}
protected void checkLinks(SiteManager siteManager, SiteNode node) throws SiteException {
String[] languages = node.getLanguages();
for (int i = 0; i < languages.length; i++) {
Link link = node.getLink(languages[i]);
assertEquals(link.getLanguage(), languages[i]);
assertNotNull(link.getLabel());
if (node.getUuid() != null) {
Document doc = link.getDocument();
assertNotNull(doc);
String docUuid = doc.getUUID();
String nodeUuid = node.getUuid();
assertNotNull(doc.getUUID());
assertEquals(docUuid, nodeUuid);
assertEquals(doc.getLanguage(), link.getLanguage());
// it may not be allowed to insert the doc twice
try {
siteManager.add("/sidebar", doc);
assertTrue("No exception thrown", false);