boolean (final String qualifiedName) { if (qualifiedName != null) { final Project project = getConfiguration().getProject(); final PsiPackage aPackage = JavaPsiFacade.getInstance(project).findPackage(qualifiedName); if (aPackage != null) { final TestSearchScope scope = getScope(); if (scope != null) { final SourceScope sourceScope = scope.getSourceScope(getConfiguration()); if (sourceScope != null) { final GlobalSearchScope configurationSearchScope = GlobalSearchScopesCore.projectTestScope(project).intersectWith( sourceScope.getGlobalSearchScope()); final PsiDirectory[] directories = aPackage.getDirectories(configurationSearchScope); return Arrays.stream(directories) .map(dir -> ModuleUtilCore.findModuleForFile(dir.getVirtualFile(), project)) .filter(Objects::nonNull) .distinct() .count() > 1; } } } } return false; }