### Question:
TmdbServiceWrapper { void initSearchLanguageIfNeeded() { if (getTmdbPrefLanguage() == null) { preferencesWrapper.setStringPreference(context, "default_tmdb_language", localeWrapper.getLanguage()); } } TmdbServiceWrapper(Context context);   TmdbServiceWrapper(Tmdb tmdb, Context context, PreferencesWrapper preferencesWrapper, LocaleWrapper localeWrapper); Call<MovieResultsPage> search(String name); Call<TvShowResultsPage> searchTv(String name); List<Integer> tvShowSeasons(int tvShowId); List<TvEpisode> tvShowEpisodes(int tvShowId, List<Integer> tvSeasonNumbers); Call<TvShow> searchTvShowById(int tvShowId);  }### Answer:
@Test public void initSearchLanguage() throws Exception { doReturn(null).when(preferencesWrapper).getStringPreference(context, "default_tmdb_language", null); LocaleWrapper localeWrapper = mock(LocaleWrapper.class); doReturn("banane").when(localeWrapper).getLanguage(); new TmdbServiceWrapper(tmdb, context, preferencesWrapper, localeWrapper).initSearchLanguageIfNeeded(); verify(preferencesWrapper).setStringPreference(context, "default_tmdb_language", "banane"); }