// 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.models.ClusterUpdate;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ClusterUpdateTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ClusterUpdate model =
            BinaryData
                .fromString("{\"properties\":{\"clusterSize\":1715507551,\"hosts\":[\"qzcjrvxdj\",\"lmwlxkvugfhzo\"]}}")
                .toObject(ClusterUpdate.class);
        Assertions.assertEquals(1715507551, model.clusterSize());
        Assertions.assertEquals("qzcjrvxdj", model.hosts().get(0));
    }

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