@Test
public void parseJavaOutput1() throws IOException {

  createTempFile(".java");
  writeToFile("public class Test {",
              "  public static void main(String[] args) {",
              "    int v2 = v4");
  StringBuilder err = new StringBuilder();
  err.append(sourceFilePath).append(":3: error: ").append("cannot find symbol").append(NEWLINE)
     .append("symbol  : variable v4").append(NEWLINE)
     .append("location: Test").append(NEWLINE)
     .append("    int v2 = v4").append(NEWLINE)
     .append("             ^");
  Collection<Message> messages = parser.parseGradleOutput(err.toString());
  assertHasCorrectErrorMessage(messages, "error: cannot find symbol variable v4", 3, 14);
}