@Test public void shouldMultiply() { int multiplier = 12; assertEquals(new Money(M2_AMOUNT * multiplier), m2.multiply(multiplier)); }
public Money multiply(int x) { return new Money(amount.multiply(new BigDecimal(x))); }
Money { public Money multiply(int x) { return new Money(amount.multiply(new BigDecimal(x))); } }
Money { public Money multiply(int x) { return new Money(amount.multiply(new BigDecimal(x))); } private  Money();  Money(BigDecimal amount);  Money(String s);  Money(int i); }
Money { public Money multiply(int x) { return new Money(amount.multiply(new BigDecimal(x))); } 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 multiply(int x) { return new Money(amount.multiply(new BigDecimal(x))); } 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; }