@Override
    public CompletableFuture<V> exceptionally(Function<Throwable, ? extends V> fn) {
        return future.handleAsync(new ExceptionallyAdapter(fn), defaultExecutor());
    }
@Test
    public void exceptionally() {
        CompletableFuture<String> nextStage = delegatingFuture.exceptionally(t -> "value2");
        invocationFuture.completeExceptionally(new IllegalStateException());

        assertTrueEventually(() -> assertTrue(nextStage.isDone()));
        assertEquals("value2", nextStage.join());
    }