### Question:
NavigationSpeechListener implements SpeechListener { @Override public void onError(String errorText, SpeechAnnouncement speechAnnouncement) { Timber.e(errorText); speechPlayerProvider.retrieveAndroidSpeechPlayer().play(speechAnnouncement); } NavigationSpeechListener(SpeechPlayerProvider speechPlayerProvider,
                           SpeechAudioFocusManager audioFocusManager); @Override void onStart(); @Override void onDone(); @Override void onError(String errorText, SpeechAnnouncement speechAnnouncement);  }### Answer:
@Test public void onError_fallbackGoesToAndroidSpeechPlayer() { SpeechPlayerProvider provider = mock(SpeechPlayerProvider.class); AndroidSpeechPlayer androidSpeechPlayer = mock(AndroidSpeechPlayer.class); when(provider.retrieveAndroidSpeechPlayer()).thenReturn(androidSpeechPlayer); NavigationSpeechListener navigationSpeechListener = buildSpeechListener(provider); SpeechAnnouncement announcement = buildAnnouncement(); navigationSpeechListener.onError("Error text", announcement); verify(androidSpeechPlayer).play(announcement); }