@Test public void pathEqual() throws Exception { Matcher<HttpRequest> matcher = path(equal("/ping")); assertTrue(matcher.matches(requestAs("/ping"))); assertFalse(matcher.matches(requestAs("/echo"))); }
@Test public void pathEndsWith() throws Exception { Matcher<HttpRequest> matcher = path(endsWith(".gif")); assertTrue(matcher.matches(requestAs("/fav.gif"))); assertTrue(matcher.matches(requestAs("/images/fav.gif"))); assertFalse(matcher.matches(requestAs("/images/fav.png"))); }