void () { myFixture.configureByText("Main.java", """ public class Main { public static void ma<caret>in(String[] args) {} }"""); RunConfigurationProducer.EP_NAME.getPoint().registerExtension(new ApplicationConfigurationProducer() { @Override protected boolean setupConfigurationFromContext(@NotNull ApplicationConfiguration configuration, @NotNull ConfigurationContext context, @NotNull Ref<PsiElement> sourceElement) { boolean result = super.setupConfigurationFromContext(configuration, context, sourceElement); if (result) { configuration.setName("Foo"); configuration.setMainClassName("FooMain"); } return result; } @Override public boolean isPreferredConfiguration(ConfigurationFromContext self, ConfigurationFromContext other) { return false; } }, LoadingOrder.FIRST, getTestRootDisposable()); List<GutterMark> marks = myFixture.findGuttersAtCaret(); GutterIconRenderer mark = (GutterIconRenderer)marks.get(0); String text = mark.getTooltipText(); assertTrue(text.startsWith(""" Run 'Main.main()' Debug 'Main.main()' Run 'Main.main()' with Coverage""")); }