public void testHandle_normalCompletion(){
  for (  ExecutionMode m : ExecutionMode.values())   for (  boolean createIncomplete : new boolean[]{true,false})   for (  Integer v1 : new Integer[]{1,null}) {
    final CompletableFuture<Integer> f=new CompletableFuture<>();
    final AtomicInteger a=new AtomicInteger(0);
    if (!createIncomplete)     assertTrue(f.complete(v1));
    final CompletableFuture<Integer> g=m.handle(f,null);
    if (createIncomplete)     assertTrue(f.complete(v1));
    checkCompletedNormally(g,inc(v1));
    checkCompletedNormally(f,v1);
    assertEquals(1,a.get());
  }
}

public void testHandle_normalCompletion ( ) { for ( ExecutionMode m : ExecutionMode . values ( ) ) for ( boolean createIncomplete : new boolean [ ] { true , false } ) for ( Integer v1 : new Integer [ ] { 1 , null } ) { final CompletableFuture < Integer > f = new CompletableFuture < > ( ) ; final AtomicInteger a = new AtomicInteger ( 0 ) ; if ( ! createIncomplete ) assertTrue ( f . complete ( v1 ) ) ; final CompletableFuture < Integer > g = m . handle ( f , null ) ; if ( createIncomplete ) assertTrue ( f . complete ( v1 ) ) ; checkCompletedNormally ( g , inc ( v1 ) ) ; checkCompletedNormally ( f , v1 ) ; assertEquals ( 1 , a . get ( ) ) ; } }
handle action completes normally with function value on normal completion of source
