private void checkProperties(WikiPage page, String source, boolean isRoot, WikiPage remotePage) throws Exception {
WikiPageProperties props = page.getData().getProperties();
if (!isRoot)
assertFalse("should not have Edit property", props.has("Edit"));
WikiImportProperty importProperty = WikiImportProperty.createFrom(props);
assertNotNull(importProperty);
assertEquals(source, importProperty.getSourceUrl());
assertEquals(isRoot, importProperty.isRoot());
if (remotePage != null) {
long remoteLastModificationTime = remotePage.getData().getProperties().getLastModificationTime().getTime();
long importPropertyLastModificationTime = importProperty.getLastRemoteModificationTime().getTime();
assertEquals(remoteLastModificationTime, importPropertyLastModificationTime);
}
}