@Test
public void testRegisterListenerForJob() throws NoSuchJobException {

    final JobListenerConfiguration jobListenerConfiguration = DomainTestHelper.createJobListenerConfiguration
            ("src/test/", "*.txt", JobListenerType.LOCAL_FOLDER_LISTENER);
    jobListenerConfiguration.setBeanName("testBean");
    final JobConfiguration jobConfiguration = DomainTestHelper.createJobConfiguration(jobListenerConfiguration);
    this.listenerService.registerListenerForJob(jobConfiguration);
    verify(this.jobRegistry, times(1)).getJob(anyString());
    verify(this.beanRegistrar, times(1)).registerBean(
            eq(FolderListener.class),
            eq("testBean"),
            anySet(),
            eq(null),
            eq(null),
            eq(null),
            eq(null));
}