@Test
  public void testCompactDueToTooManyRemoveTokens() throws Exception {
    int numEntries = 10;
    setupHashIndexSet(numEntries);

    assertEquals(numEntries, his.size());
    his.removeAll(portfolioSet);
    assertEquals(numEntries, his.hashIndexSetProperties.removedTokens);

    assertEquals(0, his.size());

    // Very very bad but we fake out the number of removed tokens
    his.hashIndexSetProperties.removedTokens = his.hashIndexSetProperties.maxSize;
    addPortfoliosToHashIndexSet(portfoliosMap, his);

    // compaction should have occurred, removed tokens should now be gone
    assertEquals(0, his.hashIndexSetProperties.removedTokens);
    assertEquals(numEntries, his.size());
  }
we have to be sure that we dont cause a compaction or growth or else removed tokens will be
removed and a new backing array created
geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexSetJUnitTest.java