void (AssertHint assertHint) { final PsiExpression firstTestArgument = assertHint.getFirstArgument(); final PsiExpression secondTestArgument = assertHint.getSecondArgument(); final String literalValue; final String compareValue; if (isSimpleLiteral(firstTestArgument, secondTestArgument)) { literalValue = firstTestArgument.getText(); compareValue = secondTestArgument.getText(); } else { literalValue = secondTestArgument.getText(); compareValue = firstTestArgument.getText(); } final String uppercaseLiteralValue = Character.toUpperCase(literalValue.charAt(0)) + literalValue.substring(1); @NonNls final String methodName = "assert" + uppercaseLiteralValue; final String newExpression = compoundMethodCall(methodName, assertHint, compareValue); PsiReplacementUtil.replaceExpressionAndShorten(assertHint.getOriginalExpression(), newExpression); }