Money { public Money add(Money other) { return new Money(amount.add(other.amount)); } Money();  Money(int i);  Money(BigDecimal amount); boolean isGreaterThanOrEqual(Money other); Money add(Money other); Money subtract(Money other); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); BigDecimal getAmount(); void setAmount(BigDecimal amount); static final Money ZERO; }
@Test public void shouldAdd() { assertEquals(new Money(25), m1.add(m2)); }