boolean (PsiExpression expression) { PsiElement parent = ExpressionUtils.getPassThroughParent(expression); if (parent instanceof PsiExpressionList) { PsiMethodCallExpression call = ObjectUtils.tryCast(parent.getParent(), PsiMethodCallExpression.class); // JUnit4 has assertEquals(long, long) but no assertEquals(int, int) // so int-assertions will be wired to assertEquals(long, long), which could be annoying false-positive. // If the multiplication unexpectedly overflows then assertion will fail anyway, so the problem will manifest itself. return JUNIT4_ASSERT_EQUALS.matches(call); } return false; }