void () { final VirtualFile root = getOrCreateProjectBaseDir(); VirtualFile grandRoot = root.getParent().getParent(); PsiTestUtil.addContentRoot(myModule, root); VfsTestUtil.createFile(grandRoot, "module-1/.idea/module.xml", "1\n2\n3\n4\n5\n6\n"); VfsTestUtil.createFile(grandRoot, "module-2/.idea/module.xml", "1\n2\n3\n4\n5\n6\n"); VfsTestUtil.createFile(root, "module-1/.idea/module.xml", "1\n2\n3\n4\n5\n6\n"); VfsTestUtil.createFile(root, ".idea/module.xml", "1\n2\n3\n4\n5\n6\n"); TextFilePatch patch1 = create("../../module-1/.idea/module.xml"); TextFilePatch patch2 = create("../../module-2/.idea/module.xml"); final MatchPatchPaths iterator1 = new MatchPatchPaths(myProject); final List<AbstractFilePatchInProgress<?>> result1 = iterator1.execute(Collections.singletonList(patch1), true); checkPath(result1, "module-1/.idea/module.xml", Collections.singletonList(grandRoot), 2); final MatchPatchPaths iterator2 = new MatchPatchPaths(myProject); final List<AbstractFilePatchInProgress<?>> result2 = iterator2.execute(Collections.singletonList(patch2), true); checkPath(result2, "module-2/.idea/module.xml", Collections.singletonList(grandRoot), 2); }