final PreparedStatement ps = connection.prepareStatement("SELECT 0 as a, 'VALUE_2'::enumeration as b;");
final ResultSet rs = ps.executeQuery();
final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithEnum.class);
int i = 0;
while (rs.next()) {
final ClassWithEnum result = (ClassWithEnum) mapper.mapRow(rs, i++);
Assert.assertNotNull(result);
Assert.assertEquals(Enumeration.VALUE_1, result.getValue1());
Assert.assertEquals(Enumeration.VALUE_2, result.getValue2());
}
}