@Test
public void testPrune() {

  index = new CachedIndex(new SameIndex(), 250, 5, true);
  for (int ix = 0; ix < 10000; ix++) {
    String key = Integer.toString((int) (Math.random() * 500));
    Assert.assertTrue("didn't find value",
           index.get(key).equals(key));
  }
  Assert.assertTrue("number of keys in index too high",
         index.getKeyNumber() <= 250);
}