List<Message> msgs=createMessages();
MessageBatch batch=new MessageBatch(msgs);
long total_size=0;
for(Message msg: msgs)
total_size+=msg.size();
System.out.println("total size=" + batch.totalSize());
assert batch.totalSize() == total_size;
}
public void testSize() throws Exception {