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

package com.azure.resourcemanager.mediaservices.generated;

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

public final class OperationDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OperationDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"qpsoacctazak\",\"resource\":\"lahbcryff\",\"operation\":\"dosyg\",\"description\":\"paojakhmsbzjh\"}")
                .toObject(OperationDisplay.class);
        Assertions.assertEquals("qpsoacctazak", model.provider());
        Assertions.assertEquals("lahbcryff", model.resource());
        Assertions.assertEquals("dosyg", model.operation());
        Assertions.assertEquals("paojakhmsbzjh", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OperationDisplay model =
            new OperationDisplay()
                .withProvider("qpsoacctazak")
                .withResource("lahbcryff")
                .withOperation("dosyg")
                .withDescription("paojakhmsbzjh");
        model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
        Assertions.assertEquals("qpsoacctazak", model.provider());
        Assertions.assertEquals("lahbcryff", model.resource());
        Assertions.assertEquals("dosyg", model.operation());
        Assertions.assertEquals("paojakhmsbzjh", model.description());
    }
}
