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

package com.azure.resourcemanager.storagecache.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storagecache.models.AmlFilesystemUpdatePropertiesMaintenanceWindow;
import com.azure.resourcemanager.storagecache.models.MaintenanceDayOfWeekType;
import org.junit.jupiter.api.Assertions;

public final class AmlFilesystemUpdatePropertiesMaintenanceWindowTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AmlFilesystemUpdatePropertiesMaintenanceWindow model =
            BinaryData
                .fromString("{\"dayOfWeek\":\"Monday\",\"timeOfDayUTC\":\"xdcu\"}")
                .toObject(AmlFilesystemUpdatePropertiesMaintenanceWindow.class);
        Assertions.assertEquals(MaintenanceDayOfWeekType.MONDAY, model.dayOfWeek());
        Assertions.assertEquals("xdcu", model.timeOfDayUtc());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AmlFilesystemUpdatePropertiesMaintenanceWindow model =
            new AmlFilesystemUpdatePropertiesMaintenanceWindow()
                .withDayOfWeek(MaintenanceDayOfWeekType.MONDAY)
                .withTimeOfDayUtc("xdcu");
        model = BinaryData.fromObject(model).toObject(AmlFilesystemUpdatePropertiesMaintenanceWindow.class);
        Assertions.assertEquals(MaintenanceDayOfWeekType.MONDAY, model.dayOfWeek());
        Assertions.assertEquals("xdcu", model.timeOfDayUtc());
    }
}
