// we'll be adding this one later. make sure it's not already there.
assert cfm.getColumn_metadata().get(ByteBuffer.wrap(new byte[] { 5 })) == null;
CfDef cfDef = cfm.toThrift();
// add one.
ColumnDef addIndexDef = new ColumnDef();
addIndexDef.index_name = "5";
addIndexDef.index_type = IndexType.KEYS;
addIndexDef.name = ByteBuffer.wrap(new byte[] { 5 });
addIndexDef.validation_class = BytesType.class.getName();
cfDef.column_metadata.add(addIndexDef);
// remove one.
ColumnDef removeIndexDef = new ColumnDef();
removeIndexDef.index_name = "0";
removeIndexDef.index_type = IndexType.KEYS;
removeIndexDef.name = ByteBuffer.wrap(new byte[] { 0 });
removeIndexDef.validation_class = BytesType.class.getName();
assert cfDef.column_metadata.remove(removeIndexDef);