boolean (PsiMethod method) { if (method == null) { return false; } final PsiClass containingClass = method.getContainingClass(); if (containingClass == null) { return false; } final String qualifiedName = containingClass.getQualifiedName(); return "org.junit.Assert".equals(qualifiedName) || "junit.framework.TestCase".equals(qualifiedName); }