@Override
  public Optional<CeWorker> getCeWorkerIn(Thread thread) {
    return workerStatuses.keySet().stream()
      .filter(t -> t.isExecutedBy(thread))
      .findFirst();
  }
@Test
  public void getCeWorkerIn_returns_empty_if_worker_is_unregistered_in_CeWorkerController() {
    CeWorker ceWorker = mock(CeWorker.class);
    Thread currentThread = Thread.currentThread();
    Thread otherThread = new Thread();

    mockWorkerIsRunningOnNoThread(ceWorker);
    assertThat(underTest.getCeWorkerIn(currentThread)).isEmpty();
    assertThat(underTest.getCeWorkerIn(otherThread)).isEmpty();

    mockWorkerIsRunningOnThread(ceWorker, currentThread);
    assertThat(underTest.getCeWorkerIn(currentThread)).isEmpty();
    assertThat(underTest.getCeWorkerIn(otherThread)).isEmpty();

    mockWorkerIsRunningOnThread(ceWorker, otherThread);
    assertThat(underTest.getCeWorkerIn(currentThread)).isEmpty();
    assertThat(underTest.getCeWorkerIn(otherThread)).isEmpty();
  }