void () { VirtualFile root = getTempDir().createVirtualDir(); myVcsManager.setDirectoryMapping(root.getPath(), myVcs.getName()); PsiTestUtil.addContentRoot(myModule, root); VirtualFile excludedDir = createChildDirectory(root, "excluded"); VirtualFile excludedFile = createChildData(excludedDir, "a.txt"); PsiTestUtil.addExcludedRoot(myModule, excludedDir); assertEquals(root, myVcsManager.getVcsRootFor(excludedFile)); List<VirtualFile> processed = new ArrayList<>(); myVcsManager.iterateVcsRoot(root, path -> { processed.add(path.getVirtualFile()); return true; }); assertTrue(processed.contains(excludedFile)); }