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

package com.azure.resourcemanager.iothub.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.iothub.fluent.models.JobResponseInner;
import com.azure.resourcemanager.iothub.models.JobResponseListResult;
import java.util.Arrays;

public final class JobResponseListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        JobResponseListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"jobId\":\"skxfbk\",\"startTimeUtc\":\"Fri, 05 Feb 2021 18:39:24"
                        + " GMT\",\"endTimeUtc\":\"Sun, 14 Feb 2021 18:57:00"
                        + " GMT\",\"type\":\"writeDeviceProperties\",\"status\":\"completed\",\"failureReason\":\"hjdauwhvylwz\",\"statusMessage\":\"dhxujznbmpo\",\"parentJobId\":\"wpr\"}],\"nextLink\":\"lve\"}")
                .toObject(JobResponseListResult.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        JobResponseListResult model = new JobResponseListResult().withValue(Arrays.asList(new JobResponseInner()));
        model = BinaryData.fromObject(model).toObject(JobResponseListResult.class);
    }
}
