ListPresenter extends BasePresenter<ListArcticleView> { public void getPosts(int page, boolean isUpdate) { getMvpView().showLoading(); getBlogPosts.setPage(page); getBlogPosts.setUpdate(isUpdate); getBlogPosts.execute(new PostsSubscriber()); } @Inject  ListPresenter(GetBlogPosts getBlogPosts); @Override void attachView(ListArcticleView mvpView); @Override void detachView(); void getPosts(int page, boolean isUpdate);  }
@Test public void testWhenEmptyShouldLoadData() throws Exception { Mockito.when(postModels.isEmpty()).thenReturn(true); presenter.getPosts(1, true); Mockito.verify(view).showLoading(); Mockito.verify(getPosts).execute(any(Subscriber.class)); }