Source:
public void testSingleElement_withoutAttributes_withRejection ( ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String other = "" + ( ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " xmlns:tools=\"http://schemas.android.com/apk/res/android/tools\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <activity android:name=\"activityOne\" " ) + " android:configChanges=\"locale\"/>\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument xmlDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , com.android.manifmerger.ActionRecorderTest.REFEFENCE_DOCUMENT ) , com.android.manifmerger.ActionRecorderTest.REFERENCE ) ; com.android.manifmerger.XmlDocument otherDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "other_document" ) , other ) ; com.android.manifmerger.XmlElement xmlElement = xmlDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.ACTIVITY , "com.example.lib3.activityOne" ) . get ( ) ; mActionRecorderBuilder.recordNodeAction ( xmlElement , Actions.ActionType.ADDED ) ; mActionRecorderBuilder.recordNodeAction ( xmlElement , Actions.ActionType.REJECTED , otherDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.ACTIVITY , "com.example.lib3.activityOne" ) . get ( ) ) ; com.android.manifmerger.Actions actions = mActionRecorderBuilder.build ( ) ; assertEquals ( 1 , actions.getNodeKeys ( ) . size ( ) ) ; assertEquals ( 2 , actions.getNodeRecords ( xmlElement.getId ( ) ) . size ( ) ) ; assertEquals ( Actions.ActionType.ADDED , actions.getNodeRecords ( xmlElement.getId ( ) ) . get ( 0 ) . mActionType ) ; assertEquals ( Actions.ActionType.REJECTED , actions.getNodeRecords ( xmlElement.getId ( ) ) . get ( 1 ) . mActionType ) ; assertEquals ( 0 , actions.getRecordedAttributeNames ( xmlElement.getId ( ) ) . size ( ) ) ; actions.log ( mLoggerMock ) ; java.lang.StringBuilder stringBuilder = new java.lang.StringBuilder ( ) ; stringBuilder.append ( Actions.HEADER ) . append ( xmlElement.getId ( ) ) . append ( "\n" ) ; appendNode ( stringBuilder , Actions.ActionType.ADDED , com.android.manifmerger.ActionRecorderTest.REFEFENCE_DOCUMENT , 6 ) ; appendNode ( stringBuilder , Actions.ActionType.REJECTED , "other_document" , 6 ) ; org.mockito.Mockito.verify ( mLoggerMock ) . info ( stringBuilder.toString ( ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mLoggerMock ) ; }

Target:
public void testSingleElement_withoutAttributes_withRejection ( ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String other = "" + ( ( ( ( ( ( ( ( "<manifest\n" + " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " xmlns:tools=\"http://schemas.android.com/apk/res/android/tools\"\n" ) + " package=\"com.example.lib3\">\n" ) + "\n" ) + " <activity android:name=\"activityOne\" " ) + " android:configChanges=\"locale\"/>\n" ) + "\n" ) + "</manifest>" ) ; com.android.manifmerger.XmlDocument xmlDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , com.android.manifmerger.ActionRecorderTest.REFEFENCE_DOCUMENT ) , com.android.manifmerger.ActionRecorderTest.REFERENCE ) ; com.android.manifmerger.XmlDocument otherDocument = com.android.manifmerger.TestUtils.xmlDocumentFromString ( new com.android.manifmerger.TestUtils.TestSourceLocation ( getClass ( ) , "other_document" ) , other ) ; com.android.manifmerger.XmlElement xmlElement = xmlDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.ACTIVITY , "com.example.lib3.activityOne" ) . get ( ) ; mActionRecorderBuilder.recordNodeAction ( xmlElement , Actions.ActionType.ADDED ) ; mActionRecorderBuilder.recordNodeAction ( xmlElement , Actions.ActionType.REJECTED , otherDocument.getRootNode ( ) . getNodeByTypeAndKey ( ManifestModel.NodeTypes.ACTIVITY , "com.example.lib3.activityOne" ) . get ( ) ) ; com.android.manifmerger.Actions actions = mActionRecorderBuilder.build ( ) ; assertEquals ( 1 , actions.getNodeKeys ( ) . size ( ) ) ; assertEquals ( 2 , actions.getNodeRecords ( xmlElement.getId ( ) ) . size ( ) ) ; assertEquals ( Actions.ActionType.ADDED , actions.getNodeRecords ( xmlElement.getId ( ) ) . get ( 0 ) . mActionType ) ; assertEquals ( Actions.ActionType.REJECTED , actions.getNodeRecords ( xmlElement.getId ( ) ) . get ( 1 ) . mActionType ) ; assertEquals ( 0 , actions.getRecordedAttributeNames ( xmlElement.getId ( ) ) . size ( ) ) ; actions.log ( mLoggerMock ) ; java.lang.StringBuilder stringBuilder = new java.lang.StringBuilder ( ) ; stringBuilder.append ( Actions.HEADER ) . append ( xmlElement.getId ( ) ) . append ( "\n" ) ; appendNode ( stringBuilder , Actions.ActionType.ADDED , com.android.manifmerger.ActionRecorderTest.REFEFENCE_DOCUMENT , 6 , 5 ) ; appendNode ( stringBuilder , Actions.ActionType.REJECTED , "other_document" , 6 , 5 ) ; org.mockito.Mockito.verify ( mLoggerMock ) . info ( stringBuilder.toString ( ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mLoggerMock ) ; }