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

package com.azure.resourcemanager.iothub.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.iothub.models.GroupIdInformationProperties;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class GroupIdInformationPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        GroupIdInformationProperties model =
            BinaryData
                .fromString(
                    "{\"groupId\":\"suiizynkedyat\",\"requiredMembers\":[\"hqmibzyhwit\",\"mypyynpcdpu\",\"nzgmwznmabik\"],\"requiredZoneNames\":[\"rgjhxb\",\"dtlwwrlkd\",\"tncvokot\"]}")
                .toObject(GroupIdInformationProperties.class);
        Assertions.assertEquals("suiizynkedyat", model.groupId());
        Assertions.assertEquals("hqmibzyhwit", model.requiredMembers().get(0));
        Assertions.assertEquals("rgjhxb", model.requiredZoneNames().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        GroupIdInformationProperties model =
            new GroupIdInformationProperties()
                .withGroupId("suiizynkedyat")
                .withRequiredMembers(Arrays.asList("hqmibzyhwit", "mypyynpcdpu", "nzgmwznmabik"))
                .withRequiredZoneNames(Arrays.asList("rgjhxb", "dtlwwrlkd", "tncvokot"));
        model = BinaryData.fromObject(model).toObject(GroupIdInformationProperties.class);
        Assertions.assertEquals("suiizynkedyat", model.groupId());
        Assertions.assertEquals("hqmibzyhwit", model.requiredMembers().get(0));
        Assertions.assertEquals("rgjhxb", model.requiredZoneNames().get(0));
    }
}
