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"); createChildData(c, BINARY_FILENAME); final TextFilePatch patch1 = create("a1/b1/c/f1.txt"); final TextFilePatch patch2 = create("h1/c/f2.txt"); final ShelvedBinaryFilePatch shelvedBinaryPatch = createShelvedBinarySimplePatch("a1/b1/c/" + BINARY_FILENAME); final MatchPatchPaths iterator = new MatchPatchPaths(myProject); final List<AbstractFilePatchInProgress<?>> result = iterator.execute(Arrays.asList(patch1, patch2, shelvedBinaryPatch)); checkPath(result, "c/f1.txt", Collections.singletonList(b), 2); checkPath(result, "c/f2.txt", Collections.singletonList(b), 1); checkPath(result, "c/" + BINARY_FILENAME, Collections.singletonList(b), 2); }