@Test
  public void testIndexOfObjectWithCollision() throws Exception {
    int numEntries = 10;
    his = createHashIndexSet();
    Map<Integer, Portfolio> portfoliosMap1 = createPortfolioObjects(numEntries, 0);
    Map<Integer, Portfolio> portfoliosMap2 = createPortfolioObjects(numEntries, numEntries);

    portfoliosMap1.forEach((k, v) -> {
      try {
        int index = his.add(k, portfoliosMap1.get(k));
        int foundIndex = his.index(portfoliosMap1.get(k));
        assertEquals(index, foundIndex);
      } catch (TypeMismatchException ex) {
        throw new Error(ex);
      }
    });
    portfoliosMap2.forEach((k, v) -> {
      try {
        int index = his.add(k, portfoliosMap2.get(k));
        int foundIndex = his.index(portfoliosMap2.get(k));
        assertEquals(index, foundIndex);
      } catch (TypeMismatchException ex) {
        throw new Error(ex);
      }
    });
  }
Add multiple portfolios with the same id they should collide, we should then be able to look up
each one correctly
geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexSetJUnitTest.java