/// <summary>
        /// Loop to find the item with the specified subject.
        /// </summary>
        /// <param name="folderName">Name of the specified folder.</param>
        /// <param name="itemSubject">Subject of the specified item.</param>
        /// <param name="itemType">Type of the specified item.</param>
        /// <returns>Item with the specified subject.</returns>
        private ItemType LoopToFindItem(DistinguishedFolderIdNameType folderName, string itemSubject, Item itemType)
        {
            ItemType[] items = null;
            ItemType firstFoundItem = null;
            int sleepTimes = 0;

            // Get the query sleep delay and times from ptfconfig file.
            int queryDelay = int.Parse(Common.GetConfigurationPropertyValue("WaitTime", this.Site));
            int queryTimes = int.Parse(Common.GetConfigurationPropertyValue("RetryCount", this.Site));

            // Loop to find the item, in case that the sent item has still not been received.
            do
            {
                Thread.Sleep(queryDelay);
                items = this.FindAllItems(folderName);
                sleepTimes++;
            }
            while (items == null && sleepTimes < queryTimes);

            ItemType type = null;

            switch (itemType)
            {
                case Item.MeetingRequest:
                    type = new MeetingRequestMessageType();
                    break;
                case Item.MeetingResponse:
                    type = new MeetingResponseMessageType();
                    break;
                case Item.MeetingCancellation:
                    type = new MeetingCancellationMessageType();
                    break;
                case Item.CalendarItem:
                    type = new CalendarItemType();
                    break;
            }

            if (items != null)
            {
                // Find the item with the specified subject and store its ID.
                for (int i = 0; i < items.Length; i++)
                {
                    if (items[i].Subject.Contains(itemSubject) && items[i].GetType().ToString() == type.ToString())
                    {
                        firstFoundItem = items[i];
                        break;
                    }
                }
            }

            return firstFoundItem;
        }
        /// <summary>
        /// Verify the MeetingCancellationMessageType structure.
        /// </summary>
        /// <param name="meetingCancellationMessageType">Represents a meeting cancellation</param>
        /// <param name="isSchemaValidated">The result of schema validation, true means valid.</param>
        private void VerifyMeetingCancellationMessageType(MeetingCancellationMessageType meetingCancellationMessageType, bool isSchemaValidated)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSMTGS_R260");

            // Verify MS-OXWSMTGS requirement: MS-OXWSMTGS_R260
            Site.CaptureRequirementIfIsTrue(
             isSchemaValidated,
             260,
                @"[In t:MeetingCancellationMessageType Complex Type] [Its schema is]
<xs:complexType name=""MeetingCancellationMessageType"">
  <xs:complexContent>
    <xs:extension base=""t:MeetingMessageType"">
      <xs:sequence>
        <xs:element name=""Start"" type=""xs:dateTime"" minOccurs=""0""/>
        <xs:element name=""End"" type=""xs:dateTime"" minOccurs=""0""/>
        <xs:element name=""Location"" type=""xs:string"" minOccurs=""0""/>
        <xs:element name=""Recurrence"" type=""t:RecurrenceType"" minOccurs=""0""/>
        <xs:element name=""CalendarItemType"" type=""xs:string"" minOccurs=""0""/>
        <xs:element name=""EnhancedLocation"" type=""t:EnhancedLocationType"" minOccurs=""0""/>
      </xs:sequence>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>");

            // MeetingMessageType is the base type of MeetingCancellationMessageType.
            this.VerifyMeetingMessageType(meetingCancellationMessageType, isSchemaValidated);
        }