code: public static void invokeMethod(Object target, Method method, Object... arguments) {
          method.setAccessible(true); // so we can call private and protected methods too
  
          try {
              method.invoke(target, arguments);
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }
docs: Invoke the given method on the given target using the given arguments.
  Allows to call private and protected methods.
  @throws RuntimeException if method could not be invoked.
  @param target
  @param method
  @param arguments