### Question:
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);  }### Answer:
@Test public void shouldCreateEmptyGroupSummary() { GroupMonetarySummaryStatistics group = new GroupMonetarySummaryStatistics(); Map<CurrencyUnit, MonetarySummaryStatistics> map = group.get(); Assert.assertTrue(map.isEmpty()); }
@Test public void shouldReturnsAnEmptySummaryWhenCurrencyThereIsNot() { GroupMonetarySummaryStatistics group = new GroupMonetarySummaryStatistics(); MonetarySummaryStatistics brazilianSummary = group.get().get( BRAZILIAN_REAL); verifySummary(brazilianSummary, 0, 0, 0L); }
@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); }