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