void () { assumeWindows(); tempDir.newFile("file.txt"); // just to populate a directory performTestOnWindowsSubst(tempDir.getRoot().getPath(), substRoot ->{ FileAttributes attributes = getAttributes(substRoot); assertEquals(substRoot + " " + attributes, FileAttributes.Type.DIRECTORY, attributes.getType()); assertFalse(substRoot + " " + attributes, attributes.isSymLink()); File[] children = substRoot.listFiles(); assertNotNull(children); assertEquals(1, children.length); File file = children[0]; String target = resolveSymLink(file); assertEquals(file.getPath(), target); }); }