SchedulerService { public void stop() { consoleBootstrap.stop(); taskLaunchScheduledService.stopAsync(); cloudJobConfigurationListener.stop(); cloudAppConfigurationListener.stop(); cloudJobDisableListener.stop(); cloudAppDisableListener.stop(); statisticManager.shutdown(); producerManager.shutdown(); schedulerDriver.stop(true); facadeService.stop(); if (env.getFrameworkConfiguration().isEnabledReconcile()) { reconcileService.stopAsync(); } } SchedulerService(final CoordinatorRegistryCenter regCenter); void start(); void stop();  }
@Test public void assertStop() { setReconcileEnabled(true); schedulerService.stop(); InOrder inOrder = getInOrder(); inOrder.verify(consoleBootstrap).stop(); inOrder.verify(taskLaunchScheduledService).stopAsync(); inOrder.verify(cloudJobConfigurationListener).stop(); inOrder.verify(statisticManager).shutdown(); inOrder.verify(producerManager).shutdown(); inOrder.verify(schedulerDriver).stop(true); inOrder.verify(facadeService).stop(); inOrder.verify(reconcileService).stopAsync(); }
@Test public void assertStopWithoutReconcile() { setReconcileEnabled(false); schedulerService.stop(); InOrder inOrder = getInOrder(); inOrder.verify(consoleBootstrap).stop(); inOrder.verify(taskLaunchScheduledService).stopAsync(); inOrder.verify(cloudJobConfigurationListener).stop(); inOrder.verify(statisticManager).shutdown(); inOrder.verify(producerManager).shutdown(); inOrder.verify(schedulerDriver).stop(true); inOrder.verify(facadeService).stop(); inOrder.verify(reconcileService, never()).stopAsync(); }