Example usage for com.liferay.portal.kernel.test AssertUtils assertEquals

List of usage examples for com.liferay.portal.kernel.test AssertUtils assertEquals

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.test AssertUtils assertEquals.

Prototype

public static void assertEquals(Map<String, ?> expectedMap, Map<String, ?> actualMap) 

Source Link

Usage

From source file:com.liferay.blogs.service.persistence.test.BlogsStatsUserPersistenceTest.java

License:Open Source License

@Test
public void testUpdateExisting() throws Exception {
    long pk = RandomTestUtil.nextLong();

    BlogsStatsUser newBlogsStatsUser = _persistence.create(pk);

    newBlogsStatsUser.setGroupId(RandomTestUtil.nextLong());

    newBlogsStatsUser.setCompanyId(RandomTestUtil.nextLong());

    newBlogsStatsUser.setUserId(RandomTestUtil.nextLong());

    newBlogsStatsUser.setEntryCount(RandomTestUtil.nextInt());

    newBlogsStatsUser.setLastPostDate(RandomTestUtil.nextDate());

    newBlogsStatsUser.setRatingsTotalEntries(RandomTestUtil.nextInt());

    newBlogsStatsUser.setRatingsTotalScore(RandomTestUtil.nextDouble());

    newBlogsStatsUser.setRatingsAverageScore(RandomTestUtil.nextDouble());

    _blogsStatsUsers.add(_persistence.update(newBlogsStatsUser));

    BlogsStatsUser existingBlogsStatsUser = _persistence.findByPrimaryKey(newBlogsStatsUser.getPrimaryKey());

    Assert.assertEquals(existingBlogsStatsUser.getStatsUserId(), newBlogsStatsUser.getStatsUserId());
    Assert.assertEquals(existingBlogsStatsUser.getGroupId(), newBlogsStatsUser.getGroupId());
    Assert.assertEquals(existingBlogsStatsUser.getCompanyId(), newBlogsStatsUser.getCompanyId());
    Assert.assertEquals(existingBlogsStatsUser.getUserId(), newBlogsStatsUser.getUserId());
    Assert.assertEquals(existingBlogsStatsUser.getEntryCount(), newBlogsStatsUser.getEntryCount());
    Assert.assertEquals(Time.getShortTimestamp(existingBlogsStatsUser.getLastPostDate()),
            Time.getShortTimestamp(newBlogsStatsUser.getLastPostDate()));
    Assert.assertEquals(existingBlogsStatsUser.getRatingsTotalEntries(),
            newBlogsStatsUser.getRatingsTotalEntries());
    AssertUtils.assertEquals(existingBlogsStatsUser.getRatingsTotalScore(),
            newBlogsStatsUser.getRatingsTotalScore());
    AssertUtils.assertEquals(existingBlogsStatsUser.getRatingsAverageScore(),
            newBlogsStatsUser.getRatingsAverageScore());
}

From source file:com.liferay.document.library.content.service.test.DLContentLocalServiceTest.java

License:Open Source License

protected void assertEquals(DLContent expectedDLContent, DLContent actualDLContent) throws Exception {

    Assert.assertEquals(expectedDLContent.getContentId(), actualDLContent.getContentId());
    Assert.assertEquals(expectedDLContent.getGroupId(), actualDLContent.getGroupId());
    Assert.assertEquals(expectedDLContent.getCompanyId(), actualDLContent.getCompanyId());
    Assert.assertEquals(expectedDLContent.getRepositoryId(), actualDLContent.getRepositoryId());
    Assert.assertEquals(expectedDLContent.getPath(), actualDLContent.getPath());
    Assert.assertEquals(expectedDLContent.getVersion(), actualDLContent.getVersion());
    AssertUtils.assertEquals(expectedDLContent.getData(), actualDLContent.getData());
    Assert.assertEquals(expectedDLContent.getSize(), actualDLContent.getSize());
}

From source file:com.liferay.journal.service.persistence.test.JournalArticlePersistenceTest.java

License:Open Source License

