// 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.models.WarmStoreConfigurationProperties;
import java.time.Duration;
import org.junit.jupiter.api.Assertions;

public final class WarmStoreConfigurationPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WarmStoreConfigurationProperties model =
            BinaryData
                .fromString("{\"dataRetention\":\"PT233H27M22S\"}")
                .toObject(WarmStoreConfigurationProperties.class);
        Assertions.assertEquals(Duration.parse("PT233H27M22S"), model.dataRetention());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WarmStoreConfigurationProperties model =
            new WarmStoreConfigurationProperties().withDataRetention(Duration.parse("PT233H27M22S"));
        model = BinaryData.fromObject(model).toObject(WarmStoreConfigurationProperties.class);
        Assertions.assertEquals(Duration.parse("PT233H27M22S"), model.dataRetention());
    }
}
