Source:
public void testNamespaceAwareAttributeRemoval ( ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String higherPriority = "" + ( ( ( ( ( ( ( ( "<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" ) + " <activity android:name=\"activityOne\"\n" ) + " tools:remove=\"android:theme\"/>\n" ) + "\n" ) + "</manifest>" ) ; java.lang.String lowerPriority = "" + ( ( ( ( ( ( ( ( "<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" ) + " <activity android:name=\"activityOne\" \n" ) + " android:theme=\"@oldtheme\"/>\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument refDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "higherPriority" ) , higherPriority ) ; com.android.manifmerger.XmlDocument otherDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "lowerPriority" ) , lowerPriority ) ; com.android.manifmerger.MergingReport.Builder mergingReportBuilder = new com.android.manifmerger.MergingReport.Builder ( new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ) ; com.google.common.base.Optional < com.android.manifmerger.XmlDocument > result = refDocument.merge ( otherDocument , mergingReportBuilder ) ; assertTrue ( result.isPresent ( ) ) ; com.android.manifmerger.XmlDocument resultDocument = result.get ( ) ; com.google.common.base.Optional < com.android.manifmerger.XmlElement > activityOne = resultDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.ACTIVITY , "com.example.lib3.activityOne" ) ; assertTrue ( activityOne.isPresent ( ) ) ; java.util.List < com.android.manifmerger.XmlAttribute > attributes = activityOne.get ( ) . getAttributes ( ) ; assertEquals ( 2 , attributes.size ( ) ) ; assertTrue ( activityOne.get ( ) . getAttribute ( com.android.manifmerger.XmlNode.fromXmlName ( "android:name" ) ) . isPresent ( ) ) ; assertTrue ( activityOne.get ( ) . getAttribute ( com.android.manifmerger.XmlNode.fromNSName ( SdkConstants.TOOLS_URI , "tools" , "remove" ) ) . isPresent ( ) ) ; }

Target:
public void testNamespaceAwareAttributeRemoval ( ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String higherPriority = "" + ( ( ( ( ( ( ( ( "<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" ) + " <activity android:name=\"activityOne\"\n" ) + " tools:remove=\"android:theme\"/>\n" ) + "\n" ) + "</manifest>" ) ; java.lang.String lowerPriority = "" + ( ( ( ( ( ( ( ( "<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" ) + " <activity android:name=\"activityOne\" \n" ) + " android:theme=\"@oldtheme\"/>\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument refDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "higherPriority" ) , higherPriority ) ; com.android.manifmerger.XmlDocument otherDocument = com.android.manifmerger.TestUtils.xmlLibraryFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "lowerPriority" ) , lowerPriority ) ; com.android.manifmerger.MergingReport.Builder mergingReportBuilder = new com.android.manifmerger.MergingReport.Builder ( new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ) ; com.google.common.base.Optional < com.android.manifmerger.XmlDocument > result = refDocument.merge ( otherDocument , mergingReportBuilder ) ; assertTrue ( result.isPresent ( ) ) ; com.android.manifmerger.XmlDocument resultDocument = result.get ( ) ; com.google.common.base.Optional < com.android.manifmerger.XmlElement > activityOne = resultDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.ACTIVITY , "com.example.lib3.activityOne" ) ; assertTrue ( activityOne.isPresent ( ) ) ; java.util.List < com.android.manifmerger.XmlAttribute > attributes = activityOne.get ( ) . getAttributes ( ) ; assertEquals ( 2 , attributes.size ( ) ) ; assertTrue ( activityOne.get ( ) . getAttribute ( com.android.manifmerger.XmlNode.fromXmlName ( "android:name" ) ) . isPresent ( ) ) ; assertTrue ( activityOne.get ( ) . getAttribute ( com.android.manifmerger.XmlNode.fromNSName ( SdkConstants.TOOLS_URI , "tools" , "remove" ) ) . isPresent ( ) ) ; }