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

public final class PrivateLinkServiceConnectionTests {
    @Test
    public void testDeserialize() {
        PrivateLinkServiceConnection model =
            BinaryData
                .fromString("{\"name\":\"suyonobglaocq\",\"groupIds\":[\"cmgyud\"],\"requestMessage\":\"tlmoyrx\"}")
                .toObject(PrivateLinkServiceConnection.class);
        Assertions.assertEquals("suyonobglaocq", model.name());
        Assertions.assertEquals("cmgyud", model.groupIds().get(0));
        Assertions.assertEquals("tlmoyrx", model.requestMessage());
    }

    @Test
    public void testSerialize() {
        PrivateLinkServiceConnection model =
            new PrivateLinkServiceConnection()
                .withName("suyonobglaocq")
                .withGroupIds(Arrays.asList("cmgyud"))
                .withRequestMessage("tlmoyrx");
        model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnection.class);
        Assertions.assertEquals("suyonobglaocq", model.name());
        Assertions.assertEquals("cmgyud", model.groupIds().get(0));
        Assertions.assertEquals("tlmoyrx", model.requestMessage());
    }
}