@Test
public void testUpdateExisting() throws Exception {
    long pk = RandomTestUtil.nextLong();

    JournalArticle newJournalArticle = _persistence.create(pk);

    newJournalArticle.setUuid(RandomTestUtil.randomString());

    newJournalArticle.setResourcePrimKey(RandomTestUtil.nextLong());

    newJournalArticle.setGroupId(RandomTestUtil.nextLong());

    newJournalArticle.setCompanyId(RandomTestUtil.nextLong());

    newJournalArticle.setUserId(RandomTestUtil.nextLong());

    newJournalArticle.setUserName(RandomTestUtil.randomString());

    newJournalArticle.setCreateDate(RandomTestUtil.nextDate());

    newJournalArticle.setModifiedDate(RandomTestUtil.nextDate());

    newJournalArticle.setFolderId(RandomTestUtil.nextLong());

    newJournalArticle.setClassNameId(RandomTestUtil.nextLong());

    newJournalArticle.setClassPK(RandomTestUtil.nextLong());

    newJournalArticle.setTreePath(RandomTestUtil.randomString());

    newJournalArticle.setArticleId(RandomTestUtil.randomString());

    newJournalArticle.setVersion(RandomTestUtil.nextDouble());

    newJournalArticle.setUrlTitle(RandomTestUtil.randomString());

    newJournalArticle.setContent(RandomTestUtil.randomString());

    newJournalArticle.setDDMStructureKey(RandomTestUtil.randomString());

    newJournalArticle.setDDMTemplateKey(RandomTestUtil.randomString());

    newJournalArticle.setDefaultLanguageId(RandomTestUtil.randomString());

    newJournalArticle.setLayoutUuid(RandomTestUtil.randomString());

    newJournalArticle.setDisplayDate(RandomTestUtil.nextDate());

    newJournalArticle.setExpirationDate(RandomTestUtil.nextDate());

    newJournalArticle.setReviewDate(RandomTestUtil.nextDate());

    newJournalArticle.setIndexable(RandomTestUtil.randomBoolean());

    newJournalArticle.setSmallImage(RandomTestUtil.randomBoolean());

    newJournalArticle.setSmallImageId(RandomTestUtil.nextLong());

    newJournalArticle.setSmallImageURL(RandomTestUtil.randomString());

    newJournalArticle.setLastPublishDate(RandomTestUtil.nextDate());

    newJournalArticle.setStatus(RandomTestUtil.nextInt());

    newJournalArticle.setStatusByUserId(RandomTestUtil.nextLong());

    newJournalArticle.setStatusByUserName(RandomTestUtil.randomString());

    newJournalArticle.setStatusDate(RandomTestUtil.nextDate());

    _journalArticles.add(_persistence.update(newJournalArticle));

    JournalArticle existingJournalArticle = _persistence.findByPrimaryKey(newJournalArticle.getPrimaryKey());

    Assert.assertEquals(existingJournalArticle.getUuid(), newJournalArticle.getUuid());
    Assert.assertEquals(existingJournalArticle.getId(), newJournalArticle.getId());
    Assert.assertEquals(existingJournalArticle.getResourcePrimKey(), newJournalArticle.getResourcePrimKey());
    Assert.assertEquals(existingJournalArticle.getGroupId(), newJournalArticle.getGroupId());
    Assert.assertEquals(existingJournalArticle.getCompanyId(), newJournalArticle.getCompanyId());
    Assert.assertEquals(existingJournalArticle.getUserId(), newJournalArticle.getUserId());
    Assert.assertEquals(existingJournalArticle.getUserName(), newJournalArticle.getUserName());
    Assert.assertEquals(Time.getShortTimestamp(existingJournalArticle.getCreateDate()),
            Time.getShortTimestamp(newJournalArticle.getCreateDate()));
    Assert.assertEquals(Time.getShortTimestamp(existingJournalArticle.getModifiedDate()),
            Time.getShortTimestamp(newJournalArticle.getModifiedDate()));
    Assert.assertEquals(existingJournalArticle.getFolderId(), newJournalArticle.getFolderId());
    Assert.assertEquals(existingJournalArticle.getClassNameId(), newJournalArticle.getClassNameId());
    Assert.assertEquals(existingJournalArticle.getClassPK(), newJournalArticle.getClassPK());
    Assert.assertEquals(existingJournalArticle.getTreePath(), newJournalArticle.getTreePath());
    Assert.assertEquals(existingJournalArticle.getArticleId(), newJournalArticle.getArticleId());
    AssertUtils.assertEquals(existingJournalArticle.getVersion(), newJournalArticle.getVersion());
    Assert.assertEquals(existingJournalArticle.getUrlTitle(), newJournalArticle.getUrlTitle());
    Assert.assertEquals(existingJournalArticle.getContent(), newJournalArticle.getContent());
    Assert.assertEquals(existingJournalArticle.getDDMStructureKey(), newJournalArticle.getDDMStructureKey());
    Assert.assertEquals(existingJournalArticle.getDDMTemplateKey(), newJournalArticle.getDDMTemplateKey());
    Assert.assertEquals(existingJournalArticle.getDefaultLanguageId(),
            newJournalArticle.getDefaultLanguageId());
    Assert.assertEquals(existingJournalArticle.getLayoutUuid(), newJournalArticle.getLayoutUuid());
    Assert.assertEquals(Time.getShortTimestamp(existingJournalArticle.getDisplayDate()),
            Time.getShortTimestamp(newJournalArticle.getDisplayDate()));
    Assert.assertEquals(Time.getShortTimestamp(existingJournalArticle.getExpirationDate()),
            Time.getShortTimestamp(newJournalArticle.getExpirationDate()));
    Assert.assertEquals(Time.getShortTimestamp(existingJournalArticle.getReviewDate()),
            Time.getShortTimestamp(newJournalArticle.getReviewDate()));
    Assert.assertEquals(existingJournalArticle.getIndexable(), newJournalArticle.getIndexable());
    Assert.assertEquals(existingJournalArticle.getSmallImage(), newJournalArticle.getSmallImage());
    Assert.assertEquals(existingJournalArticle.getSmallImageId(), newJournalArticle.getSmallImageId());
    Assert.assertEquals(existingJournalArticle.getSmallImageURL(), newJournalArticle.getSmallImageURL());
    Assert.assertEquals(Time.getShortTimestamp(existingJournalArticle.getLastPublishDate()),
            Time.getShortTimestamp(newJournalArticle.getLastPublishDate()));
    Assert.assertEquals(existingJournalArticle.getStatus(), newJournalArticle.getStatus());
    Assert.assertEquals(existingJournalArticle.getStatusByUserId(), newJournalArticle.getStatusByUserId());
    Assert.assertEquals(existingJournalArticle.getStatusByUserName(), newJournalArticle.getStatusByUserName());
    Assert.assertEquals(Time.getShortTimestamp(existingJournalArticle.getStatusDate()),
            Time.getShortTimestamp(newJournalArticle.getStatusDate()));
}

