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

package com.azure.resourcemanager.devtestlabs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.devtestlabs.models.OperationMetadataDisplay;
import org.junit.jupiter.api.Assertions;

public final class OperationMetadataDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OperationMetadataDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"lx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"}")
                .toObject(OperationMetadataDisplay.class);
        Assertions.assertEquals("lx", model.provider());
        Assertions.assertEquals("kuksjtxukcdm", model.resource());
        Assertions.assertEquals("rcryuanzwuxzdxta", model.operation());
        Assertions.assertEquals("lhmwhfpmrqobm", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OperationMetadataDisplay model =
            new OperationMetadataDisplay()
                .withProvider("lx")
                .withResource("kuksjtxukcdm")
                .withOperation("rcryuanzwuxzdxta")
                .withDescription("lhmwhfpmrqobm");
        model = BinaryData.fromObject(model).toObject(OperationMetadataDisplay.class);
        Assertions.assertEquals("lx", model.provider());
        Assertions.assertEquals("kuksjtxukcdm", model.resource());
        Assertions.assertEquals("rcryuanzwuxzdxta", model.operation());
        Assertions.assertEquals("lhmwhfpmrqobm", model.description());
    }
}
