// 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.ReservationInner;
import com.azure.resourcemanager.billing.models.ReservationSkuProperty;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ReservationInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ReservationInner model =
            BinaryData
                .fromString(
                    "{\"id\":\"vdwxfzwi\",\"name\":\"wzjbh\",\"type\":\"sxjrk\",\"location\":\"btrnegvm\",\"sku\":{\"name\":\"q\"},\"properties\":{\"appliedScopes\":[\"dspastjbkkdmfl\"],\"appliedScopeType\":\"stmjlxrri\",\"reservedResourceType\":\"zapeewchpx\",\"quantity\":51.30364,\"provisioningState\":\"kuziycsle\",\"expiryDate\":\"f\",\"provisioningSubState\":\"tcktyhjtqedcgzu\",\"displayName\":\"mmrqz\",\"displayProvisioningState\":\"rjvpglydzgkrvqee\",\"userFriendlyRenewState\":\"oepry\",\"userFriendlyAppliedScopeType\":\"nwy\",\"effectiveDateTime\":\"zdmovzv\",\"skuDescription\":\"aawzqadfl\",\"term\":\"ur\",\"renew\":true,\"renewSource\":\"ecxn\",\"utilization\":{\"trend\":\"cokpv\",\"aggregates\":[]}}}")
                .toObject(ReservationInner.class);
        Assertions.assertEquals("dspastjbkkdmfl", model.appliedScopes().get(0));
    }

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