Source:
public void testLoadSample_1 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = getTestResource ( "/com/android/sdklib/testdata/addons_list_sample_1.xml" ) ; int version = mFetcher._getXmlSchemaVersion ( xmlStream ) ; assertEquals ( 1 , version ) ; java.lang.Boolean [ ] validatorFound = new java.lang.Boolean [ ] { java.lang.Boolean.FALSE } ; java.lang.String [ ] validationError = new java.lang.String [ ] { null } ; java.lang.String url = "not-a-valid-url://addons_list.xml" ; java.lang.String uri = mFetcher._validateXml ( xmlStream , url , version , validationError , validatorFound ) ; assertEquals ( java.lang.Boolean.TRUE , validatorFound [ 0 ] ) ; assertEquals ( null , validationError [ 0 ] ) ; assertEquals ( com.android.sdklib.repository.SdkAddonsListConstants.getSchemaUri ( 1 ) , uri ) ; com.android.sdklib.internal.repository.MockMonitor monitor = new com.android.sdklib.internal.repository.MockMonitor ( ) ; org.w3c.dom.Document doc = mFetcher._getDocument ( xmlStream , monitor ) ; assertNotNull ( doc ) ; com.android.sdklib.internal.repository.AddonsListFetcher.Site [ ] result = mFetcher._parseAddonsList ( doc , uri , monitor ) ; assertEquals ( "" , monitor.getCapturedDescriptions ( ) ) ; assertEquals ( "" , monitor.getCapturedLog ( ) ) ; assertEquals ( "" , monitor.getCapturedErrorLog ( ) ) ; assertEquals ( "" , monitor.getCapturedVerboseLog ( ) ) ; assertEquals ( 3 , result.length ) ; assertEquals ( "My Example Add-ons." , result [ 0 ] . getUiName ( ) ) ; assertEquals ( "http://www.example.com/my_addons.xml" , result [ 0 ] . getUrl ( ) ) ; assertEquals ( "ありがとうございます。" , result [ 1 ] . getUiName ( ) ) ; assertEquals ( "http://www.example.co.jp/addons.xml" , result [ 1 ] . getUrl ( ) ) ; assertEquals ( "Example of directory URL." , result [ 2 ] . getUiName ( ) ) ; assertEquals ( "http://www.example.com/" , result [ 2 ] . getUrl ( ) ) ; }

Target:
public void testLoadSample_2 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = getTestResource ( "/com/android/sdklib/testdata/addons_list_sample_2.xml" ) ; int version = mFetcher._getXmlSchemaVersion ( xmlStream ) ; assertEquals ( 2 , version ) ; java.lang.Boolean [ ] validatorFound = new java.lang.Boolean [ ] { java.lang.Boolean.FALSE } ; java.lang.String [ ] validationError = new java.lang.String [ ] { null } ; java.lang.String url = "not-a-valid-url://addons_list.xml" ; java.lang.String uri = mFetcher._validateXml ( xmlStream , url , version , validationError , validatorFound ) ; assertEquals ( java.lang.Boolean.TRUE , validatorFound [ 0 ] ) ; assertEquals ( null , validationError [ 0 ] ) ; assertEquals ( com.android.sdklib.repository.SdkAddonsListConstants.getSchemaUri ( 2 ) , uri ) ; com.android.sdklib.internal.repository.MockMonitor monitor = new com.android.sdklib.internal.repository.MockMonitor ( ) ; org.w3c.dom.Document doc = mFetcher._getDocument ( xmlStream , monitor ) ; assertNotNull ( doc ) ; com.android.sdklib.internal.repository.AddonsListFetcher.Site [ ] result = mFetcher._parseAddonsList ( doc , uri , monitor ) ; assertEquals ( "" , monitor.getCapturedDescriptions ( ) ) ; assertEquals ( "" , monitor.getCapturedLog ( ) ) ; assertEquals ( "" , monitor.getCapturedErrorLog ( ) ) ; assertEquals ( "" , monitor.getCapturedVerboseLog ( ) ) ; assertEquals ( ( "[<ADDON_SITE URL='http://www.example.com/my_addons.xml' Name='My Example Add-ons.'>, " + ( ( ( "<ADDON_SITE URL=\'http://www.example.co.jp/addons.xml\' Name=\'ありがとうございます。\'>, " + "<ADDON_SITE URL='http://www.example.com/' Name='Example of directory URL.'>, " ) + "<SYS_IMG_SITE URL='http://www.example.com/' Name='Example of sys-img URL using the default xml filename.'>, " ) + "<SYS_IMG_SITE URL='http://www.example.com/specific_file.xml' Name='Example of sys-img URL using a specific xml filename.'>]" ) ) , java.util.Arrays.toString ( result ) ) ; assertEquals ( 5 , result.length ) ; }