@Test public void testShutdown() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { Container container = new Container(); Field repositorySyncExecutorField = Container.class.getDeclaredField("repositorySyncExecutor"); repositorySyncExecutorField.setAccessible(true); ScheduledExecutorService repositorySyncExecutor = (ScheduledExecutorService) repositorySyncExecutorField.get(container); assertFalse(repositorySyncExecutor.isShutdown()); Field schedulerSyncExecutorField = Container.class.getDeclaredField("schedulerSyncExecutor"); schedulerSyncExecutorField.setAccessible(true); ScheduledExecutorService schedulerSyncExecutor = (ScheduledExecutorService) schedulerSyncExecutorField.get(container); assertFalse(schedulerSyncExecutor.isShutdown()); container.shutdown(); assertTrue(repositorySyncExecutor.isShutdown()); assertTrue(schedulerSyncExecutor.isShutdown()); }
public void shutdown() { log.info("Stopping sync with scheduler"); schedulerSyncExecutor.shutdownNow(); log.info("Stopping sync with repository"); repositorySyncExecutor.shutdownNow(); }
Container { public void shutdown() { log.info("Stopping sync with scheduler"); schedulerSyncExecutor.shutdownNow(); log.info("Stopping sync with repository"); repositorySyncExecutor.shutdownNow(); } }
Container { public void shutdown() { log.info("Stopping sync with scheduler"); schedulerSyncExecutor.shutdownNow(); log.info("Stopping sync with repository"); repositorySyncExecutor.shutdownNow(); } Container();  Container(Scheduler scheduler, Repository repository); }
Container { public void shutdown() { log.info("Stopping sync with scheduler"); schedulerSyncExecutor.shutdownNow(); log.info("Stopping sync with repository"); repositorySyncExecutor.shutdownNow(); } Container();  Container(Scheduler scheduler, Repository repository); Scheduler scheduler(); Repository repository(); Fault fault(String name, String params); Fault fault(String name, String id, String params); Map<String, Class<? extends Fault>> classes(); Map<String, Fault> faults(); Map<String, Interceptor> interceptors(); void shutdown(); }
Container { public void shutdown() { log.info("Stopping sync with scheduler"); schedulerSyncExecutor.shutdownNow(); log.info("Stopping sync with repository"); repositorySyncExecutor.shutdownNow(); } Container();  Container(Scheduler scheduler, Repository repository); Scheduler scheduler(); Repository repository(); Fault fault(String name, String params); Fault fault(String name, String id, String params); Map<String, Class<? extends Fault>> classes(); Map<String, Fault> faults(); Map<String, Interceptor> interceptors(); void shutdown();  }