JobSchedulerFeService extends CommonJobConfigurationFeService { public void stopScheduler(final Long jobConfigurationId, final String applicationInstanceId) { final LightminClientApplication lightminClientApplication = this.findLightminClientApplicatonById(applicationInstanceId); this.adminServerService.stopJobConfigurationScheduler(jobConfigurationId, lightminClientApplication); } JobSchedulerFeService(final RegistrationBean registrationBean, final AdminServerService adminServerService); MapJobSchedulerConfigurationModel getMapJobConfigurationModel(final String applicationInstanceId); SchedulerJobConfigurationModel getJobConfigurationModel(final Long jobConfigurationId,
                                                                   final String applicationInstanceId); void startScheduler(final Long jobConfigurationId, final String applicationInstanceId); void stopScheduler(final Long jobConfigurationId, final String applicationInstanceId); void deleteSchedulerConfiguration(final Long jobConfigurationId, final String applicationInstanceId); void addSchedulerConfiguration(final SchedulerJobConfigurationModel schedulerModel,
                                          final String applicationInstanceId); void updateSchedulerConfiguration(final SchedulerJobConfigurationModel schedulerModel,
                                             final String applicationInstanceId);  }
@Test public void testStopListener() { final LightminClientApplication lightminClientApplication = ServiceTestHelper.createLightminClientApplication(); when(this.registrationBean.findById(APPLICATION_INSTANCE_ID)).thenReturn(lightminClientApplication); try { this.jobSchedulerFeService.stopScheduler(JC_ID, APPLICATION_INSTANCE_ID); verify(this.adminServerService, times(1)).stopJobConfigurationScheduler(JC_ID, lightminClientApplication); } catch (final Exception e) { fail(e.getMessage()); } }