@Test
public void testAdaptForTable() {

  // If no GcRule passed to ColumnFamily, then ColumnDescriptorAdapter#buildGarbageCollectionRule
  // updates maxVersion to Integer.MAX_VALUE
  GCRule gcRule = GCRULES.maxVersions(1);
  ColumnFamily columnFamily = ColumnFamily.newBuilder().setGcRule(gcRule.toProto()).build();
  Table table =
      Table.newBuilder()
          .setName(TABLE_NAME)
          .putColumnFamilies(COLUMN_FAMILY, columnFamily)
          .build();
  HTableDescriptor actualTableDesc =
      TableAdapter.adapt(com.google.cloud.bigtable.admin.v2.models.Table.fromProto(table));
  HTableDescriptor expected = new HTableDescriptor(TableName.valueOf(TABLE_ID));
  expected.addFamily(new HColumnDescriptor(COLUMN_FAMILY));
  Assert.assertEquals(expected, actualTableDesc);
}