BookmarksPresenter extends BasePresenter<BookmarksView> { void onClickBookmarkDelete() { if (currBookmark == null) { return; } StaticLogger.info(this, "Delete bookmark: " + currBookmark); getView().showToast(R.string.removed); deleteBookmarkAndRefresh(currBookmark); } @Inject  BookmarksPresenter(BookmarksManager bookmarksManager, Librarian myLibrarian); @Override void onViewCreated();  }
@Test public void onClickBookmarkDelete() throws Exception { presenter.setChangeListener(changeListener); presenter.onRefresh(); Mockito.reset(view); presenter.onSelectBookmark(0); presenter.onClickBookmarkDelete(); verify(bookmarksManager).delete(eq(bookmarksWithoutTag.get(0))); verify(changeListener).onBookmarksUpdate(); verify(view).updateBookmarks(anyList()); }