public void LockSessionAndReleaseLock()
        {
            var sessionStore = new SessionStore("test");

            byte[]  serializedItems = Serialize((SessionStateItemCollection)item.Items);
            Binary  sessionItems    = new Binary(serializedItems);
            string  id      = Guid.NewGuid().ToString();
            Session session = new Session(id, this.ApplicationName, this.Timeout, sessionItems, item.Items.Count, SessionStateActions.None);

            sessionStore.Insert(session);
            DateTime timestamp = DateTime.Now;

            session.LockID = 1;
            sessionStore.LockSession(session);
            Session lockedSesssion = sessionStore.Get(id, this.ApplicationName);

            Assert.AreEqual(true, lockedSesssion.Locked);
            Assert.AreEqual(1, session.LockID);
            Assert.AreNotEqual(session.LockDate, lockedSesssion.LockDate);
            Assert.AreEqual(0, lockedSesssion.Flags);
            sessionStore.ReleaseLock(lockedSesssion.SessionID, lockedSesssion.ApplicationName, lockedSesssion.LockID, item.Timeout);
            Session unlockedSession = sessionStore.Get(id, this.ApplicationName);

            Assert.AreEqual(false, unlockedSession.Locked);
            Assert.AreEqual(lockedSesssion.LockDate, unlockedSession.LockDate);
            Assert.AreNotEqual(lockedSesssion.Expires, unlockedSession.Expires);
        }