void () { String packageName = "abstractTests"; String shortName = "AbstractTestImpl1"; String qualifiedName = StringUtil.getQualifiedName(packageName, shortName); PsiClass psiClass = findClass(getModule1(), qualifiedName); PsiMethod testMethod = psiClass.findMethodsByName(METHOD_NAME, true)[0]; MapDataContext dataContext = new MapDataContext(); dataContext.put(CommonDataKeys.PROJECT, myProject); if (PlatformCoreDataKeys.MODULE.getData(dataContext) == null) { dataContext.put(PlatformCoreDataKeys.MODULE, ModuleUtilCore.findModuleForPsiElement(testMethod)); } dataContext.put(Location.DATA_KEY, new PsiMemberParameterizedLocation(myProject, testMethod, psiClass, "param")); ConfigurationContext context = ConfigurationContext.getFromContext(dataContext, ActionPlaces.UNKNOWN); RunnerAndConfigurationSettings settings = context.getConfiguration(); JUnitConfiguration configuration = (JUnitConfiguration)settings.getConfiguration(); checkClassName(qualifiedName, configuration); checkMethodName(METHOD_NAME, configuration); checkPackage(packageName, configuration); checkGeneretedName(configuration, shortName + "." + METHOD_NAME); }