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

package com.azure.resourcemanager.synapse.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.synapse.models.PrivateEndpoint;
import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasic;
import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState;
import org.junit.jupiter.api.Assertions;

public final class PrivateEndpointConnectionForPrivateLinkHubBasicTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PrivateEndpointConnectionForPrivateLinkHubBasic model =
            BinaryData
                .fromString(
                    "{\"id\":\"uwiqzb\",\"properties\":{\"privateEndpoint\":{\"id\":\"ovm\"},\"privateLinkServiceConnectionState\":{\"status\":\"acspkwl\",\"description\":\"dobpxjmflbvvn\",\"actionsRequired\":\"rkcciwwzjuqk\"},\"provisioningState\":\"sa\"}}")
                .toObject(PrivateEndpointConnectionForPrivateLinkHubBasic.class);
        Assertions.assertEquals("acspkwl", model.privateLinkServiceConnectionState().status());
        Assertions.assertEquals("dobpxjmflbvvn", model.privateLinkServiceConnectionState().description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PrivateEndpointConnectionForPrivateLinkHubBasic model =
            new PrivateEndpointConnectionForPrivateLinkHubBasic()
                .withPrivateEndpoint(new PrivateEndpoint())
                .withPrivateLinkServiceConnectionState(
                    new PrivateLinkServiceConnectionState().withStatus("acspkwl").withDescription("dobpxjmflbvvn"));
        model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionForPrivateLinkHubBasic.class);
        Assertions.assertEquals("acspkwl", model.privateLinkServiceConnectionState().status());
        Assertions.assertEquals("dobpxjmflbvvn", model.privateLinkServiceConnectionState().description());
    }
}
