@Test public void testConvertAmountDefault() throws Exception { CurrencyUnit[] units = new CurrencyUnit[]{Monetary.getCurrency("CHF"), Monetary.getCurrency("EUR"), Monetary.getCurrency("USD"), Monetary.getCurrency("JPY"), Monetary.getCurrency("INR"),}; Money[] moneys = new Money[]{Money.of(10, "CHF"), Money.of(123.34, "USD"), Money.of(2300.30, "INR")}; for (CurrencyUnit u1 : units) { for (Money m : moneys) { boolean exception = false; MonetaryAmount expected = null; try { expected = m.with(MonetaryConversions .getConversion(ConversionQueryBuilder.of().setTermCurrency(u1).build())); } catch (Exception e) { exception = true; } MonetaryAmount res = conv.convertAmountDefault(u1, m); try { assertEquals(expected, res); } catch (Exception e) { if (!exception) { throw e; } } } } }
public MonetaryAmount convertAmountDefault(CurrencyUnit tgt, MonetaryAmount amount) { throw new UnsupportedOperationException(); }
Conversions { public MonetaryAmount convertAmountDefault(CurrencyUnit tgt, MonetaryAmount amount) { throw new UnsupportedOperationException(); } }
Conversions { public MonetaryAmount convertAmountDefault(CurrencyUnit tgt, MonetaryAmount amount) { throw new UnsupportedOperationException(); }  }
Conversions { public MonetaryAmount convertAmountDefault(CurrencyUnit tgt, MonetaryAmount amount) { throw new UnsupportedOperationException(); }  ExchangeRate getExchangeRateFromIMF(CurrencyUnit src, CurrencyUnit tgt); ExchangeRate getExchangeRateWithTime(CurrencyUnit src, CurrencyUnit tgt, LocalDate timestamp); MonetaryAmount convertAmountDefault(CurrencyUnit tgt, MonetaryAmount amount); ConversionContext getDefaultConversionContext(CurrencyUnit src, CurrencyUnit tgt); ProviderContext getIMFProviderContext(); ProviderContext getECBProviderContext(); ProviderContext getDefaultProviderContext(); MonetaryAmount convertAmount(CurrencyUnit tgt, MonetaryAmount amount, LocalDate timestamp); List<String> getDefaultProviderChain(); String getNewProviderName(); }
Conversions { public MonetaryAmount convertAmountDefault(CurrencyUnit tgt, MonetaryAmount amount) { throw new UnsupportedOperationException(); }  ExchangeRate getExchangeRateFromIMF(CurrencyUnit src, CurrencyUnit tgt); ExchangeRate getExchangeRateWithTime(CurrencyUnit src, CurrencyUnit tgt, LocalDate timestamp); MonetaryAmount convertAmountDefault(CurrencyUnit tgt, MonetaryAmount amount); ConversionContext getDefaultConversionContext(CurrencyUnit src, CurrencyUnit tgt); ProviderContext getIMFProviderContext(); ProviderContext getECBProviderContext(); ProviderContext getDefaultProviderContext(); MonetaryAmount convertAmount(CurrencyUnit tgt, MonetaryAmount amount, LocalDate timestamp); List<String> getDefaultProviderChain(); String getNewProviderName();  }