descendent.getPageCrawler().getFullPath());
}
@Test
public void testMovePage() throws Exception {
PageData data = pageA.getData();
data.setAttribute("someAttribute", "someValue");
pageA.commit(data);
final String sourcePage = "PageOne.PageA";
final String destinationPage = "PageTwo.PageA";
final String destinationParent = "PageTwo";
assertTrue(crawler.pageExists(PathParser.parse(sourcePage)));
assertFalse(crawler.pageExists(PathParser.parse(destinationPage)));
movePage(sourcePage, destinationParent, true);
assertTrue(crawler.pageExists(PathParser.parse(destinationPage)));
assertFalse(crawler.pageExists(PathParser.parse(sourcePage)));
WikiPagePath destinationPath = PathParser.parse(destinationPage);
WikiPage movedPage = crawler.getPage(destinationPath);
data = movedPage.getData();
assertEquals("content", data.getContent());
assertEquals("someValue", data.getAttribute("someAttribute"));
}