Cart tests fixes.

Some fixes to cart entity and tests.