void () { myFixture.addClass("class Another { }"); myFixture.configureByText("Test.java", """ class Test { void test() { Another.fo<caret>o; } }"""); IntentionAction action = myFixture.findSingleIntention("Create field 'foo' in 'Another'"); assertNotNull(action); String text = IntentionPreviewPopupUpdateProcessor.getPreviewText(getProject(), action, getFile(), getEditor()); assertEquals(""" class Another { public static Object foo; }""", text); }