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

package com.azure.resourcemanager.deviceupdate.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.deviceupdate.models.GroupConnectivityInformation;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class GroupConnectivityInformationTests {
    @Test
    public void testDeserialize() {
        GroupConnectivityInformation model =
            BinaryData
                .fromString(
                    "{\"groupId\":\"dauwhvylwzbtd\",\"memberName\":\"ujznb\",\"customerVisibleFqdns\":[\"wuwprzqlv\"],\"internalFqdn\":\"alupjm\",\"redirectMapId\":\"fxobbcsws\",\"privateLinkServiceArmRegion\":\"jriplrbpbewtghf\"}")
                .toObject(GroupConnectivityInformation.class);
        Assertions.assertEquals("wuwprzqlv", model.customerVisibleFqdns().get(0));
        Assertions.assertEquals("fxobbcsws", model.redirectMapId());
        Assertions.assertEquals("jriplrbpbewtghf", model.privateLinkServiceArmRegion());
    }

    @Test
    public void testSerialize() {
        GroupConnectivityInformation model =
            new GroupConnectivityInformation()
                .withCustomerVisibleFqdns(Arrays.asList("wuwprzqlv"))
                .withRedirectMapId("fxobbcsws")
                .withPrivateLinkServiceArmRegion("jriplrbpbewtghf");
        model = BinaryData.fromObject(model).toObject(GroupConnectivityInformation.class);
        Assertions.assertEquals("wuwprzqlv", model.customerVisibleFqdns().get(0));
        Assertions.assertEquals("fxobbcsws", model.redirectMapId());
        Assertions.assertEquals("jriplrbpbewtghf", model.privateLinkServiceArmRegion());
    }
}
