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

package com.azure.resourcemanager.timeseriesinsights.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.timeseriesinsights.fluent.models.WarmStoragePropertiesUsage;
import com.azure.resourcemanager.timeseriesinsights.models.WarmStoragePropertiesState;
import org.junit.jupiter.api.Assertions;

public final class WarmStoragePropertiesUsageTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WarmStoragePropertiesUsage model =
            BinaryData
                .fromString("{\"state\":\"Ok\",\"stateDetails\":{\"currentCount\":1487439384,\"maxCount\":1681681951}}")
                .toObject(WarmStoragePropertiesUsage.class);
        Assertions.assertEquals(WarmStoragePropertiesState.OK, model.state());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WarmStoragePropertiesUsage model = new WarmStoragePropertiesUsage().withState(WarmStoragePropertiesState.OK);
        model = BinaryData.fromObject(model).toObject(WarmStoragePropertiesUsage.class);
        Assertions.assertEquals(WarmStoragePropertiesState.OK, model.state());
    }
}
