code: public static Money of(CurrencyUnit currency, BigDecimal amount) {
          MoneyUtils.checkNotNull(currency, "Currency must not be null");
          MoneyUtils.checkNotNull(amount, "Amount must not be null");
          if (amount.scale() > currency.getDecimalPlaces()) {
              throw new ArithmeticException("Scale of amount " + amount + " is greater than the scale of the currency " + currency);
          }
          return Money.of(currency, amount, RoundingMode.UNNECESSARY);
      }
docs: Obtains an instance of {@code Money} from a {@code BigDecimal}.
  <p>
  This allows you to create an instance with a specific currency and amount.
  No rounding is performed on the amount, so it must have a scale compatible
  with the currency.
  
  @param currency  the currency, not null
  @param amount  the amount of money, not null
  @return the new instance, never null
  @throws ArithmeticException if the scale exceeds the currency scale