private static @NlsContexts.Tooltip String createOneArgMismatchTooltip(@NotNull MethodCandidateInfo candidateInfo,
                                                                         @NotNull List<? extends PsiExpression> mismatchedExpressions,
                                                                         PsiExpression @NotNull [] expressions,
                                                                         PsiParameter @NotNull [] parameters) {
    PsiExpression wrongArg = mismatchedExpressions.get(0);
    PsiType argType = wrongArg != null ? wrongArg.getType() : null;
    if (argType != null) {
      int idx = ArrayUtil.find(expressions, wrongArg);
      if (idx > parameters.length - 1 && !parameters[parameters.length - 1].isVarArgs()) return null;
      PsiType paramType = candidateInfo.getSubstitutor().substitute(PsiTypesUtil.getParameterType(parameters, idx, candidateInfo.isVarargs()));
      String errorMessage = candidateInfo.getInferenceErrorMessage();
      HtmlChunk reason = getTypeMismatchErrorHtml(errorMessage);
      return HighlightUtil.createIncompatibleTypesTooltip(
        paramType, argType, (lRawType, lTypeArguments, rRawType, rTypeArguments) ->
          JavaErrorBundle.message("incompatible.types.html.tooltip",
                                  lRawType, lTypeArguments, rRawType, rTypeArguments, reason, ColorUtil.toHtmlColor(UIUtil.getContextHelpForeground())));
    }
    return null;
  }
private static @NlsContexts.Tooltip String createOneArgMismatchTooltip(@NotNull MethodCandidateInfo candidateInfo,
                                                                         @NotNull List<? extends PsiExpression> mismatchedExpressions,
                                                                         PsiExpression @NotNull [] expressions,
                                                                         PsiParameter @NotNull [] parameters)