final PreparedStatement ps = connection.prepareStatement("SELECT tmp.primitives_function();");
final ResultSet rs = ps.executeQuery();
final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(PrimitiveResult.class);
int i = 0;
while (rs.next()) {
final PrimitiveResult result = (PrimitiveResult) mapper.mapRow(rs, i++);
Assert.assertEquals(0, result.getId().intValue());
Assert.assertEquals("result_code", result.getMsg());
}
}