use of org.jivesoftware.smackx.sid.element.OriginIdElement in project Smack by igniterealtime.
the class RetractedElementTest method serializationTest.
@Test
public void serializationTest() throws ParseException {
Date stamp = XmppDateTime.parseXEP0082Date("2019-09-20T23:08:25.000+00:00");
OriginIdElement originId = new OriginIdElement("origin-id-1");
RetractedElement retractedElement = new RetractedElement(stamp, originId);
String expectedXml = "" + "<retracted stamp='2019-09-20T23:08:25.000+00:00' xmlns='urn:xmpp:message-retract:0'>\n" + " <origin-id xmlns='urn:xmpp:sid:0' id='origin-id-1'/>\n" + "</retracted>";
assertXmlSimilar(expectedXml, retractedElement.toXML());
}
Aggregations