From source file:com.liferay.journal.service.persistence.test.JournalArticlePersistenceTest.java

License:Open Source License

@Test
public void testResetOriginalValues() throws Exception {
    JournalArticle newJournalArticle = addJournalArticle();

    _persistence.clearCache();/*  w w  w  .  j  a va2s . c o m*/

    JournalArticle existingJournalArticle = _persistence.findByPrimaryKey(newJournalArticle.getPrimaryKey());

    Assert.assertTrue(Objects.equals(existingJournalArticle.getUuid(),
            ReflectionTestUtil.invoke(existingJournalArticle, "getOriginalUuid", new Class<?>[0])));
    Assert.assertEquals(Long.valueOf(existingJournalArticle.getGroupId()),
            ReflectionTestUtil.<Long>invoke(existingJournalArticle, "getOriginalGroupId", new Class<?>[0]));

    Assert.assertEquals(Long.valueOf(existingJournalArticle.getGroupId()),
            ReflectionTestUtil.<Long>invoke(existingJournalArticle, "getOriginalGroupId", new Class<?>[0]));
    Assert.assertEquals(Long.valueOf(existingJournalArticle.getClassNameId()),
            ReflectionTestUtil.<Long>invoke(existingJournalArticle, "getOriginalClassNameId", new Class<?>[0]));
    Assert.assertTrue(Objects.equals(existingJournalArticle.getDDMStructureKey(),
            ReflectionTestUtil.invoke(existingJournalArticle, "getOriginalDDMStructureKey", new Class<?>[0])));

    Assert.assertEquals(Long.valueOf(existingJournalArticle.getGroupId()),
            ReflectionTestUtil.<Long>invoke(existingJournalArticle, "getOriginalGroupId", new Class<?>[0]));
    Assert.assertTrue(Objects.equals(existingJournalArticle.getArticleId(),
            ReflectionTestUtil.invoke(existingJournalArticle, "getOriginalArticleId", new Class<?>[0])));
    AssertUtils.assertEquals(existingJournalArticle.getVersion(),
            ReflectionTestUtil.<Double>invoke(existingJournalArticle, "getOriginalVersion", new Class<?>[0]));
}

