/// <summary>
        /// blast some enormous random strings through the analyzer </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testRandomHugeStrings() throws Exception
        public virtual void testRandomHugeStrings()
        {
            int numIterations = atLeast(5);

            for (int i = 0; i < numIterations; i++)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int flags = random().nextInt(512);
                int flags = random().Next(512);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.apache.lucene.analysis.util.CharArraySet protectedWords;
                CharArraySet protectedWords;
                if (random().nextBoolean())
                {
                    protectedWords = new CharArraySet(TEST_VERSION_CURRENT, new HashSet <>("a", "b", "cd"), false);
                }
                else
                {
                    protectedWords = null;
                }

                Analyzer a = new AnalyzerAnonymousInnerClassHelper7(this, flags, protectedWords);
                checkRandomData(random(), a, 100 * RANDOM_MULTIPLIER, 8192);
            }
        }
        public virtual void TestRepeatsOff()
        {
            b = new SynonymMap.Builder(true);
            const bool keepOrig = false;

            Add("a b", "ab", keepOrig);
            Add("a b", "ab", keepOrig);
            Add("a b", "ab", keepOrig);
            SynonymMap map = b.Build();
            Analyzer   a   = new AnalyzerAnonymousInnerClassHelper7(this, map);

            AssertAnalyzesTo(a, "a b", new string[] { "ab" }, new int[] { 1 });
        }
        public virtual void TestRandomHugeStrings()
        {
            int numIterations = AtLeast(5);

            for (int i = 0; i < numIterations; i++)
            {
                WordDelimiterFlags flags = (WordDelimiterFlags)Random.Next(512);
                CharArraySet       protectedWords;
                if (Random.nextBoolean())
                {
                    protectedWords = new CharArraySet(TEST_VERSION_CURRENT, new string[] { "a", "b", "cd" }, false);
                }
                else
                {
                    protectedWords = null;
                }

                Analyzer a = new AnalyzerAnonymousInnerClassHelper7(this, flags, protectedWords);
                CheckRandomData(Random, a, 100 * RANDOM_MULTIPLIER, 8192);
            }
        }
        /// <summary>
        /// blast some enormous random strings through the analyzer </summary>
        //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        //ORIGINAL LINE: public void testRandomHugeStrings() throws Exception
        public virtual void testRandomHugeStrings()
        {
            int numIterations = atLeast(5);
            for (int i = 0; i < numIterations; i++)
            {
            //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
            //ORIGINAL LINE: final int flags = random().nextInt(512);
              int flags = random().Next(512);
            //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
            //ORIGINAL LINE: final org.apache.lucene.analysis.util.CharArraySet protectedWords;
              CharArraySet protectedWords;
              if (random().nextBoolean())
              {
            protectedWords = new CharArraySet(TEST_VERSION_CURRENT, new HashSet<>("a", "b", "cd"), false);
              }
              else
              {
            protectedWords = null;
              }

              Analyzer a = new AnalyzerAnonymousInnerClassHelper7(this, flags, protectedWords);
              checkRandomData(random(), a, 100 * RANDOM_MULTIPLIER, 8192);
            }
        }
        public virtual void TestRandomHugeStrings()
        {
            int numIterations = AtLeast(5);
            for (int i = 0; i < numIterations; i++)
            {
                int flags = Random().Next(512);
                CharArraySet protectedWords;
                if (Random().nextBoolean())
                {
                    protectedWords = new CharArraySet(TEST_VERSION_CURRENT, new string[] { "a", "b", "cd" }, false);
                }
                else
                {
                    protectedWords = null;
                }

                Analyzer a = new AnalyzerAnonymousInnerClassHelper7(this, flags, protectedWords);
                CheckRandomData(Random(), a, 100 * RANDOM_MULTIPLIER, 8192);
            }
        }
        //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        //ORIGINAL LINE: public void testRepeatsOff() throws Exception
        public virtual void testRepeatsOff()
        {
            b = new SynonymMap.Builder(true);
            const bool keepOrig = false;
            add("a b", "ab", keepOrig);
            add("a b", "ab", keepOrig);
            add("a b", "ab", keepOrig);
            //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
            //ORIGINAL LINE: final SynonymMap map = b.build();
            SynonymMap map = b.build();
            Analyzer a = new AnalyzerAnonymousInnerClassHelper7(this, map);

            assertAnalyzesTo(a, "a b", new string[] {"ab"}, new int[] {1});
        }
        public virtual void TestRepeatsOff()
        {
            b = new SynonymMap.Builder(true);
            const bool keepOrig = false;
            Add("a b", "ab", keepOrig);
            Add("a b", "ab", keepOrig);
            Add("a b", "ab", keepOrig);
            SynonymMap map = b.Build();
            Analyzer a = new AnalyzerAnonymousInnerClassHelper7(this, map);

            AssertAnalyzesTo(a, "a b", new string[] { "ab" }, new int[] { 1 });
        }