void (AssertHint assertHint) { final PsiPrefixExpression expression = (PsiPrefixExpression)assertHint.getFirstArgument(); final PsiExpression operand = PsiUtil.skipParenthesizedExprDown(expression.getOperand()); if (operand == null) { return; } final String newMethodName = assertHint.isAssertTrue() ? "assertFalse" : "assertTrue"; final String newExpression = compoundMethodCall(newMethodName, assertHint, operand.getText()); PsiReplacementUtil.replaceExpressionAndShorten(assertHint.getOriginalExpression(), newExpression); }