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

public final class AutoscaleTimeAndCapacityTests {
    @Test
    public void testDeserialize() {
        AutoscaleTimeAndCapacity model =
            BinaryData
                .fromString("{\"time\":\"ckbasyypndd\",\"minInstanceCount\":1048772360,\"maxInstanceCount\":248766473}")
                .toObject(AutoscaleTimeAndCapacity.class);
        Assertions.assertEquals("ckbasyypndd", model.time());
        Assertions.assertEquals(1048772360, model.minInstanceCount());
        Assertions.assertEquals(248766473, model.maxInstanceCount());
    }

    @Test
    public void testSerialize() {
        AutoscaleTimeAndCapacity model =
            new AutoscaleTimeAndCapacity()
                .withTime("ckbasyypndd")
                .withMinInstanceCount(1048772360)
                .withMaxInstanceCount(248766473);
        model = BinaryData.fromObject(model).toObject(AutoscaleTimeAndCapacity.class);
        Assertions.assertEquals("ckbasyypndd", model.time());
        Assertions.assertEquals(1048772360, model.minInstanceCount());
        Assertions.assertEquals(248766473, model.maxInstanceCount());
    }
}
