@Test public void writeDeliveryReportResponse() throws Exception { DeliveryReportResponse deliveryResponse = new DeliveryReportResponse(); deliveryResponse.setErrorCode(5); deliveryResponse.setErrorMessage("Success"); StringWriter sw = new StringWriter(); SxmpWriter.write(sw, deliveryResponse); logger.debug(sw.toString()); StringBuilder expectedXML = new StringBuilder(200) .append("<?xml version=\"1.0\"?>\n") .append("<operation type=\"deliveryReport\">\n") .append(" <deliveryReportResponse>\n") .append(" <error code=\"5\" message=\"Success\"/>\n") .append(" </deliveryReportResponse>\n") .append("</operation>\n") .append(""); XMLUnit.setIgnoreWhitespace(true); Diff myDiff = new Diff(expectedXML.toString(), sw.toString()); DetailedDiff myDetailedDiff = new DetailedDiff(myDiff); Assert.assertTrue("XML are similar " + myDetailedDiff, myDetailedDiff.similar()); }
static public void write(Writer out, Operation operation) throws SxmpErrorException, IOException { write(out, operation, true); }
SxmpWriter { static public void write(Writer out, Operation operation) throws SxmpErrorException, IOException { write(out, operation, true); } }
SxmpWriter { static public void write(Writer out, Operation operation) throws SxmpErrorException, IOException { write(out, operation, true); }  }
SxmpWriter { static public void write(Writer out, Operation operation) throws SxmpErrorException, IOException { write(out, operation, true); }  static String createString(Operation operation); static void write(Writer out, Operation operation); static void write(Writer out, Operation operation, boolean withXmlHeader); }
SxmpWriter { static public void write(Writer out, Operation operation) throws SxmpErrorException, IOException { write(out, operation, true); }  static String createString(Operation operation); static void write(Writer out, Operation operation); static void write(Writer out, Operation operation, boolean withXmlHeader);  }