@Test(expectedExceptions = NullPointerException.class) public void shouldReturnErrorWhenCreateWithNumberNull() { factory.create(null, real); fail(); }
@Override public MonetaryAmount create(Number number, CurrencyUnit currencyUnit) { return RoundedMoney.of(requireNonNull(number), requireNonNull(currencyUnit), roundingOperator); }
DefaultMonetaryRoundedFactory implements MonetaryRoundedFactory { @Override public MonetaryAmount create(Number number, CurrencyUnit currencyUnit) { return RoundedMoney.of(requireNonNull(number), requireNonNull(currencyUnit), roundingOperator); } }
DefaultMonetaryRoundedFactory implements MonetaryRoundedFactory { @Override public MonetaryAmount create(Number number, CurrencyUnit currencyUnit) { return RoundedMoney.of(requireNonNull(number), requireNonNull(currencyUnit), roundingOperator); } DefaultMonetaryRoundedFactory(MonetaryOperator roundingOperator); }
DefaultMonetaryRoundedFactory implements MonetaryRoundedFactory { @Override public MonetaryAmount create(Number number, CurrencyUnit currencyUnit) { return RoundedMoney.of(requireNonNull(number), requireNonNull(currencyUnit), roundingOperator); } DefaultMonetaryRoundedFactory(MonetaryOperator roundingOperator); @Override MonetaryAmount create(Number number, CurrencyUnit currencyUnit); @Override MonetaryOperator getRoundingOperator(); @Override String toString(); }
DefaultMonetaryRoundedFactory implements MonetaryRoundedFactory { @Override public MonetaryAmount create(Number number, CurrencyUnit currencyUnit) { return RoundedMoney.of(requireNonNull(number), requireNonNull(currencyUnit), roundingOperator); } DefaultMonetaryRoundedFactory(MonetaryOperator roundingOperator); @Override MonetaryAmount create(Number number, CurrencyUnit currencyUnit); @Override MonetaryOperator getRoundingOperator(); @Override String toString();  }