From source file:com.liferay.journal.service.persistence.test.JournalFeedPersistenceTest.java

License:Open Source License

@Test
public void testUpdateExisting() throws Exception {
    long pk = RandomTestUtil.nextLong();

    JournalFeed newJournalFeed = _persistence.create(pk);

    newJournalFeed.setUuid(RandomTestUtil.randomString());

    newJournalFeed.setGroupId(RandomTestUtil.nextLong());

    newJournalFeed.setCompanyId(RandomTestUtil.nextLong());

    newJournalFeed.setUserId(RandomTestUtil.nextLong());

    newJournalFeed.setUserName(RandomTestUtil.randomString());

    newJournalFeed.setCreateDate(RandomTestUtil.nextDate());

    newJournalFeed.setModifiedDate(RandomTestUtil.nextDate());

    newJournalFeed.setFeedId(RandomTestUtil.randomString());

    newJournalFeed.setName(RandomTestUtil.randomString());

    newJournalFeed.setDescription(RandomTestUtil.randomString());

    newJournalFeed.setDDMStructureKey(RandomTestUtil.randomString());

    newJournalFeed.setDDMTemplateKey(RandomTestUtil.randomString());

    newJournalFeed.setDDMRendererTemplateKey(RandomTestUtil.randomString());

    newJournalFeed.setDelta(RandomTestUtil.nextInt());

    newJournalFeed.setOrderByCol(RandomTestUtil.randomString());

    newJournalFeed.setOrderByType(RandomTestUtil.randomString());

    newJournalFeed.setTargetLayoutFriendlyUrl(RandomTestUtil.randomString());

    newJournalFeed.setTargetPortletId(RandomTestUtil.randomString());

    newJournalFeed.setContentField(RandomTestUtil.randomString());

    newJournalFeed.setFeedFormat(RandomTestUtil.randomString());

    newJournalFeed.setFeedVersion(RandomTestUtil.nextDouble());

    newJournalFeed.setLastPublishDate(RandomTestUtil.nextDate());

    _journalFeeds.add(_persistence.update(newJournalFeed));

    JournalFeed existingJournalFeed = _persistence.findByPrimaryKey(newJournalFeed.getPrimaryKey());

    Assert.assertEquals(existingJournalFeed.getUuid(), newJournalFeed.getUuid());
    Assert.assertEquals(existingJournalFeed.getId(), newJournalFeed.getId());
    Assert.assertEquals(existingJournalFeed.getGroupId(), newJournalFeed.getGroupId());
    Assert.assertEquals(existingJournalFeed.getCompanyId(), newJournalFeed.getCompanyId());
    Assert.assertEquals(existingJournalFeed.getUserId(), newJournalFeed.getUserId());
    Assert.assertEquals(existingJournalFeed.getUserName(), newJournalFeed.getUserName());
    Assert.assertEquals(Time.getShortTimestamp(existingJournalFeed.getCreateDate()),
            Time.getShortTimestamp(newJournalFeed.getCreateDate()));
    Assert.assertEquals(Time.getShortTimestamp(existingJournalFeed.getModifiedDate()),
            Time.getShortTimestamp(newJournalFeed.getModifiedDate()));
    Assert.assertEquals(existingJournalFeed.getFeedId(), newJournalFeed.getFeedId());
    Assert.assertEquals(existingJournalFeed.getName(), newJournalFeed.getName());
    Assert.assertEquals(existingJournalFeed.getDescription(), newJournalFeed.getDescription());
    Assert.assertEquals(existingJournalFeed.getDDMStructureKey(), newJournalFeed.getDDMStructureKey());
    Assert.assertEquals(existingJournalFeed.getDDMTemplateKey(), newJournalFeed.getDDMTemplateKey());
    Assert.assertEquals(existingJournalFeed.getDDMRendererTemplateKey(),
            newJournalFeed.getDDMRendererTemplateKey());
    Assert.assertEquals(existingJournalFeed.getDelta(), newJournalFeed.getDelta());
    Assert.assertEquals(existingJournalFeed.getOrderByCol(), newJournalFeed.getOrderByCol());
    Assert.assertEquals(existingJournalFeed.getOrderByType(), newJournalFeed.getOrderByType());
    Assert.assertEquals(existingJournalFeed.getTargetLayoutFriendlyUrl(),
            newJournalFeed.getTargetLayoutFriendlyUrl());
    Assert.assertEquals(existingJournalFeed.getTargetPortletId(), newJournalFeed.getTargetPortletId());
    Assert.assertEquals(existingJournalFeed.getContentField(), newJournalFeed.getContentField());
    Assert.assertEquals(existingJournalFeed.getFeedFormat(), newJournalFeed.getFeedFormat());
    AssertUtils.assertEquals(existingJournalFeed.getFeedVersion(), newJournalFeed.getFeedVersion());
    Assert.assertEquals(Time.getShortTimestamp(existingJournalFeed.getLastPublishDate()),
            Time.getShortTimestamp(newJournalFeed.getLastPublishDate()));
}

