HttpMethodMatcher extends AbstractMatcher<Method> { @Override public boolean matches(Method m) { Set<String> verbs = IsHttpMethod.getHttpMethods(m); return verbs != null && !verbs.isEmpty() && !m.isSynthetic(); }  @Override boolean matches(Method m);  }
@Test public void testMatches() { HttpMethodMatcher matcher = new HttpMethodMatcher(); Method[] methods = TestResource.class.getMethods(); for (int i = 0; i < methods.length; i++) { if (methods[i].getAnnotations().length != 0) { assertTrue(matcher.matches(methods[i])); } else { assertFalse(matcher.matches(methods[i])); } } }