// 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.AutoscaleCapacity;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class AutoscaleCapacityTests {
    @Test
    public void testDeserialize() {
        AutoscaleCapacity model =
            BinaryData
                .fromString("{\"minInstanceCount\":253386723,\"maxInstanceCount\":1248526317}")
                .toObject(AutoscaleCapacity.class);
        Assertions.assertEquals(253386723, model.minInstanceCount());
        Assertions.assertEquals(1248526317, model.maxInstanceCount());
    }

    @Test
    public void testSerialize() {
        AutoscaleCapacity model =
            new AutoscaleCapacity().withMinInstanceCount(253386723).withMaxInstanceCount(1248526317);
        model = BinaryData.fromObject(model).toObject(AutoscaleCapacity.class);
        Assertions.assertEquals(253386723, model.minInstanceCount());
        Assertions.assertEquals(1248526317, model.maxInstanceCount());
    }
}
