@Test
public void parseAaptOutputWithRange4() throws IOException {

  // Check that when we have a duplicate resource error, we highlight both the original property
  // and the original definition.
  // This tests the original definition. Note that we don't have enough position info so we simply
  // highlight the whitespace portion of the line.
  createTempXmlFile();
  writeToFile("<resources xmlns:android='http://schemas.android.com/apk/res/android'>",
              "  <style name='repeatedStyle1'>",
              "    <item name='android:gravity'>left</item>");
  String messageText = "Originally defined here.";
  String err = sourceFilePath + ":3: " + messageText;
  Collection<Message> messages = parser.parseGradleOutput(err);
  assertHasCorrectErrorMessage(messages, messageText, 3, 5);
}