ShoppingCartPresenter extends PresenterWidget<ShoppingCartPresenter.MyView> implements ShoppingCartUiHandlers, ShoppingCartChangedEventHandler, ShoppingCartQuantityUpdatedEventHandler,
        CheckoutEventHandler, EmptyCartEventHandler { @Override public void onShoppingCartChanged(ShoppingCartChangedEvent event) { int orderSize = currentOrder.getSize(); getView().updateItemNumber(orderSize); showCartContent(); } @Inject  ShoppingCartPresenter(
            EventBus eventBus,
            MyView view,
            CurrentOrder currentOrder,
            CartItemsPresenter cartItemsPresenter); @Override void onShoppingCartChanged(ShoppingCartChangedEvent event); @Override void onShoppingCartQuantityChanged(ShoppingCartQuantityChangeEvent event); @Override void onCheckoutClicked(); @Override void onEmptyCart(EmptyCartEvent event); @Override void onCheckout(CheckoutEvent event); @Override void onCloseClicked();  }
@Test public void onShoppingCartChanged_showEmptyCart_whenOrderIsEmpty() { given(currentOrder.isEmpty()).willReturn(true); presenter.onShoppingCartChanged(mock(ShoppingCartChangedEvent.class)); verify(view).showEmptyCart(); }
@Test public void onShoppingCartChanged_showCheckout_whenOrderIsNotEmpty() { given(currentOrder.isEmpty()).willReturn(false); presenter.onShoppingCartChanged(mock(ShoppingCartChangedEvent.class)); verify(view).showCheckout(); }