//---------------------------------------------------------------
// TestUniDataModelPlugin::testInboxMessage
//---------------------------------------------------------------
void TestUniDataModelMMSPlugin::testInboxMessage()
    {
	//Create the MMS First
	createMMS(KMsvGlobalInBoxIndexEntryIdValue,ETrue);
    
	QTest::qWait(50000);  //to ensure path completion
	
	//MMS Message created, will now be validated
	
	//Checking if Another Instance of MMS Data Plugin can be created form an existing one
	QObject* anotherInstance = pluginInterface->createInstance();
    QVERIFY(anotherInstance != NULL);
    delete anotherInstance;
    
    //Setting a Message ID, thereby populating the MMS message at the Plugin
    QVERIFY(pluginInterface->setMessageId(iMessageId) == KErrNone);

    //Verifying the MMS message size
    QVERIFY(pluginInterface->messageSize() == msgSize);
    
    //Verifying the MMS timestamp
    QVERIFY(pluginInterface->timeStamp() == retTimeStamp);
    
    //Verifying is the MMP Plugin works file afetr it has been Reset and Restored
    pluginInterface->reset();
	pluginInterface->restore(*iMmsClientMtm);
	QVERIFY(pluginInterface->setMessageId(iMessageId) == KErrNone);
	
	//Subject Verification
    QVERIFY(pluginInterface->subject().compare(QString(TEST_MSG_SUBJECT)) == 0);
    
    //MMS message have no Body String
    QString body;
    pluginInterface->body(body);
    QVERIFY(body == QString(""));
    
    //Message type verification
    QVERIFY(pluginInterface->messageType().compare(QString("mms")) == 0);
    
    //Fetch the To List
    ConvergedMessageAddressList recipientList;
    pluginInterface->toRecipientList(recipientList);
    QVERIFY(recipientList.count() != 0);
    QVERIFY(recipientList[0]->address().compare(QString(TEST_MSG_RECIEPIENT1)) == 0);
    
    //Fetch the CC List
    ConvergedMessageAddressList recipientList2;
    pluginInterface->ccRecipientList(recipientList2);
    QVERIFY(recipientList2.count() != 0);
    QVERIFY(recipientList2[0]->address().compare(QString(TEST_MSG_RECIEPIENT2)) == 0);
    
    //Fetch the BCC List
    ConvergedMessageAddressList recipientList3;
    pluginInterface->bccRecipientList(recipientList3);
    QVERIFY(recipientList3.count() != 0);
    QVERIFY(recipientList3[0]->address().compare(QString(TEST_MSG_RECIEPIENT3)) == 0);
    
    //Fetch the From Address
    QString recepient(TEST_MSG_FROM1);
    QString fromaddress;
    pluginInterface->fromAddress(fromaddress);
    QVERIFY(recepient == fromaddress);
    
    //Verifying Attachments
    UniMessageInfoList attList = pluginInterface->attachmentList();
    QVERIFY(attList.count() == 0);
    
    QVERIFY(pluginInterface->hasAttachment() == false);
    
    QVERIFY(pluginInterface->attachmentCount() == 0);
    
    QVERIFY(pluginInterface->messagePriority() == 1);

    //Verifying various objects added to the MMS Message during creation
    QVERIFY(pluginInterface->objectCount() == 2);
    
    UniMessageInfoList objectlist = pluginInterface->objectList();
    QVERIFY(!objectlist.isEmpty());
    
    QVERIFY(objectlist[1]->path().contains(QString("TestUnidataModelMMSPluginPhoto.jpg"), Qt::CaseInsensitive) == true);
	QVERIFY(objectlist[1]->mimetype().contains(QString("image/jpeg"), Qt::CaseInsensitive) == true);
    
    QVERIFY(pluginInterface->slideCount() == 1);
    
    QVERIFY(pluginInterface->slideContent(0)[0]->path().contains(QString("Story.txt"), Qt::CaseInsensitive) == true);
    QVERIFY(pluginInterface->slideContent(0)[0]->mimetype().contains(QString("text/plain"), Qt::CaseInsensitive) == true);
    
    //Verifying if the plugin returns the correct session, thus will correctly delete the MMS we just created
    CMsvSession* msvSession = pluginInterface->session();
    QVERIFY(msvSession != NULL);
    msvSession->RemoveEntry(iMessageId);
    
    qDebug() << "Verified Test MMS Successfully";    
    }