@Test
void testLongStrings() throws Exception {

    // This blew out the stack on a recursive version of wildcardMatch
    final char[] t = new char[] { 'a', 'b', 'c', 'd' };
    StringBuffer text = new StringBuffer("a");
    Random r = new Random();
    int size = 8192;
    for (int i = 0; i < size; i++) {
        text.append(t[r.nextInt(Integer.MAX_VALUE) % t.length]);
    }
    text.append("b");
    assertTrue(SearchPattern.wildcardMatch("a*b", text.toString()));
}