SettingsPresenter extends BasePresenter<SettingsContract.View> implements SettingsContract.Presenter { @Override public void openTutorialScreen() { checkViewAttached(); analytics.trackViewHelpTutorialAgain(); getView().showTutorialScreen(repository.getTutorialItems()); } SettingsPresenter(TutorialsRepository repository, Analytics analytics, SettingsRepository settings); @Override void openTutorialScreen(); @Override void setNewBookNotificationSubscriptionStatus(final boolean onOff);  }
@Test public void openTutorialScreen() throws Exception { ArrayList<TutorialItem> testData = generateTestData(3); when(mockTutorialsRepository.getTutorialItems()).thenReturn(testData); presenter.openTutorialScreen(); verify(mockSettingsView).showTutorialScreen(argumentCaptor.capture()); verify(mockAnalytics).trackViewHelpTutorialAgain(); assertEquals(testData, argumentCaptor.getValue()); }