public String getFragmentByLines(int startLine, int endLine) {
    Preconditions.checkArgument(startLine <= endLine);
    return Joiner.on("\n").join(getLines(startLine, endLine)) + "\n";
  }
@Test
  public void getFragmentByLines() {
    assertThat(sourceFile.getFragmentByLines(2, 2))
        .isEqualTo("// eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut\n");
    assertThat(sourceFile.getFragmentByLines(8, 8)).isEqualTo("// est laborum.\n");
    assertThat(sourceFile.getFragmentByLines(2, 3))
        .isEqualTo(
            "// eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut\n"
                + "// enim ad minim veniam, quis nostrud exercitation ullamco\n");
    assertThat(sourceFile.getFragmentByLines(1, 8)).isEqualTo(SOURCE_TEXT);
  }