@Test public void immediateFutureCannotBeCancelled() { Future<Object> future = Futures.immediateFuture(mock(Object.class)); assertThat(future.cancel(false)).isFalse(); }
@Override public boolean cancel(boolean mayInterruptIfRunning) { return false; }
ImmediateFuture implements ListenableFuture<V> { @Override public boolean cancel(boolean mayInterruptIfRunning) { return false; } }
ImmediateFuture implements ListenableFuture<V> { @Override public boolean cancel(boolean mayInterruptIfRunning) { return false; }  }
ImmediateFuture implements ListenableFuture<V> { @Override public boolean cancel(boolean mayInterruptIfRunning) { return false; }  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); }
ImmediateFuture implements ListenableFuture<V> { @Override public boolean cancel(boolean mayInterruptIfRunning) { return false; }  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);  }