void () { myFixture.configureByText("Test.java", """ class Test { void test() { int x = <caret>"xyz"; } }"""); IntentionAction action = myFixture.findSingleIntention("Change variable 'x' type to 'String'"); assertNotNull(action); String text = IntentionPreviewPopupUpdateProcessor.getPreviewText(getProject(), action, getFile(), getEditor()); assertEquals(""" class Test { void test() { String x = "xyz"; } }""", text); }