From source file:com.liferay.message.boards.service.test.MBCategoryLocalServiceTest.java

License:Open Source License

@Test
public void testGetCategoriesWithExcludedCategories() throws Exception {
    List<MBCategory> expectedCategories = new ArrayList<>();

    expectedCategories.add(addCategory());

    MBCategory excludedCategory1 = addCategory();

    expectedCategories.add(excludedCategory1);

    MBCategory excludedCategory2 = addCategory();

    expectedCategories.add(excludedCategory2);

    List<MBCategory> categories = MBCategoryLocalServiceUtil.getCategories(_group.getGroupId());

    AssertUtils.assertEquals(expectedCategories, categories);

    expectedCategories.remove(excludedCategory1);
    expectedCategories.remove(excludedCategory2);

    categories = MBCategoryLocalServiceUtil.getCategories(_group.getGroupId(),
            new long[] { excludedCategory1.getCategoryId(), excludedCategory2.getCategoryId() },
            new long[] { MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID }, WorkflowConstants.STATUS_ANY,
            QueryUtil.ALL_POS, QueryUtil.ALL_POS);

    AssertUtils.assertEquals(expectedCategories, categories);
}

From source file:com.liferay.message.boards.service.test.MBCategoryLocalServiceTest.java

License:Open Source License

@Test
public void testGetCategoriesWithExcludedCategory() throws Exception {
    List<MBCategory> expectedCategories = new ArrayList<>();

    expectedCategories.add(addCategory());
    expectedCategories.add(addCategory());

    MBCategory excludedCategory = addCategory();

    expectedCategories.add(excludedCategory);

    List<MBCategory> categories = MBCategoryLocalServiceUtil.getCategories(_group.getGroupId());

    AssertUtils.assertEquals(expectedCategories, categories);

    expectedCategories.remove(excludedCategory);

    categories = MBCategoryLocalServiceUtil.getCategories(_group.getGroupId(), excludedCategory.getCategoryId(),
            MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID, WorkflowConstants.STATUS_ANY, QueryUtil.ALL_POS,
            QueryUtil.ALL_POS);// w ww . j  a  v  a2 s  .c o m

    AssertUtils.assertEquals(expectedCategories, categories);
}

