void () { final VirtualFile root = getOrCreateProjectBaseDir(); PsiTestUtil.addContentRoot(myModule, root); VirtualFile a = createChildDirectory(root, "a"); VirtualFile b = createChildDirectory(a, "b"); VirtualFile c = createChildDirectory(b, "c"); VfsTestUtil.createFile(c, BINARY_FILENAME); VirtualFile cc = createChildDirectory(root, "c"); VfsTestUtil.createFile(cc, BINARY_FILENAME); VirtualFile e = createChildDirectory(root, "e"); VirtualFile f = createChildDirectory(e, "b"); VirtualFile g = createChildDirectory(f, "c"); VfsTestUtil.createFile(g, BINARY_FILENAME); String cBinary = "c/" + BINARY_FILENAME; ShelvedBinaryFilePatch shelvedBinaryPatch = createShelvedBinarySimplePatch(cBinary); final MatchPatchPaths matchPatchPaths = new MatchPatchPaths(myProject); final List<AbstractFilePatchInProgress<?>> resultProjectBase = matchPatchPaths.execute(Collections.singletonList(shelvedBinaryPatch)); checkPath(resultProjectBase, cBinary, Arrays.asList(root, b, f), 0); assertEquals(resultProjectBase.get(0).getBase(), getOrCreateProjectBaseDir()); }