boolean (UExpression expression) { final UElement parent = UastUtils.skipParenthesizedExprUp(expression.getUastParent()); if (parent == null || !UastExpressionUtils.isMethodCall(parent)) { return false; } @NonNls final String methodName = ((UCallExpression)parent).getMethodName(); if (methodName == null) { return false; } if (!methodName.startsWith("assert") && !methodName.equals("fail")) { return false; } final PsiMethod method = ((UCallExpression)parent).resolve(); if (method == null) { return false; } final PsiClass containingClass = method.getContainingClass(); if (containingClass == null) { return false; } return InheritanceUtil.isInheritor(containingClass,"org.junit.Assert") || InheritanceUtil.isInheritor(containingClass,"org.junit.jupiter.api.Assertions") || InheritanceUtil.isInheritor(containingClass, "junit.framework.Assert"); }