### Question:
TransientProducerScheduler { synchronized void register(final CloudJobConfiguration jobConfig) { String cron = jobConfig.getTypeConfig().getCoreConfig().getCron(); JobKey jobKey = buildJobKey(cron); repository.put(jobKey, jobConfig.getJobName()); try { if (!scheduler.checkExists(jobKey)) { scheduler.scheduleJob(buildJobDetail(jobKey), buildTrigger(jobKey.getName())); } } catch (final SchedulerException ex) { throw new JobSystemException(ex); } } TransientProducerScheduler(final ReadyService readyService);   }### Answer:
@Test public void assertRegister() throws SchedulerException { when(scheduler.checkExists(jobDetail.getKey())).thenReturn(false); transientProducerScheduler.register(jobConfig); verify(scheduler).checkExists(jobDetail.getKey()); verify(scheduler).scheduleJob(jobDetail, trigger); }