@Test
  public void testModifyFamily() {
    byte[] familyName = Bytes.toBytes("cf");
    ColumnFamilyDescriptor hcd = ColumnFamilyDescriptorBuilder.newBuilder(familyName)
      .setBlocksize(1000).setDFSReplication((short) 3).build();
    TableDescriptor htd = TableDescriptorBuilder.newBuilder(TableName.valueOf(name.getMethodName()))
      .setColumnFamily(hcd).build();

    assertEquals(1000, htd.getColumnFamily(familyName).getBlocksize());
    assertEquals(3, htd.getColumnFamily(familyName).getDFSReplication());
    hcd = ColumnFamilyDescriptorBuilder.newBuilder(familyName).setBlocksize(2000)
      .setDFSReplication((short) 1).build();
    htd = TableDescriptorBuilder.newBuilder(htd).modifyColumnFamily(hcd).build();
    assertEquals(2000, htd.getColumnFamily(familyName).getBlocksize());
    assertEquals(1, htd.getColumnFamily(familyName).getDFSReplication());
  }
Test default value handling for memStoreFlushSize
hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestTableDescriptorBuilder.java