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

package com.azure.resourcemanager.maintenance.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.maintenance.models.InputWindowsParameters;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class InputWindowsParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        InputWindowsParameters model =
            BinaryData
                .fromString(
                    "{\"kbNumbersToExclude\":[\"jumasx\"],\"kbNumbersToInclude\":[\"pqyegualhbxxh\",\"jj\"],\"classificationsToInclude\":[\"dudgwdslfhot\"],\"excludeKbsRequiringReboot\":true}")
                .toObject(InputWindowsParameters.class);
        Assertions.assertEquals("jumasx", model.kbNumbersToExclude().get(0));
        Assertions.assertEquals("pqyegualhbxxh", model.kbNumbersToInclude().get(0));
        Assertions.assertEquals("dudgwdslfhot", model.classificationsToInclude().get(0));
        Assertions.assertEquals(true, model.excludeKbsRequiringReboot());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        InputWindowsParameters model =
            new InputWindowsParameters()
                .withKbNumbersToExclude(Arrays.asList("jumasx"))
                .withKbNumbersToInclude(Arrays.asList("pqyegualhbxxh", "jj"))
                .withClassificationsToInclude(Arrays.asList("dudgwdslfhot"))
                .withExcludeKbsRequiringReboot(true);
        model = BinaryData.fromObject(model).toObject(InputWindowsParameters.class);
        Assertions.assertEquals("jumasx", model.kbNumbersToExclude().get(0));
        Assertions.assertEquals("pqyegualhbxxh", model.kbNumbersToInclude().get(0));
        Assertions.assertEquals("dudgwdslfhot", model.classificationsToInclude().get(0));
        Assertions.assertEquals(true, model.excludeKbsRequiringReboot());
    }
}
