private void testCompleteOnTimeout_timesOut(Integer v){
  long timeoutMillis=timeoutMillis();
  CompletableFuture<Integer> f=new CompletableFuture<>();
  long startTime=System.nanoTime();
  assertSame(f,f.completeOnTimeout(v,timeoutMillis,MILLISECONDS));
  assertSame(v,f.join());
  assertTrue(millisElapsedSince(startTime) >= timeoutMillis);
  f.complete(99);
  checkCompletedNormally(f,v);
}

private void testCompleteOnTimeout_timesOut ( Integer v ) { long timeoutMillis = timeoutMillis ( ) ; CompletableFuture < Integer > f = new CompletableFuture < > ( ) ; long startTime = System . nanoTime ( ) ; assertSame ( f , f . completeOnTimeout ( v , timeoutMillis , MILLISECONDS ) ) ; assertSame ( v , f . join ( ) ) ; assertTrue ( millisElapsedSince ( startTime ) >= timeoutMillis ) ; f . complete ( 99 ) ; checkCompletedNormally ( f , v ) ; }
completeontimeout completes with given value if not complete
