void () { assumeWindows(); File targetDir = tempDir.newDirectory("target"); File targetFile = tempDir.newFile("target/file"); File directDirLink = new File(tempDir.getRoot(), "dirLink"); createJunction(targetDir.getPath(), directDirLink.getPath()); File linkParentDir = tempDir.newDirectory("linkParent"); createJunction(targetDir.getPath(), new File(linkParentDir, "link").getPath()); FileUtil.delete(directDirLink); FileUtil.delete(linkParentDir); assertThat(directDirLink).doesNotExist(); assertThat(linkParentDir).doesNotExist(); assertThat(targetFile).exists(); }