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

package com.azure.analytics.purview.workflow.generated;

import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

public final class UserRequestsSubmitTests extends PurviewWorkflowClientTestBase {
    @Test
    @Disabled
    public void testUserRequestsSubmitTests() {
        BinaryData userRequestsPayload =
                BinaryData.fromString(
                        "{\"comment\":\"Thanks!\",\"operations\":[{\"type\":\"CreateTerm\",\"payload\":{\"glossaryTerm\":{\"name\":\"term\",\"anchor\":{\"glossaryGuid\":\"20031e20-b4df-4a66-a61d-1b0716f3fa48\"},\"nickName\":\"term\",\"status\":\"Approved\"}}}]}");
        RequestOptions requestOptions = new RequestOptions();
        Response<BinaryData> response =
                purviewWorkflowClient.submitUserRequestsWithResponse(userRequestsPayload, requestOptions);
        Assertions.assertEquals(200, response.getStatusCode());
        Assertions.assertEquals(
                BinaryData.fromString(
                                "{\"comment\":\"Thanks!\",\"requestId\":\"26026374-f2f6-4627-b2f4-ba2db93c7e2c\",\"requestor\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"status\":\"InProgress\",\"operations\":[{\"type\":\"CreateTerm\",\"payload\":{\"glossaryTerm\":{\"name\":\"term\",\"anchor\":{\"glossaryGuid\":\"20031e20-b4df-4a66-a61d-1b0716f3fa48\"},\"nickName\":\"term\",\"status\":\"Approved\"}},\"workflowRunIds\":[\"26026374-f2f6-4627-b2f4-ba2db93c7e2c\"]}]}")
                        .toObject(Object.class),
                response.getValue().toObject(Object.class));
    }
}
