### Question:
TextSegment { @Override public String toString() { return toStringHelper(TextSegment.class).add("text", ToStringHelper.toStringValue(text)).toString(); } TextSegment(Iterable<Line> lines); String getText(); List<Line> getLines(); int offsetOf(int textOffset); int toTextOffset(int documentOffset); @Override String toString(); Line getLineAtOffset(int textOffset);  }### Answer:
@Test public void toStringTest() { assertEquals("TextSegment{text=one\\ntwo\\nthree four}", new TextSegment(createLines("one\ntwo\r\nthree four")).toString()); assertEquals("TextSegment{text=01234567890123456789...}", new TextSegment(createLines(Strings.repeat("0123456789", 10))).toString()); }