// Path: app/src/test/java/de/czyrux/store/test/ProductFakeCreator.java
// public class ProductFakeCreator {
// 
//     private static final String DEFAULT_SKU = "ada300343";
// 
//     private ProductFakeCreator() {
//     }
// 
//     public static Product createProduct() {
//         return createProduct(DEFAULT_SKU);
//     }
// 
//     public static Product createProduct(String sku) {
//         return new Product(sku, "Adidas Perf", "someImage", 23.5f);
//     }
// 
// }


import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import de.czyrux.store.test.ProductFakeCreator;
import io.reactivex.Single;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
package de.czyrux.store.core.domain.cart;




public class CartServiceTest {

    @Mock
    CartDataSource cartDataSource;

    @Mock
    CartStore cartStore;

    private CartService cartService;

    @Before
    public void setUp() throws Exception {
        MockitoAnnotations.initMocks(this);

        cartService = new CartService(cartDataSource, cartStore);

        Cart cart = Cart.EMPTY;
        when(cartDataSource.getCart()).thenReturn(Single.just(cart));
    }

    @Test
    public void addProduct_Should_CallDataSource() {
// Path: app/src/test/java/de/czyrux/store/test/ProductFakeCreator.java
// public class ProductFakeCreator {
// 
//     private static final String DEFAULT_SKU = "ada300343";
// 
//     private ProductFakeCreator() {
//     }
// 
//     public static Product createProduct() {
//         return createProduct(DEFAULT_SKU);
//     }
// 
//     public static Product createProduct(String sku) {
//         return new Product(sku, "Adidas Perf", "someImage", 23.5f);
//     }
// 
// }


// Path: app/src/test/java/de/czyrux/store/core/domain/cart/CartServiceTest.java
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import de.czyrux.store.test.ProductFakeCreator;
import io.reactivex.Single;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;

package de.czyrux.store.core.domain.cart;




public class CartServiceTest {

    @Mock
    CartDataSource cartDataSource;

    @Mock
    CartStore cartStore;

    private CartService cartService;

    @Before
    public void setUp() throws Exception {
        MockitoAnnotations.initMocks(this);

        cartService = new CartService(cartDataSource, cartStore);

        Cart cart = Cart.EMPTY;
        when(cartDataSource.getCart()).thenReturn(Single.just(cart));
    }

    @Test
    public void addProduct_Should_CallDataSource() {
        CartProduct product = CartProductFactory.newCartProduct(ProductFakeCreator.createProduct(), 1);