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

package com.azure.resourcemanager.resourcehealth.generated;

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

public final class MetadataSupportedValueDetailTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MetadataSupportedValueDetail model =
            BinaryData
                .fromString(
                    "{\"id\":\"wgndrvynhzgpp\",\"displayName\":\"cgyncocpecf\",\"resourceTypes\":[\"coofsxlzev\"]}")
                .toObject(MetadataSupportedValueDetail.class);
        Assertions.assertEquals("wgndrvynhzgpp", model.id());
        Assertions.assertEquals("cgyncocpecf", model.displayName());
        Assertions.assertEquals("coofsxlzev", model.resourceTypes().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MetadataSupportedValueDetail model =
            new MetadataSupportedValueDetail()
                .withId("wgndrvynhzgpp")
                .withDisplayName("cgyncocpecf")
                .withResourceTypes(Arrays.asList("coofsxlzev"));
        model = BinaryData.fromObject(model).toObject(MetadataSupportedValueDetail.class);
        Assertions.assertEquals("wgndrvynhzgpp", model.id());
        Assertions.assertEquals("cgyncocpecf", model.displayName());
        Assertions.assertEquals("coofsxlzev", model.resourceTypes().get(0));
    }
}
