  @Test
  public void should_show_error_when_fetch_fails() {

    // given
    ServiceException exception = new ServiceException();
    when(repository.fetchResponse(any())).thenReturn(Single.error(exception));

    // when
    presenter.onStart();

    // then
    verify(view).setViewState(ViewState.Error.create(R.string.error_message));
  }