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

package com.azure.resourcemanager.avs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.avs.models.DiskPoolVolume;
import com.azure.resourcemanager.avs.models.MountOptionEnum;
import org.junit.jupiter.api.Assertions;

public final class DiskPoolVolumeTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DiskPoolVolume model =
            BinaryData
                .fromString(
                    "{\"targetId\":\"y\",\"lunName\":\"hibnuqqkpika\",\"mountOption\":\"ATTACH\",\"path\":\"tqagnbuynh\"}")
                .toObject(DiskPoolVolume.class);
        Assertions.assertEquals("y", model.targetId());
        Assertions.assertEquals("hibnuqqkpika", model.lunName());
        Assertions.assertEquals(MountOptionEnum.ATTACH, model.mountOption());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DiskPoolVolume model =
            new DiskPoolVolume().withTargetId("y").withLunName("hibnuqqkpika").withMountOption(MountOptionEnum.ATTACH);
        model = BinaryData.fromObject(model).toObject(DiskPoolVolume.class);
        Assertions.assertEquals("y", model.targetId());
        Assertions.assertEquals("hibnuqqkpika", model.lunName());
        Assertions.assertEquals(MountOptionEnum.ATTACH, model.mountOption());
    }
}
