private static void createEntry(String name, int ttl, ExpirationAction action, GenericListener l)
      throws CacheException {

    Region region = getRegion();
    AttributesFactory factory = new AttributesFactory(region.getAttributes());
    factory.setStatisticsEnabled(true);
    factory.setEntryTimeToLive(new ExpirationAttributes(ttl, action));
    factory.setScope(SCOPE);
    factory.setCacheListener(l);

    Region sub = region.createSubregion(name, factory.create());
    sub.create(name, 0, sub.getCache().getDistributedSystem().getDistributedMember());
  }
Create a region with one entry in this test's region with the given name and attributes.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/SystemFailureDUnitTest.java