@Test public void testConvertAmountAdvanced() { MonetaryAmount converted = basics.convertAmount(Money.of(200.234, "USD"), 100, 200, MathContext.UNLIMITED); assertNotNull(converted); assertEquals(new BigDecimal("200.234"), converted.getNumber().numberValue(BigDecimal.class).stripTrailingZeros()); assertEquals("USD", converted.getCurrency().getCurrencyCode()); assertEquals(200, converted.getNumber().getPrecision()); assertEquals(200, converted.getContext().getPrecision()); assertEquals(100, converted.getContext().getMaxScale()); assertEquals(MathContext.UNLIMITED, converted.getContext().get(MathContext.class)); }
public MonetaryAmount convertAmount(MonetaryAmount amount, BigDecimal bd, String currencyCode){ throw new UnsupportedOperationException(); }
Basics { public MonetaryAmount convertAmount(MonetaryAmount amount, BigDecimal bd, String currencyCode){ throw new UnsupportedOperationException(); } }
Basics { public MonetaryAmount convertAmount(MonetaryAmount amount, BigDecimal bd, String currencyCode){ throw new UnsupportedOperationException(); }  }
Basics { public MonetaryAmount convertAmount(MonetaryAmount amount, BigDecimal bd, String currencyCode){ throw new UnsupportedOperationException(); }  CurrencyUnit getProvidedCurrency(String currencyCode); CurrencyUnit getProvidedCurrency(Locale locale); CurrencyUnit buildCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits); CurrencyUnit buildAndRegisterCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits); Collection<Class<? extends MonetaryAmount>> getMonetaryAmountTypes(); Class<? extends MonetaryAmount> getDefaultMonetaryAmountType(); MonetaryAmountFactory<T> getMoneyFactory(Class<T> moneyType); MonetaryAmount getMoney(Number number, String currencyCode); MonetaryAmount convertAmount(MonetaryAmount amount, BigDecimal bd, String currencyCode); MonetaryAmount convertAmount(MonetaryAmount amount, int scale, int precision, MathContext context); MonetaryAmount getMoneyWithContext(Number number, String currencyCode, MonetaryContext context); MonetaryAmount getMoneyWithSpecificCapabilities(Number number, String currencyCode); }
Basics { public MonetaryAmount convertAmount(MonetaryAmount amount, BigDecimal bd, String currencyCode){ throw new UnsupportedOperationException(); }  CurrencyUnit getProvidedCurrency(String currencyCode); CurrencyUnit getProvidedCurrency(Locale locale); CurrencyUnit buildCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits); CurrencyUnit buildAndRegisterCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits); Collection<Class<? extends MonetaryAmount>> getMonetaryAmountTypes(); Class<? extends MonetaryAmount> getDefaultMonetaryAmountType(); MonetaryAmountFactory<T> getMoneyFactory(Class<T> moneyType); MonetaryAmount getMoney(Number number, String currencyCode); MonetaryAmount convertAmount(MonetaryAmount amount, BigDecimal bd, String currencyCode); MonetaryAmount convertAmount(MonetaryAmount amount, int scale, int precision, MathContext context); MonetaryAmount getMoneyWithContext(Number number, String currencyCode, MonetaryContext context); MonetaryAmount getMoneyWithSpecificCapabilities(Number number, String currencyCode);  }