boolean (PsiClass psiClass) { String className = psiClass.getName(); if (className == null) { return false; } SearchScope useScope = psiClass.getUseScope(); if (!shouldCheckClassUsages(psiClass, className, useScope)) { return false; } return ReferencesSearch.search(psiClass, useScope, false) .anyMatch(reference -> { PsiElement referenceElement = reference.getElement(); PsiAnnotation annotation = PsiTreeUtil.getParentOfType(referenceElement, PsiAnnotation.class, true, PsiStatement.class, PsiMember.class); if (annotation != null) { String annotationName = annotation.getQualifiedName(); if (JUnitCommonClassNames.ORG_JUNIT_JUPITER_PARAMS_PROVIDER_ENUM_SOURCE.equals(annotationName) && annotation.getAttributes().size() == 1) { return true; } } return false; }); }