@Test(expected = ConflictException.class)
    public void testTerminateCompletedWorkflow() {
        WorkflowModel workflow = new WorkflowModel();
        workflow.setWorkflowId("testTerminateTerminalWorkflow");
        workflow.setStatus(WorkflowModel.Status.COMPLETED);
        when(executionDAOFacade.getWorkflowModel(anyString(), anyBoolean())).thenReturn(workflow);

        workflowExecutor.terminateWorkflow(
                workflow.getWorkflowId(), "test terminating terminal workflow");
    }
Simulate Queue push failures and assert that scheduleTask doesn't throw an exception.
core/src/test/java/com/netflix/conductor/core/execution/TestWorkflowExecutor.java