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