* @throws PublicationException
* @throws RepositoryException
*/
final public void testImportSubtree() throws PublicationException, RepositoryException {
Publication pub = getPublication("test");
DefaultSiteTree newSiteTree = new DefaultSiteTree(getFactory(),
pub,
"test1",
getManager(),
getLogger());
ContainerUtil.enableLogging(newSiteTree, getLogger());
newSiteTree.getRepositoryNode().lock();
newSiteTree.addNode("/root", "root-uuid", true, null, null, false);
newSiteTree.addLabel("/root", "en", "root");
newSiteTree.addNode("/root/foo", "root-foo-uuid", true, null, null, false);
newSiteTree.addLabel("/root/foo", "en", "foo");
newSiteTree.addNode("/root/subtree",
"root-subtree-uuid",
true,
"http://exact.biz",
"suffix",
true);
newSiteTree.addLabel("/root/subtree", "en", "subtree");
newSiteTree.addNode("/root/subtree/child",
"root-subtree-child-uuid",
true,
null,
null,
false);
newSiteTree.addLabel("/root/subtree/child", "en", "child");
SiteTreeNode node = (SiteTreeNode) newSiteTree.getNode("/root/subtree");
assertNotNull(node);
SiteTreeNode parentNode = (SiteTreeNode) this.siteTree.getNode("/foo/lala");
assertNotNull(parentNode);
newSiteTree.getRepositoryNode().unlock();
}