/// <summary>
        /// Verify RopPublicFolderIsGhosted Failure Response
        /// </summary>
        /// <param name="ropPublicFolderIsGhostedResponse">The failure response of RopPublicFolderIsGhosted request</param>
        /// <param name="inputHandleIndex">The field of InputHandleIndex in RopPublicFolderIsGhosted request</param>
        private void VerifyRopPublicFolderIsGhostedFailureResponse(RopPublicFolderIsGhostedResponse ropPublicFolderIsGhostedResponse, byte inputHandleIndex)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R321");

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R323
            Site.CaptureRequirementIfAreEqual<byte>(
                (byte)RopId.RopPublicFolderIsGhosted,
                ropPublicFolderIsGhostedResponse.RopId,
                323,
                @"[In RopPublicFolderIsGhosted ROP Failure Response Buffer] RopId (1 byte): For this operation[RopPublicFolderIsGhosted], this field[RopId (1 byte)] is set to 0x45.");

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

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

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

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

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

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R328
            Site.CaptureRequirementIfAreNotEqual<uint>(
                SuccessReturnValue,
                ropPublicFolderIsGhostedResponse.ReturnValue,
                328,
                @"[In RopPublicFolderIsGhosted ROP Failure Response Buffer] ReturnValue (4 bytes): For this response[Failure Response], this field[ReturnValue (4 bytes)] is set to a value other than 0x00000000.");
        }
        /// <summary>
        /// Verify the response by sending the ROP RopPublicFolderIsGhosted.
        /// </summary>
        /// <param name="response">The structure of ROP RopPublicFolderIsGhosted response.</param>
        private void VerifyRopPublicFolderIsGhosted(RopPublicFolderIsGhostedResponse response)
        {
            if (response.ReturnValue == 0)
            {
                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R396");

                // If the response can be parsed successfully and the return value is success, indicates the ROP's functionality is consistent with its description.
                this.Site.CaptureRequirement(
                    396,
                    @"[In RopPublicFolderIsGhosted ROP] The RopPublicFolderIsGhosted is used to obtain the replication state for a folder on the current server.");

                if (response.IsGhosted == 0x00)
                {
                    // Add the debug information
                    this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R1100");

                    // This block is to verify the requirements when the IsGhosted field is set to FALSE.  
                    // If the response can be parsed successfully when the IsGhosted field is set to FALSE, indicates the field[CheapServersCount] is not present
                    this.Site.CaptureRequirement(
                        1100,
                        @"[In RopPublicFolderIsGhosted ROP Success Response Buffer] CheapServersCount: This field [CheapServersCount] is not present if the IsGhosted field is set to FALSE.");

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

                    // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R1101
                    // If the Servers field is not present, the Servers will be null.
                    this.Site.CaptureRequirementIfIsNull(
                        response.Servers,
                        1101,
                        @"[In RopPublicFolderIsGhosted ROP Success Response Buffer] Servers: This field[Servers] is not present if the IsGhosted field is set to FALSE");

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

                    // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R59712
                    // If the Servers field is not present, the Servers will be null.
                    this.Site.CaptureRequirementIfIsNull(
                        response.Servers,
                        59712,
                        @"[In RopPublicFolderIsGhosted ROP Success Response Buffer] Servers: This field is not present if the IsGhosted field is set to FALSE.");
                }
            }
        }
        /// <summary>
        /// Verify RopPublicFolderIsGhosted Success Response
        /// </summary>
        /// <param name="ropPublicFolderIsGhostedResponse">The success response of RopPublicFolderIsGhosted request</param>
        /// <param name="inputHandleIndex">The field of InputHandleIndex in RopPublicFolderIsGhosted request</param>
        private void VerifyRopPublicFolderIsGhostedSuccessResponse(RopPublicFolderIsGhostedResponse ropPublicFolderIsGhostedResponse, byte inputHandleIndex)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R296");

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R298
            Site.CaptureRequirementIfAreEqual<byte>(
                (byte)RopId.RopPublicFolderIsGhosted,
                ropPublicFolderIsGhostedResponse.RopId,
                298,
                @"[In RopPublicFolderIsGhosted ROP Success Response Buffer] RopId (1 byte): For this operation[RopPublicFolderIsGhosted], this field[RopId (1 byte)] is set to 0x45.");

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

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R300
            Site.CaptureRequirementIfAreEqual<byte>(
                inputHandleIndex,
                ropPublicFolderIsGhostedResponse.InputHandleIndex,
                300,
                @"[In RopPublicFolderIsGhosted 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_R301");

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R303
            Site.CaptureRequirementIfAreEqual<uint>(
                SuccessReturnValue,
                ropPublicFolderIsGhostedResponse.ReturnValue,
                303,
                @"[In RopPublicFolderIsGhosted 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_R304,IsGhosted:{0}", ropPublicFolderIsGhostedResponse.IsGhosted);

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R304
            // If IsGhosted is of the byte type and can be represented by the boolean type, then Verify R304
            bool isVerifyR304 = (typeof(byte) == ropPublicFolderIsGhostedResponse.IsGhosted.GetType()) &&
                                ((Convert.ToBoolean(ropPublicFolderIsGhostedResponse.IsGhosted) == true) ||
                                (Convert.ToBoolean(ropPublicFolderIsGhostedResponse.IsGhosted) == false));

            Site.CaptureRequirementIfIsTrue(
                isVerifyR304,
                304,
                @"[In RopPublicFolderIsGhosted ROP Success Response Buffer] IsGhosted (1 byte): A Boolean.");

            // The field ServersCount,CheapServersCount and Servers are present if IsGhosted is non-zero and are not present if IsGhosted is zero
            if (ropPublicFolderIsGhostedResponse.IsGhosted != 0)
            {
                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R306");

                // Verify MS-OXCROPS requirement: MS-OXCROPS_R306
                Site.CaptureRequirementIfAreEqual<Type>(
                    typeof(ushort),
                    ropPublicFolderIsGhostedResponse.ServersCount.GetType(),
                    306,
                    @"[In RopPublicFolderIsGhosted ROP Success Response Buffer] ServersCount (2 bytes): An unsigned integer.");

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

                // Verify MS-OXCROPS requirement: MS-OXCROPS_R311
                Site.CaptureRequirementIfAreEqual<Type>(
                    typeof(ushort),
                    ropPublicFolderIsGhostedResponse.CheapServersCount.GetType(),
                    311,
                    @"[In RopPublicFolderIsGhosted ROP Success Response Buffer] CheapServersCount (2 bytes): An unsigned integer.");

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R315,the length of the Servers is {0}", ropPublicFolderIsGhostedResponse.Servers.Length);

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

                    // If one of List is not null-terminated ASCII string then break iteration
                    if (!isVerifyR315)
                    {
                        break;
                    }
                }

                Site.CaptureRequirementIfIsTrue(
                    isVerifyR315,
                    315,
                    @"[In RopPublicFolderIsGhosted ROP Success Response Buffer] Servers (optional) (variable): A list of null-terminated ASCII strings.");
            }
        }