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

public final class WorkloadNetworkVMGroupPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkloadNetworkVMGroupProperties model =
            BinaryData
                .fromString(
                    "{\"displayName\":\"zfoqouicybxar\",\"members\":[\"zuf\",\"x\",\"iqopidoamciod\",\"khazxkhnzbonlwn\"],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":8928756986200818231}")
                .toObject(WorkloadNetworkVMGroupProperties.class);
        Assertions.assertEquals("zfoqouicybxar", model.displayName());
        Assertions.assertEquals("zuf", model.members().get(0));
        Assertions.assertEquals(8928756986200818231L, model.revision());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WorkloadNetworkVMGroupProperties model =
            new WorkloadNetworkVMGroupProperties()
                .withDisplayName("zfoqouicybxar")
                .withMembers(Arrays.asList("zuf", "x", "iqopidoamciod", "khazxkhnzbonlwn"))
                .withRevision(8928756986200818231L);
        model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupProperties.class);
        Assertions.assertEquals("zfoqouicybxar", model.displayName());
        Assertions.assertEquals("zuf", model.members().get(0));
        Assertions.assertEquals(8928756986200818231L, model.revision());
    }
}
