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

package com.azure.resourcemanager.peering.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.peering.fluent.models.PeeringServiceCountryInner;
import com.azure.resourcemanager.peering.models.PeeringServiceCountryListResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class PeeringServiceCountryListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PeeringServiceCountryListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"id\":\"cmgyud\",\"name\":\"ytlmoyrxvwfud\",\"type\":\"pz\"}],\"nextLink\":\"xhdzhlrqjbhckf\"}")
                .toObject(PeeringServiceCountryListResult.class);
        Assertions.assertEquals("xhdzhlrqjbhckf", model.nextLink());
    }

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