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

package com.azure.resourcemanager.databoxedge.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.databoxedge.fluent.models.JobProperties;
import org.junit.jupiter.api.Assertions;

public final class JobPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        JobProperties model =
            BinaryData
                .fromString(
                    "{\"jobType\":\"RefreshContainer\",\"currentStage\":\"Unknown\",\"downloadProgress\":{\"downloadPhase\":\"Initializing\",\"percentComplete\":1879825209,\"totalBytesToDownload\":14.127280760623284,\"totalBytesDownloaded\":77.16376490043355,\"numberOfUpdatesToDownload\":207335442,\"numberOfUpdatesDownloaded\":1774598517},\"installProgress\":{\"percentComplete\":28529322,\"numberOfUpdatesToInstall\":766224962,\"numberOfUpdatesInstalled\":943269845},\"totalRefreshErrors\":771742090,\"errorManifestFile\":\"lhocohslkev\",\"refreshedEntityId\":\"ggzfbu\",\"folder\":\"mvfaxkffeiith\"}")
                .toObject(JobProperties.class);
        Assertions.assertEquals("mvfaxkffeiith", model.folder());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        JobProperties model = new JobProperties().withFolder("mvfaxkffeiith");
        model = BinaryData.fromObject(model).toObject(JobProperties.class);
        Assertions.assertEquals("mvfaxkffeiith", model.folder());
    }
}
