void () { AllVcsesI myVcses = AllVcses.getInstance(myProject); myVcses.registerManually(new MockAbstractVcs(myProject, MOCK)); List<VirtualFile> roots = createRootStructure( Pair.create(myBaseDir.getPath(), MOCK), Pair.create("community", MOCK) ); Change changeBeforeCommunity = createChangeForPath("a.txt"); Change changeAfterCommunity = createChangeForPath("readme.txt"); Change changeInCommunity = createChangeForPath("community/com.txt"); myChangeListManager.addChanges(changeBeforeCommunity, changeAfterCommunity, changeInCommunity); Map<VirtualFile, Collection<Change>> expected = new HashMap<>(); expected.put(roots.get(0), Arrays.asList(changeBeforeCommunity, changeAfterCommunity)); expected.put(roots.get(1), Collections.singletonList(changeInCommunity)); Map<VirtualFile, Collection<Change>> changesUnderRoots = LocalChangesUnderRoots.getChangesUnderRoots(roots, myChangeListManager, myProject); assertEqualMaps(expected, changesUnderRoots); }