void () { final VirtualFile root = getOrCreateProjectBaseDir(); PsiTestUtil.addContentRoot(myModule, root); VirtualFile a = createChildDirectory(root, "a"); VirtualFile b = createChildDirectory(a, "b"); VirtualFile c = createChildDirectory(b, "c"); createChildData(c, "f1.txt"); createChildData(c, "f2.txt"); createChildData(c, "f3.txt"); createChildData(c, "f4.txt"); VirtualFile e = createChildDirectory(root, "e"); VirtualFile h1 = createChildDirectory(e, "h1"); VirtualFile a1 = createChildDirectory(e, "a1"); VirtualFile f = createChildDirectory(a1, "b1"); VirtualFile g = createChildDirectory(f, "c"); createChildData(g, "f1.txt"); createChildData(g, "f2.txt"); createChildData(g, "f3.txt"); createChildData(g, "f4.txt"); VirtualFile c2 = createChildDirectory(h1, "c"); createChildData(c2, "f2.txt"); final TextFilePatch patch1 = create("a1/b1/c/f1.txt"); final TextFilePatch patch2 = create("h1/c/f2.txt"); final MatchPatchPaths iterator = new MatchPatchPaths(myProject); final List<AbstractFilePatchInProgress<?>> result = iterator.execute(Arrays.asList(patch1, patch2)); checkPath(result, "a1/b1/c/f1.txt", Collections.singletonList(e), 0); checkPath(result, "h1/c/f2.txt", Collections.singletonList(e), 0); }