@Test
public void stopJobConfigurationSchedulerTest() throws NoSuchJobConfigurationException {

    final String beanName = "schedulerBean";
    final Long jobConfigurationId = 10L;
    when(this.properties.getApplicationName()).thenReturn(APPLICATION_NAME);
    final JobSchedulerConfiguration jobSchedulerConfiguration = DomainTestHelper
            .createJobSchedulerConfiguration("* * * * * *", null, null, JobSchedulerType.CRON);
    jobSchedulerConfiguration.setBeanName(beanName);
    final JobConfiguration jobConfiguration = DomainTestHelper.createJobConfiguration(jobSchedulerConfiguration);
    when(this.jobConfigurationRepository.getJobConfiguration(jobConfigurationId, APPLICATION_NAME)).thenReturn(jobConfiguration);
    this.defaultAdminService.stopJobConfiguration(jobConfigurationId);
    verify(this.schedulerService, times(1)).terminate(beanName);
}