@Test
public void userEditsPriceThenExchangeRateFieldsWithCommaForDecimal() throws Exception {

    TestLocaleToggler.setDefaultLocale(Locale.FRANCE);
    presenter = new CurrencyExchangeRateEditorPresenter(currencyExchangeRateEditorView, receiptPricingView, currencyListEditorView, receiptDateView, exchangeRateServiceManager, databaseHelper, trip, null, null, Schedulers.trampoline(), Schedulers.trampoline(), Schedulers.trampoline());
    presenter.subscribe();
    exchangedPriceInBaseCurrencyFocusChanges.onNext(false);
    currencyClicks.onNext(1);
    receiptPriceChanges.onNext("1");
    receiptPriceChanges.onNext("10");
    receiptPriceChanges.onNext("10,");
    receiptPriceChanges.onNext("10,0");
    receiptPriceChanges.onNext("10,00");
    final InOrder inOrderVerifier = inOrder(displayExchangedPriceInBaseCurrencyConsumer);
    exchangeRateChanges.onNext("");
    inOrderVerifier.verify(displayExchangedPriceInBaseCurrencyConsumer).accept(Optional.absent());
    exchangeRateChanges.onNext("0");
    inOrderVerifier.verify(displayExchangedPriceInBaseCurrencyConsumer).accept(Optional.of(new PriceBuilderFactory().setCurrency(TRIP_CURRENCY).setPrice("0").build()));
    exchangeRateChanges.onNext("0,");
    inOrderVerifier.verify(displayExchangedPriceInBaseCurrencyConsumer).accept(Optional.of(new PriceBuilderFactory().setCurrency(TRIP_CURRENCY).setPrice("0").build()));
    exchangeRateChanges.onNext("0,1");
    inOrderVerifier.verify(displayExchangedPriceInBaseCurrencyConsumer).accept(Optional.of(new PriceBuilderFactory().setCurrency(TRIP_CURRENCY).setPrice("1").build()));
    exchangeRateChanges.onNext("0,");
    inOrderVerifier.verify(displayExchangedPriceInBaseCurrencyConsumer).accept(Optional.of(new PriceBuilderFactory().setCurrency(TRIP_CURRENCY).setPrice("0").build()));
    exchangeRateChanges.onNext("0,2");
    inOrderVerifier.verify(displayExchangedPriceInBaseCurrencyConsumer).accept(Optional.of(new PriceBuilderFactory().setCurrency(TRIP_CURRENCY).setPrice("2").build()));
    exchangeRateChanges.onNext("0,");
    inOrderVerifier.verify(displayExchangedPriceInBaseCurrencyConsumer).accept(Optional.of(new PriceBuilderFactory().setCurrency(TRIP_CURRENCY).setPrice("0").build()));
    exchangeRateChanges.onNext("0");
    inOrderVerifier.verify(displayExchangedPriceInBaseCurrencyConsumer).accept(Optional.of(new PriceBuilderFactory().setCurrency(TRIP_CURRENCY).setPrice("0").build()));
    exchangeRateChanges.onNext("");
    inOrderVerifier.verify(displayExchangedPriceInBaseCurrencyConsumer).accept(Optional.absent());
}