source: class CurrencyConverterViewModelTest {
  
      @Mock RateLoader rateLoader;
      @Mock MessageManager messageManager;
      @InjectMocks CurrencyConverterViewModel viewModel;
  
      @Test
      public void testConvertCurrencyOnError() {
  
target:         when(rateLoader.loadRate()).thenReturn(Observable.just(2f));
  
          CurrencyConverterModel model = viewModel.initAndResume();
          model.input.set("abc");
          viewModel.calculate();
  
          verify(messageManager).showMessage(any(ActivityHolder.class), eq(R.string.conversion_error));
      }
  
  }