@Test public void testKiloMultiply() { assertEquals(PRICE_7_EUR_PER_SEVEN_HUNDED_GRAM, PRICE_10_EUR_PER_KILO.getPriceFor(SEVEN_HUNDRED_GRAM)); }
public Price getPriceFor(Quantity newQuantity) { return new Price(amount.multiply(newQuantity.divide(quantity)), newQuantity); }
Price { public Price getPriceFor(Quantity newQuantity) { return new Price(amount.multiply(newQuantity.divide(quantity)), newQuantity); } }
Price { public Price getPriceFor(Quantity newQuantity) { return new Price(amount.multiply(newQuantity.divide(quantity)), newQuantity); } Price(BigDecimal amount, Currency currency);  Price(Money amount, Quantity quantity); }
Price { public Price getPriceFor(Quantity newQuantity) { return new Price(amount.multiply(newQuantity.divide(quantity)), newQuantity); } Price(BigDecimal amount, Currency currency);  Price(Money amount, Quantity quantity); static Price getInstance(PricePO price); Price divide(BigDecimal divisor); @Override boolean equals(Object obj); Money getMoney(); Price getPriceFor(Quantity newQuantity); Quantity getQuantity(); @Override int hashCode(); Price multiply(BigDecimal multiplicand); PricePO toPricePO(); @Override String toString(); }
Price { public Price getPriceFor(Quantity newQuantity) { return new Price(amount.multiply(newQuantity.divide(quantity)), newQuantity); } Price(BigDecimal amount, Currency currency);  Price(Money amount, Quantity quantity); static Price getInstance(PricePO price); Price divide(BigDecimal divisor); @Override boolean equals(Object obj); Money getMoney(); Price getPriceFor(Quantity newQuantity); Quantity getQuantity(); @Override int hashCode(); Price multiply(BigDecimal multiplicand); PricePO toPricePO(); @Override String toString();  }