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

package com.azure.resourcemanager.iothub.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.iothub.fluent.models.IotHubQuotaMetricInfoInner;
import com.azure.resourcemanager.iothub.models.IotHubQuotaMetricInfoListResult;
import java.util.Arrays;

public final class IotHubQuotaMetricInfoListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        IotHubQuotaMetricInfoListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"name\":\"vlvqhjkbegi\",\"currentValue\":7757966335492850327,\"maxValue\":8168827985153452849},{\"name\":\"wwaloayqcgwrt\",\"currentValue\":1503893081288679809,\"maxValue\":203566108787836432},{\"name\":\"mhtxongmtsavjcb\",\"currentValue\":4203274454921698643,\"maxValue\":273530932074575825},{\"name\":\"nftguvriuhpr\",\"currentValue\":4550073852873606939,\"maxValue\":2697266994096414506}],\"nextLink\":\"ayriwwroyqbexrm\"}")
                .toObject(IotHubQuotaMetricInfoListResult.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        IotHubQuotaMetricInfoListResult model =
            new IotHubQuotaMetricInfoListResult()
                .withValue(
                    Arrays
                        .asList(
                            new IotHubQuotaMetricInfoInner(),
                            new IotHubQuotaMetricInfoInner(),
                            new IotHubQuotaMetricInfoInner(),
                            new IotHubQuotaMetricInfoInner()));
        model = BinaryData.fromObject(model).toObject(IotHubQuotaMetricInfoListResult.class);
    }
}
