StockCardPresenter extends Presenter { public List<InventoryViewModel> getInventoryViewModels() { return inventoryViewModels; } StockCardPresenter(); List<InventoryViewModel> getInventoryViewModels(); Observable<List<StockCard>> correctDirtyObservable(ArchiveStatus status); void loadStockCards(ArchiveStatus status); void loadStockCards(ArchiveStatus status, Boolean showLoading); void loadKits(); void refreshStockCardsObservable(long stockCardId); @Override void attachView(BaseView v); void archiveBackStockCard(StockCard stockCard);  }
@Test public void shouldRefreshStockCardModelListWithGetLoadStockCardsSubscriber() throws Exception { ArrayList<StockCard> cardList = new ArrayList<>(); cardList.addAll(this.stockCardList); presenter.afterLoadHandler.onNext(cardList); assertThat(presenter.getInventoryViewModels().size()).isEqualTo(3); verify(stockCardListView).refresh(presenter.getInventoryViewModels()); presenter.afterLoadHandler.onCompleted(); verify(stockCardListView).loaded(); }