.add(new Message(null, "Nicole"));
System.out.println("batch = " + batch);
for(Message msg: batch) {
if("Michi".equals(msg.getObject())) {
msg.setObject("Michelle");
batch.replace(msg, msg); // tests replacing the message with itself (with changed buffer though)
}
}
Queue<String> names=new LinkedBlockingQueue<String>(Arrays.asList("Bela", "Michelle", "Nicole"));
for(Message msg: batch) {
String expected=names.poll();