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

package com.azure.resourcemanager.batch.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.batch.models.DiffDiskPlacement;
import com.azure.resourcemanager.batch.models.DiffDiskSettings;
import org.junit.jupiter.api.Assertions;

public final class DiffDiskSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DiffDiskSettings model =
            BinaryData.fromString("{\"placement\":\"CacheDisk\"}").toObject(DiffDiskSettings.class);
        Assertions.assertEquals(DiffDiskPlacement.CACHE_DISK, model.placement());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DiffDiskSettings model = new DiffDiskSettings().withPlacement(DiffDiskPlacement.CACHE_DISK);
        model = BinaryData.fromObject(model).toObject(DiffDiskSettings.class);
        Assertions.assertEquals(DiffDiskPlacement.CACHE_DISK, model.placement());
    }
}
