Source:
public void testGlEsVersionFromFlavor ( ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String flavor = "" + ( ( ( ( ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <uses-feature\n" ) + " android:name=\"android.hardware.camera\"\n" ) + " android:glEsVersion=\"0x00020000\"\n" ) + " android:required=\"true\" />" ) + "\n" ) + " <application android:label=\"@string/lib_name\" />\n" ) + "\n" ) + "</manifest>" ) ; java.lang.String main = "" + ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " xmlns:acme=\"http://acme.org/schemas\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <activity android:name=\"activityOne\" />\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument flavorDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "flavor" ) , flavor ) ; com.android.manifmerger.XmlDocument mainDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "main" ) , main ) ; com.android.manifmerger.MergingReport.Builder mergingReportBuilder = new com.android.manifmerger.MergingReport.Builder ( mLogger ) ; com.google.common.base.Optional < com.android.manifmerger.XmlDocument > mergedDocument = flavorDocument.merge ( mainDocument , mergingReportBuilder ) ; assertTrue ( mergedDocument.isPresent ( ) ) ; java.lang.System.out.println ( mergedDocument.get ( ) . prettyPrint ( ) ) ; com.android.manifmerger.XmlDocument xmlDocument = mergedDocument.get ( ) ; com.google.common.base.Optional < com.android.manifmerger.XmlElement > usesFeature = xmlDocument.getByTypeAndKey ( ManifestModel.NodeTypes.USES_FEATURE , "android.hardware.camera" ) ; assertTrue ( usesFeature.isPresent ( ) ) ; com.google.common.base.Optional < com.android.manifmerger.XmlAttribute > glEsVersion = usesFeature.get ( ) . getAttribute ( com.android.manifmerger.XmlNode.fromXmlName ( "android:glEsVersion" ) ) ; assertTrue ( glEsVersion.isPresent ( ) ) ; assertEquals ( "0x00020000" , glEsVersion.get ( ) . getValue ( ) ) ; }

Target:
public void testGlEsVersionFromFlavor ( ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String flavor = "" + ( ( ( ( ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <uses-feature\n" ) + " android:name=\"android.hardware.camera\"\n" ) + " android:glEsVersion=\"0x00020000\"\n" ) + " android:required=\"true\" />" ) + "\n" ) + " <application android:label=\"@string/lib_name\" />\n" ) + "\n" ) + "</manifest>" ) ; java.lang.String main = "" + ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " xmlns:acme=\"http://acme.org/schemas\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <activity android:name=\"activityOne\" />\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument flavorDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "flavor" ) , flavor ) ; com.android.manifmerger.XmlDocument mainDocument = com.android.manifmerger.TestUtils.xmlLibraryFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "main" ) , main ) ; com.android.manifmerger.MergingReport.Builder mergingReportBuilder = new com.android.manifmerger.MergingReport.Builder ( mLogger ) ; com.google.common.base.Optional < com.android.manifmerger.XmlDocument > mergedDocument = flavorDocument.merge ( mainDocument , mergingReportBuilder ) ; assertTrue ( mergedDocument.isPresent ( ) ) ; java.lang.System.out.println ( mergedDocument.get ( ) . prettyPrint ( ) ) ; com.android.manifmerger.XmlDocument xmlDocument = mergedDocument.get ( ) ; com.google.common.base.Optional < com.android.manifmerger.XmlElement > usesFeature = xmlDocument.getByTypeAndKey ( ManifestModel.NodeTypes.USES_FEATURE , "android.hardware.camera" ) ; assertTrue ( usesFeature.isPresent ( ) ) ; com.google.common.base.Optional < com.android.manifmerger.XmlAttribute > glEsVersion = usesFeature.get ( ) . getAttribute ( com.android.manifmerger.XmlNode.fromXmlName ( "android:glEsVersion" ) ) ; assertTrue ( glEsVersion.isPresent ( ) ) ; assertEquals ( "0x00020000" , glEsVersion.get ( ) . getValue ( ) ) ; }