void () { String summary = "foo_bar"; TaskManager.getManager(getProject()).activateTask(new LocalTaskImpl("", summary), false); TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO = true; AnActionEvent event = TestActionEvent.createTestToolbarEvent(null); new SwitchTaskAction().update(event); assertEquals(summary, event.getPresentation().getText()); }