Source:
public void testIllegalLibraryVersionMerge ( ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String main = "" + ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <application android:label=\"@string/lib_name\" />\n" ) + " <uses-sdk android:minSdkVersion=\"4\"/>\n" ) + "\n" ) + "</manifest>" ) ; java.lang.String library = "" + ( ( ( ( ( ( ( ( "<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" ) + " <uses-sdk android:minSdkVersion=\"19\"/>\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument mainDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "main" ) , main ) ; com.android.manifmerger.XmlDocument libraryDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "library" ) , library ) ; com.android.manifmerger.MergingReport.Builder mergingReportBuilder = new com.android.manifmerger.MergingReport.Builder ( mLogger ) ; com.google.common.base.Optional < com.android.manifmerger.XmlDocument > mergedDocument = mainDocument.merge ( libraryDocument , mergingReportBuilder ) ; assertFalse ( mergedDocument.isPresent ( ) ) ; com.android.manifmerger.MergingReport mergingReport = mergingReportBuilder.build ( ) ; assertEquals ( 2 , mergingReport.getLoggingRecords ( ) . size ( ) ) ; assertTrue ( ( ( mergingReport.getLoggingRecords ( ) . get ( 0 ) . getSeverity ( ) ) == ( Severity.ERROR ) ) ) ; assertTrue ( ( ( mergingReport.getLoggingRecords ( ) . get ( 1 ) . getSeverity ( ) ) == ( Severity.ERROR ) ) ) ; assertTrue ( mergingReport.getLoggingRecords ( ) . get ( 1 ) . toString ( ) . contains ( "uses-sdk:minSdkVersion 4" ) ) ; }

Target:
public void testIllegalLibraryVersionMerge ( ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String main = "" + ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <application android:label=\"@string/lib_name\" />\n" ) + " <uses-sdk android:minSdkVersion=\"4\"/>\n" ) + "\n" ) + "</manifest>" ) ; java.lang.String library = "" + ( ( ( ( ( ( ( ( "<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" ) + " <uses-sdk android:minSdkVersion=\"19\"/>\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument mainDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "main" ) , main ) ; com.android.manifmerger.XmlDocument libraryDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "library" ) , library ) ; com.android.manifmerger.MergingReport.Builder mergingReportBuilder = new com.android.manifmerger.MergingReport.Builder ( mLogger ) ; com.google.common.base.Optional < com.android.manifmerger.XmlDocument > mergedDocument = mainDocument.merge ( libraryDocument , mergingReportBuilder ) ; assertFalse ( mergedDocument.isPresent ( ) ) ; com.android.manifmerger.MergingReport mergingReport = mergingReportBuilder.build ( ) ; assertEquals ( 1 , mergingReport.getLoggingRecords ( ) . size ( ) ) ; assertTrue ( ( ( mergingReport.getLoggingRecords ( ) . get ( 0 ) . getSeverity ( ) ) == ( Severity.ERROR ) ) ) ; assertTrue ( mergingReport.getLoggingRecords ( ) . get ( 0 ) . toString ( ) . contains ( "uses-sdk:minSdkVersion 4" ) ) ; }