" <subject>I implore you!</subject>\n" +
" <subject xml:lang='de'>Ich flehe dich an!</subject>\n" +
" <body>Wherefore art thou, Romeo?</body>\n" +
" <body xml:lang='cs'>Wo bist du, Romeo?</body>\n" +
"</message>";
Message message = unmarshal(xml, Message.class);
Assert.assertEquals(message.getFrom().toString(), "juliet@example.com/balcony");
Assert.assertEquals(message.getTo().toString(), "romeo@example.net");
Assert.assertEquals(message.getType(), Message.Type.CHAT);
Assert.assertEquals(message.getId(), "jk3v47gw");
Assert.assertEquals(message.getLanguage(), "en");
Assert.assertEquals(message.getSubject(), "I implore you!");
Assert.assertEquals(message.getSubjects().get(1).getText(), "Ich flehe dich an!");
Assert.assertEquals(message.getBody(), "Wherefore art thou, Romeo?");
Assert.assertEquals(message.getBodies().get(1).getText(), "Wo bist du, Romeo?");
}