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

package com.azure.resourcemanager.hdinsight.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hdinsight.models.OperationDisplay;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class OperationDisplayTests {
    @Test
    public void testDeserialize() {
        OperationDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"jviylwdshfs\",\"resource\":\"rbgyefry\",\"operation\":\"gaojf\",\"description\":\"nc\"}")
                .toObject(OperationDisplay.class);
        Assertions.assertEquals("jviylwdshfs", model.provider());
        Assertions.assertEquals("rbgyefry", model.resource());
        Assertions.assertEquals("gaojf", model.operation());
        Assertions.assertEquals("nc", model.description());
    }

    @Test
    public void testSerialize() {
        OperationDisplay model =
            new OperationDisplay()
                .withProvider("jviylwdshfs")
                .withResource("rbgyefry")
                .withOperation("gaojf")
                .withDescription("nc");
        model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
        Assertions.assertEquals("jviylwdshfs", model.provider());
        Assertions.assertEquals("rbgyefry", model.resource());
        Assertions.assertEquals("gaojf", model.operation());
        Assertions.assertEquals("nc", model.description());
    }
}
