cls -> {
Arrays.stream(cls.getDeclaredMethods())
.filter(m -> m.isAnnotationPresent(Test.class))
.forEach(m -> {
checkTestAnnotationForMethod(m);
Test annotation = m.getAnnotation(Test.class);
String testName = m.getName();
if (!"".equals(annotation.name())) {
testName = annotation.name();
}
testMethods.put(testName, m);
});
});
}