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