@Test
public void marshalErrorMessage() throws JAXBException, XMLStreamException {
Message message = new Message(Jid.valueOf("juliet@example.com"), Message.Type.ERROR);
message.setBody("test");
message.setError(new StanzaError(new Conflict()));
String xml = marshal(message);
Assert.assertEquals(xml, "<message to=\"juliet@example.com\" type=\"error\"><body>test</body><error type=\"cancel\"><conflict xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"></conflict></error></message>");
}