public Table createMultiRegionTable(TableName tableName, byte[] family, int numRegions)
    throws IOException {
    if (numRegions < 3) throw new IOException("Must create at least 3 regions");
    byte[] startKey = Bytes.toBytes("aaaaa");
    byte[] endKey = Bytes.toBytes("zzzzz");
    byte[][] splitKeys = Bytes.split(startKey, endKey, numRegions - 3);

    return createTable(tableName, new byte[][] { family }, splitKeys);
  }
Create a table with multiple regions.
@return A Table instance for the created table.
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java