@Test
    public void testTaskExtendLease() {
        TaskModel simpleTask = new TaskModel();
        simpleTask.setTaskType(TaskType.SIMPLE.name());
        simpleTask.setReferenceTaskName("simpleTask");
        simpleTask.setWorkflowInstanceId("test-workflow-id");
        simpleTask.setScheduledTime(System.currentTimeMillis());
        simpleTask.setCallbackAfterSeconds(0);
        simpleTask.setTaskId("simple-task-id");
        simpleTask.setStatus(TaskModel.Status.IN_PROGRESS);
        when(executionDAOFacade.getTaskModel(simpleTask.getTaskId())).thenReturn(simpleTask);

        TaskResult taskResult = new TaskResult();
        taskResult.setWorkflowInstanceId(simpleTask.getWorkflowInstanceId());
        taskResult.setTaskId(simpleTask.getTaskId());
        taskResult.log("extend lease");
        taskResult.setExtendLease(true);

        workflowExecutor.updateTask(taskResult);
        verify(executionDAOFacade, times(1)).extendLease(simpleTask);
        verify(queueDAO, times(0)).postpone(anyString(), anyString(), anyInt(), anyLong());
        verify(executionDAOFacade, times(0)).updateTask(any());
    }
Simulate Queue push failures and assert that scheduleTask doesn't throw an exception.
core/src/test/java/com/netflix/conductor/core/execution/TestWorkflowExecutor.java