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

package com.azure.resourcemanager.signalr.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.signalr.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.signalr.models.PrivateEndpointConnectionList;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class PrivateEndpointConnectionListTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PrivateEndpointConnectionList model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"groupIds\":[]},\"id\":\"kwobdagxtibq\",\"name\":\"xbxwa\",\"type\":\"bogqxndlkzgxhu\"}],\"nextLink\":\"plbpodxun\"}")
                .toObject(PrivateEndpointConnectionList.class);
        Assertions.assertEquals("plbpodxun", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PrivateEndpointConnectionList model =
            new PrivateEndpointConnectionList()
                .withValue(Arrays.asList(new PrivateEndpointConnectionInner()))
                .withNextLink("plbpodxun");
        model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionList.class);
        Assertions.assertEquals("plbpodxun", model.nextLink());
    }
}
