// 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\":\"oujmkcjhwqytj\",\"members\":[\"n\"],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":4853504646193342370},\"id\":\"ervnaenqpehi\",\"name\":\"doy\",\"type\":\"mifthnzdnd\"}")
                .toObject(WorkloadNetworkVMGroupInner.class);
        Assertions.assertEquals("oujmkcjhwqytj", model.displayName());
        Assertions.assertEquals("n", model.members().get(0));
        Assertions.assertEquals(4853504646193342370L, model.revision());
    }

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