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

package com.azure.resourcemanager.managednetworkfabric.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacesList;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class NetworkInterfacesListTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        NetworkInterfacesList model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"physicalIdentifier\":\"mxtd\",\"administrativeState\":\"Disabled\",\"provisioningState\":\"Updating\",\"connectedTo\":\"coebjvewzcj\",\"interfaceType\":\"Management\",\"ipv4Address\":\"cpmguaadraufact\",\"ipv6Address\":\"hzovaj\",\"annotation\":\"iuxxpshneekulfg\"},\"id\":\"qubkw\",\"name\":\"lenrd\",\"type\":\"utujba\"},{\"properties\":{\"physicalIdentifier\":\"juohminyflnorw\",\"administrativeState\":\"Disabled\",\"provisioningState\":\"Deleting\",\"connectedTo\":\"klvxwmyg\",\"interfaceType\":\"Data\",\"ipv4Address\":\"pqchiszep\",\"ipv6Address\":\"bjcrxgibbdaxco\",\"annotation\":\"ozauorsukokwb\"},\"id\":\"lhlv\",\"name\":\"uuepzlrphwzsoldw\",\"type\":\"yuqdu\"},{\"properties\":{\"physicalIdentifier\":\"mnnrwr\",\"administrativeState\":\"Enabled\",\"provisioningState\":\"Canceled\",\"connectedTo\":\"alywjhhgdn\",\"interfaceType\":\"Management\",\"ipv4Address\":\"ivfomiloxgg\",\"ipv6Address\":\"fi\",\"annotation\":\"dieuzaofj\"},\"id\":\"vcyy\",\"name\":\"s\",\"type\":\"gdotcubiipuipwo\"}],\"nextLink\":\"nmacj\"}")
                .toObject(NetworkInterfacesList.class);
        Assertions.assertEquals("iuxxpshneekulfg", model.value().get(0).annotation());
        Assertions.assertEquals("nmacj", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        NetworkInterfacesList model =
            new NetworkInterfacesList()
                .withValue(
                    Arrays
                        .asList(
                            new NetworkInterfaceInner().withAnnotation("iuxxpshneekulfg"),
                            new NetworkInterfaceInner().withAnnotation("ozauorsukokwb"),
                            new NetworkInterfaceInner().withAnnotation("dieuzaofj")))
                .withNextLink("nmacj");
        model = BinaryData.fromObject(model).toObject(NetworkInterfacesList.class);
        Assertions.assertEquals("iuxxpshneekulfg", model.value().get(0).annotation());
        Assertions.assertEquals("nmacj", model.nextLink());
    }
}
