code: @Override
      public MonetaryAmount apply(MonetaryAmount amount) {
          if (termCurrency.equals(Objects.requireNonNull(amount).getCurrency())) {
              return amount;
          }
          ExchangeRate rate = getExchangeRate(amount);
          if (Objects.isNull(rate) || !amount.getCurrency().equals(rate.getBaseCurrency())) {
              throw new CurrencyConversionException(amount.getCurrency(),
                      this.termCurrency, null);
          }
  
          NumberValue factor = rate.getFactor();
          factor = roundFactor(amount, factor);
  
          Integer scale = rate.getContext().get(KEY_SCALE, Integer.class);
          if(Objects.isNull(scale) || scale < 0) {
          	return amount.multiply(factor).getFactory().setCurrency(rate.getCurrency()).create();
          } else {
          	return amount.multiply(factor).getFactory().setCurrency(rate.getCurrency()).create().with(MonetaryOperators.rounding(scale));
          }
      }
docs: Method that converts the source {@link MonetaryAmount} to an
  {@link MonetaryAmount} based on the {@link ExchangeRate} of this
  conversion.
  @param amount The source amount
  @return The converted amount, never null.
  @throws CurrencyConversionException if conversion failed, or the required data is not available.
  @see #getExchangeRate(MonetaryAmount)