final PreparedStatement ps = connection.prepareStatement("SELECT 1 as i, 2 as l, 'c' as c, 'str' as str");
final ResultSet rs = ps.executeQuery();
final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithEmbed.class);
int i = 0;
while (rs.next()) {
final ClassWithEmbed result = (ClassWithEmbed) mapper.mapRow(rs, i++);
Assert.assertNotNull(result.getPrimitives());
Assert.assertEquals(1, result.getPrimitives().getI());
Assert.assertEquals(2, result.getPrimitives().getL());
Assert.assertEquals('c', result.getPrimitives().getC());
Assert.assertEquals("str", result.getStr());
}
}