@Override
  public <U> ParSeqBasedCompletionStage<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn,
      Executor executor)
  {
    return nextStageByComposingTask(_task.transformWith("handleAsync", (prevTaskResult) -> Task.blocking(
        () -> fn.apply(prevTaskResult.isFailed() ? null : prevTaskResult.get(), prevTaskResult.getError()), executor)));
  }
@Test
  public void testHandleAsync() throws Exception
  {
    CountDownLatch waitLatch = new CountDownLatch(1);
    CompletionStage<String> completionStage = createTestStage(TESTVALUE1);
    finish(completionStage);

    completionStage.handleAsync((v, t) -> {
      assertEquals(THREAD_NAME_VALUE, Thread.currentThread().getName());
      waitLatch.countDown();
      return TESTVALUE2;
    }, _mockExecutor);

    assertTrue(waitLatch.await(1000, TimeUnit.MILLISECONDS));
  }