public void terminate(String executionId, WorkflowInstance.Status status, String reason) {
    try {
      workflowExecutor.terminateWorkflow(executionId, status + "-" + reason);
    } catch (ApplicationException e) {
      if (e.getCode() != CONFLICT) {
        throw e;
      }
    }
  }
@Test
  public void testTerminate() {
    runner.terminate("test-uuid", WorkflowInstance.Status.STOPPED, "test-reason");
    verify(workflowExecutor, times(1)).terminateWorkflow("test-uuid", "STOPPED-test-reason");
  }