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

package com.azure.resourcemanager.recoveryservicesbackup.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.recoveryservicesbackup.models.DpmErrorInfo;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class DpmErrorInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DpmErrorInfo model =
            BinaryData
                .fromString(
                    "{\"errorString\":\"i\",\"recommendations\":[\"sdaultxij\",\"um\",\"qwazlnqnmcjngzq\",\"qxtbjwgnyf\"]}")
                .toObject(DpmErrorInfo.class);
        Assertions.assertEquals("i", model.errorString());
        Assertions.assertEquals("sdaultxij", model.recommendations().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DpmErrorInfo model =
            new DpmErrorInfo()
                .withErrorString("i")
                .withRecommendations(Arrays.asList("sdaultxij", "um", "qwazlnqnmcjngzq", "qxtbjwgnyf"));
        model = BinaryData.fromObject(model).toObject(DpmErrorInfo.class);
        Assertions.assertEquals("i", model.errorString());
        Assertions.assertEquals("sdaultxij", model.recommendations().get(0));
    }
}
