@Test
  public void testResetOriginalValues() throws Exception {
    if (!PropsValues.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) {
      return;
    }

    VirtualHost newVirtualHost = addVirtualHost();

    _persistence.clearCache();

    VirtualHostModelImpl existingVirtualHostModelImpl =
        (VirtualHostModelImpl) _persistence.findByPrimaryKey(newVirtualHost.getPrimaryKey());

    Assert.assertTrue(
        Validator.equals(
            existingVirtualHostModelImpl.getHostname(),
            existingVirtualHostModelImpl.getOriginalHostname()));

    Assert.assertEquals(
        existingVirtualHostModelImpl.getCompanyId(),
        existingVirtualHostModelImpl.getOriginalCompanyId());
    Assert.assertEquals(
        existingVirtualHostModelImpl.getLayoutSetId(),
        existingVirtualHostModelImpl.getOriginalLayoutSetId());
  }
  @Override
  public void resetOriginalValues() {
    VirtualHostModelImpl virtualHostModelImpl = this;

    virtualHostModelImpl._originalCompanyId = virtualHostModelImpl._companyId;

    virtualHostModelImpl._setOriginalCompanyId = false;

    virtualHostModelImpl._originalLayoutSetId = virtualHostModelImpl._layoutSetId;

    virtualHostModelImpl._setOriginalLayoutSetId = false;

    virtualHostModelImpl._originalHostname = virtualHostModelImpl._hostname;

    virtualHostModelImpl._columnBitmask = 0;
  }