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