void (@NotNull String moduleName, Collection<ExternalSystemSourceType> sourceTypes, Pair<String, ExternalSystemSourceType>... expected) { Module module = ReadAction.compute(() -> ModuleManager.getInstance(myProject).findModuleByName(moduleName)); assertNotNull(moduleName, module); Collection<ExternalSystemContentRootContributor.ExternalContentRoot> contentRoots = ExternalSystemApiUtil.getExternalProjectContentRoots(module, sourceTypes); String projectRootPath = myProjectRoot.getPath(); List<Pair<String, ExternalSystemSourceType>> map = ContainerUtil.map( contentRoots, it -> Pair.create(FileUtil.getRelativePath(projectRootPath, FileUtil.toSystemIndependentName(it.getPath().toString()), '/'), it.getRootType())); assertSameElements(map, expected); }