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

package com.azure.resourcemanager.billingbenefits.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.billingbenefits.models.SavingsPlanSummary;
import com.azure.resourcemanager.billingbenefits.models.SavingsPlanSummaryCount;

public final class SavingsPlanSummaryTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SavingsPlanSummary model =
            BinaryData
                .fromString(
                    "{\"name\":\"wtiukbldn\",\"value\":{\"succeededCount\":64.59211,\"failedCount\":96.508446,\"expiringCount\":62.192535,\"expiredCount\":65.49128,\"pendingCount\":4.9401464,\"cancelledCount\":99.802826,\"processingCount\":20.08384,\"noBenefitCount\":53.660904,\"warningCount\":14.958477}}")
                .toObject(SavingsPlanSummary.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SavingsPlanSummary model = new SavingsPlanSummary().withValue(new SavingsPlanSummaryCount());
        model = BinaryData.fromObject(model).toObject(SavingsPlanSummary.class);
    }
}
