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

package com.azure.resourcemanager.billing.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.billing.fluent.models.ReservationProperty;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ReservationPropertyTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ReservationProperty model =
            BinaryData
                .fromString(
                    "{\"appliedScopes\":[\"gxobfirclnp\",\"ciayzriykhya\",\"fvjlboxqvkjlmx\"],\"appliedScopeType\":\"mdy\",\"reservedResourceType\":\"dwdigumb\",\"quantity\":79.26031,\"provisioningState\":\"uzzptjazysdz\",\"expiryDate\":\"zwwva\",\"provisioningSubState\":\"yuvvfonkp\",\"displayName\":\"qyikvy\",\"displayProvisioningState\":\"uyav\",\"userFriendlyRenewState\":\"wmn\",\"userFriendlyAppliedScopeType\":\"ttijfybvpoekrs\",\"effectiveDateTime\":\"gbdhuzqgnjdg\",\"skuDescription\":\"nscliqhzvhxnk\",\"term\":\"tkubotppn\",\"renew\":false,\"renewSource\":\"xhihfrbbcevqagtl\",\"utilization\":{\"trend\":\"lfkqojpy\",\"aggregates\":[{\"grain\":71.06859,\"grainUnit\":\"cnifm\",\"value\":42.886497,\"valueUnit\":\"ymbrnysuxmpraf\"}]}}")
                .toObject(ReservationProperty.class);
        Assertions.assertEquals("gxobfirclnp", model.appliedScopes().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ReservationProperty model =
            new ReservationProperty().withAppliedScopes(Arrays.asList("gxobfirclnp", "ciayzriykhya", "fvjlboxqvkjlmx"));
        model = BinaryData.fromObject(model).toObject(ReservationProperty.class);
        Assertions.assertEquals("gxobfirclnp", model.appliedScopes().get(0));
    }
}
