void (@NotNull PsiMethodCallExpression expression) { final Project project = expression.getProject(); final Module module = ModuleUtilCore.findModuleForPsiElement(expression); if (module == null) { return; } final PsiClass newAssertClass = JavaPsiFacade.getInstance(project) .findClass(JUnitCommonClassNames.ORG_JUNIT_ASSERT, GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module)); if (newAssertClass == null) { return; } final PsiMethod psiMethod = expression.resolveMethod(); if (psiMethod == null || !psiMethod.hasModifierProperty(PsiModifier.STATIC)) { return; } final PsiClass containingClass = psiMethod.getContainingClass(); if (containingClass == null) { return; } final String name = containingClass.getQualifiedName(); if (JUnitCommonClassNames.JUNIT_FRAMEWORK_ASSERT.equals(name) || JUnitCommonClassNames.JUNIT_FRAMEWORK_TEST_CASE.equals(name)) { registerMethodCallError(expression, name); } }