TableAdapter2x { public static HColumnDescriptor toHColumnDescriptor(ColumnFamilyDescriptor column) { TableDescriptor desc = TableDescriptorBuilder.newBuilder(TableName.valueOf("N_A")).setColumnFamily(column).build(); return new HTableDescriptor(desc).getColumnFamilies()[0]; } private  TableAdapter2x(); static CreateTableRequest adapt(TableDescriptor desc, byte[][] splitKeys); static HColumnDescriptor toHColumnDescriptor(ColumnFamilyDescriptor column); static TableDescriptor adapt(Table table);  }
@Test public void testHColumnDescriptorAdapter() { ColumnFamilyDescriptor columnFamilyDesc = ColumnFamilyDescriptorBuilder.of(COLUMN_FAMILY); HColumnDescriptor actualDesc = TableAdapter2x.toHColumnDescriptor(columnFamilyDesc); HColumnDescriptor columnDes = new HColumnDescriptor(COLUMN_FAMILY); Assert.assertEquals(columnDes, actualDesc); }