RunConfiguration (final String packageName) { PsiPackage aPackage = JavaPsiFacade.getInstance(myProject).findPackage(packageName); assertNotNull(aPackage); RunConfiguration configuration = createConfiguration(aPackage); assertInstanceOf(configuration, JUnitConfiguration.class); return configuration; }