BytesStreamOutput out = new BytesStreamOutput();
cn.writeTo(out);
BytesStreamInput in = new BytesStreamInput(out.bytes());
CollectNode cn2 = new CollectNode();
cn2.readFrom(in);
assertEquals(cn, cn2);
assertEquals(cn.toCollect(), cn2.toCollect());
assertEquals(cn.downStreamNodes(), cn2.downStreamNodes());
assertEquals(cn.maxRowGranularity(), cn.maxRowGranularity());