void () { VirtualFile moduleRoot = getTempDir().createVirtualDir(); assertNotNull(moduleRoot); PsiTestUtil.addSourceRoot(getModule(), moduleRoot); VirtualFile moduleRoot2 = getTempDir().createVirtualDir(); assertNotNull(moduleRoot2); PsiTestUtil.addSourceRoot(getModule(), moduleRoot2); GlobalSearchScope modScope = getModule().getModuleScope(); int compare = modScope.compare(moduleRoot, moduleRoot2); assertTrue(compare != 0); GlobalSearchScope union = modScope.uniteWith(GlobalSearchScope.EMPTY_SCOPE); int compare2 = union.compare(moduleRoot, moduleRoot2); assertEquals(compare, compare2); assertEquals(modScope.compare(moduleRoot2, moduleRoot), union.compare(moduleRoot2, moduleRoot)); }