protected ShoppingItemPrice addShoppingItemPrice() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingItemPrice shoppingItemPrice = _persistence.create(pk);

    shoppingItemPrice.setItemId(ServiceTestUtil.nextLong());

    shoppingItemPrice.setMinQuantity(ServiceTestUtil.nextInt());

    shoppingItemPrice.setMaxQuantity(ServiceTestUtil.nextInt());

    shoppingItemPrice.setPrice(ServiceTestUtil.nextDouble());

    shoppingItemPrice.setDiscount(ServiceTestUtil.nextDouble());

    shoppingItemPrice.setTaxable(ServiceTestUtil.randomBoolean());

    shoppingItemPrice.setShipping(ServiceTestUtil.nextDouble());

    shoppingItemPrice.setUseShippingFormula(ServiceTestUtil.randomBoolean());

    shoppingItemPrice.setStatus(ServiceTestUtil.nextInt());

    _persistence.update(shoppingItemPrice);

    return shoppingItemPrice;
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingItemPrice newShoppingItemPrice = _persistence.create(pk);

    newShoppingItemPrice.setItemId(ServiceTestUtil.nextLong());

    newShoppingItemPrice.setMinQuantity(ServiceTestUtil.nextInt());

    newShoppingItemPrice.setMaxQuantity(ServiceTestUtil.nextInt());

    newShoppingItemPrice.setPrice(ServiceTestUtil.nextDouble());

    newShoppingItemPrice.setDiscount(ServiceTestUtil.nextDouble());

    newShoppingItemPrice.setTaxable(ServiceTestUtil.randomBoolean());

    newShoppingItemPrice.setShipping(ServiceTestUtil.nextDouble());

    newShoppingItemPrice.setUseShippingFormula(ServiceTestUtil.randomBoolean());

    newShoppingItemPrice.setStatus(ServiceTestUtil.nextInt());

    _persistence.update(newShoppingItemPrice);

    ShoppingItemPrice existingShoppingItemPrice =
        _persistence.findByPrimaryKey(newShoppingItemPrice.getPrimaryKey());

    Assert.assertEquals(
        existingShoppingItemPrice.getItemPriceId(), newShoppingItemPrice.getItemPriceId());
    Assert.assertEquals(existingShoppingItemPrice.getItemId(), newShoppingItemPrice.getItemId());
    Assert.assertEquals(
        existingShoppingItemPrice.getMinQuantity(), newShoppingItemPrice.getMinQuantity());
    Assert.assertEquals(
        existingShoppingItemPrice.getMaxQuantity(), newShoppingItemPrice.getMaxQuantity());
    AssertUtils.assertEquals(existingShoppingItemPrice.getPrice(), newShoppingItemPrice.getPrice());
    AssertUtils.assertEquals(
        existingShoppingItemPrice.getDiscount(), newShoppingItemPrice.getDiscount());
    Assert.assertEquals(existingShoppingItemPrice.getTaxable(), newShoppingItemPrice.getTaxable());
    AssertUtils.assertEquals(
        existingShoppingItemPrice.getShipping(), newShoppingItemPrice.getShipping());
    Assert.assertEquals(
        existingShoppingItemPrice.getUseShippingFormula(),
        newShoppingItemPrice.getUseShippingFormula());
    Assert.assertEquals(existingShoppingItemPrice.getStatus(), newShoppingItemPrice.getStatus());
  }
  @Test
  public void testCountByC_V() {
    try {
      _persistence.countByC_V(ServiceTestUtil.nextLong(), ServiceTestUtil.nextDouble());

      _persistence.countByC_V(0L, 0D);
    } catch (Exception e) {
      Assert.fail(e.getMessage());
    }
  }
  @Test
  public void testCountByG_A_V() {
    try {
      _persistence.countByG_A_V(
          ServiceTestUtil.nextLong(), StringPool.BLANK, ServiceTestUtil.nextDouble());

      _persistence.countByG_A_V(0L, StringPool.NULL, 0D);

      _persistence.countByG_A_V(0L, (String) null, 0D);
    } catch (Exception e) {
      Assert.fail(e.getMessage());
    }
  }
  protected ShoppingOrder addShoppingOrder() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingOrder shoppingOrder = _persistence.create(pk);

    shoppingOrder.setGroupId(ServiceTestUtil.nextLong());

    shoppingOrder.setCompanyId(ServiceTestUtil.nextLong());

    shoppingOrder.setUserId(ServiceTestUtil.nextLong());

    shoppingOrder.setUserName(ServiceTestUtil.randomString());

    shoppingOrder.setCreateDate(ServiceTestUtil.nextDate());

    shoppingOrder.setModifiedDate(ServiceTestUtil.nextDate());

    shoppingOrder.setNumber(ServiceTestUtil.randomString());

    shoppingOrder.setTax(ServiceTestUtil.nextDouble());

    shoppingOrder.setShipping(ServiceTestUtil.nextDouble());

    shoppingOrder.setAltShipping(ServiceTestUtil.randomString());

    shoppingOrder.setRequiresShipping(ServiceTestUtil.randomBoolean());

    shoppingOrder.setInsure(ServiceTestUtil.randomBoolean());

    shoppingOrder.setInsurance(ServiceTestUtil.nextDouble());

    shoppingOrder.setCouponCodes(ServiceTestUtil.randomString());

    shoppingOrder.setCouponDiscount(ServiceTestUtil.nextDouble());

    shoppingOrder.setBillingFirstName(ServiceTestUtil.randomString());

    shoppingOrder.setBillingLastName(ServiceTestUtil.randomString());

    shoppingOrder.setBillingEmailAddress(ServiceTestUtil.randomString());

    shoppingOrder.setBillingCompany(ServiceTestUtil.randomString());

    shoppingOrder.setBillingStreet(ServiceTestUtil.randomString());

    shoppingOrder.setBillingCity(ServiceTestUtil.randomString());

    shoppingOrder.setBillingState(ServiceTestUtil.randomString());

    shoppingOrder.setBillingZip(ServiceTestUtil.randomString());

    shoppingOrder.setBillingCountry(ServiceTestUtil.randomString());

    shoppingOrder.setBillingPhone(ServiceTestUtil.randomString());

    shoppingOrder.setShipToBilling(ServiceTestUtil.randomBoolean());

    shoppingOrder.setShippingFirstName(ServiceTestUtil.randomString());

    shoppingOrder.setShippingLastName(ServiceTestUtil.randomString());

    shoppingOrder.setShippingEmailAddress(ServiceTestUtil.randomString());

    shoppingOrder.setShippingCompany(ServiceTestUtil.randomString());

    shoppingOrder.setShippingStreet(ServiceTestUtil.randomString());

    shoppingOrder.setShippingCity(ServiceTestUtil.randomString());

    shoppingOrder.setShippingState(ServiceTestUtil.randomString());

    shoppingOrder.setShippingZip(ServiceTestUtil.randomString());

    shoppingOrder.setShippingCountry(ServiceTestUtil.randomString());

    shoppingOrder.setShippingPhone(ServiceTestUtil.randomString());

    shoppingOrder.setCcName(ServiceTestUtil.randomString());

    shoppingOrder.setCcType(ServiceTestUtil.randomString());

    shoppingOrder.setCcNumber(ServiceTestUtil.randomString());

    shoppingOrder.setCcExpMonth(ServiceTestUtil.nextInt());

    shoppingOrder.setCcExpYear(ServiceTestUtil.nextInt());

    shoppingOrder.setCcVerNumber(ServiceTestUtil.randomString());

    shoppingOrder.setComments(ServiceTestUtil.randomString());

    shoppingOrder.setPpTxnId(ServiceTestUtil.randomString());

    shoppingOrder.setPpPaymentStatus(ServiceTestUtil.randomString());

    shoppingOrder.setPpPaymentGross(ServiceTestUtil.nextDouble());

    shoppingOrder.setPpReceiverEmail(ServiceTestUtil.randomString());

    shoppingOrder.setPpPayerEmail(ServiceTestUtil.randomString());

    shoppingOrder.setSendOrderEmail(ServiceTestUtil.randomBoolean());

    shoppingOrder.setSendShippingEmail(ServiceTestUtil.randomBoolean());

    _persistence.update(shoppingOrder);

    return shoppingOrder;
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingOrder newShoppingOrder = _persistence.create(pk);

    newShoppingOrder.setGroupId(ServiceTestUtil.nextLong());

    newShoppingOrder.setCompanyId(ServiceTestUtil.nextLong());

    newShoppingOrder.setUserId(ServiceTestUtil.nextLong());

    newShoppingOrder.setUserName(ServiceTestUtil.randomString());

    newShoppingOrder.setCreateDate(ServiceTestUtil.nextDate());

    newShoppingOrder.setModifiedDate(ServiceTestUtil.nextDate());

    newShoppingOrder.setNumber(ServiceTestUtil.randomString());

    newShoppingOrder.setTax(ServiceTestUtil.nextDouble());

    newShoppingOrder.setShipping(ServiceTestUtil.nextDouble());

    newShoppingOrder.setAltShipping(ServiceTestUtil.randomString());

    newShoppingOrder.setRequiresShipping(ServiceTestUtil.randomBoolean());

    newShoppingOrder.setInsure(ServiceTestUtil.randomBoolean());

    newShoppingOrder.setInsurance(ServiceTestUtil.nextDouble());

    newShoppingOrder.setCouponCodes(ServiceTestUtil.randomString());

    newShoppingOrder.setCouponDiscount(ServiceTestUtil.nextDouble());

    newShoppingOrder.setBillingFirstName(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingLastName(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingEmailAddress(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingCompany(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingStreet(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingCity(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingState(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingZip(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingCountry(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingPhone(ServiceTestUtil.randomString());

    newShoppingOrder.setShipToBilling(ServiceTestUtil.randomBoolean());

    newShoppingOrder.setShippingFirstName(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingLastName(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingEmailAddress(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingCompany(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingStreet(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingCity(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingState(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingZip(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingCountry(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingPhone(ServiceTestUtil.randomString());

    newShoppingOrder.setCcName(ServiceTestUtil.randomString());

    newShoppingOrder.setCcType(ServiceTestUtil.randomString());

    newShoppingOrder.setCcNumber(ServiceTestUtil.randomString());

    newShoppingOrder.setCcExpMonth(ServiceTestUtil.nextInt());

    newShoppingOrder.setCcExpYear(ServiceTestUtil.nextInt());

    newShoppingOrder.setCcVerNumber(ServiceTestUtil.randomString());

    newShoppingOrder.setComments(ServiceTestUtil.randomString());

    newShoppingOrder.setPpTxnId(ServiceTestUtil.randomString());

    newShoppingOrder.setPpPaymentStatus(ServiceTestUtil.randomString());

    newShoppingOrder.setPpPaymentGross(ServiceTestUtil.nextDouble());

    newShoppingOrder.setPpReceiverEmail(ServiceTestUtil.randomString());

    newShoppingOrder.setPpPayerEmail(ServiceTestUtil.randomString());

    newShoppingOrder.setSendOrderEmail(ServiceTestUtil.randomBoolean());

    newShoppingOrder.setSendShippingEmail(ServiceTestUtil.randomBoolean());

    _persistence.update(newShoppingOrder);

    ShoppingOrder existingShoppingOrder =
        _persistence.findByPrimaryKey(newShoppingOrder.getPrimaryKey());

    Assert.assertEquals(existingShoppingOrder.getOrderId(), newShoppingOrder.getOrderId());
    Assert.assertEquals(existingShoppingOrder.getGroupId(), newShoppingOrder.getGroupId());
    Assert.assertEquals(existingShoppingOrder.getCompanyId(), newShoppingOrder.getCompanyId());
    Assert.assertEquals(existingShoppingOrder.getUserId(), newShoppingOrder.getUserId());
    Assert.assertEquals(existingShoppingOrder.getUserName(), newShoppingOrder.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingShoppingOrder.getCreateDate()),
        Time.getShortTimestamp(newShoppingOrder.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingShoppingOrder.getModifiedDate()),
        Time.getShortTimestamp(newShoppingOrder.getModifiedDate()));
    Assert.assertEquals(existingShoppingOrder.getNumber(), newShoppingOrder.getNumber());
    AssertUtils.assertEquals(existingShoppingOrder.getTax(), newShoppingOrder.getTax());
    AssertUtils.assertEquals(existingShoppingOrder.getShipping(), newShoppingOrder.getShipping());
    Assert.assertEquals(existingShoppingOrder.getAltShipping(), newShoppingOrder.getAltShipping());
    Assert.assertEquals(
        existingShoppingOrder.getRequiresShipping(), newShoppingOrder.getRequiresShipping());
    Assert.assertEquals(existingShoppingOrder.getInsure(), newShoppingOrder.getInsure());
    AssertUtils.assertEquals(existingShoppingOrder.getInsurance(), newShoppingOrder.getInsurance());
    Assert.assertEquals(existingShoppingOrder.getCouponCodes(), newShoppingOrder.getCouponCodes());
    AssertUtils.assertEquals(
        existingShoppingOrder.getCouponDiscount(), newShoppingOrder.getCouponDiscount());
    Assert.assertEquals(
        existingShoppingOrder.getBillingFirstName(), newShoppingOrder.getBillingFirstName());
    Assert.assertEquals(
        existingShoppingOrder.getBillingLastName(), newShoppingOrder.getBillingLastName());
    Assert.assertEquals(
        existingShoppingOrder.getBillingEmailAddress(), newShoppingOrder.getBillingEmailAddress());
    Assert.assertEquals(
        existingShoppingOrder.getBillingCompany(), newShoppingOrder.getBillingCompany());
    Assert.assertEquals(
        existingShoppingOrder.getBillingStreet(), newShoppingOrder.getBillingStreet());
    Assert.assertEquals(existingShoppingOrder.getBillingCity(), newShoppingOrder.getBillingCity());
    Assert.assertEquals(
        existingShoppingOrder.getBillingState(), newShoppingOrder.getBillingState());
    Assert.assertEquals(existingShoppingOrder.getBillingZip(), newShoppingOrder.getBillingZip());
    Assert.assertEquals(
        existingShoppingOrder.getBillingCountry(), newShoppingOrder.getBillingCountry());
    Assert.assertEquals(
        existingShoppingOrder.getBillingPhone(), newShoppingOrder.getBillingPhone());
    Assert.assertEquals(
        existingShoppingOrder.getShipToBilling(), newShoppingOrder.getShipToBilling());
    Assert.assertEquals(
        existingShoppingOrder.getShippingFirstName(), newShoppingOrder.getShippingFirstName());
    Assert.assertEquals(
        existingShoppingOrder.getShippingLastName(), newShoppingOrder.getShippingLastName());
    Assert.assertEquals(
        existingShoppingOrder.getShippingEmailAddress(),
        newShoppingOrder.getShippingEmailAddress());
    Assert.assertEquals(
        existingShoppingOrder.getShippingCompany(), newShoppingOrder.getShippingCompany());
    Assert.assertEquals(
        existingShoppingOrder.getShippingStreet(), newShoppingOrder.getShippingStreet());
    Assert.assertEquals(
        existingShoppingOrder.getShippingCity(), newShoppingOrder.getShippingCity());
    Assert.assertEquals(
        existingShoppingOrder.getShippingState(), newShoppingOrder.getShippingState());
    Assert.assertEquals(existingShoppingOrder.getShippingZip(), newShoppingOrder.getShippingZip());
    Assert.assertEquals(
        existingShoppingOrder.getShippingCountry(), newShoppingOrder.getShippingCountry());
    Assert.assertEquals(
        existingShoppingOrder.getShippingPhone(), newShoppingOrder.getShippingPhone());
    Assert.assertEquals(existingShoppingOrder.getCcName(), newShoppingOrder.getCcName());
    Assert.assertEquals(existingShoppingOrder.getCcType(), newShoppingOrder.getCcType());
    Assert.assertEquals(existingShoppingOrder.getCcNumber(), newShoppingOrder.getCcNumber());
    Assert.assertEquals(existingShoppingOrder.getCcExpMonth(), newShoppingOrder.getCcExpMonth());
    Assert.assertEquals(existingShoppingOrder.getCcExpYear(), newShoppingOrder.getCcExpYear());
    Assert.assertEquals(existingShoppingOrder.getCcVerNumber(), newShoppingOrder.getCcVerNumber());
    Assert.assertEquals(existingShoppingOrder.getComments(), newShoppingOrder.getComments());
    Assert.assertEquals(existingShoppingOrder.getPpTxnId(), newShoppingOrder.getPpTxnId());
    Assert.assertEquals(
        existingShoppingOrder.getPpPaymentStatus(), newShoppingOrder.getPpPaymentStatus());
    AssertUtils.assertEquals(
        existingShoppingOrder.getPpPaymentGross(), newShoppingOrder.getPpPaymentGross());
    Assert.assertEquals(
        existingShoppingOrder.getPpReceiverEmail(), newShoppingOrder.getPpReceiverEmail());
    Assert.assertEquals(
        existingShoppingOrder.getPpPayerEmail(), newShoppingOrder.getPpPayerEmail());
    Assert.assertEquals(
        existingShoppingOrder.getSendOrderEmail(), newShoppingOrder.getSendOrderEmail());
    Assert.assertEquals(
        existingShoppingOrder.getSendShippingEmail(), newShoppingOrder.getSendShippingEmail());
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    JournalArticle newJournalArticle = _persistence.create(pk);

    newJournalArticle.setUuid(ServiceTestUtil.randomString());

    newJournalArticle.setResourcePrimKey(ServiceTestUtil.nextLong());

    newJournalArticle.setGroupId(ServiceTestUtil.nextLong());

    newJournalArticle.setCompanyId(ServiceTestUtil.nextLong());

    newJournalArticle.setUserId(ServiceTestUtil.nextLong());

    newJournalArticle.setUserName(ServiceTestUtil.randomString());

    newJournalArticle.setCreateDate(ServiceTestUtil.nextDate());

    newJournalArticle.setModifiedDate(ServiceTestUtil.nextDate());

    newJournalArticle.setFolderId(ServiceTestUtil.nextLong());

    newJournalArticle.setClassNameId(ServiceTestUtil.nextLong());

    newJournalArticle.setClassPK(ServiceTestUtil.nextLong());

    newJournalArticle.setTreePath(ServiceTestUtil.randomString());

    newJournalArticle.setArticleId(ServiceTestUtil.randomString());

    newJournalArticle.setVersion(ServiceTestUtil.nextDouble());

    newJournalArticle.setTitle(ServiceTestUtil.randomString());

    newJournalArticle.setUrlTitle(ServiceTestUtil.randomString());

    newJournalArticle.setDescription(ServiceTestUtil.randomString());

    newJournalArticle.setContent(ServiceTestUtil.randomString());

    newJournalArticle.setType(ServiceTestUtil.randomString());

    newJournalArticle.setStructureId(ServiceTestUtil.randomString());

    newJournalArticle.setTemplateId(ServiceTestUtil.randomString());

    newJournalArticle.setLayoutUuid(ServiceTestUtil.randomString());

    newJournalArticle.setDisplayDate(ServiceTestUtil.nextDate());

    newJournalArticle.setExpirationDate(ServiceTestUtil.nextDate());

    newJournalArticle.setReviewDate(ServiceTestUtil.nextDate());

    newJournalArticle.setIndexable(ServiceTestUtil.randomBoolean());

    newJournalArticle.setSmallImage(ServiceTestUtil.randomBoolean());

    newJournalArticle.setSmallImageId(ServiceTestUtil.nextLong());

    newJournalArticle.setSmallImageURL(ServiceTestUtil.randomString());

    newJournalArticle.setStatus(ServiceTestUtil.nextInt());

    newJournalArticle.setStatusByUserId(ServiceTestUtil.nextLong());

    newJournalArticle.setStatusByUserName(ServiceTestUtil.randomString());

    newJournalArticle.setStatusDate(ServiceTestUtil.nextDate());

    _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.getTitle(), newJournalArticle.getTitle());
    Assert.assertEquals(existingJournalArticle.getUrlTitle(), newJournalArticle.getUrlTitle());
    Assert.assertEquals(
        existingJournalArticle.getDescription(), newJournalArticle.getDescription());
    Assert.assertEquals(existingJournalArticle.getContent(), newJournalArticle.getContent());
    Assert.assertEquals(existingJournalArticle.getType(), newJournalArticle.getType());
    Assert.assertEquals(
        existingJournalArticle.getStructureId(), newJournalArticle.getStructureId());
    Assert.assertEquals(existingJournalArticle.getTemplateId(), newJournalArticle.getTemplateId());
    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(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()));
  }
  protected JournalArticle addJournalArticle() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    JournalArticle journalArticle = _persistence.create(pk);

    journalArticle.setUuid(ServiceTestUtil.randomString());

    journalArticle.setResourcePrimKey(ServiceTestUtil.nextLong());

    journalArticle.setGroupId(ServiceTestUtil.nextLong());

    journalArticle.setCompanyId(ServiceTestUtil.nextLong());

    journalArticle.setUserId(ServiceTestUtil.nextLong());

    journalArticle.setUserName(ServiceTestUtil.randomString());

    journalArticle.setCreateDate(ServiceTestUtil.nextDate());

    journalArticle.setModifiedDate(ServiceTestUtil.nextDate());

    journalArticle.setFolderId(ServiceTestUtil.nextLong());

    journalArticle.setClassNameId(ServiceTestUtil.nextLong());

    journalArticle.setClassPK(ServiceTestUtil.nextLong());

    journalArticle.setTreePath(ServiceTestUtil.randomString());

    journalArticle.setArticleId(ServiceTestUtil.randomString());

    journalArticle.setVersion(ServiceTestUtil.nextDouble());

    journalArticle.setTitle(ServiceTestUtil.randomString());

    journalArticle.setUrlTitle(ServiceTestUtil.randomString());

    journalArticle.setDescription(ServiceTestUtil.randomString());

    journalArticle.setContent(ServiceTestUtil.randomString());

    journalArticle.setType(ServiceTestUtil.randomString());

    journalArticle.setStructureId(ServiceTestUtil.randomString());

    journalArticle.setTemplateId(ServiceTestUtil.randomString());

    journalArticle.setLayoutUuid(ServiceTestUtil.randomString());

    journalArticle.setDisplayDate(ServiceTestUtil.nextDate());

    journalArticle.setExpirationDate(ServiceTestUtil.nextDate());

    journalArticle.setReviewDate(ServiceTestUtil.nextDate());

    journalArticle.setIndexable(ServiceTestUtil.randomBoolean());

    journalArticle.setSmallImage(ServiceTestUtil.randomBoolean());

    journalArticle.setSmallImageId(ServiceTestUtil.nextLong());

    journalArticle.setSmallImageURL(ServiceTestUtil.randomString());

    journalArticle.setStatus(ServiceTestUtil.nextInt());

    journalArticle.setStatusByUserId(ServiceTestUtil.nextLong());

    journalArticle.setStatusByUserName(ServiceTestUtil.randomString());

    journalArticle.setStatusDate(ServiceTestUtil.nextDate());

    _persistence.update(journalArticle);

    return journalArticle;
  }