question: public void testFailedStage ( ) { CFException ex = new CFException ( ) ; CompletionStage < Integer > f = CompletableFuture . failedStage ( ex ) ; AtomicInteger x = new AtomicInteger ( 0 ) ; AtomicReference < Throwable > r = new AtomicReference < Throwable > ( ) ; f . whenComplete ( null ) ; assertEquals ( x . get ( ) , 0 ) ; assertEquals ( r . get ( ) , ex ) ; }
target:  failedStage returns a CompletionStage completed exceptionally with the given Exception