public void testIntegration1(){
  boolean res;
  int originalAppIdValue=mAppIdValue;
  int originalContentTypeValue=mContentTypeValue;
  String originalAppIdName=mAppIdName;
  String originalContentTypeName=mContentTypeName;
  String originalClassName=mClassName;
  byte[] originalMessageBody=mMessageBody;
  Random rd=new Random();
  mMessageBody=new byte[100 + rd.nextInt(100)];
  rd.nextBytes(mMessageBody);
  byte[] pdu=createPDU(1);
  byte[] wappushPdu=retrieveWspBody();
  mClassName="com.android.smspush.unitTests.ReceiverActivity";
  try {
    IWapPushManager iwapman=getInterface();
    IDataVerify dataverify=getVerifyInterface();
    dataverify.resetData();
    if (isContentTypeMapped(mContentTypeValue)) {
      mContentTypeName=getContentTypeName(mContentTypeValue);
      Log.d(LOG_TAG,"mContentTypeValue mapping " + mContentTypeName + ":"+ mContentTypeValue);
    }
 else {
      mContentTypeName=Integer.toString(mContentTypeValue);
    }
    iwapman.addPackage(Integer.toString(mAppIdValue),mContentTypeName,mPackageName,mClassName,WapPushManagerParams.APP_TYPE_ACTIVITY,false,false);
    dispatchWapPdu(wappushPdu,iwapman);
    iwapman.deletePackage(Integer.toString(mAppIdValue),mContentTypeName,mPackageName,mClassName);
    assertTrue(dataverify.verifyData(mMessageBody));
  }
 catch (  RemoteException e) {
  }
  mClassName=originalClassName;
  mAppIdName=originalAppIdName;
  mContentTypeName=originalContentTypeName;
  mAppIdValue=originalAppIdValue;
  mContentTypeValue=originalContentTypeValue;
  mMessageBody=originalMessageBody;
}

public void testIntegration1 ( ) { boolean res ; int originalAppIdValue = mAppIdValue ; int originalContentTypeValue = mContentTypeValue ; String originalAppIdName = mAppIdName ; String originalContentTypeName = mContentTypeName ; String originalClassName = mClassName ; byte [ ] originalMessageBody = mMessageBody ; Random rd = new Random ( ) ; mMessageBody = new byte [ 100 + rd . nextInt ( 100 ) ] ; rd . nextBytes ( mMessageBody ) ; byte [ ] pdu = createPDU ( 1 ) ; byte [ ] wappushPdu = retrieveWspBody ( ) ; mClassName = "com.android.smspush.unitTests.ReceiverActivity" ; try { IWapPushManager iwapman = getInterface ( ) ; IDataVerify dataverify = getVerifyInterface ( ) ; dataverify . resetData ( ) ; if ( isContentTypeMapped ( mContentTypeValue ) ) { mContentTypeName = getContentTypeName ( mContentTypeValue ) ; Log . d ( LOG_TAG , "mContentTypeValue mapping " + mContentTypeName + ":" + mContentTypeValue ) ; } else { mContentTypeName = Integer . toString ( mContentTypeValue ) ; } iwapman . addPackage ( Integer . toString ( mAppIdValue ) , mContentTypeName , mPackageName , mClassName , WapPushManagerParams . APP_TYPE_ACTIVITY , false , false ) ; dispatchWapPdu ( wappushPdu , iwapman ) ; iwapman . deletePackage ( Integer . toString ( mAppIdValue ) , mContentTypeName , mPackageName , mClassName ) ; assertTrue ( dataverify . verifyData ( mMessageBody ) ) ; } catch ( RemoteException e ) { } mClassName = originalClassName ; mAppIdName = originalAppIdName ; mContentTypeName = originalContentTypeName ; mAppIdValue = originalAppIdValue ; mContentTypeValue = originalContentTypeValue ; mMessageBody = originalMessageBody ; }
integration test 1 , simple case
