ImmediateFuture implements ListenableFuture<V> { @Override public boolean isDone() { return true; }  static ListenableFuture<V> nullFuture(); @Override void addListener(@NonNull Runnable listener, @NonNull Executor executor); @Override boolean cancel(boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override @Nullable abstract V get(); @Override @Nullable V get(long timeout, @NonNull TimeUnit unit);  }
@Test public void immediateFutureIsDone() { Future<Object> future = Futures.immediateFuture(mock(Object.class)); assertThat(future.isDone()).isTrue(); }
@Test public void immediateFailedFutureIsDone() { Future<Object> future = Futures.immediateFailedFuture(mock(Throwable.class)); assertThat(future.isDone()).isTrue(); }