@Override
    public void start() {
        if (taskExecutorThread == null) {
            taskExecutorThread = new TaskExecutorThread(name);
            taskExecutorThread.start();
            shutdownGate = new CountDownLatch(1);
        }
    }
@Test
    public void shouldClearTaskTimeoutOnProcessed() {
        when(taskExecutionMetadata.canProcessTask(any(), anyLong())).thenReturn(true);
        when(task.isProcessable(anyLong())).thenReturn(true);
        when(task.process(anyLong())).thenReturn(true);

        taskExecutor.start();

        verify(task, timeout(VERIFICATION_TIMEOUT).atLeastOnce()).clearTaskTimeout();
    }