public virtual void TestStringUnion() { List <BytesRef> strings = new List <BytesRef>(); for (int i = RandomInts.RandomInt32Between(Random, 0, 1000); --i >= 0;) { strings.Add(new BytesRef(TestUtil.RandomUnicodeString(Random))); } strings.Sort(); Automaton union = BasicAutomata.MakeStringUnion(strings); Assert.IsTrue(union.IsDeterministic); Assert.IsTrue(BasicOperations.SameLanguage(union, NaiveUnion(strings))); }