// 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.DiskExclusionProperties;
import com.azure.resourcemanager.recoveryservicesbackup.models.ExtendedProperties;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ExtendedPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ExtendedProperties model =
            BinaryData
                .fromString(
                    "{\"diskExclusionProperties\":{\"diskLunList\":[1699726584],\"isInclusionList\":true},\"linuxVmApplicationName\":\"kulfg\"}")
                .toObject(ExtendedProperties.class);
        Assertions.assertEquals(1699726584, model.diskExclusionProperties().diskLunList().get(0));
        Assertions.assertEquals(true, model.diskExclusionProperties().isInclusionList());
        Assertions.assertEquals("kulfg", model.linuxVmApplicationName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ExtendedProperties model =
            new ExtendedProperties()
                .withDiskExclusionProperties(
                    new DiskExclusionProperties().withDiskLunList(Arrays.asList(1699726584)).withIsInclusionList(true))
                .withLinuxVmApplicationName("kulfg");
        model = BinaryData.fromObject(model).toObject(ExtendedProperties.class);
        Assertions.assertEquals(1699726584, model.diskExclusionProperties().diskLunList().get(0));
        Assertions.assertEquals(true, model.diskExclusionProperties().isInclusionList());
        Assertions.assertEquals("kulfg", model.linuxVmApplicationName());
    }
}
