}
public void testGetPageAtVersion() throws Exception
{
List<XWikiPageHistorySummary> pageHistorySummaries = this.rpc.getPageHistory(TestConstants.TEST_PAGE);
XWikiPageHistorySummary pageHistorySummary =
pageHistorySummaries.get(this.random.nextInt(pageHistorySummaries.size()));
XWikiPage page = this.rpc.getPage(TestConstants.TEST_PAGE, pageHistorySummary.getVersion());
TestUtils.banner("TEST: getPageAtVersion()");
System.out.format("%s\n", pageHistorySummary);
System.out.format("%s\n", page);
assertEquals(pageHistorySummary.getVersion(), page.getVersion());
assertEquals(pageHistorySummary.getModifier(), page.getModifier());
/*
* This test occasionally fails because the version returned as the modification date by XWiki when getting a
* page with a given version is always equal to the current date/time. So if the previous version to
* getPageHistory is made, let's say at 12:53:59 and the subsequent getPage at 12:54:01 then the date in the