void () { createEmptyModule(); addDependency(getModule2(), getModule1()); PsiClass psiClass = findClass(getModule1(), CLASS_NAME); PsiPackage psiPackage = JUnitUtil.getContainingPackage(psiClass); JUnitConfiguration configuration = createJUnitConfiguration(psiPackage, AllInPackageConfigurationProducer.class, new MapDataContext()); configuration.getPersistentData().setScope(TestSearchScope.MODULE_WITH_DEPENDENCIES); configuration.setModule(getModule2()); MapDataContext dataContext = new MapDataContext(); dataContext.put(RunConfiguration.DATA_KEY, configuration); configuration = createJUnitConfiguration(psiClass, TestInClassConfigurationProducer.class, dataContext); checkClassName(psiClass.getQualifiedName(), configuration); assertEquals(Collections.singleton(getModule2()), new HashSet(Arrays.asList(configuration.getModules()))); }