public void testCompletedStage(){
  AtomicInteger x=new AtomicInteger(0);
  AtomicReference<Throwable> r=new AtomicReference<Throwable>();
  CompletionStage<Integer> f=CompletableFuture.completedStage(1);
  f.whenComplete(null);
  assertEquals(x.get(),1);
  assertNull(r.get());
}

public void testCompletedStage ( ) { AtomicInteger x = new AtomicInteger ( 0 ) ; AtomicReference < Throwable > r = new AtomicReference < Throwable > ( ) ; CompletionStage < Integer > f = CompletableFuture . completedStage ( 1 ) ; f . whenComplete ( null ) ; assertEquals ( x . get ( ) , 1 ) ; assertNull ( r . get ( ) ) ; }
completedstage returns a completed completionstage
