LazyExecutorService implements ExecutorService { @Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { if (isTerminated()) { return true; } return terminated.await(timeout, unit); } LazyExecutorService();  LazyExecutorService(ExecutorService backingService); @Override void shutdown(); @CanIgnoreReturnValue @Override List<Runnable> shutdownNow(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override boolean awaitTermination(long timeout, TimeUnit unit); @Override Future<T> submit(final Callable<T> task); @Override Future<T> submit(Runnable task, T result); @Override Future<?> submit(Runnable command); @CanIgnoreReturnValue @Override List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks); @CanIgnoreReturnValue @Override List<Future<T>> invokeAll(
      Collection<? extends Callable<T>> tasks, final long timeout, final TimeUnit unit); @Override T invokeAny(Collection<? extends Callable<T>> tasks); @Override T invokeAny(
      final Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit); @Override void execute(Runnable command);  }
@Test public void testAwaitTermination() throws Exception { assertThat(lazyExecutorService.awaitTermination(1, TimeUnit.MILLISECONDS)).isFalse(); lazyExecutorService.shutdown(); assertThat(lazyExecutorService.awaitTermination(1, TimeUnit.MILLISECONDS)).isTrue(); }