public void testExceptionally_exceptionalCompletion(){
  for (  boolean createIncomplete : new boolean[]{true,false})   for (  Integer v1 : new Integer[]{1,null}) {
    final AtomicInteger a=new AtomicInteger(0);
    final CFException ex=new CFException();
    final CompletableFuture<Integer> f=new CompletableFuture<>();
    if (!createIncomplete)     f.completeExceptionally(ex);
    final CompletableFuture<Integer> g=f.exceptionally(null);
    if (createIncomplete)     f.completeExceptionally(ex);
    checkCompletedNormally(g,v1);
    assertEquals(1,a.get());
  }
}

public void testExceptionally_exceptionalCompletion ( ) { for ( boolean createIncomplete : new boolean [ ] { true , false } ) for ( Integer v1 : new Integer [ ] { 1 , null } ) { final AtomicInteger a = new AtomicInteger ( 0 ) ; final CFException ex = new CFException ( ) ; final CompletableFuture < Integer > f = new CompletableFuture < > ( ) ; if ( ! createIncomplete ) f . completeExceptionally ( ex ) ; final CompletableFuture < Integer > g = f . exceptionally ( null ) ; if ( createIncomplete ) f . completeExceptionally ( ex ) ; checkCompletedNormally ( g , v1 ) ; assertEquals ( 1 , a . get ( ) ) ; } }
exceptionally action completes with function value on source exception
