assertTrue(matcher.matches(createRequest("")));
}
@Test
public void trailingWildcardMatchesCorrectly() {
AntPathRequestMatcher matcher = new AntPathRequestMatcher("/blah/blAh/**");
assertTrue(matcher.matches(createRequest("/BLAH/blah")));
assertFalse(matcher.matches(createRequest("/blah/bleh")));
assertTrue(matcher.matches(createRequest("/blah/blah/")));
assertTrue(matcher.matches(createRequest("/blah/blah/xxx")));
assertFalse(matcher.matches(createRequest("/blah/blaha")));
assertFalse(matcher.matches(createRequest("/blah/bleh/")));
MockHttpServletRequest request = createRequest("/blah/");
request.setPathInfo("blah/bleh");
assertTrue(matcher.matches(request));
matcher = new AntPathRequestMatcher("/bl?h/blAh/**");
assertTrue(matcher.matches(createRequest("/BLAH/Blah/aaa/")));
assertTrue(matcher.matches(createRequest("/bleh/Blah")));
matcher = new AntPathRequestMatcher("/blAh/**/blah/**");
assertTrue(matcher.matches(createRequest("/blah/blah")));
assertFalse(matcher.matches(createRequest("/blah/bleh")));
assertTrue(matcher.matches(createRequest("/blah/aaa/blah/bbb")));
}