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

public final class GroupInformationInnerTests {
    @Test
    public void testDeserialize() {
        GroupInformationInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"provisioningState\":\"Succeeded\",\"groupId\":\"rhcffcydd\",\"requiredMembers\":[\"jthjqkwpyei\",\"xmqci\",\"q\"],\"requiredZoneNames\":[\"hix\",\"igdtopbob\",\"og\",\"m\"]},\"id\":\"w\",\"name\":\"a\",\"type\":\"a\"}")
                .toObject(GroupInformationInner.class);
        Assertions.assertEquals("hix", model.requiredZoneNames().get(0));
    }

    @Test
    public void testSerialize() {
        GroupInformationInner model =
            new GroupInformationInner().withRequiredZoneNames(Arrays.asList("hix", "igdtopbob", "og", "m"));
        model = BinaryData.fromObject(model).toObject(GroupInformationInner.class);
        Assertions.assertEquals("hix", model.requiredZoneNames().get(0));
    }
}