From source file:com.liferay.message.boards.service.test.MBCategoryLocalServiceTest.java

License:Open Source License

@Test
public void testGetCategoriesWithStatusApprovedAndExcludedCategories() throws Exception {

    List<MBCategory> expectedCategories = new ArrayList<>();

    expectedCategories.add(addCategory());

    MBCategory excludedCategory1 = addCategory();

    expectedCategories.add(excludedCategory1);

    MBCategory excludedCategory2 = addCategory();

    expectedCategories.add(excludedCategory2);

    MBCategory draftCategory = addCategory();

    MBCategoryLocalServiceUtil.updateStatus(draftCategory.getUserId(), draftCategory.getCategoryId(),
            WorkflowConstants.STATUS_DRAFT);

    List<MBCategory> categories = MBCategoryLocalServiceUtil.getCategories(_group.getGroupId(),
            WorkflowConstants.STATUS_APPROVED);

    AssertUtils.assertEquals(expectedCategories, categories);

    expectedCategories.remove(excludedCategory1);
    expectedCategories.remove(excludedCategory2);

    categories = MBCategoryLocalServiceUtil.getCategories(_group.getGroupId(),
            new long[] { excludedCategory1.getCategoryId(), excludedCategory2.getCategoryId() },
            new long[] { MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID }, WorkflowConstants.STATUS_APPROVED,
            QueryUtil.ALL_POS, QueryUtil.ALL_POS);

    AssertUtils.assertEquals(expectedCategories, categories);
}

From source file:com.liferay.message.boards.service.test.MBCategoryLocalServiceTest.java

License:Open Source License

@Test
public void testGetCategoriesWithStatusApprovedAndExcludedCategory() throws Exception {

    List<MBCategory> expectedCategories = new ArrayList<>();

    expectedCategories.add(addCategory());

    MBCategory excludedCategory = addCategory();

    expectedCategories.add(excludedCategory);

    MBCategory draftCategory = addCategory();

    MBCategoryLocalServiceUtil.updateStatus(draftCategory.getUserId(), draftCategory.getCategoryId(),
            WorkflowConstants.STATUS_DRAFT);

    List<MBCategory> categories = MBCategoryLocalServiceUtil.getCategories(_group.getGroupId(),
            WorkflowConstants.STATUS_APPROVED);

    AssertUtils.assertEquals(expectedCategories, categories);

    expectedCategories.remove(excludedCategory);

    categories = MBCategoryLocalServiceUtil.getCategories(_group.getGroupId(), excludedCategory.getCategoryId(),
            MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID, WorkflowConstants.STATUS_APPROVED,
            QueryUtil.ALL_POS, QueryUtil.ALL_POS);

    AssertUtils.assertEquals(expectedCategories, categories);
}

From source file:com.liferay.wiki.service.persistence.test.WikiPagePersistenceTest.java

License:Open Source License

