RegionInfo createTableAndGetOneRegion(final TableName tableName)
    throws IOException, InterruptedException, ExecutionException {
    TableDescriptor desc = TableDescriptorBuilder.newBuilder(tableName)
      .setColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY)).build();
    admin.createTable(desc, Bytes.toBytes("A"), Bytes.toBytes("Z"), 5).get();

    // wait till the table is assigned
    HMaster master = TEST_UTIL.getHBaseCluster().getMaster();
    long timeoutTime = EnvironmentEdgeManager.currentTime() + 3000;
    while (true) {
      List<RegionInfo> regions =
        master.getAssignmentManager().getRegionStates().getRegionsOfTable(tableName);
      if (regions.size() > 3) {
        return regions.get(2);
      }
      long now = EnvironmentEdgeManager.currentTime();
      if (now > timeoutTime) {
        fail("Could not find an online region");
      }
      Thread.sleep(10);
    }
  }
Class to test asynchronous region admin operations.
@see TestAsyncRegionAdminApi2 This test and it used to be joined it was taking longer than our
     ten minute timeout so they were split.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java