public static void Trans2FindFirst2RequestInvalidFileToken(
     int messageId,
     int sessionId,
     int treeId,
     bool isSigned,
     bool isReparse,
     InformationLevel informationLevel,
     int gmtTokenIndex,
     bool isFlagsKnowsLongNameSet,
     bool isGmtPatten)
 {
     Checker.CheckRequest(smbConnection, messageId, sessionId, treeId, isSigned, smbState);
     smbRequest = new Trans2FindFirst2Request(
         messageId,
         sessionId,
         treeId,
         gmtTokenIndex,
         isReparse,
         informationLevel,
         isFlagsKnowsLongNameSet,
         isGmtPatten);
     // -1 here means the invalid token.
     const int invalidToken = -1;
     Condition.IsTrue(gmtTokenIndex == invalidToken);
     Update.UpdateRequest(smbConnection, smbRequest);
     Requirement.AssumeCaptured("Test case for invalid file token");
 }
        public static void Trans2FindFirst2Request(
            int messageId,
            int sessionId,
            int treeId,
            bool isSigned,
            bool isReparse,
            [Domain("InfoLevelByFind")] InformationLevel informationLevel,
            int gmtTokenIndex,
            bool isFlagsKnowsLongNameSet,
            bool isGMTPatten)
        {
            Checker.CheckRequest(smbConnection, messageId, sessionId, treeId, isSigned, smbState);
            smbRequest = new Trans2FindFirst2Request(
                messageId,
                sessionId,
                treeId,
                gmtTokenIndex,
                isReparse,
                informationLevel,
                isFlagsKnowsLongNameSet,
                isGMTPatten);

            bool tokenExist = false;
            foreach (SmbFile file in smbConnection.openedFiles.Values)
            {
                foreach (int i in file.previousVersionToken)
                {
                    if (i == gmtTokenIndex)
                    {
                        tokenExist = true;
                        Condition.IsTrue(gmtTokenIndex == i);
                        break;
                    }
                }
                if (tokenExist)
                {
                    break;
                }
            }
            Condition.IsTrue(tokenExist);
            Update.UpdateRequest(smbConnection, smbRequest);
        }