for (SoyMsg msg : msgBundle) {
msgs.add(msg);
}
assertEquals(5, msgs.size());
SoyMsg moscowMsg = msgs.get(0);
assertEquals(626010707674174792L, moscowMsg.getId());
List<SoyMsgPart> moscowMsgParts = moscowMsg.getParts();
assertEquals(1, moscowMsgParts.size());
assertEquals("Zmoscow", ((SoyMsgRawTextPart) moscowMsgParts.get(0)).getRawText());
assertEquals(948230478248061386L, msgs.get(1).getId());
SoyMsg mooseMsg = msgs.get(2);
assertEquals(2764913337766789440L, mooseMsg.getId());
List<SoyMsgPart> mooseMsgParts = mooseMsg.getParts();
assertEquals(7, mooseMsgParts.size());
assertEquals("Zmoose ", ((SoyMsgRawTextPart) mooseMsgParts.get(0)).getRawText());
assertEquals("START_ITALIC",
((SoyMsgPlaceholderPart) mooseMsgParts.get(1)).getPlaceholderName());
assertEquals("zalso", ((SoyMsgRawTextPart) mooseMsgParts.get(2)).getRawText());
assertEquals("END_ITALIC",
((SoyMsgPlaceholderPart) mooseMsgParts.get(3)).getPlaceholderName());
assertEquals(" zsays ", ((SoyMsgRawTextPart) mooseMsgParts.get(4)).getRawText());
assertEquals("XXX", ((SoyMsgPlaceholderPart) mooseMsgParts.get(5)).getPlaceholderName());
assertEquals(".", ((SoyMsgRawTextPart) mooseMsgParts.get(6)).getRawText());
SoyMsg cowMsg = msgs.get(3);
assertEquals(6632711700686641662L, cowMsg.getId());
List<SoyMsgPart> cowMsgParts = cowMsg.getParts();
assertEquals(3, cowMsgParts.size());
assertEquals("Zcow zsays ", ((SoyMsgRawTextPart) cowMsgParts.get(0)).getRawText());
assertEquals("MOO", ((SoyMsgPlaceholderPart) cowMsgParts.get(1)).getPlaceholderName());
assertEquals(".", ((SoyMsgRawTextPart) cowMsgParts.get(2)).getRawText());