TransientProducerScheduler { synchronized void deregister(final CloudJobConfigurationPOJO cloudJobConfig) { repository.remove(cloudJobConfig.getJobName()); String cron = cloudJobConfig.getCron(); if (!repository.containsKey(buildJobKey(cron))) { try { scheduler.unscheduleJob(TriggerKey.triggerKey(cron)); } catch (final SchedulerException ex) { throw new JobSystemException(ex); } } } TransientProducerScheduler(final ReadyService readyService);   }
@Test public void assertDeregister() throws SchedulerException { transientProducerScheduler.deregister(cloudJobConfig); verify(scheduler).unscheduleJob(TriggerKey.triggerKey(cloudJobConfig.getCron())); }