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

package com.azure.resourcemanager.synapse.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.synapse.fluent.models.DataMaskingPolicyInner;
import com.azure.resourcemanager.synapse.models.DataMaskingState;
import org.junit.jupiter.api.Assertions;

public final class DataMaskingPolicyInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DataMaskingPolicyInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"dataMaskingState\":\"Enabled\",\"exemptPrincipals\":\"jviylwdshfs\",\"applicationPrincipals\":\"rbgyefry\",\"maskingLevel\":\"gaojf\"},\"location\":\"nc\",\"kind\":\"mrfhirctymox\",\"managedBy\":\"tpipiwyczuhx\",\"id\":\"cpqjlihhyu\",\"name\":\"pskasdvlmfwdg\",\"type\":\"x\"}")
                .toObject(DataMaskingPolicyInner.class);
        Assertions.assertEquals(DataMaskingState.ENABLED, model.dataMaskingState());
        Assertions.assertEquals("jviylwdshfs", model.exemptPrincipals());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DataMaskingPolicyInner model =
            new DataMaskingPolicyInner()
                .withDataMaskingState(DataMaskingState.ENABLED)
                .withExemptPrincipals("jviylwdshfs");
        model = BinaryData.fromObject(model).toObject(DataMaskingPolicyInner.class);
        Assertions.assertEquals(DataMaskingState.ENABLED, model.dataMaskingState());
        Assertions.assertEquals("jviylwdshfs", model.exemptPrincipals());
    }
}
