// 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.PeeringServiceProviderInner;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class PeeringServiceProviderInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PeeringServiceProviderInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"serviceProviderName\":\"bunrmfqjhhk\",\"peeringLocations\":[\"vjymjhxxjyngud\",\"vkr\",\"swbxqz\",\"szjfauvjfdxxivet\"]},\"id\":\"t\",\"name\":\"qaqtdoqmcbxvwvxy\",\"type\":\"lqbhsf\"}")
                .toObject(PeeringServiceProviderInner.class);
        Assertions.assertEquals("bunrmfqjhhk", model.serviceProviderName());
        Assertions.assertEquals("vjymjhxxjyngud", model.peeringLocations().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PeeringServiceProviderInner model =
            new PeeringServiceProviderInner()
                .withServiceProviderName("bunrmfqjhhk")
                .withPeeringLocations(Arrays.asList("vjymjhxxjyngud", "vkr", "swbxqz", "szjfauvjfdxxivet"));
        model = BinaryData.fromObject(model).toObject(PeeringServiceProviderInner.class);
        Assertions.assertEquals("bunrmfqjhhk", model.serviceProviderName());
        Assertions.assertEquals("vjymjhxxjyngud", model.peeringLocations().get(0));
    }
}
