@Test(expectedExceptions = NullPointerException.class) public void shouldReturnErrorWhenCurrencyIsNull() { producer.create(null, 10); }
@Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return Money.of(Objects.requireNonNull(number), Objects.requireNonNull(currency)); }
MoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return Money.of(Objects.requireNonNull(number), Objects.requireNonNull(currency)); } }
MoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return Money.of(Objects.requireNonNull(number), Objects.requireNonNull(currency)); }  }
MoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return Money.of(Objects.requireNonNull(number), Objects.requireNonNull(currency)); }  @Override MonetaryAmount create(CurrencyUnit currency, Number number); }
MoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return Money.of(Objects.requireNonNull(number), Objects.requireNonNull(currency)); }  @Override MonetaryAmount create(CurrencyUnit currency, Number number);  }