@Test public void shouldAdd() { assertEquals(new Money(M1_AMOUNT + M2_AMOUNT), m1.add(m2)); }
public Money add(Money delta) { return new Money(amount.add(delta.amount)); }
Money { public Money add(Money delta) { return new Money(amount.add(delta.amount)); } }
Money { public Money add(Money delta) { return new Money(amount.add(delta.amount)); } private  Money();  Money(BigDecimal amount);  Money(String s);  Money(int i); }
Money { public Money add(Money delta) { return new Money(amount.add(delta.amount)); } private  Money();  Money(BigDecimal amount);  Money(String s);  Money(int i); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); Money add(Money delta); boolean isGreaterThanOrEqual(Money other); String asString(); Money multiply(int x); Long asLong(); }
Money { public Money add(Money delta) { return new Money(amount.add(delta.amount)); } private  Money();  Money(BigDecimal amount);  Money(String s);  Money(int i); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); Money add(Money delta); boolean isGreaterThanOrEqual(Money other); String asString(); Money multiply(int x); Long asLong(); static Money ZERO; }