// 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;
import org.junit.jupiter.api.Test;

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

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