@Override
    public CompletableFuture<V> whenComplete(BiConsumer<? super V, ? super Throwable> action) {
        return future.handleAsync(new WhenCompleteAdapter(action), defaultExecutor());
    }
@Test
    public void whenComplete_whenExceptional() {
        CompletableFuture<String> nextStage = delegatingFuture.whenComplete((v, t) -> assertInstanceOf(IllegalArgumentException.class, t));
        invocationFuture.completeExceptionally(new IllegalArgumentException());

        assertTrueEventually(() -> assertTrue(nextStage.isDone()));

        assertThatThrownBy(delegatingFuture::join)
                .isInstanceOf(CompletionException.class)
                .cause().has(rootCause(IllegalArgumentException.class));
    }