void (VirtualFile rootDir) { PsiTestUtil.addContentRoot(myModule, rootDir); final VirtualFile[] children = rootDir.getChildren(); for (VirtualFile child : children) { String name = child.getName(); if (name.startsWith("src")) { String prefix = name.equals("srcPrefix1") ? "pack1.inside" : name.equals("srcPrefix2") ? "pack1Unrelated" : ""; PsiTestUtil.addSourceRoot(myModule, child, JavaSourceRootType.SOURCE, JpsJavaExtensionService.getInstance().createSourceRootProperties(prefix, false)); } } }