boolean (final String methodName, final Class<?> clazz) { final RunWith clazzAnnotation = clazz.getAnnotation(RunWith.class); if (clazzAnnotation != null && Parameterized.class.isAssignableFrom(clazzAnnotation.value())) { return true; } if (methodName != null) { for (Method method : clazz.getDeclaredMethods()) { if (methodName.equals(method.getName()) && method.getParameterTypes().length > 0) { return true; } } } return false; }