void () { myFixture.configureByText(FileTypes.PLAIN_TEXT, "hello,<caret>world"); @SuppressWarnings("rawtypes") ExtensionPoint<RunConfigurationProducer> ep = RunConfigurationProducer.EP_NAME.getPoint(); ep.registerExtension(new FakeRunConfigurationProducer("hello_"), getTestRootDisposable()); ep.registerExtension(new FakeRunConfigurationProducer("world_"), getTestRootDisposable()); FakeRunConfigurationProducer.SORTING = SortingMode.NONE; List<RunnerAndConfigurationSettings> configs = getConfigurationsFromContext(); Assert.assertEquals(2, configs.size()); for (RunnerAndConfigurationSettings config : configs) { addConfiguration(config); } FakeRunConfigurationProducer.SORTING = SortingMode.NAME_ASC; ConfigurationContext context = ConfigurationContext.getFromContext(createDataContext(), ActionPlaces.UNKNOWN); RunnerAndConfigurationSettings existing = context.findExisting(); Assert.assertNotNull(existing); Assert.assertTrue(existing.getConfiguration().getName().startsWith("hello_")); FakeRunConfigurationProducer.SORTING = SortingMode.NAME_DESC; context = ConfigurationContext.getFromContext(createDataContext(), ActionPlaces.UNKNOWN); existing = context.findExisting(); Assert.assertNotNull(existing); Assert.assertTrue(existing.getConfiguration().getName().startsWith("world_")); }