@Test
public void parseXmlValidationErrorOutput() {

  StringBuilder err = new StringBuilder();
  err.append("[Fatal Error] :5:7: The element type \"error\" must be terminated by the matching end-tag \"</error>\".").append(NEWLINE);
  err.append("FAILURE: Build failed with an exception.").append(NEWLINE);
  List<Message> messages = parser.parseGradleOutput(err.toString());
  assertEquals("0: Error:The element type \"error\" must be terminated by the matching end-tag \"</error>\".\n" +
               "1: Simple:FAILURE: Build failed with an exception.\n",
               toString(messages));
}