ApplicationContextCloser implements ApplicationContextAware { public void closeTriggers() { scheduler.shutdown(); executor.shutdown(); appContext.close(); }  void closeTriggers(); @Override void setApplicationContext(final ApplicationContext appContext);  }
@Test public void testCloseTriggersShouldShutdownScheduler() { underTest.closeTriggers(); verify(scheduler).shutdown(); }
@Test public void testCloseTriggersShouldShutdownExecutor() { underTest.closeTriggers(); verify(executor).shutdown(); }
@Test public void testCloseTriggersShouldCloseApplicationContext() { underTest.closeTriggers(); verify(appContext).close(); }