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(ClassWithBadPrimitives.class);
int i = 0;
while (rs.next()) {
final ClassWithBadPrimitives result = (ClassWithBadPrimitives) mapper.mapRow(rs, i++);
Assert.assertNotNull(result);
Assert.assertEquals(0, result.getI());
Assert.assertEquals(2, result.getL());
Assert.assertEquals('c', result.getC());
}
}