@Test public void shouldConvertWhenIsDifferentCurrency() { MonetarySummaryStatistics summary = new ExchangeRateMonetarySummaryStatistics( BRAZILIAN_REAL, provider); summary.accept(Money.of(10, DOLLAR)); assertEquals(BRAZILIAN_REAL, summary.getCurrencyUnit()); assertEquals(1L, summary.getCount()); assertNotSame(0L, summary.getMin().getNumber().longValue()); assertNotSame(0L, summary.getMax().getNumber().longValue()); assertNotSame(0L, summary.getSum().getNumber().longValue()); assertNotSame(0L, summary.getAverage().getNumber().longValue()); }
@Override public void accept(MonetaryAmount amount) { super.accept(currencyConversion.apply(amount)); }
ExchangeRateMonetarySummaryStatistics extends DefaultMonetarySummaryStatistics { @Override public void accept(MonetaryAmount amount) { super.accept(currencyConversion.apply(amount)); } }
ExchangeRateMonetarySummaryStatistics extends DefaultMonetarySummaryStatistics { @Override public void accept(MonetaryAmount amount) { super.accept(currencyConversion.apply(amount)); } ExchangeRateMonetarySummaryStatistics(CurrencyUnit currencyUnit,
			ExchangeRateProvider provider); }
ExchangeRateMonetarySummaryStatistics extends DefaultMonetarySummaryStatistics { @Override public void accept(MonetaryAmount amount) { super.accept(currencyConversion.apply(amount)); } ExchangeRateMonetarySummaryStatistics(CurrencyUnit currencyUnit,
			ExchangeRateProvider provider); @Override void accept(MonetaryAmount amount); @Override MonetarySummaryStatistics combine(
			MonetarySummaryStatistics summaryStatistics); @Override boolean isExchangeable(); @Override MonetarySummaryStatistics to(CurrencyUnit unit); }
ExchangeRateMonetarySummaryStatistics extends DefaultMonetarySummaryStatistics { @Override public void accept(MonetaryAmount amount) { super.accept(currencyConversion.apply(amount)); } ExchangeRateMonetarySummaryStatistics(CurrencyUnit currencyUnit,
			ExchangeRateProvider provider); @Override void accept(MonetaryAmount amount); @Override MonetarySummaryStatistics combine(
			MonetarySummaryStatistics summaryStatistics); @Override boolean isExchangeable(); @Override MonetarySummaryStatistics to(CurrencyUnit unit);  }