MonetaryAmountAttributeConverter implements AttributeConverter<MonetaryAmount, String> { @Override public MonetaryAmount convertToEntityAttribute(String source) { return source == null ? null : Money.parse(source, FORMAT); }  @Override String convertToDatabaseColumn(MonetaryAmount amount); @Override MonetaryAmount convertToEntityAttribute(String source);  }
@Test void deserializesFormattedValues() { assertThat(converter.convertToEntityAttribute("EUR 123,456.78")).isEqualTo(Money.of(123456.78, "EUR")); }