void () { File upDir = tempDir.newDirectory("sub"); File upLinkFile = createSymLink(upDir.getPath(), upDir.getPath() + "/up_link"); VirtualFile upLinkVFile = refreshAndFind(upLinkFile); assertNotNull(upLinkVFile); assertTrue(upLinkVFile.is(VFileProperty.SYMLINK)); assertTrue(upLinkVFile.isDirectory()); assertPathsEqual(upDir.getPath(), upLinkVFile.getCanonicalPath()); assertVisitedPaths(upDir.getPath(), upLinkVFile.getPath()); File repeatedLinksFile = new File(upDir.getPath() + StringUtil.repeat(File.separator + upLinkFile.getName(), 4)); assertTrue(repeatedLinksFile.getPath(), repeatedLinksFile.isDirectory()); VirtualFile repeatedLinksVFile = refreshAndFind(repeatedLinksFile); assertNotNull(repeatedLinksFile.getPath(), repeatedLinksVFile); assertTrue(repeatedLinksVFile.is(VFileProperty.SYMLINK)); assertTrue(repeatedLinksVFile.isDirectory()); assertPathsEqual(upDir.getPath(), repeatedLinksVFile.getCanonicalPath()); assertEquals(upLinkVFile.getCanonicalFile(), repeatedLinksVFile.getCanonicalFile()); }