public void testUpdate() {
int size = 10000;
Random r = new Random();
short[] shorts = new short[size];
MapIS map = new HMapIS();
for (int i = 0; i < size; i++) {
int k = r.nextInt(size);
map.put(i, (short) (k + 10));
shorts[i] = (short) (k + 10);
}
assertEquals(size, map.size());
for (int i = 0; i < size; i++) {
map.put(i, (short) (shorts[i] + 10));
}
assertEquals(size, map.size());
for (int i = 0; i < size; i++) {
short v = map.get(i);
assertEquals(shorts[i] + 10, v);
assertTrue(map.containsKey(i));
}
}