@Override
      public void run() {
        try {
          Region<Object, Object> region = getRootRegion().getSubregion(regionName);
          Collection values = region.values();
          Set keys = region.keySet();
          Set entries = region.entrySet();
          assertEquals("value collection size was not the expected value", numEntries,
              values.size());
          assertEquals("key set size was not the expected value", numEntries, keys.size());
          assertEquals("entry set size was not the expected value", numEntries, entries.size());
          assertEquals("region size was not the expected value", numEntries, region.size());
          Iterator valuesIt = values.iterator();
          Iterator keysIt = keys.iterator();
          Iterator entriesIt = entries.iterator();
          for (int i = 0; i < numEntries; i++) {
            assertThat(valuesIt.hasNext()).isTrue();
            Integer value = (Integer) valuesIt.next();
            assertNotNull("value was null", value);

            assertThat(keysIt.hasNext()).isTrue();
            String key = (String) keysIt.next();
            assertNotNull("key was null", key);

            assertThat(entriesIt.hasNext()).isTrue();
            Region.Entry entry = (Region.Entry) entriesIt.next();
            assertNotNull("entry was null", entry);
            assertNotNull("entry key was null", entry.getKey());
            assertNotNull("entry value was null", entry.getValue());
          }
          assertThat(!valuesIt.hasNext()).describedAs("should have been end of values iteration")
              .isTrue();
          assertThat(!keysIt.hasNext()).describedAs("should have been end of keys iteration")
              .isTrue();
          assertThat(!entriesIt.hasNext()).describedAs("should have been end of entries iteration")
              .isTrue();
        } catch (Exception ex) { // TODO: remove all of this and just disconnect DS in tear down
          try {
            getRootRegion().getSubregion(regionName).destroyRegion();
          } catch (Exception ignored) {
          }
          fail("Unexpected exception", ex);
        }
      }
test with multiple vms and a decent spread of keys
geode-core/src/distributedTest/java/org/apache/geode/cache30/PartitionedRegionDUnitTest.java