public void testUpdate() {
int size = 100000;
Random r = new Random();
long[] longs = new long[size];
MapIL map = new HMapIL();
for (int i = 0; i < size; i++) {
int k = r.nextInt(size);
map.put(i, k + 10L);
longs[i] = k + 10L;
}
assertEquals(size, map.size());
for (int i = 0; i < size; i++) {
map.put(i, longs[i] + 10L);
}
assertEquals(size, map.size());
for (int i = 0; i < size; i++) {
long v = map.get(i);
assertEquals(longs[i] + 10L, v);
assertTrue(map.containsKey(i));
}
}