// 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.PrivateLinkResourceInner;
import com.azure.resourcemanager.batch.models.ListPrivateLinkResourcesResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class ListPrivateLinkResourcesResultTests {
    @Test
    public void testDeserialize() {
        ListPrivateLinkResourcesResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"groupId\":\"hfnljkyq\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"etag\":\"ujqgidok\",\"id\":\"jljyoxgv\",\"name\":\"ltbgsncghkj\",\"type\":\"szzhbijhtxfvgxbf\"}],\"nextLink\":\"xnehmpvec\"}")
                .toObject(ListPrivateLinkResourcesResult.class);
        Assertions.assertEquals("xnehmpvec", model.nextLink());
    }

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