@Test
public void testMethodFromWrongClassChain() throws SecurityException, NoSuchMethodException {

  Class<?> clazz = ChildClassList.class;
  Method method = ParameterizedList.class.getMethod("foo", List.class);
  try {
    getEndpointMethod(clazz, method);
    fail(String.format("Method %s is not part of '%s's inheritance chain", clazz, method));
  } catch (IllegalArgumentException expected) {
    // expected
  }
}