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

package com.azure.resourcemanager.changeanalysis.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.changeanalysis.models.ResourceProviderOperationDisplay;
import org.junit.jupiter.api.Assertions;

public final class ResourceProviderOperationDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ResourceProviderOperationDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"lx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"}")
                .toObject(ResourceProviderOperationDisplay.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 {
        ResourceProviderOperationDisplay model =
            new ResourceProviderOperationDisplay()
                .withProvider("lx")
                .withResource("kuksjtxukcdm")
                .withOperation("rcryuanzwuxzdxta")
                .withDescription("lhmwhfpmrqobm");
        model = BinaryData.fromObject(model).toObject(ResourceProviderOperationDisplay.class);
        Assertions.assertEquals("lx", model.provider());
        Assertions.assertEquals("kuksjtxukcdm", model.resource());
        Assertions.assertEquals("rcryuanzwuxzdxta", model.operation());
        Assertions.assertEquals("lhmwhfpmrqobm", model.description());
    }
}
