@Test
public void xmlErrorBadLineNumbers() throws Exception {

  // Like testXmlError2, but with tweaked line numbers to check the MergingExceptionParser parser
  createTempXmlFile();
  String output =
    "[Fatal Error] :5:2: The content of elements must consist of well-formed character data or markup.\n" +
    sourceFilePath + ":42: Error: The content of elements must consist of well-formed character data or markup.\n" +
    sourceFilePath + ":-1: Error: The content of elements must consist of well-formed character data or markup.\n" +
    sourceFilePath + ":-1:-1: Error: The content of elements must consist of well-formed character data or markup.";
  assertEquals("0: Error:The content of elements must consist of well-formed character data or markup.\n" +
               "1: Error:Error: The content of elements must consist of well-formed character data or markup.\n" +
               "\t" + sourceFilePath + ":42:-1\n" +
               "2: Error:Error: The content of elements must consist of well-formed character data or markup.\n" +
               "\t" + sourceFilePath + ":-1:-1\n",
               toString(parser.parseGradleOutput(output)));
  sourceFile.delete();
}