Refactored the cart unit test