code: static MonetaryAmount max(MonetaryAmount a, MonetaryAmount b) {
          MoneyUtils.checkAmountParameter(Objects.requireNonNull(a), Objects.requireNonNull(b.getCurrency()));
          return a.isGreaterThan(b) ? a : b;
      }
docs: Returns the greater of two {@code MonetaryAmount} values. If the
  arguments have the same value, the result is that same value.
  @param a an argument.
  @param b another argument.
  @return the larger of {@code a} and {@code b}.