@Operation(summary = "update", description = "UPDATE_WORKFLOWS_NOTES")
    @PutMapping(value = "/{code}")
    @ResponseStatus(HttpStatus.OK)
    @ApiException(UPDATE_PROCESS_DEFINITION_ERROR)
    public Result<ProcessDefinition> updateWorkflow(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
                                                    @PathVariable("code") Long code,
                                                    @RequestBody WorkflowUpdateRequest workflowUpdateRequest) {
        ProcessDefinition processDefinition =
                processDefinitionService.updateSingleProcessDefinition(loginUser, code, workflowUpdateRequest);
        return Result.success(processDefinition);
    }
@Test
    public void testUpdateWorkflow() {
        WorkflowUpdateRequest workflowUpdateRequest = new WorkflowUpdateRequest();
        workflowUpdateRequest.setName(newName);

        Mockito.when(processDefinitionService.updateSingleProcessDefinition(user, 1L, workflowUpdateRequest))
                .thenReturn(this.getProcessDefinition(newName));
        Result<ProcessDefinition> resourceResponse =
                workflowV2Controller.updateWorkflow(user, 1L, workflowUpdateRequest);

        Assertions.assertEquals(this.getProcessDefinition(newName), resourceResponse.getData());
    }