OrderPresenter extends PresenterWidget<OrderPresenter.MyView> implements OrderUiHandlers, ShoppingCartChangedEventHandler, ShoppingCartQuantityUpdatedEventHandler,
        CheckoutEventHandler, EmptyCartEventHandler { @Override public void onEmptyCart(EmptyCartEvent event) { removeFromSlot(SLOT_CART_ITEMS, cartItemsPresenter); } @Inject  OrderPresenter(
            EventBus eventBus,
            MyView view,
            CartItemsPresenter cartItemsPresenter,
            CurrentOrder currentOrder,
            CurrencyFormat currencyFormat); @Override void onEmptyCart(EmptyCartEvent event); @Override void onCheckout(CheckoutEvent event); @Override void onContinueClicked(); @Override void setShippingMethod(ShippingMethod shippingMethod); @Override void onShoppingCartChanged(ShoppingCartChangedEvent event); @Override void onShoppingCartQuantityChanged(ShoppingCartQuantityChangeEvent event); static final SingleSlot<CartItemsPresenter> SLOT_CART_ITEMS; }
@Test public void onEmptyCart_shouldRemoveCartItemsPresenterFromSlot() throws Exception { presenter.onEmptyCart(mock(EmptyCartEvent.class)); assertNull(presenter.getChild(OrderPresenter.SLOT_CART_ITEMS)); }