public void MSOXCROPS_S07_TC03_TestRopsLockAndUnlockRegionStream()
        {
            this.CheckTransportIsSupported();

            this.cropsAdapter.RpcConnect(
                Common.GetConfigurationPropertyValue("SutComputerName", this.Site),
                ConnectionType.PrivateMailboxServer,
                Common.GetConfigurationPropertyValue("UserEssdn", this.Site),
                Common.GetConfigurationPropertyValue("Domain", this.Site),
                Common.GetConfigurationPropertyValue("AdminUserName", this.Site),
                Common.GetConfigurationPropertyValue("PassWord", this.Site));

            // Step 1: Preparations-Create message and get its handle, open stream and get its handle.
            #region Common operations for RopLockRegionStream and RopUnlockRegionStream

            // Log on to a private mailbox.
            RopLogonResponse logonResponse = Logon(LogonType.Mailbox, this.userDN, out inputObjHandle);

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Step 1:Call GetCreatedMessageHandle method to create message and get its handle.");

            // Call GetCreatedMessageHandle method to create message and get its handle.
            uint messageHandle = GetCreatedMessageHandle(logonResponse.FolderIds[4], inputObjHandle);

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Step 1:Call GetOpenedStreamHandle method to open stream and get its handle.");

            // Call GetOpenedStreamHandle method to open stream and get its handle.
            uint streamObjectHandle = this.GetOpenedStreamHandle(messageHandle);

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Step 1:Call WriteStream method to write stream.");

            // Call WriteStream method to write stream.
            this.WriteStream(streamObjectHandle);

            #endregion

            // Refer to MS-OXCPRPT: Exchange 2003 and Exchange 2007 implement the RopLockRegionStream ROP.
            if (Common.IsRequirementEnabled(750001, this.Site))
            {
                // Step 2: Send the RopLockRegionStream request and verify the success response.
                #region RopLockRegionStream Response

                RopLockRegionStreamRequest lockRegionStreamRequest = new RopLockRegionStreamRequest();
                RopLockRegionStreamResponse lockRegionStreamResponse;

                lockRegionStreamRequest.RopId = (byte)RopId.RopLockRegionStream;

                lockRegionStreamRequest.LogonId = TestSuiteBase.LogonId;
                lockRegionStreamRequest.InputHandleIndex = TestSuiteBase.InputHandleIndex0;
                lockRegionStreamRequest.RegionOffset = TestSuiteBase.RegionOffset;

                // Defined by tester, less than the stream size.
                lockRegionStreamRequest.RegionSize = TestSuiteBase.RegionSize;

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Step 2: Begin to send the RopLockRegionStream request.");

                // Send the RopLockRegionStream request and verify the failure response.
                this.responseSOHs = cropsAdapter.ProcessSingleRop(
                    lockRegionStreamRequest,
                    streamObjectHandle,
                    ref this.response,
                    ref this.rawData,
                    RopResponseType.SuccessResponse);
                lockRegionStreamResponse = (RopLockRegionStreamResponse)response;

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

                // Verify MS-OXCROPS requirement: MS-OXCROPS_R750001
                Site.CaptureRequirementIfAreEqual<uint>(
                    TestSuiteBase.SuccessReturnValue,
                    lockRegionStreamResponse.ReturnValue,
                    750001,
                    @"[In Appendix A: Product Behavior] Implementation does implement the RopLockRegionStream ROP. (Exchange 2007 follows this behavior.)");

                Site.Assert.AreEqual<uint>(
                    TestSuiteBase.SuccessReturnValue,
                    lockRegionStreamResponse.ReturnValue,
                    "if ROP succeeds, the ReturnValue of its response is 0(success)");

                #endregion
            }

            // Refer to MS-OXCPRPT: Exchange 2003 and Exchange 2007 implement the RopUnlockRegionStream ROP.
            if (Common.IsRequirementEnabled(751001, this.Site))
            {
                // Step 3: Send the RopUnlockRegionStream request and verify the success response.
                #region RopUnlockRegionStream response

                RopUnlockRegionStreamRequest unlockRegionStreamRequest = new RopUnlockRegionStreamRequest();
                RopUnlockRegionStreamResponse unlockRegionStreamResponse;

                unlockRegionStreamRequest.RopId = (byte)RopId.RopUnlockRegionStream;
                unlockRegionStreamRequest.LogonId = TestSuiteBase.LogonId;
                unlockRegionStreamRequest.InputHandleIndex = TestSuiteBase.InputHandleIndex0;

                // Beginning of the stream.
                unlockRegionStreamRequest.RegionOffset = TestSuiteBase.RegionOffset;

                // Defined by tester, less than the stream size.
                unlockRegionStreamRequest.RegionSize = TestSuiteBase.RegionSize;

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Step 3: Begin to send the RopUnlockRegionStream request.");

                // Step 4: Send the RopUnlockRegionStream request and verify the success response.
                this.responseSOHs = cropsAdapter.ProcessSingleRop(
                    unlockRegionStreamRequest,
                    streamObjectHandle,
                    ref this.response,
                    ref this.rawData,
                    RopResponseType.SuccessResponse);
                unlockRegionStreamResponse = (RopUnlockRegionStreamResponse)response;

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

                // Verify MS-OXCROPS requirement: MS-OXCROPS_R751001
                Site.CaptureRequirementIfAreEqual<uint>(
                    TestSuiteBase.SuccessReturnValue,
                    unlockRegionStreamResponse.ReturnValue,
                    751001,
                    @"[In Appendix A: Product Behavior] Implementation does implement the RopUnlockRegionStream ROP. (Exchange 2007 follows this behavior.)");

                Site.Assert.AreEqual<uint>(
                    TestSuiteBase.SuccessReturnValue,
                    unlockRegionStreamResponse.ReturnValue,
                    "if ROP succeeds, the ReturnValue of its response is 0(success)");

                #endregion
            }
        }