void (AssertHint assertHint) { @NonNls final StringBuilder newExpression = new StringBuilder(); addStaticImportOrQualifier("fail", assertHint, newExpression); newExpression.append("fail("); final PsiExpression message = assertHint.getMessage(); if (message != null) { newExpression.append(message.getText()); } newExpression.append(')'); PsiReplacementUtil.replaceExpressionAndShorten(assertHint.getOriginalExpression(), newExpression.toString()); }