* @param tuple
* @throws IOException
*/
private void testTupleSedes(Tuple tuple) throws IOException {
InterSedes sedes = InterSedesFactory.getInterSedesInstance();
//write the tuple into a DataOutputStream on bytearray
ByteArrayOutputStream bout = new ByteArrayOutputStream(10*1024*1024);// 10 MB
DataOutputStream out = new DataOutputStream(bout);
sedes.writeDatum(out, tuple);
out.flush();
//read tuple back
ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
DataInputStream in = new DataInputStream(bin);
Tuple tupleout = (Tuple)sedes.readDatum(in);
assertEquals(" Tuple before and after serialization are same ",
tuple, tupleout);
}