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

package com.azure.resourcemanager.databox.generated;

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

public final class JobDeliveryInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        JobDeliveryInfo model =
            BinaryData.fromString("{\"scheduledDateTime\":\"2021-07-27T15:10:57Z\"}").toObject(JobDeliveryInfo.class);
        Assertions.assertEquals(OffsetDateTime.parse("2021-07-27T15:10:57Z"), model.scheduledDateTime());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        JobDeliveryInfo model =
            new JobDeliveryInfo().withScheduledDateTime(OffsetDateTime.parse("2021-07-27T15:10:57Z"));
        model = BinaryData.fromObject(model).toObject(JobDeliveryInfo.class);
        Assertions.assertEquals(OffsetDateTime.parse("2021-07-27T15:10:57Z"), model.scheduledDateTime());
    }
}
