CakePresenter extends BasePresenter<MainView> implements Observer<CakesResponse> { @Override public void onCompleted() { getView().onHideDialog(); getView().onShowToast("Cakes loading complete!"); } @Inject  CakePresenter(); void getCakes(); @Override void onCompleted(); @Override void onError(Throwable e); @Override void onNext(CakesResponse cakesResponse); void getCakesFromDatabase();  }
@Test public void onCompleted() throws Exception { presenter.onCompleted(); verify(mView, times(1)).onHideDialog(); verify(mView, times(1)).onShowToast("Cakes loading complete!"); }