/*
* Test method for 'xbird.util.IntHash.put(int, V)'
*/
public void testPut() {
IntArrayList keys = new IntArrayList(100000);
IntHash<Long> hash = new IntHash<Long>();
Random random = new Random(System.currentTimeMillis());
for(int i = 0; i < 100000; i++) {
int key = random.nextInt();
keys.add(key);
long value = random.nextLong();
hash.put(key, value);
}
IntHash<Long> copyed = ObjectUtils.deepCopy(hash);
assert (hash.size() == copyed.size());
for(int i = 0; i < 100000; i++) {
int key = keys.get(i);
assertEquals(hash.get(key), copyed.get(key));
}
}