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

package com.azure.resourcemanager.hdinsight.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hdinsight.fluent.models.PrivateLinkResourceInner;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class PrivateLinkResourceInnerTests {
    @Test
    public void testDeserialize() {
        PrivateLinkResourceInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"groupId\":\"tx\",\"requiredMembers\":[\"ukxit\",\"m\",\"tg\",\"qqxhrnxrxcpj\"],\"requiredZoneNames\":[\"av\",\"k\",\"dzf\"]},\"id\":\"zivj\",\"name\":\"frqttbajlkatnw\",\"type\":\"yiopi\"}")
                .toObject(PrivateLinkResourceInner.class);
        Assertions.assertEquals("av", model.requiredZoneNames().get(0));
    }

    @Test
    public void testSerialize() {
        PrivateLinkResourceInner model =
            new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("av", "k", "dzf"));
        model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class);
        Assertions.assertEquals("av", model.requiredZoneNames().get(0));
    }
}
