@Nonnull private List<TestCaseEvent> convertClassToTestCaseEvents(ClassDefItem classDefItem) { AnnotationDirectoryItem annotationDirectoryItem = classDefItem.getAnnotations(); if (annotationDirectoryItem == null) { return emptyList(); } List<TestCaseEvent> testCaseEvents = new ArrayList<>(); for (AnnotationDirectoryItem.MethodAnnotation method : annotationDirectoryItem.getMethodAnnotations()) { stream(method.annotationSet.getAnnotations()) .filter(annotation -> TEST_ANNOTATION.equals(stringType(annotation))) .map(annotation -> convertToTestCaseEvent(classDefItem, annotationDirectoryItem, method)) .forEach(testCaseEvents::add); } return testCaseEvents; }