LazyExecutorService implements ExecutorService { @Override public <T> Future<T> submit(final Callable<T> task) { checkNotNull(task, "Null task submitted."); tasksAndTerminationLock.lock(); try { if (isShutdown()) { throw new RejectedExecutionException("ExecutorService is shutdown"); } ExecutingFuture<T> future = new ExecutingFutureImpl<T>(task); pendingTasks.add(future); return future; } finally { tasksAndTerminationLock.unlock(); } } 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 testSubmitTask() { Future<?> future = lazyExecutorService.submit(() -> {}); assertThat(future.isDone()).isTrue(); }
@Test public void testSubmitTaskWithResult() { Future<Object> future = lazyExecutorService.submit(() -> {}, null); assertThat(future.isDone()).isTrue(); }