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

package com.azure.resourcemanager.security.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.security.fluent.models.RegulatoryComplianceControlProperties;
import com.azure.resourcemanager.security.models.State;
import org.junit.jupiter.api.Assertions;

public final class RegulatoryComplianceControlPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RegulatoryComplianceControlProperties model =
            BinaryData
                .fromString(
                    "{\"description\":\"wspughftqsxhqx\",\"state\":\"Skipped\",\"passedAssessments\":649615996,\"failedAssessments\":1485711526,\"skippedAssessments\":2084244471}")
                .toObject(RegulatoryComplianceControlProperties.class);
        Assertions.assertEquals(State.SKIPPED, model.state());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RegulatoryComplianceControlProperties model =
            new RegulatoryComplianceControlProperties().withState(State.SKIPPED);
        model = BinaryData.fromObject(model).toObject(RegulatoryComplianceControlProperties.class);
        Assertions.assertEquals(State.SKIPPED, model.state());
    }
}