@Test
public void testUpdateExisting() throws Exception {
    long pk = RandomTestUtil.nextLong();

    WikiPage newWikiPage = _persistence.create(pk);

    newWikiPage.setUuid(RandomTestUtil.randomString());

    newWikiPage.setResourcePrimKey(RandomTestUtil.nextLong());

    newWikiPage.setGroupId(RandomTestUtil.nextLong());

    newWikiPage.setCompanyId(RandomTestUtil.nextLong());

    newWikiPage.setUserId(RandomTestUtil.nextLong());

    newWikiPage.setUserName(RandomTestUtil.randomString());

    newWikiPage.setCreateDate(RandomTestUtil.nextDate());

    newWikiPage.setModifiedDate(RandomTestUtil.nextDate());

    newWikiPage.setNodeId(RandomTestUtil.nextLong());

    newWikiPage.setTitle(RandomTestUtil.randomString());

    newWikiPage.setVersion(RandomTestUtil.nextDouble());

    newWikiPage.setMinorEdit(RandomTestUtil.randomBoolean());

    newWikiPage.setContent(RandomTestUtil.randomString());

    newWikiPage.setSummary(RandomTestUtil.randomString());

    newWikiPage.setFormat(RandomTestUtil.randomString());

    newWikiPage.setHead(RandomTestUtil.randomBoolean());

    newWikiPage.setParentTitle(RandomTestUtil.randomString());

    newWikiPage.setRedirectTitle(RandomTestUtil.randomString());

    newWikiPage.setLastPublishDate(RandomTestUtil.nextDate());

    newWikiPage.setStatus(RandomTestUtil.nextInt());

    newWikiPage.setStatusByUserId(RandomTestUtil.nextLong());

    newWikiPage.setStatusByUserName(RandomTestUtil.randomString());

    newWikiPage.setStatusDate(RandomTestUtil.nextDate());

    _wikiPages.add(_persistence.update(newWikiPage));

    WikiPage existingWikiPage = _persistence.findByPrimaryKey(newWikiPage.getPrimaryKey());

    Assert.assertEquals(existingWikiPage.getUuid(), newWikiPage.getUuid());
    Assert.assertEquals(existingWikiPage.getPageId(), newWikiPage.getPageId());
    Assert.assertEquals(existingWikiPage.getResourcePrimKey(), newWikiPage.getResourcePrimKey());
    Assert.assertEquals(existingWikiPage.getGroupId(), newWikiPage.getGroupId());
    Assert.assertEquals(existingWikiPage.getCompanyId(), newWikiPage.getCompanyId());
    Assert.assertEquals(existingWikiPage.getUserId(), newWikiPage.getUserId());
    Assert.assertEquals(existingWikiPage.getUserName(), newWikiPage.getUserName());
    Assert.assertEquals(Time.getShortTimestamp(existingWikiPage.getCreateDate()),
            Time.getShortTimestamp(newWikiPage.getCreateDate()));
    Assert.assertEquals(Time.getShortTimestamp(existingWikiPage.getModifiedDate()),
            Time.getShortTimestamp(newWikiPage.getModifiedDate()));
    Assert.assertEquals(existingWikiPage.getNodeId(), newWikiPage.getNodeId());
    Assert.assertEquals(existingWikiPage.getTitle(), newWikiPage.getTitle());
    AssertUtils.assertEquals(existingWikiPage.getVersion(), newWikiPage.getVersion());
    Assert.assertEquals(existingWikiPage.getMinorEdit(), newWikiPage.getMinorEdit());
    Assert.assertEquals(existingWikiPage.getContent(), newWikiPage.getContent());
    Assert.assertEquals(existingWikiPage.getSummary(), newWikiPage.getSummary());
    Assert.assertEquals(existingWikiPage.getFormat(), newWikiPage.getFormat());
    Assert.assertEquals(existingWikiPage.getHead(), newWikiPage.getHead());
    Assert.assertEquals(existingWikiPage.getParentTitle(), newWikiPage.getParentTitle());
    Assert.assertEquals(existingWikiPage.getRedirectTitle(), newWikiPage.getRedirectTitle());
    Assert.assertEquals(Time.getShortTimestamp(existingWikiPage.getLastPublishDate()),
            Time.getShortTimestamp(newWikiPage.getLastPublishDate()));
    Assert.assertEquals(existingWikiPage.getStatus(), newWikiPage.getStatus());
    Assert.assertEquals(existingWikiPage.getStatusByUserId(), newWikiPage.getStatusByUserId());
    Assert.assertEquals(existingWikiPage.getStatusByUserName(), newWikiPage.getStatusByUserName());
    Assert.assertEquals(Time.getShortTimestamp(existingWikiPage.getStatusDate()),
            Time.getShortTimestamp(newWikiPage.getStatusDate()));
}