void (@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); final AssertHint assertHint = AssertHint.createAssertEqualsHint(expression); if (assertHint != null && isAssertEqualsThatCouldBeAssertLiteral(assertHint)) { registerMethodCallError(expression, getReplacementMethodName(assertHint)); } else { final AssertHint assertTrueFalseHint = AssertHint.createAssertTrueFalseHint(expression); if (assertTrueFalseHint == null) { return; } final boolean assertTrue = assertTrueFalseHint.isAssertTrue(); final PsiExpression firstArgument = assertTrueFalseHint.getFirstArgument(); if (ComparisonUtils.isNullComparison(firstArgument)) { registerMethodCallError(expression, assertTrue == isEqEqExpression(firstArgument) ? "assertNull()" : "assertNotNull()"); } else if (isIdentityComparison(firstArgument)) { registerMethodCallError(expression, assertTrue == isEqEqExpression(firstArgument) ? "assertSame()" : "assertNotSame()"); } else { if (isEqualityComparison(firstArgument)) { if (assertTrue) { registerMethodCallError(expression, "assertEquals()"); } else if (firstArgument instanceof PsiMethodCallExpression || hasPrimitiveOverload(assertTrueFalseHint)) { registerMethodCallError(expression, "assertNotEquals()"); } } else if (isAssertThatCouldBeFail(firstArgument, !assertTrue)) { registerMethodCallError(expression, "fail()"); } else if (assertTrue && assertTrueFalseHint.isExpectedActualOrder() && isArrayEqualityComparison(firstArgument)) { registerMethodCallError(expression, "assertArrayEquals()"); } else if (BoolUtils.isNegation(firstArgument)) { registerMethodCallError(expression, assertTrue ? "assertFalse()" : "assertTrue()"); } else if (assertTrue && isInstanceOfComparison(firstArgument) && isInstanceOfMethodExistsWithMatchingParams(assertTrueFalseHint)) { registerMethodCallError(expression, "assertInstanceOf()"); } } } }