/// <summary>
        /// Verify method to verify whether a message is expected
        /// </summary>
        /// <param name="message">An MMA message</param>
        /// <param name="endpointRoles">Endpoint Roles of the test</param>
        /// <returns>true if the message is expected, otherwise return false</returns>
        public bool Verify(Message message, Dictionary <string, EndpointRole> endpointRoles)
        {
            // Verify type name
            if (!message.TypeName.ToLower().Equals(this.Name.ToLower()))
            {
                return(false);
            }

            // Verify address
            if (!VerifyAddress(message, endpointRoles))
            {
                return(false);
            }

            // Verify the verifyList
            if (VerifyItemList != null)
            {
                if (!VerifyItemList.Verify(message))
                {
                    return(false);
                }
            }

            // Verify structures
            if (Structures != null)
            {
                foreach (StructureField structure in Structures)
                {
                    if (!structure.Verify(message))
                    {
                        return(false);
                    }
                }
            }

            // Verify Arrays
            if (Arrays != null)
            {
                foreach (ArrayField array in Arrays)
                {
                    if (!array.Verify(message))
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
        /// <summary>
        /// Verify whether this structure is expected
        /// </summary>
        /// <param name="complexValue">A MA complex type</param>
        /// <returns></returns>
        public bool Verify(ComplexType complexValue)
        {
            // Get the structure by using field name
            ComplexType value;

            if (!MAVerifyUtil.GetFieldValue <ComplexType>(FieldName, complexValue, out value))
            {
                return(false);
            }

            // Verify the verifyList
            if (VerifyItemList != null)
            {
                if (!VerifyItemList.Verify(value))
                {
                    return(false);
                }
            }

            // Verify sub-structures
            if (Structures != null)
            {
                foreach (StructureField structure in Structures)
                {
                    if (!structure.Verify(value))
                    {
                        return(false);
                    }
                }
            }

            // Verify arrays in this structure
            if (Arrays != null)
            {
                foreach (ArrayField array in Arrays)
                {
                    if (!array.Verify(value))
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
        /// <summary>
        /// Verify whether this array item is expected
        /// </summary>
        /// <param name="complexValue">complexValue from array</param>
        /// <returns></returns>
        public bool Verify(Object value)
        {
            // Verify verify list
            if (VerifyItemList != null)
            {
                if (!VerifyItemList.Verify(value))
                {
                    return(false);
                }
            }

            if (value is ComplexType)
            {
                ComplexType complexValue = (ComplexType)value;
                // Veiry structures
                if (Structures != null)
                {
                    foreach (StructureField structure in Structures)
                    {
                        if (!structure.Verify(complexValue))
                        {
                            return(false);
                        }
                    }
                }

                // Verify Arrays
                if (Arrays != null)
                {
                    foreach (ArrayField array in Arrays)
                    {
                        if (!array.Verify(complexValue))
                        {
                            return(false);
                        }
                    }
                }
            }
            return(true);
        }