RunConfiguration (String expectedRunTitle) { List<GutterMark> marks = myFixture.findGuttersAtCaret(); assertEquals(1, marks.size()); GutterIconRenderer mark = (GutterIconRenderer)marks.get(0); ActionGroup group = mark.getPopupMenuActions(); assertNotNull(group); AnActionEvent event = TestActionEvent.createTestEvent(); List<AnAction> list = ContainerUtil.findAll(group.getChildren(event), action -> { AnActionEvent actionEvent = TestActionEvent.createTestEvent(); action.update(actionEvent); String text = actionEvent.getPresentation().getText(); return text != null && text.startsWith("Run '") && text.endsWith("'"); }); assertEquals(list.toString(), 1, list.size()); list.get(0).update(event); assertEquals(expectedRunTitle, event.getPresentation().getText()); myFixture.testAction(list.get(0)); NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); RunnerAndConfigurationSettings selectedConfiguration = RunManager.getInstance(getProject()).getSelectedConfiguration(); myTempSettings.add(selectedConfiguration); RunConfiguration configuration = selectedConfiguration.getConfiguration(); assertInstanceOf(configuration, JUnitConfiguration.class); return configuration; }