@Test
  public void testBunchOfInvalidEntries() throws Exception {
    // make sure iterator works while values are valid
    Collection<String> valuesBefore = region.values();
    assertThat(valuesBefore).hasSize(PUT_COUNT);

    int iteratorCount = 0;
    for (Iterator iterator = valuesBefore.iterator(); iterator.hasNext(); iterator.next()) {
      iteratorCount++;
    }

    assertThat(iteratorCount).isEqualTo(PUT_COUNT);

    region.localInvalidateRegion();

    // now we expect iterator to stackOverflow if bug 34583 exists
    Collection<String> valuesAfter = region.values();
    assertThat(valuesAfter).isEmpty();

    iteratorCount = 0;
    for (Iterator iterator = valuesAfter.iterator(); iterator.hasNext(); iterator.next()) {
      iteratorCount++;
    }

    assertThat(iteratorCount).isZero();
  }
Confirm that bug 34583 is fixed. Cause of bug is recursion is entries iterator that causes stack
overflow.

<p>
TRAC #34583: StackOverflowError while performing region.put() at bridge client.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/RegionValuesIteratorAfterLocalInvalidateRegressionTest.java