Source:
public final void testLocalSdkTest_getPkgInfo_PlatformTools ( ) { com.android.sdklib.io.MockFileOp fop = new com.android.sdklib.io.MockFileOp ( ) ; com.android.sdklib.local.LocalSdk ls = new com.android.sdklib.local.LocalSdk ( fop ) ; ls.setLocation ( new java.io.File ( "/sdk" ) ) ; assertNull ( ls.getPkgInfo ( LocalSdk.PKG_PLATFORM_TOOLS ) ) ; ls.clearLocalPkg ( LocalSdk.PKG_ALL ) ; fop.recordExistingFolder ( "/sdk/platform-tools" ) ; fop.recordExistingFile ( "/sdk/platform-tools/source.properties" , ( "Pkg.License=Terms and Conditions\n" + ( ( ( ( "Archive.Os=WINDOWS\n" + "Pkg.Revision=18.19.20\n" ) + "Pkg.LicenseRef=android-sdk-license\n" ) + "Archive.Arch=ANY\n" ) + "Pkg.SourceUrl=https\\://dl-ssl.google.com/android/repository/repository-8.xml" ) ) ) ; com.android.sdklib.local.LocalPkgInfo pi = ls.getPkgInfo ( LocalSdk.PKG_PLATFORM_TOOLS ) ; assertNotNull ( pi ) ; assertTrue ( ( pi instanceof com.android.sdklib.local.LocalPlatformToolPkgInfo ) ) ; assertEquals ( new java.io.File ( "/sdk/platform-tools" ) , pi.getLocalDir ( ) ) ; assertSame ( ls , pi.getLocalSdk ( ) ) ; assertEquals ( null , pi.getLoadError ( ) ) ; assertEquals ( new com.android.sdklib.repository.FullRevision ( 18 , 19 , 20 ) , pi.getFullRevision ( ) ) ; assertEquals ( "<LocalPlatformToolPkgInfo FullRev=18.19.20>" , pi.toString ( ) ) ; java.lang.Package pkg = pi.getPackage ( ) ; assertNotNull ( pkg ) ; }

Target:
public final void testLocalSdkTest_getPkgInfo_Tools ( ) { assertNull ( mLS.getPkgInfo ( LocalSdk.PKG_TOOLS ) ) ; mLS.clearLocalPkg ( LocalSdk.PKG_ALL ) ; mFOp.recordExistingFolder ( "/sdk/tools" ) ; mFOp.recordExistingFile ( "/sdk/tools/source.properties" , ( "Pkg.License=Terms and Conditions\n" + ( ( ( ( ( "Archive.Os=WINDOWS\n" + "Pkg.Revision=22.3.4\n" ) + "Platform.MinPlatformToolsRev=18\n" ) + "Pkg.LicenseRef=android-sdk-license\n" ) + "Archive.Arch=ANY\n" ) + "Pkg.SourceUrl=https\\://dl-ssl.google.com/android/repository/repository-8.xml" ) ) ) ; mFOp.recordExistingFile ( ( "/sdk/tools/" + ( com.android.SdkConstants.androidCmdName ( ) ) ) , "placeholder" ) ; mFOp.recordExistingFile ( ( "/sdk/tools/" + ( com.android.SdkConstants.FN_EMULATOR ) ) , "placeholder" ) ; com.android.sdklib.local.LocalPkgInfo pi = mLS.getPkgInfo ( LocalSdk.PKG_TOOLS ) ; assertNotNull ( pi ) ; assertTrue ( ( pi instanceof com.android.sdklib.local.LocalToolPkgInfo ) ) ; assertEquals ( new java.io.File ( "/sdk/tools" ) , pi.getLocalDir ( ) ) ; assertSame ( mLS , pi.getLocalSdk ( ) ) ; assertEquals ( null , pi.getLoadError ( ) ) ; assertEquals ( new com.android.sdklib.repository.FullRevision ( 22 , 3 , 4 ) , pi.getFullRevision ( ) ) ; assertEquals ( "<LocalToolPkgInfo FullRev=22.3.4>" , pi.toString ( ) ) ; java.lang.Package pkg = pi.getPackage ( ) ; assertNotNull ( pkg ) ; assertEquals ( new com.android.sdklib.repository.FullRevision ( 22 , 3 , 4 ) , pkg.getRevision ( ) ) ; assertEquals ( "Android SDK Tools, revision 22.3.4" , pkg.getShortDescription ( ) ) ; assertTrue ( pkg.isLocal ( ) ) ; com.android.sdklib.internal.repository.archives.Archive a = pkg.getArchives ( ) [ 0 ] ; assertTrue ( a.isLocal ( ) ) ; assertEquals ( "/sdk/tools" , mFOp.getAgnosticAbsPath ( a.getLocalOsPath ( ) ) ) ; }