Source:
public void testToolsPrefix ( ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String input = "" + ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " xmlns:tools=\"http://schemas.android.com/tools\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <application android:label=\"@string/lib_name\" tools:node=\"replace\"/>\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument xmlDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "testToolsPrefix()" ) , input ) ; com.google.common.base.Optional < com.android.manifmerger.XmlElement > applicationOptional = xmlDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.APPLICATION , null ) ; assertTrue ( applicationOptional.isPresent ( ) ) ; org.w3c.dom.Element application = applicationOptional.get ( ) . getXml ( ) ; assertEquals ( 2 , application.getAttributes ( ) . getLength ( ) ) ; org.w3c.dom.Attr label = application.getAttributeNodeNS ( SdkConstants.ANDROID_URI , "label" ) ; assertEquals ( "android:label" , label.getNodeName ( ) ) ; org.w3c.dom.Attr tools = application.getAttributeNodeNS ( SdkConstants.TOOLS_URI , "node" ) ; assertEquals ( "replace" , tools.getNodeValue ( ) ) ; com.android.utils.PositionXmlParser.Position applicationPosition = applicationOptional.get ( ) . getPosition ( ) ; assertNotNull ( applicationPosition ) ; assertEquals ( 6 , applicationPosition.getLine ( ) ) ; assertEquals ( 5 , applicationPosition.getColumn ( ) ) ; com.android.manifmerger.XmlAttribute xmlAttribute = new com.android.manifmerger.XmlAttribute ( applicationOptional.get ( ) , tools , null ) ; com.android.utils.PositionXmlParser.Position toolsPosition = xmlAttribute.getPosition ( ) ; assertNotNull ( toolsPosition ) ; assertEquals ( 6 , toolsPosition.getLine ( ) ) ; assertEquals ( 51 , toolsPosition.getColumn ( ) ) ; }

Target:
public void testToolsPrefix ( ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String input = "" + ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " xmlns:tools=\"http://schemas.android.com/tools\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <application android:label=\"@string/lib_name\" tools:node=\"replace\"/>\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument xmlDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "testToolsPrefix()" ) , input ) ; com.google.common.base.Optional < com.android.manifmerger.XmlElement > applicationOptional = xmlDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.APPLICATION , null ) ; assertTrue ( applicationOptional.isPresent ( ) ) ; org.w3c.dom.Element application = applicationOptional.get ( ) . getXml ( ) ; assertEquals ( 2 , application.getAttributes ( ) . getLength ( ) ) ; org.w3c.dom.Attr label = application.getAttributeNodeNS ( SdkConstants.ANDROID_URI , "label" ) ; assertEquals ( "android:label" , label.getNodeName ( ) ) ; org.w3c.dom.Attr tools = application.getAttributeNodeNS ( SdkConstants.TOOLS_URI , NodeOperationType.NODE_LOCAL_NAME ) ; assertEquals ( "replace" , tools.getNodeValue ( ) ) ; com.android.utils.PositionXmlParser.Position applicationPosition = applicationOptional.get ( ) . getPosition ( ) ; assertNotNull ( applicationPosition ) ; assertEquals ( 6 , applicationPosition.getLine ( ) ) ; assertEquals ( 5 , applicationPosition.getColumn ( ) ) ; com.android.manifmerger.XmlAttribute xmlAttribute = new com.android.manifmerger.XmlAttribute ( applicationOptional.get ( ) , tools , null ) ; com.android.utils.PositionXmlParser.Position toolsPosition = xmlAttribute.getPosition ( ) ; assertNotNull ( toolsPosition ) ; assertEquals ( 6 , toolsPosition.getLine ( ) ) ; assertEquals ( 51 , toolsPosition.getColumn ( ) ) ; }