JobListenerFeService extends CommonJobConfigurationFeService { public void startListener(final Long jobConfigurationId, final String applicationInstanceId) { final LightminClientApplication lightminClientApplication = this.findLightminClientApplicatonById(applicationInstanceId); this.adminServerService.startJobConfigurationScheduler(jobConfigurationId, lightminClientApplication); } JobListenerFeService(final RegistrationBean registrationBean, final AdminServerService adminServerService); MapJobListenerConfigurationModel getMapJobConfigurationModel(final String applicationInstanceId); ListenerJobConfigurationModel getJobConfigurationModel(final Long jobConfigurationId,
                                                                  final String applicationInstanceId); void startListener(final Long jobConfigurationId, final String applicationInstanceId); void stopListener(final Long jobConfigurationId, final String applicationInstanceId); void deleteListenerConfiguration(final Long jobConfigurationId, final String applicationInstanceId); void addListenerConfiguration(final ListenerJobConfigurationModel listenerModel,
                                         final String applicationInstanceId); void updateListenerConfiguration(final ListenerJobConfigurationModel listenerModel,
                                            final String applicationInstanceId);  }
@Test public void testStartListener() { final LightminClientApplication lightminClientApplication = ServiceTestHelper.createLightminClientApplication(); when(this.registrationBean.findById(APPLICATION_INSTANCE_ID)).thenReturn(lightminClientApplication); try { this.jobListenerFeService.startListener(JC_ID, APPLICATION_INSTANCE_ID); verify(this.adminServerService, times(1)).startJobConfigurationScheduler(JC_ID, lightminClientApplication); } catch (final Exception e) { fail(e.getMessage()); } }