// 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.Utilization;
import com.azure.resourcemanager.billingbenefits.models.UtilizationAggregates;
import java.util.Arrays;

public final class UtilizationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Utilization model =
            BinaryData
                .fromString(
                    "{\"trend\":\"rxnjeaseipheofl\",\"aggregates\":[{\"grain\":2.7443767,\"grainUnit\":\"enjbdlwtgrhp\",\"value\":10.934221,\"valueUnit\":\"umasxazjpq\"}]}")
                .toObject(Utilization.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Utilization model = new Utilization().withAggregates(Arrays.asList(new UtilizationAggregates()));
        model = BinaryData.fromObject(model).toObject(Utilization.class);
    }
}
