@Test public void writeSubmitRequestWithMissingAccount() throws Exception { SubmitRequest request = new SubmitRequest(); request.setOperatorId(20); request.setReferenceId("TESTREF"); request.setSourceAddress(new MobileAddress(MobileAddress.Type.NETWORK, "40404")); request.setDestinationAddress(new MobileAddress(MobileAddress.Type.INTERNATIONAL, "+13135551212")); request.setText("Hello World"); StringWriter sw = new StringWriter(); try { SxmpWriter.write(sw, request); Assert.fail(); } catch (SxmpErrorException e) { Assert.assertEquals(SxmpErrorCode.MISSING_REQUIRED_ELEMENT, e.getErrorCode()); } }
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);  }