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

package com.azure.resourcemanager.agrifood.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.agrifood.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\":\"xzbinjeputt\",\"requiredMembers\":[\"wnuzoqftiyqzrnkc\",\"vyxlwhzlsicohoqq\"],\"requiredZoneNames\":[\"lryav\",\"hheunmmqhgyx\",\"konocu\",\"oklyaxuconuq\"]},\"id\":\"fkbey\",\"name\":\"ewrmjmwvvjektc\",\"type\":\"senhwlrs\"}")
                .toObject(PrivateLinkResourceInner.class);
        Assertions.assertEquals("lryav", model.requiredZoneNames().get(0));
    }

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