source: class MovieRepositoryImplementationTest {
  
      private static final String POPULAR;
      private static final String TOP_RATED;
      private static final String FAST_AND_FURIOUS;
      private static final String JURASIC_WORLD;
      private MovieRepository mMovieRepository;
      @Mock
      private MovieDbRestService mMovieDbRestService;
  
      @Test
      public void fetchAllMovies_OtherHttpError_fetchMoviesTerminatedWithError() {
  
target:         //Given
          when(mMovieDbRestService.fetchAllMovies(anyString()))
                  .thenReturn(get403ForbiddenError());
  
          //When
          TestSubscriber<List<Movie>> subscriber = new TestSubscriber<>();
          mMovieRepository.fetchMovies(POPULAR).subscribe(subscriber);
  
          //Then
          subscriber.awaitTerminalEvent();
          subscriber.assertError(HttpException.class);
  
          verify(mMovieDbRestService).fetchAllMovies(POPULAR);
      }
  
  }