" type='error'>\n" +
" <error type='modify'>\n" +
" <redirect xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>xmpp:characters@conference.example.org</redirect>\n" +
" </error>\n" +
" </presence>";
Presence presence = unmarshal(xml, Presence.class);
Assert.assertNotNull(presence.getError());
Assert.assertEquals(presence.getType(), Presence.Type.ERROR);
Assert.assertEquals(presence.getError().getType(), StanzaError.Type.MODIFY);
Assert.assertTrue(presence.getError().getCondition() instanceof Redirect);
Assert.assertEquals(((Redirect) presence.getError().getCondition()).getAlternateAddress(), "xmpp:characters@conference.example.org");
}