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

package com.azure.resourcemanager.azurestack.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.azurestack.models.Display;
import org.junit.jupiter.api.Assertions;

public final class DisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Display model =
            BinaryData
                .fromString(
                    "{\"provider\":\"uxzdxtay\",\"resource\":\"hmwhfpmrqo\",\"operation\":\"tu\",\"description\":\"nryrtihf\"}")
                .toObject(Display.class);
        Assertions.assertEquals("uxzdxtay", model.provider());
        Assertions.assertEquals("hmwhfpmrqo", model.resource());
        Assertions.assertEquals("tu", model.operation());
        Assertions.assertEquals("nryrtihf", model.description());
    }

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