@Test
public void writeDeliveryReportRequest0() throws Exception {

    DeliveryReportRequest request = new DeliveryReportRequest();
    request.setAccount(new Account("customer1", "test1"));
    //request.setOperatorId(20);
    request.setReferenceId("TESTREF");
    request.setStatus(new DeliveryStatus(5, "Expired"));
    request.setTicketId("000:20090118002220948:000");
    //request.setSourceAddress(new MobileAddress(MobileAddress.Type.NETWORK, "40404"));
    //request.setDestinationAddress(new MobileAddress(MobileAddress.Type.INTERNATIONAL, "+13135551212"));
    //request.setText("Hello World");
    StringWriter sw = new StringWriter();
    SxmpWriter.write(sw, request);
    logger.debug(sw.toString());
    StringBuilder expectedXML = new StringBuilder(200)
        .append("<?xml version=\"1.0\"?>\n")
        .append("<operation type=\"deliveryReport\">\n")
        .append(" <account username=\"customer1\" password=\"test1\"/>\n")
        .append(" <deliveryReportRequest referenceId=\"TESTREF\">\n")
        .append("   <status code=\"5\" message=\"Expired\"/>\n")
        .append("   <ticketId>000:20090118002220948:000</ticketId>\n")
        .append(" </deliveryReportRequest>\n")
        .append("</operation>\n")
        .append("");
    // compare to actual correct submit response
    XMLUnit.setIgnoreWhitespace(true);
    Diff myDiff = new Diff(expectedXML.toString(), sw.toString());
    DetailedDiff myDetailedDiff = new DetailedDiff(myDiff);
    Assert.assertTrue("XML are similar " + myDetailedDiff, myDetailedDiff.similar());
}