Add some tests

Added tests for CartDataProvider and some helper functions. I'm not 100% sure if I took the right approach for mocking the CartDataProvider etc., please review the tests and suggest improvements if it should be done differently.