public static Object invokeInstanceMethod(String methodName, Object ownerInstance,
			Class<?>[] parameterTypes, Object[] args) throws RuntimeException {
		if (ownerInstance == null) {
			throw new NullPointerException("Owner of instance field cannot be null");
		}

		Class<?> objectClass =
			(ownerInstance instanceof Class) ? (Class<?>) ownerInstance : ownerInstance.getClass();
		Object result = null;

		try {

			// get the method object to call
			Method method = locateMethodObjectOnClass(methodName, objectClass, parameterTypes);

			if (method == null) {
				throw new NoSuchMethodException("Unable to find a method by " + "the name \"" +
					methodName + "\" on the class " + objectClass + " or any of its parent " +
					"implementations.");
			}

			// make sure we have access
			method.setAccessible(true);

			// execute the method and get the result
			result = method.invoke(ownerInstance, args);
		}
		catch (Exception e) {
			throw new RuntimeException("Unable to use reflection to call " + "method: " +
				methodName + " from class: " + objectClass, e);
		}

		return result;
	}
Uses reflection to execute the method denoted by the given method
name.  If any value is returned from the method execution, then it 
will be returned from this method.  Otherwise, <code>null</code> is returned.
<p>
Note: if the method is static, then the <code>ownerInstance</code> field 
can be the class of the object that contains the method.

@param methodName The name of the method to execute.
@param ownerInstance The object instance of which the method will be
       executed.
@param parameterTypes The parameter <b>types</b> that the method takes.
@param args The parameter values that should be passed to the method.
       This value can be null or zero length if there are no parameters
       to pass
@return The return value as returned from executing the method.
@see    Method#invoke(java.lang.Object, java.lang.Object[])
@throws RuntimeException if there is a problem accessing the field
        using reflection.  A RuntimeException is used so that calling
        tests can avoid using a try/catch block, but will still fail
        when an error is encountered.
@since  Tracker Id 267
Ghidra/Framework/Generic/src/main/java/generic/test/TestUtils.java