@Test public void shouldCreateUsingFastMoneyImplementation() { Long value = 10L; MonetaryAmount amount = producer.create(currency, value); assertTrue(FastMoney.class.isInstance(amount)); }
@Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return FastMoney.of(Objects.requireNonNull(number), Objects.requireNonNull(currency)); }
FastMoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return FastMoney.of(Objects.requireNonNull(number), Objects.requireNonNull(currency)); } }
FastMoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return FastMoney.of(Objects.requireNonNull(number), Objects.requireNonNull(currency)); }  }
FastMoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return FastMoney.of(Objects.requireNonNull(number), Objects.requireNonNull(currency)); }  @Override MonetaryAmount create(CurrencyUnit currency, Number number); }
FastMoneyProducer implements MonetaryAmountProducer { @Override public MonetaryAmount create(CurrencyUnit currency, Number number) { return FastMoney.of(Objects.requireNonNull(number), Objects.requireNonNull(currency)); }  @Override MonetaryAmount create(CurrencyUnit currency, Number number);  }