public static boolean isEqualsWithItself(PsiMethodCallExpression expression) {
    final PsiReferenceExpression methodExpression = expression.getMethodExpression();
    final PsiExpressionList argumentList = expression.getArgumentList();
    final int count = argumentList.getExpressionCount();
    if (count == 1) {
      final PsiExpression qualifier = ExpressionUtils.getEffectiveQualifier(methodExpression);
      final PsiExpression[] arguments = argumentList.getExpressions();
      if (arguments.length != 1) return false;
      final PsiExpression argument = PsiUtil.skipParenthesizedExprDown(arguments[0]);
      if (ONE_ARGUMENT_COMPARISON.test(expression)) {
        return isItself(qualifier, argument);
      }
      else if (ASSERTJ_COMPARISON.test(expression)) {
        return isItself(getAssertThatArgument(expression), argument);
      }
      else if (ASSERTJ_THE_SAME.test(expression)) {
        return isTheSame(getAssertThatArgument(expression), argument);
      }
    }
    else if (count == 2 || count == 3) {
      final PsiExpression[] arguments = argumentList.getExpressions();
      final PsiExpression firstArgument = PsiUtil.skipParenthesizedExprDown(arguments[0]);
      final PsiExpression secondArgument = PsiUtil.skipParenthesizedExprDown(arguments[1]);

      if (TWO_ARGUMENT_COMPARISON.test(expression) || ASSERT_ARGUMENT_COMPARISON.test(expression)) {
        return isItself(firstArgument, secondArgument);
      }
      else if (ASSERT_ARGUMENTS_THE_SAME.test(expression)) {
        return isTheSame(firstArgument, secondArgument);
      }
    }
    return false;
  }
public static boolean isEqualsWithItself(PsiMethodCallExpression expression)