private static boolean testMethod(Method method){
  Class<?>[] parameterTypes=method.getParameterTypes();
  Object parameters[]=new Object[parameterTypes.length];
  for (int i=0; i < parameters.length; i++) {
    parameters[i]=getParameterValue(parameterTypes[i]);
  }
  try {
    logInfo("Calling " + method);
    method.invoke(method.getDeclaringClass(),parameters);
  }
 catch (  IllegalArgumentException e) {
    logWarning("IllegalArgumentException for " + method + ": "+ e.getMessage());
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    logWarning("IllegalAccessException for " + method + ": "+ e.getMessage());
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    if (e.getCause() instanceof UnsatisfiedLinkError) {
      logWarning("Missing " + method);
      return false;
    }
 else     if (e.getCause() instanceof Error) {
      logWarning("Error in " + method + ": "+ e.getCause());
      return false;
    }
  }
  return true;
}

private static boolean testMethod ( Method method ) { Class < ? > [ ] parameterTypes = method . getParameterTypes ( ) ; Object parameters [ ] = new Object [ parameterTypes . length ] ; for ( int i = 0 ; i < parameters . length ; i ++ ) { parameters [ i ] = getParameterValue ( parameterTypes [ i ] ) ; } try { logInfo ( "Calling " + method ) ; method . invoke ( method . getDeclaringClass ( ) , parameters ) ; } catch ( IllegalArgumentException e ) { logWarning ( "IllegalArgumentException for " + method + ": " + e . getMessage ( ) ) ; e . printStackTrace ( ) ; } catch ( IllegalAccessException e ) { logWarning ( "IllegalAccessException for " + method + ": " + e . getMessage ( ) ) ; e . printStackTrace ( ) ; } catch ( InvocationTargetException e ) { if ( e . getCause ( ) instanceof UnsatisfiedLinkError ) { logWarning ( "Missing " + method ) ; return false ; } else if ( e . getCause ( ) instanceof Error ) { logWarning ( "Error in " + method + ": " + e . getCause ( ) ) ; return false ; } } return true ; }
tests whether the given method can be invoked on its declaring class , with default parameters , without causing an unsatisfiedlinkerror
