private void enableTableMerge(final TableName tableName) throws Exception {
    // Get the original table descriptor
    TableDescriptor originalTableDesc = admin.getDescriptor(tableName);
    TableDescriptor modifiedTableDesc =
      TableDescriptorBuilder.newBuilder(originalTableDesc).setMergeEnabled(true).build();

    // Now modify the table descriptor and enable merge for it
    admin.modifyTable(modifiedTableDesc);

    // Verify that merge is enabled
    assertTrue(admin.getDescriptor(tableName).isMergeEnabled());
  }
Method to enable merge for the passed table and validate this modification.
@param tableName name of the table
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSplitOrMergeAtTableLevel.java