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