ProblemPosition { @Override public String toString() { return "Line " + line + ", offset: [" + getOffset(range) + "]"; } ProblemPosition(final int line);  ProblemPosition(final int line, final Range<Integer> range); static ProblemPosition fromRegion(final FileRegion region); int getLine(); Optional<Range<Integer>> getRange(); @Override String toString(); @Override boolean equals(final Object obj); @Override int hashCode();  }
@Test public void stringRepresentationTest() { assertThat(new ProblemPosition(42).toString()).isEqualTo("Line 42, offset: [empty]"); assertThat(new ProblemPosition(42, Range.closed(100, 200)).toString()).isEqualTo("Line 42, offset: [100, 200]"); }