ReaderViewPresenter extends BasePresenter<ReaderView> implements TTSPlayerFragment.OnTTSStopSpeakListener { void openLastLink() { openChapterFromLink(new BibleReference(preferenceHelper.getLastRead())); } @Inject  ReaderViewPresenter(Librarian librarian, PreferenceHelper prefHelper, AnalyticsHelper helper); @Override void onStopSpeak(); @Override void onViewCreated();  }
@Test public void openLastLink() throws Exception { when(librarian.isOSISLinkValid(any())).thenReturn(false); when(preferenceHelper.getLastRead()).thenReturn("RST.Gen.1"); presenter.openLastLink(); verify(preferenceHelper).getLastRead(); verify(librarian).isOSISLinkValid(any()); verify(view).openLibraryActivity(); }