private void testCloneTableSchema(final TableName tableName, final TableName newTableName,
    boolean preserveSplits) throws Exception {
    byte[][] splitKeys = new byte[2][];
    splitKeys[0] = Bytes.toBytes(4);
    splitKeys[1] = Bytes.toBytes(8);
    int NUM_FAMILYS = 2;
    int NUM_REGIONS = 3;
    int BLOCK_SIZE = 1024;
    int TTL = 86400;
    boolean BLOCK_CACHE = false;

    // Create the table
    TableDescriptor tableDesc = TableDescriptorBuilder.newBuilder(tableName)
      .setColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY_0))
      .setColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_1).setBlocksize(BLOCK_SIZE)
        .setBlockCacheEnabled(BLOCK_CACHE).setTimeToLive(TTL).build())
      .build();
    admin.createTable(tableDesc, splitKeys).join();

    assertEquals(NUM_REGIONS, TEST_UTIL.getHBaseCluster().getRegions(tableName).size());
    assertTrue("Table should be created with splitKyes + 1 rows in META",
      admin.isTableAvailable(tableName).get());

    // Clone & Verify
    admin.cloneTableSchema(tableName, newTableName, preserveSplits).join();
    TableDescriptor newTableDesc = admin.getDescriptor(newTableName).get();

    assertEquals(NUM_FAMILYS, newTableDesc.getColumnFamilyCount());
    assertEquals(BLOCK_SIZE, newTableDesc.getColumnFamily(FAMILY_1).getBlocksize());
    assertEquals(BLOCK_CACHE, newTableDesc.getColumnFamily(FAMILY_1).isBlockCacheEnabled());
    assertEquals(TTL, newTableDesc.getColumnFamily(FAMILY_1).getTimeToLive());
    // HBASE-26246 introduced persist of store file tracker into table descriptor
    tableDesc = TableDescriptorBuilder.newBuilder(tableDesc).setValue(TRACKER_IMPL,
      StoreFileTrackerFactory.getStoreFileTrackerName(TEST_UTIL.getConfiguration())).build();
    TEST_UTIL.verifyTableDescriptorIgnoreTableName(tableDesc, newTableDesc);

    if (preserveSplits) {
      assertEquals(NUM_REGIONS, TEST_UTIL.getHBaseCluster().getRegions(newTableName).size());
      assertTrue("New table should be created with splitKyes + 1 rows in META",
        admin.isTableAvailable(newTableName).get());
    } else {
      assertEquals(1, TEST_UTIL.getHBaseCluster().getRegions(newTableName).size());
    }
  }
Class to test asynchronous table admin operations.
@see TestAsyncTableAdminApi2 This test and it used to be joined it was taking longer than our ten
     minute timeout so they were split.
@see TestAsyncTableAdminApi3 Another split out from this class so each runs under ten minutes.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi.java