@Test
public void parseAaptOutputWithRange3() throws IOException {

  // Check that when we have a duplicate resource error, we highlight both the original property
  // and the original definition.
  // This tests the second, duplicate declaration ration.
  createTempXmlFile();
  writeToFile("<resources xmlns:android='http://schemas.android.com/apk/res/android'>",
              "  <style name='repeatedStyle1'>",
              "    <item name='android:gravity'>left</item>",
              "  </style>",
              "  <style name='repeatedStyle1'>",
              "    <item name='android:gravity'>left</item>");
  String messageText = "Resource entry repeatedStyle1 already has bag item android:gravity.";
  String err = sourceFilePath + ":6: error: " + messageText;
  Collection<Message> messages = parser.parseGradleOutput(err);
  assertHasCorrectErrorMessage(messages, messageText, 6, 17);
}