question: public void waitUntil ( Predicate < OutputFrame > predicate , long limit , TimeUnit limitUnit ) throws TimeoutException { long expiry = limitUnit . toMillis ( limit ) + System . currentTimeMillis ( ) ; waitUntil ( predicate , expiry ) ; }
target:  Wait until any frame (usually, line) of output matches the provided predicate. <p> Note that lines will often have a trailing newline character, and this is not stripped off before the predicate is tested.