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

package com.azure.resourcemanager.databricks.generated;

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

public final class GroupIdInformationInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        GroupIdInformationInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"groupId\":\"gtzxdpn\",\"requiredMembers\":[\"qwxrjfeallnw\"],\"requiredZoneNames\":[\"isnjampmngnz\",\"c\"]},\"id\":\"aqw\",\"name\":\"ochcbonqvpkvl\",\"type\":\"xnj\"}")
                .toObject(GroupIdInformationInner.class);
        Assertions.assertEquals("gtzxdpn", model.properties().groupId());
        Assertions.assertEquals("qwxrjfeallnw", model.properties().requiredMembers().get(0));
        Assertions.assertEquals("isnjampmngnz", model.properties().requiredZoneNames().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        GroupIdInformationInner model =
            new GroupIdInformationInner()
                .withProperties(
                    new GroupIdInformationProperties()
                        .withGroupId("gtzxdpn")
                        .withRequiredMembers(Arrays.asList("qwxrjfeallnw"))
                        .withRequiredZoneNames(Arrays.asList("isnjampmngnz", "c")));
        model = BinaryData.fromObject(model).toObject(GroupIdInformationInner.class);
        Assertions.assertEquals("gtzxdpn", model.properties().groupId());
        Assertions.assertEquals("qwxrjfeallnw", model.properties().requiredMembers().get(0));
        Assertions.assertEquals("isnjampmngnz", model.properties().requiredZoneNames().get(0));
    }
}
