void (@NotNull AssertHint assertHint) { final PsiInstanceOfExpression expression = (PsiInstanceOfExpression)assertHint.getFirstArgument(); final PsiExpression operand = expression.getOperand(); final PsiTypeElement type = expression.getCheckType(); if (type == null) return; final String newExpression = compoundMethodCall("assertInstanceOf", assertHint, type.getText() + ".class," + operand.getText()); PsiReplacementUtil.replaceExpressionAndShorten(assertHint.getOriginalExpression(), newExpression); }