Assert.assertEquals(limit, lru.size());
}
@Test
public void testGetPromotion() {
Int2LongLRUMap map = new Int2LongLRUMap(3);
map.put(1, 1L);
map.put(2, 2L);
map.put(3, 3L);
// eviction order is now 1,2,3
map.get(1);
// eviction order is now 2,3,1
map.put(4, 4L);
// 2 should be evicted (then 3,1,4)
int[] keys = new int[3];
int i = 0;
for(Int2LongHash.BucketEntry e : map) {
keys[i++] = e.key;