If this exception is encountered:
Check whether the object instance is correct:
invoker is the instance of the object that testMethod is defined in.
java.lang.IllegalArgumentException: object is not an instance of declaring class
Check whether the object instance is correct:
Method method = invoker.getClass().getMethod("testMethod");
method.invoke(invoker); // must be invoker, don't set "this"
invoker is the instance of the object that testMethod is defined in.