MoneyAliasColumn extends AliasColumn<T, Money, Long> { @Override public Money toDomainValue(Long jdbcValue) { if (jdbcValue == null) { return null; } return Money.dollars(jdbcValue.intValue() / 100.0); } MoneyAliasColumn(Alias<T> alias, String name, Shim<T, Money> shim); @Override Money toDomainValue(Long jdbcValue); @Override Long toJdbcValue(Money domainValue); @Override Long toJdbcValue(ResultSet rs, int i);  }
@Test public void toDomainValue() { assertDomainValue(0, Money.dollars(0.00)); assertDomainValue(100, Money.dollars(1.00)); assertDomainValue(151, Money.dollars(1.51)); }