@Test public void isEndAnchored() { Assertions.assertTrue(PatternMatcher.compile("abc$").isEndAnchored()); Assertions.assertTrue(PatternMatcher.compile("[a-z]$").isEndAnchored()); Assertions.assertTrue(PatternMatcher.compile("(a|b)$").isEndAnchored()); Assertions.assertFalse(PatternMatcher.compile("(a$|b)").isEndAnchored()); Assertions.assertFalse(PatternMatcher.compile("abc").isEndAnchored()); }