### Question:
SerieSyncNetworkTask extends AsyncTask<Call<TvShow>, Void, SerieDto> { @SuppressWarnings("unchecked") @Override protected SerieDto doInBackground(Call<TvShow>... calls) { for (Call<TvShow> call : calls) { try { TvShow tvShow = call.execute().body(); return serieBuilderFromMovie.build(tvShow); } catch (IOException e) { Log.i("tmdbGetter", "Unable to execute task."); } } return null; } SerieSyncNetworkTask(SerieBuilderFromMovie serieBuilderFromMovie, SerieReview serieReview, SerieService serieService);   }### Answer:
@Test public void doInBackground() throws IOException { Call<TvShow> call = mock(Call.class); Response<TvShow> response = mock(Response.class); doReturn(response).when(call).execute(); TvShow tvShow = mock(TvShow.class); doReturn(tvShow).when(response).body(); SerieDto serieDto = mock(SerieDto.class); doReturn(serieDto).when(serieBuilderFromMovie).build(tvShow); SerieReview serieReview = mock(SerieReview.class); assertEquals( serieDto, new SerieSyncNetworkTask(serieBuilderFromMovie, serieReview, serieService).doInBackground(call) ); }