### Question:
DictionaryPresenter { void setKeyboardMessageVisibility() { if (packageHelper.isAppInstalled()) { dictionaryView.hideKeyboardMessage(); } else { dictionaryView.showKeyboardMessage(); } } DictionaryPresenter(SozlikDao sozlikDao, PackageHelper packageHelper, SpellChecker spellChecker); void setView(DictionaryView dictionaryView);  }### Answer:
@Test public void hideKeyboardLinkIfAppInstalled() { when(packageHelperMock.isAppInstalled()).thenReturn(true); dictionaryPresenter.setKeyboardMessageVisibility(); verify(dictionaryViewMock, times(1)).hideKeyboardMessage(); verifyNoMoreInteractions(dictionaryViewMock); }
@Test public void showKeyboardLinkIfAppNotInstalled() { when(packageHelperMock.isAppInstalled()).thenReturn(false); dictionaryPresenter.setKeyboardMessageVisibility(); verify(dictionaryViewMock, times(1)).showKeyboardMessage(); verifyNoMoreInteractions(dictionaryViewMock); }