void () { editor.getSelectionModel().setSelection(0, 2); ShowSelectionHistoryAction a = new ShowSelectionHistoryAction(); AnActionEvent e = createEventFor(a, new VirtualFile[] {f}, myProject); a.update(e); assertTrue(e.getPresentation().isEnabled()); assertEquals("Show History for Selection…", e.getPresentation().getText()); }