@Test
  public void testDescribeMatchesAfterClone() throws Exception {
    // Clone the original table
    final String clonedTableNameAsString = "clone" + originalTableName;
    final TableName clonedTableName = TableName.valueOf(clonedTableNameAsString);
    final String snapshotNameAsString =
      "snapshot" + originalTableName + EnvironmentEdgeManager.currentTime();
    final String snapshotName = snapshotNameAsString;

    // restore the snapshot into a cloned table and examine the output
    List<byte[]> familiesList = new ArrayList<>();
    Collections.addAll(familiesList, families);

    // Create a snapshot in which all families are empty
    SnapshotTestingUtils.createSnapshotAndValidate(admin, originalTableName, null, familiesList,
      snapshotNameAsString, rootDir, fs, /* onlineSnapshot= */ false);

    admin.cloneSnapshot(snapshotName, clonedTableName);
    Table clonedTable = UTIL.getConnection().getTable(clonedTableName);
    TableDescriptor cloneHtd = admin.getDescriptor(clonedTableName);
    assertEquals(originalTableDescription.replace(originalTableName.getNameAsString(),
      clonedTableNameAsString), cloneHtd.toStringCustomizedValues());

    // Verify the custom fields
    assertEquals(originalTableDescriptor.getValues().size(), cloneHtd.getValues().size());
    assertEquals(TEST_CUSTOM_VALUE, cloneHtd.getValue(TEST_CUSTOM_VALUE));
    assertEquals(TEST_CONF_CUSTOM_VALUE, cloneHtd.getValue(TEST_CONF_CUSTOM_VALUE));
    assertEquals(originalTableDescriptor.getValues(), cloneHtd.getValues());

    admin.enableTable(originalTableName);
    clonedTable.close();
  }
Verify that the describe for a cloned table matches the describe from the original.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java