@Test
  public void testIndexOfObject() throws Exception {
    int numEntries = 10;
    his = createHashIndexSet();
    portfoliosMap = createPortfolioObjects(numEntries, 0);
    portfoliosMap.forEach((k, v) -> {
      try {
        int index = his.add(k, portfoliosMap.get(k));
        int foundIndex = his.index(portfoliosMap.get(k));
        assertEquals(index, foundIndex);
      } catch (TypeMismatchException ex) {
        throw new Error(ex);
      }
    });
  }
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