### Question:
CurrencyConverter extends TypeConverter implements SimpleValueConverter { @Override public Object decode(Class<?> aClass, Object o, MappedField mappedField) { if (o == null) { return null; } String currencyCode = o.toString(); return Currency.getInstance(currencyCode); }  @Override Object decode(Class<?> aClass, Object o, MappedField mappedField); @Override Object encode(Object value, MappedField optionalExtraInfo);  }### Answer:
@Test public void testDecode() { CurrencyConverter cut = new CurrencyConverter(); final Object decode = cut.decode(Currency.class, "EUR"); assertThat(decode instanceof Currency, is(true)); assertThat(((Currency) decode).getCurrencyCode(), is("EUR")); }