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

package com.azure.resourcemanager.hdinsight.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hdinsight.models.DiskBillingMeters;
import com.azure.resourcemanager.hdinsight.models.Tier;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class DiskBillingMetersTests {
    @Test
    public void testDeserialize() {
        DiskBillingMeters model =
            BinaryData
                .fromString("{\"diskRpMeter\":\"wpusdsttwvogv\",\"sku\":\"ejdcngqqmoakuf\",\"tier\":\"Premium\"}")
                .toObject(DiskBillingMeters.class);
        Assertions.assertEquals("wpusdsttwvogv", model.diskRpMeter());
        Assertions.assertEquals("ejdcngqqmoakuf", model.sku());
        Assertions.assertEquals(Tier.PREMIUM, model.tier());
    }

    @Test
    public void testSerialize() {
        DiskBillingMeters model =
            new DiskBillingMeters().withDiskRpMeter("wpusdsttwvogv").withSku("ejdcngqqmoakuf").withTier(Tier.PREMIUM);
        model = BinaryData.fromObject(model).toObject(DiskBillingMeters.class);
        Assertions.assertEquals("wpusdsttwvogv", model.diskRpMeter());
        Assertions.assertEquals("ejdcngqqmoakuf", model.sku());
        Assertions.assertEquals(Tier.PREMIUM, model.tier());
    }
}
