@Test public void shouldGroupByCorrectly() { GroupMonetarySummaryStatistics group = createGroupMonetary(); Map<CurrencyUnit, MonetarySummaryStatistics> map = group.get(); Assert.assertEquals(map.keySet().size(), 3); Assert.assertNotNull(map.get(BRAZILIAN_REAL)); Assert.assertNotNull(map.get(EURO)); Assert.assertNotNull(map.get(DOLLAR)); MonetarySummaryStatistics brazilianSummary = map .get(BRAZILIAN_REAL); verifySummary(brazilianSummary, 15, 30, 2L); MonetarySummaryStatistics euroSummary = map.get(EURO); verifySummary(euroSummary, 50, 100, 2L); MonetarySummaryStatistics dollarSummary = map.get(DOLLAR); verifySummary(dollarSummary, 60, 120, 2L); }
public Map<CurrencyUnit, MonetarySummaryStatistics> get() { return groupSummary; }
GroupMonetarySummaryStatistics { public Map<CurrencyUnit, MonetarySummaryStatistics> get() { return groupSummary; } }
GroupMonetarySummaryStatistics { public Map<CurrencyUnit, MonetarySummaryStatistics> get() { return groupSummary; } GroupMonetarySummaryStatistics(); }
GroupMonetarySummaryStatistics { public Map<CurrencyUnit, MonetarySummaryStatistics> get() { return groupSummary; } GroupMonetarySummaryStatistics(); Map<CurrencyUnit, MonetarySummaryStatistics> get(); GroupMonetarySummaryStatistics accept(MonetaryAmount amount); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); GroupMonetarySummaryStatistics combine(
            GroupMonetarySummaryStatistics another); }
GroupMonetarySummaryStatistics { public Map<CurrencyUnit, MonetarySummaryStatistics> get() { return groupSummary; } GroupMonetarySummaryStatistics(); Map<CurrencyUnit, MonetarySummaryStatistics> get(); GroupMonetarySummaryStatistics accept(MonetaryAmount amount); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); GroupMonetarySummaryStatistics combine(
            GroupMonetarySummaryStatistics another);  }