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

package com.azure.resourcemanager.elasticsan.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.elasticsan.models.ElasticSanOperationDisplay;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class ElasticSanOperationDisplayTests {
    @Test
    public void testDeserialize() {
        ElasticSanOperationDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"poyfdkfogkn\",\"resource\":\"gjofjd\",\"operation\":\"eqsrdeupewnwreit\",\"description\":\"zyf\"}")
                .toObject(ElasticSanOperationDisplay.class);
        Assertions.assertEquals("poyfdkfogkn", model.provider());
        Assertions.assertEquals("gjofjd", model.resource());
        Assertions.assertEquals("eqsrdeupewnwreit", model.operation());
        Assertions.assertEquals("zyf", model.description());
    }

    @Test
    public void testSerialize() {
        ElasticSanOperationDisplay model =
            new ElasticSanOperationDisplay()
                .withProvider("poyfdkfogkn")
                .withResource("gjofjd")
                .withOperation("eqsrdeupewnwreit")
                .withDescription("zyf");
        model = BinaryData.fromObject(model).toObject(ElasticSanOperationDisplay.class);
        Assertions.assertEquals("poyfdkfogkn", model.provider());
        Assertions.assertEquals("gjofjd", model.resource());
        Assertions.assertEquals("eqsrdeupewnwreit", model.operation());
        Assertions.assertEquals("zyf", model.description());
    }
}
