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

package com.azure.resourcemanager.mediaservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mediaservices.models.UtcClipTime;
import java.time.OffsetDateTime;
import org.junit.jupiter.api.Assertions;

public final class UtcClipTimeTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UtcClipTime model =
            BinaryData
                .fromString("{\"@odata.type\":\"#Microsoft.Media.UtcClipTime\",\"time\":\"2021-10-22T01:52:24Z\"}")
                .toObject(UtcClipTime.class);
        Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T01:52:24Z"), model.time());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        UtcClipTime model = new UtcClipTime().withTime(OffsetDateTime.parse("2021-10-22T01:52:24Z"));
        model = BinaryData.fromObject(model).toObject(UtcClipTime.class);
        Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T01:52:24Z"), model.time());
    }
}
