ShoppingCartPresenter extends PresenterWidget<ShoppingCartPresenter.MyView> implements ShoppingCartUiHandlers, ShoppingCartChangedEventHandler, ShoppingCartQuantityUpdatedEventHandler,
        CheckoutEventHandler, EmptyCartEventHandler { @Override protected void onBind() { setInSlot(SLOT_CART_ITEM, cartItemsPresenter); addRegisteredHandler(ShoppingCartChangedEvent.TYPE, this); addRegisteredHandler(ShoppingCartQuantityChangeEvent.TYPE, this); addRegisteredHandler(CheckoutEvent.TYPE, this); addRegisteredHandler(EmptyCartEvent.TYPE, this); 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 onBind_showCheckout_whenOrderIsNotEmpty() { given(currentOrder.isEmpty()).willReturn(false); presenter.onBind(); verify(view).showCheckout(); }
@Test public void onBind_showEmptyCart_whenOrderIsEmpty() { given(currentOrder.isEmpty()).willReturn(false); presenter.onBind(); view.showEmptyCart(); }