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

package com.azure.resourcemanager.batch.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.batch.models.ListPrivateEndpointConnectionsResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class ListPrivateEndpointConnectionsResultTests {
    @Test
    public void testDeserialize() {
        ListPrivateEndpointConnectionsResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"provisioningState\":\"Cancelled\",\"groupIds\":[]},\"etag\":\"ckzywbiexzfeyue\",\"id\":\"xibxujwbhqwalm\",\"name\":\"zyoxaepdkzjan\",\"type\":\"ux\"}],\"nextLink\":\"d\"}")
                .toObject(ListPrivateEndpointConnectionsResult.class);
        Assertions.assertEquals("d", model.nextLink());
    }

    @Test
    public void testSerialize() {
        ListPrivateEndpointConnectionsResult model =
            new ListPrivateEndpointConnectionsResult()
                .withValue(Arrays.asList(new PrivateEndpointConnectionInner()))
                .withNextLink("d");
        model = BinaryData.fromObject(model).toObject(ListPrivateEndpointConnectionsResult.class);
        Assertions.assertEquals("d", model.nextLink());
    }
}
