*/
public void testMoveFolderContents() throws Exception {
BookmarkManager bmgr = getRoller().getBookmarkManager();
FolderData root = bmgr.getRootFolder(testWeblog);
FolderData dest = new FolderData();
dest.setName("dest");
dest.setParent(root);
dest.setWebsite(testWeblog);
bmgr.saveFolder(dest);
// create source folder f1
FolderData f1 = new FolderData();
f1.setName("f1");
f1.setParent(root);
f1.setWebsite(testWeblog);
bmgr.saveFolder(f1);
// create bookmark b1 inside source folder f1
BookmarkData b1 = new BookmarkData(
f1, "b1", "testbookmark",
"http://example.com", "http://example.com/rss",
new Integer(1), new Integer(1), "image.gif");
f1.addBookmark(b1);
// create folder f2 inside f1
FolderData f2 = new FolderData();
f2.setName("f2");
f2.setParent(f1);
f2.setWebsite(testWeblog);
bmgr.saveFolder(f2);
// create bookmark b2 inside folder f2
BookmarkData b2 = new BookmarkData(
f2, "b2", "testbookmark",
"http://example.com", "http://example.com/rss",
new Integer(1), new Integer(1), "image.gif");
f2.addBookmark(b2);
// create folder f3 inside folder f2
FolderData f3 = new FolderData();
f3.setName("f3");
f3.setParent(f2);
f3.setWebsite(testWeblog);
bmgr.saveFolder(f3);
// crete bookmark b3 inside folder f3
BookmarkData b3 = new BookmarkData(
f3, "b3", "testbookmark",
"http://example.com", "http://example.com/rss",
new Integer(1), new Integer(1), "image.gif");
f3.addBookmark(b3);
TestUtils.endSession(true);
// test that parent cannot be moved into child
boolean safe = false;
try {
// Move folder into one of it's children
f1 = bmgr.getFolder(f1.getId());
f3 = bmgr.getFolder(f3.getId());
bmgr.moveFolderContents(f1, f3);
//f3.save();
//f1.save();
TestUtils.endSession(true);
} catch (RollerException e) {