### Question:
Speakerbox implements TextToSpeech.OnInitListener { public void setLanguage(Locale locale) { textToSpeech.setLanguage(locale); } Speakerbox(final Application application); @Override void onInit(int status); void setActivity(Activity activity); Application.ActivityLifecycleCallbacks getCallbacks(); void play(CharSequence text); void playAndOnStart(String text, Runnable onStart); void playAndOnDone(String text, Runnable onDone); void playAndOnError(String text, Runnable onError); void play(String text, Runnable onStart, Runnable onDone, Runnable onError); void stop(); void dontPlayIfContains(String text); void mute(); void unmute(); boolean isMuted(); void remix(String original, String remix); TextToSpeech getTextToSpeech(); void requestAudioFocus(); void abandonAudioFocus(); void enableVolumeControl(Activity activity); void disableVolumeControl(Activity activity); void setQueueMode(int queueMode); @TargetApi(Build.VERSION_CODES.LOLLIPOP) Set<Locale> getAvailableLanguages(); void setLanguage(Locale locale); void shutdown(); static final String UTTERANCE_ID_NONE; }### Answer:
@Test public void setLanguage_shouldSetTtsLangugae() throws Exception { speakerbox.setLanguage(Locale.JAPANESE); assertThat(shadowTextToSpeech.getLanguage()).isEqualTo(Locale.JAPANESE); }