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

package com.azure.resourcemanager.datamigration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datamigration.models.ServiceOperationDisplay;
import org.junit.jupiter.api.Assertions;

public final class ServiceOperationDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ServiceOperationDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"pnqbqqwxrjfe\",\"resource\":\"lnwsubisn\",\"operation\":\"mpmngnzscxaqwoo\",\"description\":\"cbonqvpk\"}")
                .toObject(ServiceOperationDisplay.class);
        Assertions.assertEquals("pnqbqqwxrjfe", model.provider());
        Assertions.assertEquals("lnwsubisn", model.resource());
        Assertions.assertEquals("mpmngnzscxaqwoo", model.operation());
        Assertions.assertEquals("cbonqvpk", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ServiceOperationDisplay model =
            new ServiceOperationDisplay()
                .withProvider("pnqbqqwxrjfe")
                .withResource("lnwsubisn")
                .withOperation("mpmngnzscxaqwoo")
                .withDescription("cbonqvpk");
        model = BinaryData.fromObject(model).toObject(ServiceOperationDisplay.class);
        Assertions.assertEquals("pnqbqqwxrjfe", model.provider());
        Assertions.assertEquals("lnwsubisn", model.resource());
        Assertions.assertEquals("mpmngnzscxaqwoo", model.operation());
        Assertions.assertEquals("cbonqvpk", model.description());
    }
}
