private HRegion initHRegion(byte[] tableName, String callingMethod, Configuration conf,
    String family, BlockCache blockCache) throws IOException {
    TableDescriptorBuilder builder =
      TableDescriptorBuilder.newBuilder(TableName.valueOf(tableName));
    for (int i = 0; i < BLOOM_TYPE.length; i++) {
      BloomType bloomType = BLOOM_TYPE[i];
      builder.setColumnFamily(
        ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(family + "_" + bloomType))
          .setBlocksize(1).setBloomFilterType(bloomType).build());
    }
    RegionInfo info = RegionInfoBuilder.newBuilder(TableName.valueOf(tableName)).build();
    Path path = new Path(DIR + callingMethod);
    if (blockCache != null) {
      return HBaseTestingUtil.createRegionAndWAL(info, path, conf, builder.build(), blockCache);
    } else {
      return HBaseTestingUtil.createRegionAndWAL(info, path, conf, builder.build());
    }
  }
Callers must afterward call {@link HBaseTestingUtil#closeRegionAndWAL(HRegion)}
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBlocksRead.java