// 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.AzureVMAppContainerProtectableContainer;
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType;
import org.junit.jupiter.api.Assertions;

public final class AzureVMAppContainerProtectableContainerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AzureVMAppContainerProtectableContainer model =
            BinaryData
                .fromString(
                    "{\"protectableContainerType\":\"VMAppContainer\",\"friendlyName\":\"fbvfbhdy\",\"backupManagementType\":\"AzureWorkload\",\"healthStatus\":\"wpg\",\"containerId\":\"eimawzovgkkumui\"}")
                .toObject(AzureVMAppContainerProtectableContainer.class);
        Assertions.assertEquals("fbvfbhdy", model.friendlyName());
        Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType());
        Assertions.assertEquals("wpg", model.healthStatus());
        Assertions.assertEquals("eimawzovgkkumui", model.containerId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AzureVMAppContainerProtectableContainer model =
            new AzureVMAppContainerProtectableContainer()
                .withFriendlyName("fbvfbhdy")
                .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD)
                .withHealthStatus("wpg")
                .withContainerId("eimawzovgkkumui");
        model = BinaryData.fromObject(model).toObject(AzureVMAppContainerProtectableContainer.class);
        Assertions.assertEquals("fbvfbhdy", model.friendlyName());
        Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType());
        Assertions.assertEquals("wpg", model.healthStatus());
        Assertions.assertEquals("eimawzovgkkumui", model.containerId());
    }
}
