### Question:
DefaultMonetarySummaryStatistics implements MonetarySummaryStatistics { @Override public void accept(MonetaryAmount amount) { if (!empty.getCurrency().equals( Objects.requireNonNull(amount).getCurrency())) { return; } if (isEmpty()) { setSameMonetary(amount); count++; } else { doSummary(amount); } } protected  DefaultMonetarySummaryStatistics(CurrencyUnit currencyUnit); static DefaultMonetarySummaryStatistics of(CurrencyUnit currencyUnit); @Override void accept(MonetaryAmount amount); @Override CurrencyUnit getCurrencyUnit(); @Override MonetarySummaryStatistics combine(
            MonetarySummaryStatistics summaryStatistics); @Override long getCount(); @Override MonetaryAmount getMin(); @Override MonetaryAmount getMax(); @Override MonetaryAmount getSum(); @Override MonetaryAmount getAverage(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @Override boolean isExchangeable(); @Override MonetarySummaryStatistics to(CurrencyUnit unit);  }### Answer:
@Test(expectedExceptions = NullPointerException.class) public void shouldErrorWhenIsNull() { DefaultMonetarySummaryStatistics summary = new DefaultMonetarySummaryStatistics( BRAZILIAN_REAL); summary.accept(null); }