/// <summary>
        /// Verify RopGetAddressTypes Failure Response
        /// </summary>
        /// <param name="ropGetAddressTypeResponse">The response of RopGetAddressTypes request</param>
        /// <param name="inputHandleIndex">The field of InputHandleIndex in RopGetAddressTypes request</param>
        private void VerifyRopGetAddressTypesFailureResponse(RopGetAddressTypesResponse ropGetAddressTypeResponse, byte inputHandleIndex)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2417");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2417
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropGetAddressTypeResponse.RopId.GetType(),
                2417,
                @"[In RopGetAddressTypes ROP Failure Response Buffer]RopId (1 byte): An unsigned integer.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2419");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2419
            Site.CaptureRequirementIfAreEqual<byte>(
                (byte)RopId.RopGetAddressTypes,
                ropGetAddressTypeResponse.RopId,
                2419,
                @"[In RopGetAddressTypes ROP Failure Response Buffer,RopId (1 byte)]For this operation[RopGetAddressTypes], this field is set to 0x49.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2420");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2420
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropGetAddressTypeResponse.InputHandleIndex.GetType(),
                2420,
                @"[In RopGetAddressTypes ROP Failure Response Buffer]InputHandleIndex (1 byte): An unsigned integer.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2421");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2421
            Site.CaptureRequirementIfAreEqual<byte>(
                inputHandleIndex,
                ropGetAddressTypeResponse.InputHandleIndex,
                2421,
                @"[In RopGetAddressTypes ROP Failure Response Buffer,InputHandleIndex (1 byte)]This index MUST be set to the value specified in the InputHandleIndex field in the request.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2423");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2423
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(uint),
                ropGetAddressTypeResponse.ReturnValue.GetType(),
                2423,
                @"[In RopGetAddressTypes ROP Failure Response Buffer]ReturnValue (4 bytes): An unsigned integer.");

            // Refer to MS-OXCROPS: For some ROPs, Exchange 2003 and Exchange 2007 use different methods to resolve 
            // the Server object and, therefore, do not fail the ROP if the index is invalid.
            if (Common.IsRequirementEnabled(4713, this.Site))
            {
                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R4713");

                // Verify MS-OXCROPS requirement: MS-OXCROPS_R4713
                Site.CaptureRequirementIfAreEqual<uint>(
                    SuccessReturnValue,
                    ropGetAddressTypeResponse.ReturnValue,
                    4713,
                    @"[In Appendix B: Product Behavior] For some ROPs, Implementation does use different methods to resolve the Server object and, therefore, do not fail the ROP if the index is invalid. (<23> Section 3.2.5.1: For some ROPs, Exchange 2007 use different methods to resolve the Server object and, therefore, do not fail the ROP if the index is invalid.)");
            }
            else
            {
                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2425");

                // Verify MS-OXCROPS requirement: MS-OXCROPS_R2425
                Site.CaptureRequirementIfAreNotEqual<uint>(
                    SuccessReturnValue,
                    ropGetAddressTypeResponse.ReturnValue,
                    2425,
                    @"[In RopGetAddressTypes ROP Failure Response Buffer,ReturnValue (4 bytes)]For this response[Failure Response ], this field is set to a value other than 0x00000000.");
            }
        }
        /// <summary>
        /// Verify RopGetAddressTypes Success Response
        /// </summary>
        /// <param name="ropGetAddressTypeResponse">The response of RopGetAddressTypes request</param>
        /// <param name="inputHandleIndex">The field of InputHandleIndex in RopGetAddressTypes request</param>
        private void VerifyRopGetAddressTypesSuccessResponse(RopGetAddressTypesResponse ropGetAddressTypeResponse, byte inputHandleIndex)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2401");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2401
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropGetAddressTypeResponse.RopId.GetType(),
                2401,
                @"[In RopGetAddressTypes ROP Success Response Buffer]RopId (1 byte): An unsigned integer.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2403");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2403
            Site.CaptureRequirementIfAreEqual<byte>(
                (byte)RopId.RopGetAddressTypes,
                ropGetAddressTypeResponse.RopId,
                2403,
                @"[In RopGetAddressTypes ROP Success Response Buffer,RopId (1 byte)]For this operation[RopGetAddressTypes], this field is set to 0x49.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2404");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2404
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropGetAddressTypeResponse.InputHandleIndex.GetType(),
                2404,
                @"[In RopGetAddressTypes ROP Success Response Buffer]InputHandleIndex (1 byte): An unsigned integer.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2405");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2405
            Site.CaptureRequirementIfAreEqual<byte>(
                inputHandleIndex,
                ropGetAddressTypeResponse.InputHandleIndex,
                2405,
                @"[In RopGetAddressTypes ROP Success Response Buffer,InputHandleIndex (1 byte)]This index MUST be set to the value specified in the InputHandleIndex field in the request.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2407");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2407
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(uint),
                ropGetAddressTypeResponse.ReturnValue.GetType(),
                2407,
                @"[In RopGetAddressTypes ROP Success Response Buffer]ReturnValue (4 bytes): An unsigned integer.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2409");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2409
            Site.CaptureRequirementIfAreEqual<uint>(
                SuccessReturnValue,
                ropGetAddressTypeResponse.ReturnValue,
                2409,
                @"[In RopGetAddressTypes ROP Success Response Buffer,ReturnValue (4 bytes)]For this response[Success Response ], this field is set to 0x00000000.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2410");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2410
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(ushort),
                ropGetAddressTypeResponse.AddressTypeCount.GetType(),
                2410,
                @"[In RopGetAddressTypes ROP Success Response Buffer]AddressTypeCount (2 bytes): An unsigned integer.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2412");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2412
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(ushort),
                ropGetAddressTypeResponse.AddressTypeSize.GetType(),
                2412,
                @"[In RopGetAddressTypes ROP Success Response Buffer]AddressTypeSize (2 bytes): An unsigned integer.");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2414
            // Assume the result is true. If one of List is not null-terminated ASCII string, then false.
            bool isVerifyR2414 = true;
            foreach (string s in ropGetAddressTypeResponse.AddressTypes)
            {
                byte[] buffer = Encoding.ASCII.GetBytes(s);
                isVerifyR2414 = isVerifyR2414 && this.IsNullTerminatedASCIIStr(buffer);

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2414, the actual value of AddressType is {0}", s.Trim('\0'));
                
                // If one of List is not null-terminated ASCII string then break iteration
                if (!isVerifyR2414)
                {
                    break;
                }
            }

            Site.CaptureRequirementIfIsTrue(
                isVerifyR2414,
                2414,
                @"[In RopGetAddressTypes ROP Success Response Buffer]AddressTypes (variable): A list of null-terminated ASCII strings.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2415");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2415
            Site.CaptureRequirementIfAreEqual<ushort>(
                ropGetAddressTypeResponse.AddressTypeCount,
                (ushort)ropGetAddressTypeResponse.AddressTypes.Count,
                2415,
                @"[In RopGetAddressTypes ROP Success Response Buffer,AddressTypes (variable)]The number of strings contained in this field[AddressTypes (variable)] is specified by the AddressTypeCount field.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2416");

            // Assume the AddressTypeSize to zero, count the actual AddressType size in bytes
            int addressTypeSize = 0;
            foreach (string s in ropGetAddressTypeResponse.AddressTypes)
            {
                byte[] buffer = Encoding.ASCII.GetBytes(s);

                // Add each null-terminated ASCII string's count in bytes
                addressTypeSize += buffer.Length;
            }

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2416
            Site.CaptureRequirementIfAreEqual<ushort>(
                ropGetAddressTypeResponse.AddressTypeSize,
                (ushort)addressTypeSize,
                2416,
                @"[In RopGetAddressTypes ROP Success Response Buffer,AddressTypes (variable)]The size of this field, in bytes, is specified by the AddressTypeSize field.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2411");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2411
            Site.CaptureRequirementIfAreEqual<int>(
                ropGetAddressTypeResponse.AddressTypes.Count,
                ropGetAddressTypeResponse.AddressTypeCount,
                2411,
                @"[In RopGetAddressTypes ROP Success Response Buffer,AddressTypeCount (2 bytes)]This value specifies the number of strings in the AddressTypes field.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2413");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R2413
            Site.CaptureRequirementIfAreEqual<ushort>(
                (ushort)addressTypeSize,
                ropGetAddressTypeResponse.AddressTypeSize,
                2413,
                @"[In RopGetAddressTypes ROP Success Response Buffer,AddressTypeSize (2 bytes)]This value specifies the length of the AddressTypes field.");
        }