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

package com.azure.resourcemanager.machinelearning.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput;
import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode;
import org.junit.jupiter.api.Assertions;

public final class MLFlowModelJobOutputTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MLFlowModelJobOutput model =
            BinaryData
                .fromString(
                    "{\"jobOutputType\":\"mlflow_model\",\"mode\":\"Upload\",\"uri\":\"twmlmhjnqtqeah\",\"description\":\"dvragpokddxejhh\"}")
                .toObject(MLFlowModelJobOutput.class);
        Assertions.assertEquals("dvragpokddxejhh", model.description());
        Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode());
        Assertions.assertEquals("twmlmhjnqtqeah", model.uri());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MLFlowModelJobOutput model =
            new MLFlowModelJobOutput()
                .withDescription("dvragpokddxejhh")
                .withMode(OutputDeliveryMode.UPLOAD)
                .withUri("twmlmhjnqtqeah");
        model = BinaryData.fromObject(model).toObject(MLFlowModelJobOutput.class);
        Assertions.assertEquals("dvragpokddxejhh", model.description());
        Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode());
        Assertions.assertEquals("twmlmhjnqtqeah", model.uri());
    }
}
