void () { final String pattern = "c"; final String text = "aabc"; final int pos = text.lastIndexOf(pattern); final StringSearcher searcher = new StringSearcher(pattern, true, false); final int index = searcher.scan(text); assertEquals(pos, index); }