}
@Test
public void save() throws Exception {
Folder folder = fAPI.createFolders("/testsave", host, user, false);
Link link = new Link();
link.setFriendlyName("test link");
link.setTitle(link.getFriendlyName());
link.setHostId(host.getIdentifier());
link.setLinkType(Link.LinkType.EXTERNAL.toString());
link.setUrl("google.com");
link.setProtocal("http://");
mAPI.save(link, folder, user, false);
assertTrue(InodeUtils.isSet(link.getInode()));
assertTrue(InodeUtils.isSet(link.getIdentifier()));
link = new Link();
String existingInode = UUIDGenerator.generateUuid();
String existingIdent = UUIDGenerator.generateUuid();
link.setInode(existingInode);
link.setIdentifier(existingIdent);
link.setFriendlyName("test link");
link.setTitle(link.getFriendlyName());
link.setHostId(host.getIdentifier());
link.setLinkType(Link.LinkType.EXTERNAL.toString());
link.setUrl("google.com");
link.setProtocal("http://");
mAPI.save(link, folder, user, false);
assertEquals(existingIdent,link.getIdentifier());
assertEquals(existingInode,link.getInode());
}