@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());
  }