public final TestSubscriber<T> assertTerminated(long timeout,TimeUnit unit){
  if (!await(timeout,unit)) {
    cancel();
    assertionError("TestSubscriber timed out. Received: " + volatileSize + ", last event: "+ (System.currentTimeMillis() - lastEvent)+ " ms ago");
  }
  return this;
}

public final TestSubscriber < T > assertTerminated ( long timeout , TimeUnit unit ) { if ( ! await ( timeout , unit ) ) { cancel ( ) ; assertionError ( "TestSubscriber timed out. Received: " + volatileSize + ", last event: " + ( System . currentTimeMillis ( ) - lastEvent ) + " ms ago" ) ; } return this ; }
asserts that the source terminates within the specified amount of time or else throws an assertionerror with the received event count and how long the last event was seen .
