TitusClientImpl implements TitusClient { @Override public Mono<Job> getJobById(String jobId) { return Mono.fromFuture(jobs.get(jobId)); } TitusClientImpl(JobManagementServiceStub jobManagementService,
                           JobManagementServiceFutureStub jobManagementServiceFutureStub,
                           Registry registry); @Override Mono<Task> getTask(String taskId); @Override Flux<JobOrTaskUpdate> getJobAndTaskUpdates(); @Override Mono<Job> getJobById(String jobId);  }
@Test public void getJobById() { final CountDownLatch latch = new CountDownLatch(1); titusClient.getJobById(jobOne.getId()).subscribe(job -> { assertThat(job.getId()).isEqualTo(jobOne.getId()); latch.countDown(); }); try { latch.await(1, TimeUnit.SECONDS); } catch (InterruptedException e) { fail("getJobById Timeout ", e); } }