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

package com.azure.resourcemanager.avs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.avs.fluent.models.ClusterUpdateProperties;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ClusterUpdatePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ClusterUpdateProperties model =
            BinaryData
                .fromString(
                    "{\"clusterSize\":1558612469,\"hosts\":[\"gzfbishcbk\",\"ajdeyeamdphaga\",\"pbuxwgipwhon\"]}")
                .toObject(ClusterUpdateProperties.class);
        Assertions.assertEquals(1558612469, model.clusterSize());
        Assertions.assertEquals("gzfbishcbk", model.hosts().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ClusterUpdateProperties model =
            new ClusterUpdateProperties()
                .withClusterSize(1558612469)
                .withHosts(Arrays.asList("gzfbishcbk", "ajdeyeamdphaga", "pbuxwgipwhon"));
        model = BinaryData.fromObject(model).toObject(ClusterUpdateProperties.class);
        Assertions.assertEquals(1558612469, model.clusterSize());
        Assertions.assertEquals("gzfbishcbk", model.hosts().get(0));
    }
}
