void (boolean isNext) { ConsoleHistoryController controller = ConsoleHistoryController.getController(getConsoleView()); EdtTestUtil.runInEdtAndWait(() -> { AnAction action = isNext ? controller.getHistoryNext() : controller.getHistoryPrev(); action.actionPerformed(TestActionEvent.createTestEvent()); }); }