public WorkflowInstanceActionResponse stop(
      String workflowId, long workflowInstanceId, long workflowRunId, User caller) {
    return terminate(
        workflowId, workflowInstanceId, workflowRunId, Actions.WorkflowInstanceAction.STOP, caller);
  }
@Test
  public void testInvalidRunId() {
    when(instance.getWorkflowRunId()).thenReturn(2L);
    when(instance.getStatus()).thenReturn(WorkflowInstance.Status.IN_PROGRESS);
    AssertHelper.assertThrows(
        "run id has to be the latest one",
        MaestroBadRequestException.class,
        "Cannot STOP the workflow instance run [1] as it is not the latest run [2]",
        () -> actionHandler.stop("test-workflow", 1, 1, user));
  }