// 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.models.ReservationSummary;
import com.azure.resourcemanager.billing.models.ReservationsListResult;

public final class ReservationsListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ReservationsListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"id\":\"ox\",\"name\":\"dufiq\",\"type\":\"ieuzaofjchvcyyy\",\"location\":\"gdotcubiipuipwo\",\"sku\":{\"name\":\"macjekn\"},\"properties\":{\"appliedScopes\":[],\"appliedScopeType\":\"qvci\",\"reservedResourceType\":\"ev\",\"quantity\":66.675064,\"provisioningState\":\"lrri\",\"expiryDate\":\"ywdxsmic\",\"provisioningSubState\":\"rwfscjfnynszquj\",\"displayName\":\"dvoqyt\",\"displayProvisioningState\":\"yo\",\"userFriendlyRenewState\":\"blgyavutpthj\",\"userFriendlyAppliedScopeType\":\"oismsksbpimlqol\",\"effectiveDateTime\":\"kcgxxlxsffgcvi\",\"skuDescription\":\"zdwlvwlyoupfgfb\",\"term\":\"ubdyhgk\",\"renew\":false,\"renewSource\":\"sgow\"}},{\"id\":\"tsttktlahbq\",\"name\":\"tx\",\"type\":\"zukxitmmqtgqq\",\"location\":\"hrnxrxc\",\"sku\":{\"name\":\"isavok\"},\"properties\":{\"appliedScopes\":[],\"appliedScopeType\":\"vazivjlfr\",\"reservedResourceType\":\"tbajlkatn\",\"quantity\":27.220089,\"provisioningState\":\"opidkqqfkuv\",\"expiryDate\":\"xkdmligo\",\"provisioningSubState\":\"brxk\",\"displayName\":\"loazuruocbgoo\",\"displayProvisioningState\":\"te\",\"userFriendlyRenewState\":\"bfhjxakvvjgsl\",\"userFriendlyAppliedScopeType\":\"dilmyww\",\"effectiveDateTime\":\"gkxnyedabg\",\"skuDescription\":\"udtjuewbc\",\"term\":\"xuuwhcj\",\"renew\":false,\"renewSource\":\"ybvpay\"}},{\"id\":\"udzpxgwjplmagstc\",\"name\":\"hpfkyrkdbdgi\",\"type\":\"sjkmnwqj\",\"location\":\"baiyhddviaceg\",\"sku\":{\"name\":\"ntfpmvmemfnc\"},\"properties\":{\"appliedScopes\":[],\"appliedScopeType\":\"vbalxlllc\",\"reservedResourceType\":\"odbzevwrdnhf\",\"quantity\":22.404224,\"provisioningState\":\"sjcswsmystuluqyp\",\"expiryDate\":\"vlerchpqbmfpjba\",\"provisioningSubState\":\"idfcxsspuunnoxyh\",\"displayName\":\"g\",\"displayProvisioningState\":\"drihpfhoqcaaewda\",\"userFriendlyRenewState\":\"djvlpj\",\"userFriendlyAppliedScopeType\":\"kzbrmsgeivsiy\",\"effectiveDateTime\":\"kdncj\",\"skuDescription\":\"onbzoggculapzwy\",\"term\":\"gogtqxepnylbf\",\"renew\":true,\"renewSource\":\"yjt\"}}],\"nextLink\":\"fqzhv\",\"summary\":{\"succeededCount\":53.406746,\"failedCount\":13.140678,\"expiringCount\":70.9251,\"expiredCount\":36.47178,\"pendingCount\":75.72936,\"cancelledCount\":24.269749}}")
                .toObject(ReservationsListResult.class);
    }

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