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

package com.azure.resourcemanager.peering.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.peering.fluent.models.OperationInner;
import com.azure.resourcemanager.peering.models.OperationListResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class OperationListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OperationListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"name\":\"dkirsoodqxhcr\",\"display\":{\"provider\":\"hjtckwhd\",\"resource\":\"ifiyipjxsqwpgrj\",\"operation\":\"norcjxvsnbyxqab\",\"description\":\"ocpcy\"},\"isDataAction\":false}],\"nextLink\":\"zafb\"}")
                .toObject(OperationListResult.class);
        Assertions.assertEquals("zafb", model.nextLink());
    }

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