public HRegion createLocalHRegionWithInMemoryFlags(TableName tableName, byte[] startKey,
    byte[] stopKey, Configuration conf, boolean isReadOnly, Durability durability, WAL wal,
    boolean[] compactedMemStore, byte[]... families) throws IOException {
    TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
    builder.setReadOnly(isReadOnly);
    int i = 0;
    for (byte[] family : families) {
      ColumnFamilyDescriptorBuilder cfBuilder = ColumnFamilyDescriptorBuilder.newBuilder(family);
      if (compactedMemStore != null && i < compactedMemStore.length) {
        cfBuilder.setInMemoryCompaction(MemoryCompactionPolicy.BASIC);
      } else {
        cfBuilder.setInMemoryCompaction(MemoryCompactionPolicy.NONE);

      }
      i++;
      // Set default to be three versions.
      cfBuilder.setMaxVersions(Integer.MAX_VALUE);
      builder.setColumnFamily(cfBuilder.build());
    }
    builder.setDurability(durability);
    RegionInfo info =
      RegionInfoBuilder.newBuilder(tableName).setStartKey(startKey).setEndKey(stopKey).build();
    return createLocalHRegion(info, conf, builder.build(), wal);
  }
@return A region on which you must call {@link HBaseTestingUtil#closeRegionAndWAL(HRegion)}
        when done.
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java