public void testProcessMsg4(){
  byte[] originalMessageBody=mMessageBody;
  mMessageBody=new byte[]{(byte)0xee,(byte)0xff,(byte)0xee,(byte)0xff,(byte)0xee,(byte)0xff,(byte)0xee,(byte)0xff,(byte)0xee,(byte)0xff,(byte)0xee,(byte)0xff};
  byte[] pdu=createPDU(1);
  int headerLen=pdu.length - (mGsmHeader.length + mUserDataHeader.length + mMessageBody.length);
  int pduType=6;
  int tranId=0;
  String originalPackageName=mPackageName;
  String originalClassName=mClassName;
  try {
    IWapPushManager iwapman=getInterface();
    IDataVerify dataverify=getVerifyInterface();
    dataverify.resetData();
    mClassName="com.android.smspush.unitTests.ReceiverActivity";
    iwapman.addPackage(Integer.toString(mAppIdValue),Integer.toString(mContentTypeValue),mPackageName,mClassName,WapPushManagerParams.APP_TYPE_ACTIVITY,false,false);
    iwapman.processMessage(Integer.toString(mAppIdValue),Integer.toString(mContentTypeValue),createIntent(pduType,tranId));
    iwapman.deletePackage(Integer.toString(mAppIdValue),Integer.toString(mContentTypeValue),mPackageName,mClassName);
    assertTrue(dataverify.verifyData(mMessageBody));
    dataverify.resetData();
    mClassName="com.android.smspush.unitTests.ReceiverService";
    mMessageBody=new byte[]{(byte)0xaa,(byte)0xbb,(byte)0x11,(byte)0x22,(byte)0xaa,(byte)0xbb,(byte)0x11,(byte)0x22,(byte)0xaa,(byte)0xbb,(byte)0x11,(byte)0x22,(byte)0xaa,(byte)0xbb,(byte)0x11,(byte)0x22,(byte)0xaa,(byte)0xbb,(byte)0x11,(byte)0x22,(byte)0xaa,(byte)0xbb,(byte)0x11,(byte)0x22};
    pdu=createPDU(1);
    iwapman.addPackage(Integer.toString(mAppIdValue),Integer.toString(mContentTypeValue),mPackageName,mClassName,WapPushManagerParams.APP_TYPE_SERVICE,false,false);
    iwapman.processMessage(Integer.toString(mAppIdValue),Integer.toString(mContentTypeValue),createIntent(pduType,tranId));
    iwapman.deletePackage(Integer.toString(mAppIdValue),Integer.toString(mContentTypeValue),mPackageName,mClassName);
    assertTrue(dataverify.verifyData(mMessageBody));
  }
 catch (  RemoteException e) {
    assertTrue(false);
  }
  mPackageName=originalPackageName;
  mClassName=originalClassName;
  mMessageBody=originalMessageBody;
}

public void testProcessMsg4 ( ) { byte [ ] originalMessageBody = mMessageBody ; mMessageBody = new byte [ ] { ( byte ) 0xee , ( byte ) 0xff , ( byte ) 0xee , ( byte ) 0xff , ( byte ) 0xee , ( byte ) 0xff , ( byte ) 0xee , ( byte ) 0xff , ( byte ) 0xee , ( byte ) 0xff , ( byte ) 0xee , ( byte ) 0xff } ; byte [ ] pdu = createPDU ( 1 ) ; int headerLen = pdu . length - ( mGsmHeader . length + mUserDataHeader . length + mMessageBody . length ) ; int pduType = 6 ; int tranId = 0 ; String originalPackageName = mPackageName ; String originalClassName = mClassName ; try { IWapPushManager iwapman = getInterface ( ) ; IDataVerify dataverify = getVerifyInterface ( ) ; dataverify . resetData ( ) ; mClassName = "com.android.smspush.unitTests.ReceiverActivity" ; iwapman . addPackage ( Integer . toString ( mAppIdValue ) , Integer . toString ( mContentTypeValue ) , mPackageName , mClassName , WapPushManagerParams . APP_TYPE_ACTIVITY , false , false ) ; iwapman . processMessage ( Integer . toString ( mAppIdValue ) , Integer . toString ( mContentTypeValue ) , createIntent ( pduType , tranId ) ) ; iwapman . deletePackage ( Integer . toString ( mAppIdValue ) , Integer . toString ( mContentTypeValue ) , mPackageName , mClassName ) ; assertTrue ( dataverify . verifyData ( mMessageBody ) ) ; dataverify . resetData ( ) ; mClassName = "com.android.smspush.unitTests.ReceiverService" ; mMessageBody = new byte [ ] { ( byte ) 0xaa , ( byte ) 0xbb , ( byte ) 0x11 , ( byte ) 0x22 , ( byte ) 0xaa , ( byte ) 0xbb , ( byte ) 0x11 , ( byte ) 0x22 , ( byte ) 0xaa , ( byte ) 0xbb , ( byte ) 0x11 , ( byte ) 0x22 , ( byte ) 0xaa , ( byte ) 0xbb , ( byte ) 0x11 , ( byte ) 0x22 , ( byte ) 0xaa , ( byte ) 0xbb , ( byte ) 0x11 , ( byte ) 0x22 , ( byte ) 0xaa , ( byte ) 0xbb , ( byte ) 0x11 , ( byte ) 0x22 } ; pdu = createPDU ( 1 ) ; iwapman . addPackage ( Integer . toString ( mAppIdValue ) , Integer . toString ( mContentTypeValue ) , mPackageName , mClassName , WapPushManagerParams . APP_TYPE_SERVICE , false , false ) ; iwapman . processMessage ( Integer . toString ( mAppIdValue ) , Integer . toString ( mContentTypeValue ) , createIntent ( pduType , tranId ) ) ; iwapman . deletePackage ( Integer . toString ( mAppIdValue ) , Integer . toString ( mContentTypeValue ) , mPackageName , mClassName ) ; assertTrue ( dataverify . verifyData ( mMessageBody ) ) ; } catch ( RemoteException e ) { assertTrue ( false ) ; } mPackageName = originalPackageName ; mClassName = originalClassName ; mMessageBody = originalMessageBody ; }
message processing test , received body data verification test
