+ " qui officia deserunt mollit anim id est laborum";
byte[] data = Bytes.toBytes(original);
// we make the column size = 10 bytes
ChunkOutputStream out = new ChunkOutputStream(conf,
MESSAGES_TABLE, MESSAGE_DATA_BODY_CF, Bytes.toBytes("10"), 10);
ChunkInputStream in = new ChunkInputStream(conf,
MESSAGES_TABLE, MESSAGE_DATA_BODY_CF, Bytes.toBytes("10"));
//create the stream
ByteArrayInputStream bin = new ByteArrayInputStream(data);
ByteArrayOutputStream bout = new ByteArrayOutputStream(data.length);
int b;
while ((b = bin.read()) != -1) {
out.write(b);
}
out.close();
while ((b = in.read()) != -1) {
bout.write(b);
}
String s = bout.toString();
assertTrue(original.equals(s));
}