@Override
    public boolean isDone() {
        if (delegate.isDone()) {
            try {
                ensureResultSet(Long.MAX_VALUE, TimeUnit.DAYS);
            } catch (ExecutionException | CancellationException | TimeoutException ignored) {
                ignore(ignored);
            }
            return true;
        } else {
            return super.isDone();
        }
    }
@Test
    public void completeDelegate_withException_callbackBeforeGet_invokeIsDoneOnOuter_callbacksRun() {
        BiConsumer<String, Throwable> callback = getStringExecutionCallback();
        delegateThrowException = true;

        delegateFuture.run();
        outerFuture.whenCompleteAsync(callback, CALLER_RUNS);
        outerFuture.isDone();

        verify(callback, times(0)).accept(any(String.class), isNull());
        verify(callback, times(1)).accept(isNull(), any(Throwable.class));
        verifyNoMoreInteractions(callback);
    }