@Override
    public XmlStringBuilder toXML(XmlEnvironment xmlEnvironment) {
        return new XmlStringBuilder(this)
                .attribute(ATTR_STAMP, getStamp())
                .rightAngleBracket()
                .append(getOriginId())
                .closeElement(this);
    }
@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());
    }