assert batch.size() == 3;
}
public void testIterator6() {
List<Message> msgs=createMessages();
MessageBatch batch=new MessageBatch(msgs);
remove(batch, 1, 2, 3, 10, msgs.size()-1);
System.out.println("batch = " + batch);
int count=0;
for(Message msg: batch)
count++;
assert count == msgs.size() - 5;
count=0;
batch.add(new Message()).add(new Message());
System.out.println("batch = " + batch);
for(Message msg: batch)
count++;
assert count == msgs.size() - 5+2;
}