ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(cfname);
// insert two columns that represent the same integer but have different binary forms (the
// second one is padded with extra zeros)
Mutation rm = new Mutation("Keyspace1", ByteBufferUtil.bytes("k1"));
CellName column1 = cellname(ByteBuffer.wrap(new byte[]{1}));
rm.add(cfname, column1, ByteBufferUtil.bytes("data1"), 1);
rm.apply();
cfs.forceBlockingFlush();
rm = new Mutation("Keyspace1", ByteBufferUtil.bytes("k1"));
CellName column2 = cellname(ByteBuffer.wrap(new byte[]{0, 0, 1}));
rm.add(cfname, column2, ByteBufferUtil.bytes("data2"), 2);
rm.apply();
cfs.forceBlockingFlush();
// fetch by the first column name; we should get the second version of the column value