Code example for InvocationTargetException

Methods: getCause

0
            if (!Modifier.isStatic(suiteMethod.getModifiers())) {
                throw new Exception(klass.getName() + ".suite() must be static");
            } 
            suite = (Test) suiteMethod.invoke(null); // static method
        } catch (InvocationTargetException e) {
            throw e.getCause();
        } 
        return suite;
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java