void () { final String pattern = "bc"; final String text = "aabc"; StringSearcher searcher = new StringSearcher(pattern, true, true); final int index = searcher.scan(text); assertEquals(text.indexOf("bc"), index); }