static @Nullable <V> V getWhenSuccessful(@Nullable CompletableFuture<V> future) {
    try {
      return (future == null) ? null : future.join();
    } catch (CancellationException | CompletionException e) {
      return null;
    }
  }
@Test
  public void getWhenSuccessful_success_async() {
    var future = new CompletableFuture<Integer>();
    var result = new AtomicInteger();
    ConcurrentTestHarness.execute(() -> {
      result.set(1);
      result.set(Async.getWhenSuccessful(future));
    });
    await().untilAtomic(result, is(1));
    future.complete(2);
    await().untilAtomic(result, is(2));
  }