@Override
  public void check(Thread currentThread) throws CeTaskInterruptedException {
    super.check(currentThread);

    computeTimeOutOf(taskOf(currentThread))
      .ifPresent(timeout -> {
        throw new CeTaskTimeoutException(format("Execution of task timed out after %s ms", timeout));
      });
  }
@Test
  public void check_fails_with_ISE_if_thread_is_executing_a_CeTask_but_on_start_has_not_been_called_on_it() {
    String taskUuid = randomAlphabetic(15);
    Thread t = new Thread();
    mockWorkerOnThread(t, ceWorker);
    mockWorkerWithTask(ceTask);
    when(ceTask.getUuid()).thenReturn(taskUuid);

    assertThatThrownBy(() -> underTest.check(t))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("No start time recorded for task " + taskUuid);
  }