File link = new File(linkUnixPath);
Utils.deleteRecursive(root);
root.mkdirs();
assertTrue(root.exists());
ChannelSftp c = (ChannelSftp) session.openChannel("sftp");
c.connect();
c.put(new ByteArrayInputStream("0123456789".getBytes()), unixPath);
assertTrue(target.exists());
assertEquals("0123456789", readFile(unixPath));
c.symlink(unixPath, linkUnixPath);
assertTrue(link.exists());
assertEquals("0123456789", readFile(linkUnixPath));
String str1 = c.readlink(linkUnixPath);
String str2 = c.realpath(unixPath);
assertEquals(str1, str2);
}