### Question:
DefaultMethodResolver implements IMethodResolver { @Override public Method getMethod(Class<?> owner, Serializable id) { Class<?> candidate = owner; while (candidate != null) { for (Method method : candidate.getDeclaredMethods()) { if (id.equals(getId(method))) { try { method.setAccessible(true); } catch (SecurityException accessNotAllowed) { } return method; } } candidate = candidate.getSuperclass(); } throw new IllegalArgumentException(String.format( "unknown method %s#%s", owner.getName(), id)); }  @Override Method getMethod(Class<?> owner, Serializable id); @Override Serializable getId(Method method); @Override Method getSetter(Method getter);  }### Answer:
@Test public void syntheticMethodOnAnonymousClass() { @SuppressWarnings("unused") Object outer = new Object() { private boolean accessed; private Object inner = new Object() { { accessed = true; } }; }; try { resolver.getMethod(outer.getClass(), "notExistingMethod"); fail(); } catch (IllegalArgumentException expected) { } }