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

package com.azure.resourcemanager.netapp.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.netapp.models.VolumeBackups;
import org.junit.jupiter.api.Assertions;

public final class VolumeBackupsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        VolumeBackups model =
            BinaryData
                .fromString("{\"volumeName\":\"vdkcrodtj\",\"backupsCount\":321367930,\"policyEnabled\":true}")
                .toObject(VolumeBackups.class);
        Assertions.assertEquals("vdkcrodtj", model.volumeName());
        Assertions.assertEquals(321367930, model.backupsCount());
        Assertions.assertEquals(true, model.policyEnabled());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        VolumeBackups model =
            new VolumeBackups().withVolumeName("vdkcrodtj").withBackupsCount(321367930).withPolicyEnabled(true);
        model = BinaryData.fromObject(model).toObject(VolumeBackups.class);
        Assertions.assertEquals("vdkcrodtj", model.volumeName());
        Assertions.assertEquals(321367930, model.backupsCount());
        Assertions.assertEquals(true, model.policyEnabled());
    }
}
