ExecutorProxy implements Shutdownable { @Override public void shutdown() { logger.info("Shutting down."); executor.shutdown(); } ExecutorProxy(final ExecutorService executor); @Override void shutdown(); List<Runnable> shutdownNow(); boolean awaitTermination(final long timeout, final TimeUnit unit);  }
@Test public void testShutdown() { final ExecutorProxyStub proxy = new ExecutorProxyStub(); Assert.assertFalse(proxy.getExecutor().isShutdown()); proxy.shutdown(); Assert.assertTrue(proxy.getExecutor().isShutdown()); }