@Test
public void userEditsPriceThenExchangedTotalInBaseCurrency() throws Exception {

    presenter = new CurrencyExchangeRateEditorPresenter(currencyExchangeRateEditorView, receiptPricingView, currencyListEditorView, receiptDateView, exchangeRateServiceManager, databaseHelper, trip, null, null, Schedulers.trampoline(), Schedulers.trampoline(), Schedulers.trampoline());
    presenter.subscribe();
    exchangedPriceInBaseCurrencyFocusChanges.onNext(true);
    currencyClicks.onNext(1);
    receiptPriceChanges.onNext("1");
    receiptPriceChanges.onNext("10");
    receiptPriceChanges.onNext("10.");
    receiptPriceChanges.onNext("10.0");
    receiptPriceChanges.onNext("10.00");
    final InOrder inOrderVerifier = inOrder(displayExchangeRateConsumer);
    exchangedPriceInBaseCurrencyChanges.onNext("");
    exchangedPriceInBaseCurrencyChanges.onNext("2");
    inOrderVerifier.verify(displayExchangeRateConsumer).accept(UiIndicator.success(new ExchangeRateBuilderFactory().setRate(TRIP_CURRENCY, new BigDecimal("0.200000")).setBaseCurrency(RECEIPT_CURRENCY).build()));
    exchangedPriceInBaseCurrencyChanges.onNext("2.");
    inOrderVerifier.verify(displayExchangeRateConsumer).accept(UiIndicator.success(new ExchangeRateBuilderFactory().setRate(TRIP_CURRENCY, new BigDecimal("0.200000")).setBaseCurrency(RECEIPT_CURRENCY).build()));
    exchangedPriceInBaseCurrencyChanges.onNext("2.0");
    inOrderVerifier.verify(displayExchangeRateConsumer).accept(UiIndicator.success(new ExchangeRateBuilderFactory().setRate(TRIP_CURRENCY, new BigDecimal("0.200000")).setBaseCurrency(RECEIPT_CURRENCY).build()));
    exchangedPriceInBaseCurrencyChanges.onNext("2.00");
    inOrderVerifier.verify(displayExchangeRateConsumer).accept(UiIndicator.success(new ExchangeRateBuilderFactory().setRate(TRIP_CURRENCY, new BigDecimal("0.200000")).setBaseCurrency(RECEIPT_CURRENCY).build()));
    exchangedPriceInBaseCurrencyChanges.onNext("2.0");
    inOrderVerifier.verify(displayExchangeRateConsumer).accept(UiIndicator.success(new ExchangeRateBuilderFactory().setRate(TRIP_CURRENCY, new BigDecimal("0.200000")).setBaseCurrency(RECEIPT_CURRENCY).build()));
    exchangedPriceInBaseCurrencyChanges.onNext("2.");
    inOrderVerifier.verify(displayExchangeRateConsumer).accept(UiIndicator.success(new ExchangeRateBuilderFactory().setRate(TRIP_CURRENCY, new BigDecimal("0.200000")).setBaseCurrency(RECEIPT_CURRENCY).build()));
    exchangedPriceInBaseCurrencyChanges.onNext("2");
    inOrderVerifier.verify(displayExchangeRateConsumer).accept(UiIndicator.success(new ExchangeRateBuilderFactory().setRate(TRIP_CURRENCY, new BigDecimal("0.200000")).setBaseCurrency(RECEIPT_CURRENCY).build()));
    exchangedPriceInBaseCurrencyChanges.onNext("");
    inOrderVerifier.verify(displayExchangeRateConsumer).accept(UiIndicator.success());
}