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

package com.azure.resourcemanager.confidentialledger.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.confidentialledger.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\":\"txukcdmp\",\"resource\":\"cryuan\",\"operation\":\"uxzdxtay\",\"description\":\"hmwhfpmrqo\"}")
                .toObject(ResourceProviderOperationDisplay.class);
        Assertions.assertEquals("txukcdmp", model.provider());
        Assertions.assertEquals("cryuan", model.resource());
        Assertions.assertEquals("uxzdxtay", model.operation());
        Assertions.assertEquals("hmwhfpmrqo", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ResourceProviderOperationDisplay model =
            new ResourceProviderOperationDisplay()
                .withProvider("txukcdmp")
                .withResource("cryuan")
                .withOperation("uxzdxtay")
                .withDescription("hmwhfpmrqo");
        model = BinaryData.fromObject(model).toObject(ResourceProviderOperationDisplay.class);
        Assertions.assertEquals("txukcdmp", model.provider());
        Assertions.assertEquals("cryuan", model.resource());
        Assertions.assertEquals("uxzdxtay", model.operation());
        Assertions.assertEquals("hmwhfpmrqo", model.description());
    }
}
