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

package com.azure.resourcemanager.cognitiveservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointServiceConnectionStatus;
import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkServiceConnectionState;
import org.junit.jupiter.api.Assertions;

public final class PrivateLinkServiceConnectionStateTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PrivateLinkServiceConnectionState model =
            BinaryData
                .fromString(
                    "{\"status\":\"Rejected\",\"description\":\"uujitcjc\",\"actionsRequired\":\"zevndhkrwpdappds\"}")
                .toObject(PrivateLinkServiceConnectionState.class);
        Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status());
        Assertions.assertEquals("uujitcjc", model.description());
        Assertions.assertEquals("zevndhkrwpdappds", model.actionsRequired());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PrivateLinkServiceConnectionState model =
            new PrivateLinkServiceConnectionState()
                .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED)
                .withDescription("uujitcjc")
                .withActionsRequired("zevndhkrwpdappds");
        model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class);
        Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status());
        Assertions.assertEquals("uujitcjc", model.description());
        Assertions.assertEquals("zevndhkrwpdappds", model.actionsRequired());
    }
}
