### Question:
PreferencesViewModel extends ActivatableViewModel { boolean needsSupportLanguageWarning() { return !refundAgentManager.isAgentAvailableForLanguage(preferences.getUserLanguage()) || !mediationManager.isAgentAvailableForLanguage(preferences.getUserLanguage()); } @Inject  PreferencesViewModel(Preferences preferences,
                                RefundAgentManager refundAgentManager,
                                MediatorManager mediationManager); String getMediationLanguages();  }### Answer:
@Test public void needsSupportLanguageWarning_forNotSupportedLanguageInArbitration() { MediatorManager mediationManager = mock(MediatorManager.class); RefundAgentManager refundAgentManager = mock(RefundAgentManager.class); Preferences preferences = PreferenceMakers.empty; when(refundAgentManager.isAgentAvailableForLanguage(preferences.getUserLanguage())).thenReturn(false); PreferencesViewModel model = new PreferencesViewModel(preferences, refundAgentManager, mediationManager); assertTrue(model.needsSupportLanguageWarning()); }
@Test public void needsSupportLanguageWarning_forNotSupportedLanguageInMediation() { MediatorManager mediationManager = mock(MediatorManager.class); RefundAgentManager refundAgentManager = mock(RefundAgentManager.class); Preferences preferences = PreferenceMakers.empty; when(refundAgentManager.isAgentAvailableForLanguage(preferences.getUserLanguage())).thenReturn(true); when(mediationManager.isAgentAvailableForLanguage(preferences.getUserLanguage())).thenReturn(false); PreferencesViewModel model = new PreferencesViewModel(preferences, refundAgentManager, mediationManager); assertTrue(model.needsSupportLanguageWarning()); }