// 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.SensitivityLabelInner;
import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdateInner;
import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind;
import org.junit.jupiter.api.Assertions;

public final class SensitivityLabelUpdateInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SensitivityLabelUpdateInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"op\":\"remove\",\"schema\":\"qouicybxarzgsz\",\"table\":\"foxciq\",\"column\":\"p\",\"sensitivityLabel\":{\"managedBy\":\"mciodhkhazxkhn\",\"id\":\"bon\",\"name\":\"wntoegokdwbwh\",\"type\":\"szzcmrvexztv\"}},\"id\":\"t\",\"name\":\"gsfraoyzkoow\",\"type\":\"lmnguxaw\"}")
                .toObject(SensitivityLabelUpdateInner.class);
        Assertions.assertEquals(SensitivityLabelUpdateKind.REMOVE, model.op());
        Assertions.assertEquals("qouicybxarzgsz", model.schema());
        Assertions.assertEquals("foxciq", model.table());
        Assertions.assertEquals("p", model.column());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SensitivityLabelUpdateInner model =
            new SensitivityLabelUpdateInner()
                .withOp(SensitivityLabelUpdateKind.REMOVE)
                .withSchema("qouicybxarzgsz")
                .withTable("foxciq")
                .withColumn("p")
                .withSensitivityLabel(new SensitivityLabelInner());
        model = BinaryData.fromObject(model).toObject(SensitivityLabelUpdateInner.class);
        Assertions.assertEquals(SensitivityLabelUpdateKind.REMOVE, model.op());
        Assertions.assertEquals("qouicybxarzgsz", model.schema());
        Assertions.assertEquals("foxciq", model.table());
        Assertions.assertEquals("p", model.column());
    }
}
