### Question:
ExchangeBasedCurrencyValue extends CurrencyValue { static public CurrencyValue convertFromValue(ExchangeBasedCurrencyValue value, String targetCurrency, ExchangeRateProvider exchangeRateManager) { if (targetCurrency.equals(value.getCurrency())) { return value; } else if (value.hasExactValue() && value.getExactValue().getCurrency().equals(targetCurrency)) { return value.getExactValue(); } else { String sourceCurrency = value.getCurrency(); GetExchangeRate fx = new GetExchangeRate(targetCurrency, sourceCurrency, exchangeRateManager).invoke(); if (fx.getSourcePrice() == null || fx.getTargetPrice() == null) { if (targetCurrency.equals(CurrencyValue.BTC)) { return new ExchangeBasedBitcoinValue(targetCurrency, (Long) null, value.getExactValue()); } else { return new ExchangeBasedFiatValue(targetCurrency, null, value.getExactValue()); } } BigDecimal fromValueDecimal = value.getValue(); BigDecimal newValue = null; if (fromValueDecimal != null) { newValue = fromValueDecimal.divide(fx.getSourcePrice(), 8, RoundingMode.HALF_UP).multiply(fx.getTargetPrice()); } if (targetCurrency.equals(CurrencyValue.BTC)) { return new ExchangeBasedBitcoinValue(targetCurrency, newValue, value.getExactValue()); } else { return new ExchangeBasedFiatValue(targetCurrency, newValue, value.getExactValue()); } } } protected  ExchangeBasedCurrencyValue(String currency, ExactCurrencyValue basedOnExactValue); static CurrencyValue fromValue(CurrencyValue currencyValue, String targetCurrency, ExchangeRateProvider exchangeRateManager); static CurrencyValue fromValue(ExchangeBasedCurrencyValue currencyValue, String targetCurrency, ExchangeRateProvider exchangeRateManager); static CurrencyValue fromValue(ExactCurrencyValue currencyValue, String targetCurrency, ExchangeRateProvider exchangeRateManager); static CurrencyValue from(BigDecimal value, String currency); static CurrencyValue convertFromValue(ExchangeBasedCurrencyValue value, String targetCurrency, ExchangeRateProvider exchangeRateManager); static CurrencyValue fromExactValue(ExactCurrencyValue exactValue, String targetCurrency, ExchangeRateProvider exchangeRateManager); @Override String getCurrency(); @Override boolean hasExactValue(); @Override ExactCurrencyValue getExactValue();  }### Answer:
@Test public void testConvertFromValue() throws Exception { }