@NotNull
  private static String generateComparison(@NotNull String methodName,
                                           @Nullable PsiType type,
                                           @NotNull String varName,
                                           @NotNull PsiExpression expression,
                                           @NotNull PsiVariable exprVariable) {
    String lambdaExpr = getExpressionReplacingReferences(expression, varName, exprVariable);
    String parameter =
      type == null ? varName : "(" + GenericsUtil.getVariableTypeByExpressionType(type).getCanonicalText() + " " + varName + ")";
    return methodName + "(" + parameter + "->" + lambdaExpr + ")";
  }
@NotNull
  private static String generateComparison(@NotNull String methodName,
                                           @Nullable PsiType type,
                                           @NotNull String varName,
                                           @NotNull PsiExpression expression,
                                           @NotNull PsiVariable exprVariable)