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

package com.azure.resourcemanager.storagemover.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storagemover.fluent.models.JobDefinitionUpdateProperties;
import com.azure.resourcemanager.storagemover.models.CopyMode;
import org.junit.jupiter.api.Assertions;

public final class JobDefinitionUpdatePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        JobDefinitionUpdateProperties model =
            BinaryData
                .fromString(
                    "{\"description\":\"ivkwlzuvccfwnfnb\",\"copyMode\":\"Additive\",\"agentName\":\"onlebxetqgtzxdpn\"}")
                .toObject(JobDefinitionUpdateProperties.class);
        Assertions.assertEquals("ivkwlzuvccfwnfnb", model.description());
        Assertions.assertEquals(CopyMode.ADDITIVE, model.copyMode());
        Assertions.assertEquals("onlebxetqgtzxdpn", model.agentName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        JobDefinitionUpdateProperties model =
            new JobDefinitionUpdateProperties()
                .withDescription("ivkwlzuvccfwnfnb")
                .withCopyMode(CopyMode.ADDITIVE)
                .withAgentName("onlebxetqgtzxdpn");
        model = BinaryData.fromObject(model).toObject(JobDefinitionUpdateProperties.class);
        Assertions.assertEquals("ivkwlzuvccfwnfnb", model.description());
        Assertions.assertEquals(CopyMode.ADDITIVE, model.copyMode());
        Assertions.assertEquals("onlebxetqgtzxdpn", model.agentName());
    }
}
