MainPresenterImpl extends SaveStatePresenter<MainView> implements MainPresenter { @Override public void getUser() { User user = userRepository.getUser(); fullName = user.toString(); getView().sayHello(fullName); } @Inject  MainPresenterImpl(@NonNull UserRepository userRepository); @Override void onCreate(Bundle savedInstanceState); @Override void getUser(); @Override void onDestroy();  }
@Test public void testGetUser() throws Exception { User user = new User("Nimble", "Library"); when(userRepository.getUser()).thenReturn(user); presenter.getUser(); verify(userRepository).getUser(); Assert.assertEquals(user.toString(), presenter.fullName); verify(view).sayHello(presenter.fullName); }