Added tests to Cart service.
Minor refactoring of existing  tests and logic.