@Test public void shouldExchangeCurrencyNegativeValue() { CurrencyUnit real = Monetary.getCurrency("BRL"); MonetaryAmount money = Money.parse("BHD -1.345"); MonetaryAmount result = ConversionOperators.exchange(real).apply(money); assertNotNull(result); assertEquals(result.getCurrency(), real); assertEquals(-1.345d, result.getNumber().doubleValue()); }
public static MonetaryOperator exchange(CurrencyUnit currencyUnit){ return new ExchangeCurrencyOperator(Objects.requireNonNull(currencyUnit)); }
ConversionOperators { public static MonetaryOperator exchange(CurrencyUnit currencyUnit){ return new ExchangeCurrencyOperator(Objects.requireNonNull(currencyUnit)); } }
ConversionOperators { public static MonetaryOperator exchange(CurrencyUnit currencyUnit){ return new ExchangeCurrencyOperator(Objects.requireNonNull(currencyUnit)); } private  ConversionOperators(); }
ConversionOperators { public static MonetaryOperator exchange(CurrencyUnit currencyUnit){ return new ExchangeCurrencyOperator(Objects.requireNonNull(currencyUnit)); } private  ConversionOperators(); static MonetaryOperator exchange(CurrencyUnit currencyUnit); static Collector<MonetaryAmount, MonetarySummaryStatistics, MonetarySummaryStatistics> summarizingMonetary(
			CurrencyUnit currencyUnit, ExchangeRateProvider provider); }
ConversionOperators { public static MonetaryOperator exchange(CurrencyUnit currencyUnit){ return new ExchangeCurrencyOperator(Objects.requireNonNull(currencyUnit)); } private  ConversionOperators(); static MonetaryOperator exchange(CurrencyUnit currencyUnit); static Collector<MonetaryAmount, MonetarySummaryStatistics, MonetarySummaryStatistics> summarizingMonetary(
			CurrencyUnit currencyUnit, ExchangeRateProvider provider);  }