s = new Scanner("");
result = s.findWithinHorizon(Pattern.compile("^"), 0);
assertEquals("", result);
MatchResult matchResult = s.match();
assertEquals(0, matchResult.start());
assertEquals(0, matchResult.end());
result = s.findWithinHorizon(Pattern.compile("$"), 0);
assertEquals("", result);
matchResult = s.match();
assertEquals(0, matchResult.start());