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

public final class CommitmentCostTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CommitmentCost model =
            BinaryData
                .fromString("{\"commitmentMeterId\":\"dmoizpostmg\",\"overageMeterId\":\"fbunrmfqjhhk\"}")
                .toObject(CommitmentCost.class);
        Assertions.assertEquals("dmoizpostmg", model.commitmentMeterId());
        Assertions.assertEquals("fbunrmfqjhhk", model.overageMeterId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CommitmentCost model =
            new CommitmentCost().withCommitmentMeterId("dmoizpostmg").withOverageMeterId("fbunrmfqjhhk");
        model = BinaryData.fromObject(model).toObject(CommitmentCost.class);
        Assertions.assertEquals("dmoizpostmg", model.commitmentMeterId());
        Assertions.assertEquals("fbunrmfqjhhk", model.overageMeterId());
    }
}
