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

package com.azure.resourcemanager.storagepool.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storagepool.models.StoragePoolOperationDisplay;
import org.junit.jupiter.api.Assertions;

public final class StoragePoolOperationDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        StoragePoolOperationDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"mt\",\"resource\":\"kknryrtihf\",\"operation\":\"tijbpzvgnwzsymgl\",\"description\":\"uf\"}")
                .toObject(StoragePoolOperationDisplay.class);
        Assertions.assertEquals("mt", model.provider());
        Assertions.assertEquals("kknryrtihf", model.resource());
        Assertions.assertEquals("tijbpzvgnwzsymgl", model.operation());
        Assertions.assertEquals("uf", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        StoragePoolOperationDisplay model =
            new StoragePoolOperationDisplay()
                .withProvider("mt")
                .withResource("kknryrtihf")
                .withOperation("tijbpzvgnwzsymgl")
                .withDescription("uf");
        model = BinaryData.fromObject(model).toObject(StoragePoolOperationDisplay.class);
        Assertions.assertEquals("mt", model.provider());
        Assertions.assertEquals("kknryrtihf", model.resource());
        Assertions.assertEquals("tijbpzvgnwzsymgl", model.operation());
        Assertions.assertEquals("uf", model.description());
    }
}
