@Test public void testGetExchangeRateFromIMF() throws Exception { CurrencyUnit[] units = new CurrencyUnit[]{Monetary.getCurrency("CHF"), Monetary.getCurrency("EUR"), Monetary.getCurrency("USD")}; for (CurrencyUnit u1 : units) { for (CurrencyUnit u2 : units) { if (u1.equals(u2)) { continue; } boolean exception = false; ExchangeRate expected = null; try { expected = MonetaryConversions.getExchangeRateProvider("IMF").getExchangeRate(u1, u2); } catch (Exception e) { exception = true; } ExchangeRate r = conv.getExchangeRateFromIMF(u1, u2); try { assertEquals(expected, r); } catch (Exception e) { if (!exception) { throw e; } } } } }
public ExchangeRate getExchangeRateFromIMF(CurrencyUnit src, CurrencyUnit tgt) { throw new UnsupportedOperationException(); }
Conversions { public ExchangeRate getExchangeRateFromIMF(CurrencyUnit src, CurrencyUnit tgt) { throw new UnsupportedOperationException(); } }
Conversions { public ExchangeRate getExchangeRateFromIMF(CurrencyUnit src, CurrencyUnit tgt) { throw new UnsupportedOperationException(); }  }
Conversions { public ExchangeRate getExchangeRateFromIMF(CurrencyUnit src, CurrencyUnit tgt) { 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 ExchangeRate getExchangeRateFromIMF(CurrencyUnit src, CurrencyUnit tgt) { 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();  }