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

package com.azure.resourcemanager.recoveryservicesbackup.generated;

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

public final class DpmContainerExtendedInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DpmContainerExtendedInfo model =
            BinaryData
                .fromString("{\"lastRefreshedAt\":\"2021-11-08T19:03:48Z\"}")
                .toObject(DpmContainerExtendedInfo.class);
        Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T19:03:48Z"), model.lastRefreshedAt());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DpmContainerExtendedInfo model =
            new DpmContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2021-11-08T19:03:48Z"));
        model = BinaryData.fromObject(model).toObject(DpmContainerExtendedInfo.class);
        Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T19:03:48Z"), model.lastRefreshedAt());
    }
}
