public virtual void TestSpliteratorInSequence()
        {
            List <int> x = new List <int>();

            for (int i = 0; i < 1000; ++i)
            {
                x.Add(i);
            }
            IterableIterator <int> iter        = new IterableIterator <int>(x.GetEnumerator());
            ISpliterator <int>     spliterator = iter.Spliterator();
            IStream <int>          stream      = StreamSupport.Stream(spliterator, false);

            int[] next = new int[] { 0 };
            stream.ForEach(null);
        }
        public virtual void TestSpliteratorInParallel()
        {
            List <int> x = new List <int>();

            for (int i = 0; i < 1000; ++i)
            {
                x.Add(i);
            }
            IterableIterator <int> iter        = new IterableIterator <int>(x.GetEnumerator());
            ISpliterator <int>     spliterator = iter.Spliterator();
            IStream <int>          stream      = StreamSupport.Stream(spliterator, true);

            bool[] seen = new bool[1000];
            stream.ForEach(null);
            for (int i_1 = 0; i_1 < 1000; ++i_1)
            {
                NUnit.Framework.Assert.IsTrue(seen[i_1]);
            }
        }