public void testOrTimeout_timesOut(){
  long timeoutMillis=timeoutMillis();
  CompletableFuture<Integer> f=new CompletableFuture<>();
  long startTime=System.nanoTime();
  assertSame(f,f.orTimeout(timeoutMillis,MILLISECONDS));
  checkCompletedWithTimeoutException(f);
  assertTrue(millisElapsedSince(startTime) >= timeoutMillis);
}

public void testOrTimeout_timesOut ( ) { long timeoutMillis = timeoutMillis ( ) ; CompletableFuture < Integer > f = new CompletableFuture < > ( ) ; long startTime = System . nanoTime ( ) ; assertSame ( f , f . orTimeout ( timeoutMillis , MILLISECONDS ) ) ; checkCompletedWithTimeoutException ( f ) ; assertTrue ( millisElapsedSince ( startTime ) >= timeoutMillis ) ; }
ortimeout completes with timeoutexception if not complete
