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

package com.azure.resourcemanager.resourcemover.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.resourcemover.fluent.models.UnresolvedDependencyInner;
import com.azure.resourcemanager.resourcemover.models.UnresolvedDependencyCollection;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class UnresolvedDependencyCollectionTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UnresolvedDependencyCollection model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"count\":996013729,\"id\":\"jnxqbzvddntwn\"}],\"nextLink\":\"icbtwnpzao\",\"summaryCollection\":{\"fieldName\":\"hrhcffcyddglmjth\",\"summary\":[{\"count\":1616692109,\"item\":\"eicxmqciwqvhkhi\"}]},\"totalCount\":918544931908903685}")
                .toObject(UnresolvedDependencyCollection.class);
        Assertions.assertEquals(996013729, model.value().get(0).count());
        Assertions.assertEquals("jnxqbzvddntwn", model.value().get(0).id());
        Assertions.assertEquals("icbtwnpzao", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        UnresolvedDependencyCollection model =
            new UnresolvedDependencyCollection()
                .withValue(Arrays.asList(new UnresolvedDependencyInner().withCount(996013729).withId("jnxqbzvddntwn")))
                .withNextLink("icbtwnpzao");
        model = BinaryData.fromObject(model).toObject(UnresolvedDependencyCollection.class);
        Assertions.assertEquals(996013729, model.value().get(0).count());
        Assertions.assertEquals("jnxqbzvddntwn", model.value().get(0).id());
        Assertions.assertEquals("icbtwnpzao", model.nextLink());
    }
}
