public void replaceLines(List<String> lines) {
    sourceBuilder.replace(0, sourceBuilder.length(), Joiner.on("\n").join(lines) + "\n");
  }
@Test
  public void replaceLines() {
    sourceFile.replaceLines(Arrays.asList("Line1", "Line2"));
    assertThat(sourceFile.getSourceText()).isEqualTo("Line1\nLine2\n");
  }