@Test(expected = IllegalStateException.class) public void testWorkerShutdownCallableThrows() throws Exception { Callable<Boolean> requestedShutdownCallable = new GracefulShutdownCoordinator().createGracefulShutdownCallable(contextCallable); when(contextCallable.call()).thenThrow(new IllegalStateException("Bad Shutdown")); requestedShutdownCallable.call(); }
Callable<Boolean> createGracefulShutdownCallable(Callable<GracefulShutdownContext> startWorkerShutdown) { return new GracefulShutdownCallable(startWorkerShutdown); }
GracefulShutdownCoordinator { Callable<Boolean> createGracefulShutdownCallable(Callable<GracefulShutdownContext> startWorkerShutdown) { return new GracefulShutdownCallable(startWorkerShutdown); } }
GracefulShutdownCoordinator { Callable<Boolean> createGracefulShutdownCallable(Callable<GracefulShutdownContext> startWorkerShutdown) { return new GracefulShutdownCallable(startWorkerShutdown); }  }
GracefulShutdownCoordinator { Callable<Boolean> createGracefulShutdownCallable(Callable<GracefulShutdownContext> startWorkerShutdown) { return new GracefulShutdownCallable(startWorkerShutdown); }   }
GracefulShutdownCoordinator { Callable<Boolean> createGracefulShutdownCallable(Callable<GracefulShutdownContext> startWorkerShutdown) { return new GracefulShutdownCallable(startWorkerShutdown); }    }