public Optional<WorkerInfo> getWorkerById(WorkerIdentity workerIdentity) {
    return Optional.ofNullable(mWorkers.get(workerIdentity));
  }
@Test
  public void getWorkerById() {
    WorkerIdentity worker1 = WorkerIdentityTestUtils.ofLegacyId(1);
    WorkerIdentity worker2 = WorkerIdentityTestUtils.ofLegacyId(2);
    WorkerIdentity worker3 = WorkerIdentityTestUtils.ofLegacyId(3);
    WorkerClusterView view = new WorkerClusterView(ImmutableList.of(
        new WorkerInfo().setIdentity(worker1),
        new WorkerInfo().setIdentity(worker2)
    ));
    assertEquals(Optional.of(worker1), view.getWorkerById(worker1).map(WorkerInfo::getIdentity));
    assertEquals(Optional.of(worker2), view.getWorkerById(worker2).map(WorkerInfo::getIdentity));
    assertEquals(Optional.empty(), view.getWorkerById(worker3));

    WorkerClusterView emptyView = new WorkerClusterView(ImmutableList.of());
    assertFalse(emptyView.getWorkerById(worker1).isPresent());
    assertFalse(emptyView.getWorkerById(worker2).isPresent());
  }