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

package com.azure.resourcemanager.costmanagement.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.costmanagement.models.BenefitKind;
import com.azure.resourcemanager.costmanagement.models.IncludedQuantityUtilizationSummary;
import org.junit.jupiter.api.Assertions;

public final class IncludedQuantityUtilizationSummaryTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        IncludedQuantityUtilizationSummary model =
            BinaryData
                .fromString(
                    "{\"kind\":\"IncludedQuantity\",\"properties\":{\"armSkuName\":\"wgioilqukry\",\"benefitId\":\"tqmieox\",\"benefitOrderId\":\"ggufhyaomtb\",\"benefitType\":\"SavingsPlan\",\"usageDate\":\"2021-08-09T18:48:52Z\"},\"id\":\"grvk\",\"name\":\"fo\",\"type\":\"jzhpjbibgjmfx\"}")
                .toObject(IncludedQuantityUtilizationSummary.class);
        Assertions.assertEquals(BenefitKind.SAVINGS_PLAN, model.benefitType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        IncludedQuantityUtilizationSummary model =
            new IncludedQuantityUtilizationSummary().withBenefitType(BenefitKind.SAVINGS_PLAN);
        model = BinaryData.fromObject(model).toObject(IncludedQuantityUtilizationSummary.class);
        Assertions.assertEquals(BenefitKind.SAVINGS_PLAN, model.benefitType());
    }
}
