DefaultListenerService implements ListenerService, InitializingBean { @Override public void unregisterListenerForJob(final String beanName) { this.beanRegistrar.unregisterBean(beanName); } DefaultListenerService(final BeanRegistrar beanRegistrar, final JobRegistry jobRegistry, final JobRepository jobRepository); @Autowired void setApplicationContext(final ApplicationContext applicationContext); @Override String registerListenerForJob(final JobConfiguration jobConfiguration); @Override void unregisterListenerForJob(final String beanName); @Override void refreshListenerForJob(final JobConfiguration jobConfiguration); @Override void activateListener(final String beanName, final Boolean forceActivation); @Override void terminateListener(final String beanName); @Override JobLauncher createLobLauncher(final TaskExecutorType taskExecutorType, final JobRepository jobRepository); @Override void afterPropertiesSet();  }
@Test public void testUnregisterListenerForJob() { final String beanName = "testBean"; this.listenerService.unregisterListenerForJob(beanName); verify(this.beanRegistrar, times(1)).unregisterBean(beanName); }