@Test
  public void testHashIndexRetainAll() throws Exception {
    int numEntries = 10;
    setupHashIndexSet(numEntries);
    Set subset = new HashSet();
    portfolioSet.forEach(e -> {
      if (e.indexKey % 2 == 0) {
        subset.add(e);
      }
    });
    assertEquals(numEntries, his.size());
    his.retainAll(subset);
    his.iterator().forEachRemaining((subset::remove));
    assertTrue(subset.isEmpty());
    assertEquals(numEntries / 2, his.size());
  }
Remove all should still remove all portfolios provided, even if there are more provided then
contained
geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexSetJUnitTest.java