JUnitConfiguration (@NotNull PsiElement psiElement, @NotNull Class<? extends AbstractJavaTestConfigurationProducer<?>> producerClass, @NotNull MapDataContext dataContext) { ConfigurationContext context = createContext(psiElement, dataContext); RunConfigurationProducer<?> producer = RunConfigurationProducer.getInstance(producerClass); ConfigurationFromContext fromContext = producer.createConfigurationFromContext(context); assertNotNull(fromContext); return (JUnitConfiguration)fromContext.getConfiguration(); }