code: public static Money of(CurrencyUnit currency, BigDecimal amount, RoundingMode roundingMode) {
          MoneyUtils.checkNotNull(currency, "CurrencyUnit must not be null");
          MoneyUtils.checkNotNull(amount, "Amount must not be null");
          MoneyUtils.checkNotNull(roundingMode, "RoundingMode must not be null");
          amount = amount.setScale(currency.getDecimalPlaces(), roundingMode);
          return new Money(BigMoney.of(currency, amount));
      }
docs: Obtains an instance of {@code Money} from a {@code BigDecimal}, rounding as necessary.
  <p>
  This allows you to create an instance with a specific currency and amount.
  If the amount has a scale in excess of the scale of the currency then the excess
  fractional digits are rounded using the rounding mode.
  
  @param currency  the currency, not null
  @param amount  the amount of money, not null
  @param roundingMode  the rounding mode to use, not null
  @return the new instance, never null
  @throws ArithmeticException if the rounding fails