@Test(expectedExceptions = NullPointerException.class) public void shouldReturnErrorWhenNumberIsNull() { producer.create(currency, null); }
@Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return RoundedMoney.of(Objects.requireNonNull(number), Objects.requireNonNull(currency), operator); }
RoundedMoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return RoundedMoney.of(Objects.requireNonNull(number), Objects.requireNonNull(currency), operator); } }
RoundedMoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return RoundedMoney.of(Objects.requireNonNull(number), Objects.requireNonNull(currency), operator); } RoundedMoneyProducer(MonetaryOperator operator);  RoundedMoneyProducer(); }
RoundedMoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return RoundedMoney.of(Objects.requireNonNull(number), Objects.requireNonNull(currency), operator); } RoundedMoneyProducer(MonetaryOperator operator);  RoundedMoneyProducer(); @Override MonetaryAmount create(CurrencyUnit currency, Number number); MonetaryOperator getOperator(); }
RoundedMoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return RoundedMoney.of(Objects.requireNonNull(number), Objects.requireNonNull(currency), operator); } RoundedMoneyProducer(MonetaryOperator operator);  RoundedMoneyProducer(); @Override MonetaryAmount create(CurrencyUnit currency, Number number); MonetaryOperator getOperator();  }