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

package com.azure.resourcemanager.vmwarecloudsimple.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.vmwarecloudsimple.models.UsageListResponse;
import org.junit.jupiter.api.Assertions;

public final class UsageListResponseTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UsageListResponse model =
            BinaryData
                .fromString(
                    "{\"nextLink\":\"hairsbrgzdwms\",\"value\":[{\"currentValue\":827255205,\"limit\":151812446,\"name\":{\"localizedValue\":\"xggicccnxqhuexmk\",\"value\":\"lstvlzywe\"},\"unit\":\"Bytes\"},{\"currentValue\":218184123,\"limit\":955341099,\"name\":{\"localizedValue\":\"dtclusiypb\",\"value\":\"gytguslfead\"},\"unit\":\"CountPerSecond\"},{\"currentValue\":317244500,\"limit\":448514309,\"name\":{\"localizedValue\":\"hejhzisx\",\"value\":\"pelol\"},\"unit\":\"BytesPerSecond\"}]}")
                .toObject(UsageListResponse.class);
        Assertions.assertEquals("hairsbrgzdwms", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        UsageListResponse model = new UsageListResponse().withNextLink("hairsbrgzdwms");
        model = BinaryData.fromObject(model).toObject(UsageListResponse.class);
        Assertions.assertEquals("hairsbrgzdwms", model.nextLink());
    }
}
