### Question:
LineSequence implements Iterable<Line> { public static LineSequence create(String content) { return new ContentLineSequence(content); }  static LineSequence create(String content); abstract Line getCurrentLine(); abstract Line getNextLine(); abstract void advance(); void advance(int count); @Override Iterator<Line> iterator(); LineSequence with(Predicate<Line> predicate); LineSequence transform(Function<Line, Line> transform); abstract LineSequence lookAhead(); @Override String toString();  }### Answer:
@Test(expected = NullPointerException.class) public void createRequiresContent() { LineSequence.create((String) null); }
@Test public void empty() { assertNoLinesRemain(LineSequence.create("")); }
@Test public void oneLine() { assertOneLine(LineSequence.create("a")); }
@Test public void twoLines() { assertTwoLines(LineSequence.create("abc\r\ndefg")); }
@Test public void lookAheadFailsFast() { assertLookAheadFailsFast(LineSequence.create("a\nb\nc")); }
@Test public void createRequiresContent() { thrown.expect(NullPointerException.class); LineSequence.create((String) null); }