### Question:
MasterClientWrapper { public Observable<Boolean> namedJobExists(final String jobName) { final ConditionalRetry namedJobRetry = new ConditionalRetry(masterConnectRetryCounter, "NamedJobExists", Integer.MAX_VALUE); return getMasterClientApi() .flatMap((final MantisMasterClientApi mantisMasterClientApi) -> { logger.info("verifying if job name exists: " + jobName); return mantisMasterClientApi.namedJobExists(jobName); }) .retryWhen(namedJobRetry.getRetryLogic()); } MasterClientWrapper(Properties properties);  MasterClientWrapper(ConfigurationFactory configurationFactory); static String getWrappedHost(String host, int workerNumber); static String getUnwrappedHost(String wrappedHost); static void main(String[] args); MasterMonitor getMasterMonitor(); void addNumSinkWorkersObserver(Observer<JobSinkNumWorkers> numSinkWorkersObserver); void addNumWorkersObserver(Observer<JobNumWorkers> numWorkersObserver); Observable<MantisMasterClientApi> getMasterClientApi(); Observable<EndpointChange> getAllWorkerMetricLocations(final String jobId); Observable<EndpointChange> getSinkLocations(final String jobId, final int sinkStage,
                                                       final int forPartition, final int totalPartitions); Observable<Boolean> namedJobExists(final String jobName); Observable<String> getNamedJobsIds(final String jobName); static final String InvalidNamedJob; }### Answer:
@Test public void testNamedJobExists() { MasterClientWrapper clientWrapper = new MasterClientWrapper(zkProps); CountDownLatch cdLatch = new CountDownLatch(1); clientWrapper.namedJobExists("APIRequestSource") .subscribe((exists) -> { assertTrue(exists); cdLatch.countDown(); }); try { cdLatch.await(10, TimeUnit.SECONDS); } catch (InterruptedException e) { fail(); } }