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

package com.azure.resourcemanager.selfhelp.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.selfhelp.fluent.models.SolutionMetadataProperties;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class SolutionMetadataPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SolutionMetadataProperties model =
            BinaryData
                .fromString(
                    "{\"solutionId\":\"lnrosfqp\",\"solutionType\":\"ehzzvypyqrim\",\"description\":\"npvswjdkirso\",\"requiredParameterSets\":[[\"hc\"],[\"nohjt\"]]}")
                .toObject(SolutionMetadataProperties.class);
        Assertions.assertEquals("lnrosfqp", model.solutionId());
        Assertions.assertEquals("ehzzvypyqrim", model.solutionType());
        Assertions.assertEquals("npvswjdkirso", model.description());
        Assertions.assertEquals("hc", model.requiredParameterSets().get(0).get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SolutionMetadataProperties model =
            new SolutionMetadataProperties()
                .withSolutionId("lnrosfqp")
                .withSolutionType("ehzzvypyqrim")
                .withDescription("npvswjdkirso")
                .withRequiredParameterSets(Arrays.asList(Arrays.asList("hc"), Arrays.asList("nohjt")));
        model = BinaryData.fromObject(model).toObject(SolutionMetadataProperties.class);
        Assertions.assertEquals("lnrosfqp", model.solutionId());
        Assertions.assertEquals("ehzzvypyqrim", model.solutionType());
        Assertions.assertEquals("npvswjdkirso", model.description());
        Assertions.assertEquals("hc", model.requiredParameterSets().get(0).get(0));
    }
}
