class TitusClientImpl implements TitusClient {

    @Override
    public Mono<Task> getTask(String taskId) {
        logger.debug("Getting Task information about taskId {}", taskId);
        return Mono.create(sink -> attachCallerId(jobManagementService, CLIENT_ID)
                .findTask(TaskId.newBuilder().setId(taskId).build(), new StreamObserver<Task>() {
                    @Override
                    public void onNext(Task task) {
                        sink.success(task);
                    }

                    @Override
                    public void onError(Throwable t) {
                        logger.error("Error fetching task information for task ID = {}", taskId);
                        apiErrors.incrementAndGet();
                        sink.error(t);
                    }

                    @Override
                    public void onCompleted() {

                    }
                }));
    }

    public  TitusClientImpl(JobManagementServiceStub jobManagementService,
                           JobManagementServiceFutureStub jobManagementServiceFutureStub,
                           Registry registry);

}