### Question:
TransformLineSequence extends LineSequence { @Override public LineSequence lookAhead() { return new TransformLineSequence(delegate.lookAhead(), transform); } TransformLineSequence(LineSequence delegate, Function<Line, Line> transform); @Override Line getCurrentLine(); @Override Line getNextLine(); @Override void advance(); @Override LineSequence lookAhead();  }### Answer:
@Test public void lookAhead() { lineSequence.advance(); LineSequence lookAhead = lineSequence.lookAhead(); assertEquals("SECOND", lookAhead.getCurrentLine().getText()); lookAhead.advance(); assertNull(lookAhead.getCurrentLine()); assertEquals("SECOND", lineSequence.getCurrentLine().getText()); }