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

package com.azure.resourcemanager.recoveryservicesbackup.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSClassicComputeVMContainer;
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType;
import org.junit.jupiter.api.Assertions;

public final class AzureIaaSClassicComputeVMContainerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AzureIaaSClassicComputeVMContainer model =
            BinaryData
                .fromString(
                    "{\"containerType\":\"Microsoft.ClassicCompute/virtualMachines\",\"virtualMachineId\":\"k\",\"virtualMachineVersion\":\"aimmoiroqb\",\"resourceGroup\":\"hbragapyyr\",\"friendlyName\":\"svbpavbopfppdbwn\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"hxkumasjcaacfdmm\",\"healthStatus\":\"ugmehqepvufhbze\",\"protectableObjectType\":\"whoqhnlbqnbldxe\"}")
                .toObject(AzureIaaSClassicComputeVMContainer.class);
        Assertions.assertEquals("svbpavbopfppdbwn", model.friendlyName());
        Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType());
        Assertions.assertEquals("hxkumasjcaacfdmm", model.registrationStatus());
        Assertions.assertEquals("ugmehqepvufhbze", model.healthStatus());
        Assertions.assertEquals("whoqhnlbqnbldxe", model.protectableObjectType());
        Assertions.assertEquals("k", model.virtualMachineId());
        Assertions.assertEquals("aimmoiroqb", model.virtualMachineVersion());
        Assertions.assertEquals("hbragapyyr", model.resourceGroup());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AzureIaaSClassicComputeVMContainer model =
            new AzureIaaSClassicComputeVMContainer()
                .withFriendlyName("svbpavbopfppdbwn")
                .withBackupManagementType(BackupManagementType.DEFAULT_BACKUP)
                .withRegistrationStatus("hxkumasjcaacfdmm")
                .withHealthStatus("ugmehqepvufhbze")
                .withProtectableObjectType("whoqhnlbqnbldxe")
                .withVirtualMachineId("k")
                .withVirtualMachineVersion("aimmoiroqb")
                .withResourceGroup("hbragapyyr");
        model = BinaryData.fromObject(model).toObject(AzureIaaSClassicComputeVMContainer.class);
        Assertions.assertEquals("svbpavbopfppdbwn", model.friendlyName());
        Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType());
        Assertions.assertEquals("hxkumasjcaacfdmm", model.registrationStatus());
        Assertions.assertEquals("ugmehqepvufhbze", model.healthStatus());
        Assertions.assertEquals("whoqhnlbqnbldxe", model.protectableObjectType());
        Assertions.assertEquals("k", model.virtualMachineId());
        Assertions.assertEquals("aimmoiroqb", model.virtualMachineVersion());
        Assertions.assertEquals("hbragapyyr", model.resourceGroup());
    }
}
