added tests for cart factory