@Override
  public void onError(Throwable e)
  {
    _future.completeExceptionally(e);
  }
@Test
  public void testError()
  {
    CompletableFuture<String> future = new CompletableFuture<>();
    CompletableFutureCallbackAdapter<String> adapter = new CompletableFutureCallbackAdapter<>(future);
    Throwable error = new IllegalArgumentException("exception");
    adapter.onError(error);
    assertTrue(future.isDone());
    assertTrue(future.isCompletedExceptionally());
    assertFalse(future.isCancelled());

    try
    {
      future.get();
    }
    catch (ExecutionException | InterruptedException e)
    {
      assertTrue(e instanceof ExecutionException);
      assertEquals(e.getCause(), error);
    }
  }