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

package com.azure.resourcemanager.dataprotection.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.dataprotection.models.RestorableTimeRange;
import org.junit.jupiter.api.Assertions;

public final class RestorableTimeRangeTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RestorableTimeRange model =
            BinaryData
                .fromString("{\"startTime\":\"n\",\"endTime\":\"ixisxyawjoy\",\"objectType\":\"cslyjpk\"}")
                .toObject(RestorableTimeRange.class);
        Assertions.assertEquals("n", model.startTime());
        Assertions.assertEquals("ixisxyawjoy", model.endTime());
        Assertions.assertEquals("cslyjpk", model.objectType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RestorableTimeRange model =
            new RestorableTimeRange().withStartTime("n").withEndTime("ixisxyawjoy").withObjectType("cslyjpk");
        model = BinaryData.fromObject(model).toObject(RestorableTimeRange.class);
        Assertions.assertEquals("n", model.startTime());
        Assertions.assertEquals("ixisxyawjoy", model.endTime());
        Assertions.assertEquals("cslyjpk", model.objectType());
    }
}
