@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_not_running_a_CeWorker() {
    Thread t = newThreadWithRandomName();

    assertThatThrownBy(() -> underTest.check(t))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("Could not find the CeTask being executed in thread '" + t.getName() + "'");
  }