@Test
public void writeSubmitRequestWithMissingAccount() throws Exception {

    SubmitRequest request = new SubmitRequest();
    //request.setAccount(new Account("customer1", "test1"));
    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());
    }
}