void () { configureByFile(getBasePath() + "/beforeNameTyping.java"); TemplateManagerImpl.setTemplateTesting(getTestRootDisposable()); IntentionAction intentionAction = findActionWithText("Replace by @DataPoint method"); ModCommandAction mc = intentionAction.asModCommandAction(); assertNotNull(mc); List<ModCommand> commands = mc.perform(ActionContext.from(getEditor(), getFile())).unpack(); assertEquals(2, commands.size()); assertInstanceOf(commands.get(0), ModUpdateFileText.class); String actualText = ((ModUpdateFileText)commands.get(0)).newText(); assertEquals(""" // "Replace by @DataPoint method" "true" class Foo { @org.junit.experimental.theories.DataPoint public static String bar() { return null; } }""", actualText); assertInstanceOf(commands.get(1), ModRenameSymbol.class); }