final PreparedStatement ps = connection.prepareStatement("SELECT 1 as i");
final ResultSet rs = ps.executeQuery();
final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithBigDecimal.class);
int i = 0;
while (rs.next()) {
final ClassWithBigDecimal result = (ClassWithBigDecimal) mapper.mapRow(rs, i++);
Assert.assertEquals(new BigDecimal(1), result.getI());
}
}