" differences in cart.customerId",
goldenCart.getCustomerId(), cart.getCustomerId());
Iterator goldenCartEntries = goldenCart.getEntries();
Iterator cartEntries = cart.getEntries();
while (cartEntries.hasNext()) {
CartEntry goldenCartEntry = (CartEntry)goldenCartEntries.next();
CartEntry cartEntry = (CartEntry)cartEntries.next();
checkState(location + "CartEntry instance", cartEntry,
persistent);
Cart cartEntryCart = cartEntry.getCart();
if (cartEntryCart != cart) {
reportDifference(location +
" incorrect value for cartEntry.cart",
cart, cartEntryCart);
}
if (goldenCartEntry.getId() != cartEntry.getId())
reportDifference(location +
" differences in cartEntry.id",
goldenCartEntry.getId(), cartEntry.getId());
if (goldenCartEntry.getQuantity() != cartEntry.getQuantity())
reportDifference(location +
" differences in cartEntry.quantity",
goldenCartEntry.getQuantity(), cartEntry.getQuantity());
Product goldenProduct = goldenCartEntry.getProduct();
Product product = cartEntry.getProduct();
checkState(location + "Product instance", product,
persistent);
if (!goldenProduct.getDescription()
.equals(product.getDescription()))
reportDifference(location +