// 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.CommitmentPlanAssociation;
import org.junit.jupiter.api.Assertions;

public final class CommitmentPlanAssociationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CommitmentPlanAssociation model =
            BinaryData
                .fromString("{\"commitmentPlanId\":\"l\",\"commitmentPlanLocation\":\"uvfqawrlyxwj\"}")
                .toObject(CommitmentPlanAssociation.class);
        Assertions.assertEquals("l", model.commitmentPlanId());
        Assertions.assertEquals("uvfqawrlyxwj", model.commitmentPlanLocation());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CommitmentPlanAssociation model =
            new CommitmentPlanAssociation().withCommitmentPlanId("l").withCommitmentPlanLocation("uvfqawrlyxwj");
        model = BinaryData.fromObject(model).toObject(CommitmentPlanAssociation.class);
        Assertions.assertEquals("l", model.commitmentPlanId());
        Assertions.assertEquals("uvfqawrlyxwj", model.commitmentPlanLocation());
    }
}
