@Test
public void testWildcards() {

  // Don't escape wildcards occuring as individual tokens
  assertEquals("*", QueryPreprocessor.sanitize("*"));
  assertEquals("*", QueryPreprocessor.sanitize(" * "));
  assertEquals("*?*", QueryPreprocessor.sanitize("?"));
  assertEquals("*?*", QueryPreprocessor.sanitize(" ? "));
  // Don't escape wildcards occuring within tokens
  assertEquals("*H*llo* *Worl*d*", QueryPreprocessor.sanitize("H*llo Worl*d"));
  assertEquals("*H?llo* *Worl?d*", QueryPreprocessor.sanitize("H?llo Worl?d"));
}