boolean (@NotNull PsiClass containingClass, HashSet<? super PsiClass> classes) { PsiAnnotation annotation = MetaAnnotationUtil.findMetaAnnotations(containingClass, Collections.singletonList(JUnitCommonClassNames.ORG_JUNIT_JUPITER_API_TEST_INSTANCE)) .findFirst().orElse(null); if (annotation != null) { PsiAnnotationMemberValue value = annotation.findDeclaredAttributeValue(PsiAnnotation.DEFAULT_REFERENCED_METHOD_NAME); if (value != null && value.getText().contains("PER_CLASS")) { return true; } } else { for (PsiClass superClass : containingClass.getSupers()) { if (classes.add(superClass) && hasPerClassAnnotation(superClass, classes)) return true; } } return false; }