private HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopKey,
    String callingMethod, Configuration conf, boolean isReadOnly, byte[]... families)
    throws IOException {
    Path logDir = TEST_UTIL.getDataTestDirOnTestFS(callingMethod + ".log");
    RegionInfo hri =
      RegionInfoBuilder.newBuilder(tableName).setStartKey(startKey).setEndKey(stopKey).build();
    final WAL wal = HBaseTestingUtil.createWal(conf, logDir, hri);
    return initHRegion(tableName, startKey, stopKey, conf, isReadOnly, Durability.SYNC_WAL, wal,
      families);
  }
@return A region on which you must call {@link HBaseTestingUtil#closeRegionAndWAL(HRegion)}
        when done.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java