@Test
  public void testRegionEntryAccess() throws Exception {
    for (final Object o : region.entrySet(false)) {
      Region.Entry entry = (Region.Entry) o;
      RegionEntry regionEntry = null;
      if (entry instanceof NonTXEntry) {
        regionEntry = ((NonTXEntry) entry).getRegionEntry();
      } else {
        regionEntry = ((EntrySnapshot) entry).getRegionEntry();
      }
      assertNotNull(regionEntry);
    }


    LocalRegion lRegion = (LocalRegion) region;
    for (final Object key : lRegion.keys()) {
      Region.Entry rEntry = lRegion.getEntry(key);
      RegionEntry regionEntry = null;
      if (rEntry instanceof NonTXEntry) {
        regionEntry = ((NonTXEntry) rEntry).getRegionEntry();
      } else {
        regionEntry = ((EntrySnapshot) rEntry).getRegionEntry();
      }
      assertNotNull(regionEntry);
    }
  }
RegionJUnitTest.java

Created on January 31, 2005, 3:54 PM
geode-core/src/integrationTest/java/org/apache/geode/cache/query/RegionJUnitTest.java