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

package com.azure.resourcemanager.hdinsight.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hdinsight.models.RegionalQuotaCapability;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class RegionalQuotaCapabilityTests {
    @Test
    public void testDeserialize() {
        RegionalQuotaCapability model =
            BinaryData
                .fromString(
                    "{\"regionName\":\"nozj\",\"coresUsed\":1906816553325698286,\"coresAvailable\":6944179335245488017}")
                .toObject(RegionalQuotaCapability.class);
        Assertions.assertEquals("nozj", model.regionName());
        Assertions.assertEquals(1906816553325698286L, model.coresUsed());
        Assertions.assertEquals(6944179335245488017L, model.coresAvailable());
    }

    @Test
    public void testSerialize() {
        RegionalQuotaCapability model =
            new RegionalQuotaCapability()
                .withRegionName("nozj")
                .withCoresUsed(1906816553325698286L)
                .withCoresAvailable(6944179335245488017L);
        model = BinaryData.fromObject(model).toObject(RegionalQuotaCapability.class);
        Assertions.assertEquals("nozj", model.regionName());
        Assertions.assertEquals(1906816553325698286L, model.coresUsed());
        Assertions.assertEquals(6944179335245488017L, model.coresAvailable());
    }
}
