IMapIterator<String, MutableInt> itor = map.entries();
Assert.assertFalse(itor.hasNext());
final int numEntries = 1000000;
for(int i = 0; i < numEntries; i++) {
map.put(Integer.toString(i), new MutableInt(i));
}
final MutableInt probe = new MutableInt();
itor = map.entries();
Assert.assertTrue(itor.hasNext());
while(itor.hasNext()) {
Assert.assertFalse(itor.next() == -1);
String k = itor.getKey();
itor.getValue(probe);
Assert.assertEquals(Integer.valueOf(k).intValue(), probe.intValue());
}
Assert.assertEquals(-1, itor.next());
}