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

package com.azure.resourcemanager.networkcloud.generated;

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

public final class ClusterMetricsConfigurationPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ClusterMetricsConfigurationProperties model =
            BinaryData
                .fromString(
                    "{\"collectionInterval\":6238636814738032868,\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"arvlagunbt\",\"disabledMetrics\":[\"bwln\",\"mhyreeudz\",\"av\",\"pdqmjxlyyzglgouw\"],\"enabledMetrics\":[\"jjyuojqtobax\",\"j\"],\"provisioningState\":\"Canceled\"}")
                .toObject(ClusterMetricsConfigurationProperties.class);
        Assertions.assertEquals(6238636814738032868L, model.collectionInterval());
        Assertions.assertEquals("jjyuojqtobax", model.enabledMetrics().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ClusterMetricsConfigurationProperties model =
            new ClusterMetricsConfigurationProperties()
                .withCollectionInterval(6238636814738032868L)
                .withEnabledMetrics(Arrays.asList("jjyuojqtobax", "j"));
        model = BinaryData.fromObject(model).toObject(ClusterMetricsConfigurationProperties.class);
        Assertions.assertEquals(6238636814738032868L, model.collectionInterval());
        Assertions.assertEquals("jjyuojqtobax", model.enabledMetrics().get(0));
    }
}
