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

package com.azure.resourcemanager.servicefabric.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.servicefabric.models.AvailableOperationDisplay;
import org.junit.jupiter.api.Assertions;

public final class AvailableOperationDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AvailableOperationDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"kbfkg\",\"resource\":\"dkexxppofm\",\"operation\":\"x\",\"description\":\"jpgd\"}")
                .toObject(AvailableOperationDisplay.class);
        Assertions.assertEquals("kbfkg", model.provider());
        Assertions.assertEquals("dkexxppofm", model.resource());
        Assertions.assertEquals("x", model.operation());
        Assertions.assertEquals("jpgd", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AvailableOperationDisplay model =
            new AvailableOperationDisplay()
                .withProvider("kbfkg")
                .withResource("dkexxppofm")
                .withOperation("x")
                .withDescription("jpgd");
        model = BinaryData.fromObject(model).toObject(AvailableOperationDisplay.class);
        Assertions.assertEquals("kbfkg", model.provider());
        Assertions.assertEquals("dkexxppofm", model.resource());
        Assertions.assertEquals("x", model.operation());
        Assertions.assertEquals("jpgd", model.description());
    }
}
