// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.paloaltonetworks.ngfw.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.FirewallStatusResourceInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.models.FirewallStatusResourceListResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class FirewallStatusResourceListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FirewallStatusResourceListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"isPanoramaManaged\":\"TRUE\",\"healthStatus\":\"YELLOW\",\"healthReason\":\"axkgx\",\"provisioningState\":\"Deleted\"},\"id\":\"pyklyhpluodpvru\",\"name\":\"dlgzibthostgkt\",\"type\":\"tvdxeclzedqb\"},{\"properties\":{\"isPanoramaManaged\":\"FALSE\",\"healthStatus\":\"GREEN\",\"healthReason\":\"plodqkdlwwqfbu\",\"provisioningState\":\"Failed\"},\"id\":\"rqjfsmlm\",\"name\":\"txhwgfws\",\"type\":\"tawc\"},{\"properties\":{\"isPanoramaManaged\":\"FALSE\",\"healthStatus\":\"RED\",\"healthReason\":\"ubskhudygoookkq\",\"provisioningState\":\"Succeeded\"},\"id\":\"leorfmluiqtqz\",\"name\":\"avyvnqqyba\",\"type\":\"yeua\"},{\"properties\":{\"isPanoramaManaged\":\"TRUE\",\"healthStatus\":\"INITIALIZING\",\"healthReason\":\"qgzsles\",\"provisioningState\":\"Succeeded\"},\"id\":\"rnntiewdjcv\",\"name\":\"quwrbehwag\",\"type\":\"hbuffkmrq\"}],\"nextLink\":\"vvhmxtdrj\"}")
                .toObject(FirewallStatusResourceListResult.class);
        Assertions.assertEquals("vvhmxtdrj", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FirewallStatusResourceListResult model =
            new FirewallStatusResourceListResult()
                .withValue(
                    Arrays
                        .asList(
                            new FirewallStatusResourceInner(),
                            new FirewallStatusResourceInner(),
                            new FirewallStatusResourceInner(),
                            new FirewallStatusResourceInner()))
                .withNextLink("vvhmxtdrj");
        model = BinaryData.fromObject(model).toObject(FirewallStatusResourceListResult.class);
        Assertions.assertEquals("vvhmxtdrj", model.nextLink());
    }
}
