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

package com.azure.resourcemanager.dataprotection.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay;
import org.junit.jupiter.api.Assertions;

public final class ClientDiscoveryDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ClientDiscoveryDisplay model =
            BinaryData
                .fromString(
                    "{\"description\":\"krlkhbzhfepg\",\"operation\":\"qex\",\"provider\":\"ocxscpaierhhbcs\",\"resource\":\"ummajtjaod\"}")
                .toObject(ClientDiscoveryDisplay.class);
        Assertions.assertEquals("krlkhbzhfepg", model.description());
        Assertions.assertEquals("qex", model.operation());
        Assertions.assertEquals("ocxscpaierhhbcs", model.provider());
        Assertions.assertEquals("ummajtjaod", model.resource());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ClientDiscoveryDisplay model =
            new ClientDiscoveryDisplay()
                .withDescription("krlkhbzhfepg")
                .withOperation("qex")
                .withProvider("ocxscpaierhhbcs")
                .withResource("ummajtjaod");
        model = BinaryData.fromObject(model).toObject(ClientDiscoveryDisplay.class);
        Assertions.assertEquals("krlkhbzhfepg", model.description());
        Assertions.assertEquals("qex", model.operation());
        Assertions.assertEquals("ocxscpaierhhbcs", model.provider());
        Assertions.assertEquals("ummajtjaod", model.resource());
    }
}
