question: public void testHandle_sourceCancelled ( ) { for ( ExecutionMode m : ExecutionMode . values ( ) ) for ( boolean mayInterruptIfRunning : new boolean [ ] { true , false } ) 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 . cancel ( mayInterruptIfRunning ) ) ; final CompletableFuture < Integer > g = m . handle ( f , null ) ; if ( createIncomplete ) assertTrue ( f . cancel ( mayInterruptIfRunning ) ) ; checkCompletedNormally ( g , v1 ) ; checkCancelled ( f ) ; assertEquals ( 1 , a . get ( ) ) ; } }
target:  handle action completes normally with function value on cancelled source