@After
 public void tearDown() throws Exception {
   if (!stopped) {
     jobManager.stop();
   }
   jobManager = null;
 }
 @Test
 public void jobsOnStoppingShouldBeExecuted() throws Exception {
   ApplicationStopTestJob.results.clear();
   jobManager.start();
   jobManager.stop();
   stopped = true;
   assertThat(ApplicationStopTestJob.results, hasSize(1));
 }