### Question:
CompletableResultCode { public boolean isDone() { synchronized (lock) { return succeeded != null; } } CompletableResultCode(); static CompletableResultCode ofSuccess(); static CompletableResultCode ofFailure(); static CompletableResultCode ofAll(final Collection<CompletableResultCode> codes); CompletableResultCode succeed(); CompletableResultCode fail(); boolean isSuccess(); CompletableResultCode whenComplete(Runnable action); boolean isDone(); CompletableResultCode join(long timeout, TimeUnit unit);  }### Answer:
@Test void isDone() { CompletableResultCode result = new CompletableResultCode(); assertThat(result.isDone()).isFalse(); result.fail(); assertThat(result.isDone()).isTrue(); }