"SELECT 'str' as str, ROW(1,2,'c','str')::tmp.simple_type_for_embed as obj");
final ResultSet rs = ps.executeQuery();
final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithObjectWithEmbed.class);
int i = 0;
while (rs.next()) {
final ClassWithObjectWithEmbed result = (ClassWithObjectWithEmbed) mapper.mapRow(rs, i++);
Assert.assertEquals("str", result.getStr());
Assert.assertNotNull(result.getClassWithEmbed());
Assert.assertEquals("str", result.getClassWithEmbed().getStr());
Assert.assertEquals(1, result.getClassWithEmbed().getPrimitives().getI());
Assert.assertEquals(2, result.getClassWithEmbed().getPrimitives().getL());
Assert.assertEquals('c', result.getClassWithEmbed().getPrimitives().getC());
}
}