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

package com.azure.resourcemanager.cognitiveservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.cognitiveservices.models.CommitmentPlanAccountAssociationListResult;
import org.junit.jupiter.api.Assertions;

public final class CommitmentPlanAccountAssociationListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CommitmentPlanAccountAssociationListResult model =
            BinaryData
                .fromString(
                    "{\"nextLink\":\"eburu\",\"value\":[{\"etag\":\"s\",\"properties\":{\"accountId\":\"xwabmqoe\"},\"id\":\"kif\",\"name\":\"vtpuqujmqlgk\",\"type\":\"btndo\"},{\"etag\":\"gbjcntujitcjed\",\"properties\":{\"accountId\":\"waezkojvd\"},\"id\":\"pzfoqoui\",\"name\":\"ybxarzgszu\",\"type\":\"oxciqopidoamcio\"},{\"etag\":\"haz\",\"properties\":{\"accountId\":\"nz\"},\"id\":\"onlwntoeg\",\"name\":\"kdwbwhkszz\",\"type\":\"mrv\"},{\"etag\":\"tvb\",\"properties\":{\"accountId\":\"sfraoyzko\"},\"id\":\"wtl\",\"name\":\"nguxawqaldsy\",\"type\":\"uximerqfobw\"}]}")
                .toObject(CommitmentPlanAccountAssociationListResult.class);
        Assertions.assertEquals("eburu", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CommitmentPlanAccountAssociationListResult model =
            new CommitmentPlanAccountAssociationListResult().withNextLink("eburu");
        model = BinaryData.fromObject(model).toObject(CommitmentPlanAccountAssociationListResult.class);
        Assertions.assertEquals("eburu", model.nextLink());
    }
}
