### Question:
FutureImpl implements SealedFuture<T> { @Override public void cancel(boolean mayInterruptThread) { try { cancellable.cancel(mayInterruptThread); } finally { propagate.accept(mayInterruptThread); } } private  FutureImpl(Executor executor, Callback<T> callback); private  FutureImpl(Executor executor, Callback<T> callback, Propagate propagate); @Override Future<T> onComplete(Consumer1<? super Try<? extends T>> consumer); @Override Future<T> onSuccess(Consumer1<? super T> consumer); @Override Future<T> onFailure(Consumer1<? super Throwable> consumer); @Override boolean isCompleted(); @Override boolean isCancelled(); @Override Try<T> await(); @Override Try<T> await(Duration timeout); @Override Future<R> map(Function1<? super T, ? extends R> mapper); @Override Future<R> flatMap(Function1<? super T, ? extends Future<? extends R>> mapper); @Override Future<R> andThen(Future<? extends R> next); @Override Future<R> ap(Future<Function1<? super T, ? extends R>> apply); @Override Future<T> filter(Matcher1<? super T> matcher); @Override Future<T> orElse(Future<? extends T> other); @Override Future<T> recoverWith(Class<X> type, Function1<? super X, ? extends T> mapper); @Override Future<U> fold(Function1<? super Throwable, ? extends U> failureMapper, Function1<? super T, ? extends U> successMapper); @Override void cancel(boolean mayInterruptThread); @Override Promise<T> toPromise();  }### Answer:
@Test public void cancel() throws InterruptedException { Future<Unit> future = Future.sleep(Duration.ofSeconds(1)); Thread.sleep(50); future.cancel(true); assertTrue(future.isCancelled()); assertTrue(future.isCompleted()); assertTrue(future.await().getCause() instanceof CancellationException); }