### Question:
PredicateLineSequence extends LineSequence { @Override public LineSequence lookAhead() { return new PredicateLineSequence(delegate.lookAhead(), predicate); } PredicateLineSequence(LineSequence delegate, Predicate<Line> predicate); @Override Line getCurrentLine(); @Override Line getNextLine(); @Override void advance(); @Override LineSequence lookAhead();  }### Answer:
@Test public void lookAhead() { LineSequence originalLineSequence = LineSequence.create("one\ntwo"); PredicateLineSequence lineSequence = new PredicateLineSequence(originalLineSequence, notTwoPredicate()); LineSequence lookAhead = lineSequence.lookAhead(); assertEquals("one", lookAhead.getCurrentLine().getText()); assertNull(lookAhead.getNextLine()); lookAhead.advance(); assertNull(lookAhead.getCurrentLine()); assertNull(lookAhead.getNextLine()); assertEquals("one", lineSequence.getCurrentLine().getText()); }