@Override
  public void check(Thread currentThread) throws CeTaskInterruptedException {
    if (currentThread.isInterrupted()) {
      throw new CeTaskCanceledException(currentThread);
    }
  }
@Test
  public void check_throws_CeTaskCanceledException_if_provided_thread_is_interrupted() throws InterruptedException {
    String threadName = randomAlphabetic(30);
    ComputingThread t = new ComputingThread(threadName);

    try {
      t.start();

      // will not fail
      underTest.check(t);

      t.interrupt();

      assertThatThrownBy(() -> underTest.check(t))
        .isInstanceOf(CeTaskCanceledException.class)
        .hasMessage("CeWorker executing in Thread '" + threadName + "' has been interrupted");
    } finally {
      t.kill();
      t.join(1_000);
    }
  }