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

package com.azure.resourcemanager.support.generated;

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

public final class ServicePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ServiceProperties model =
            BinaryData
                .fromString("{\"displayName\":\"vwmf\",\"resourceTypes\":[\"scmdvpjhulsuu\"]}")
                .toObject(ServiceProperties.class);
        Assertions.assertEquals("vwmf", model.displayName());
        Assertions.assertEquals("scmdvpjhulsuu", model.resourceTypes().get(0));
    }

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