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

public final class WorkloadNetworkVMGroupInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkloadNetworkVMGroupInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"displayName\":\"buruvd\",\"members\":[\"s\",\"zlxwabmqoefkifr\",\"tpuqujmq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":2719047035031836575},\"id\":\"oaongbjc\",\"name\":\"tujitcjedft\",\"type\":\"waezkojvd\"}")
                .toObject(WorkloadNetworkVMGroupInner.class);
        Assertions.assertEquals("buruvd", model.displayName());
        Assertions.assertEquals("s", model.members().get(0));
        Assertions.assertEquals(2719047035031836575L, model.revision());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WorkloadNetworkVMGroupInner model =
            new WorkloadNetworkVMGroupInner()
                .withDisplayName("buruvd")
                .withMembers(Arrays.asList("s", "zlxwabmqoefkifr", "tpuqujmq"))
                .withRevision(2719047035031836575L);
        model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupInner.class);
        Assertions.assertEquals("buruvd", model.displayName());
        Assertions.assertEquals("s", model.members().get(0));
        Assertions.assertEquals(2719047035031836575L, model.revision());
    }
}
