String username = "makersoft_" + i;
String password = "makersoft_" + i;
int age = random.nextInt(30);
int gender = (i % 2 == 0) ? User.SEX_MALE : User.SEX_FEMALE;
User user = this.insert_new_user(username, password, age, gender);
Assert.assertNotNull(user.getId());
caches.put(user.getId(), user);
}
List<User> users = userMapper.findAll();
Assert.assertEquals(10, users.size());
for(User entity : users) {
User user = caches.get(entity.getId());
Assert.assertNotNull(user);
//has override hashCode and equals method
Assert.assertEquals(entity, user);
}