@Override
  public CompletableFuture<T> toCompletableFuture()
  {
    return _task.toCompletionStage().toCompletableFuture();
  }
@Test
  public void testCreateStageFromRunnable_withExecutor() throws Exception
  {
    final String[] stringArr = new String[1];
    String testResult = "testCreateStageFromCompletableFuture";
    ParSeqBasedCompletionStage<Void> stageFromCompletionStage =
        _parSeqBasedCompletionStageFactory.buildStageFromRunnableAsync(() -> {
          try {
            Thread.sleep(500);
          } catch (InterruptedException e) {
            e.printStackTrace();
          }
          stringArr[0] = testResult;
        }, _executor);
    Assert.assertEquals(stringArr[0], null);
    stageFromCompletionStage.toCompletableFuture().get(); //ensure completion
    Assert.assertEquals(stringArr[0], testResult);
  }