@Test
public void processResponseAuthenticationReturnsFalse() throws Exception {

    StringBuilder string0 = new StringBuilder(200)
        .append("<?xml version=\"1.0\"?>\n")
        .append("<operation type=\"submit\">\n")
        .append(" <account username=\"customer1\" password=\"test1\"/>\n")
        .append(" <submitRequest referenceId=\"MYREF102020022\">\n")
        .append("  <operatorId>10</operatorId>\n")
        .append("  <deliveryReport>true</deliveryReport>\n")
        .append("  <sourceAddress type=\"network\">40404</sourceAddress>\n")
        .append("  <destinationAddress type=\"international\">+12065551212</destinationAddress>\n")
        .append("  <text encoding=\"ISO-8859-1\">48656c6c6f20576f726c64</text>\n")
        .append(" </submitRequest>\n")
        .append("</operation>\n")
        .append("");
    ByteArrayInputStream is = new ByteArrayInputStream(string0.toString().getBytes());
    SxmpProcessor processor = new SxmpProcessor() {
        public boolean authenticate(Account account) throws SxmpErrorException {
            return false;
        }
        public SubmitResponse submit(Account account, SubmitRequest submitRequest) throws SxmpErrorException {
            return null;
        }
        public DeliverResponse deliver(Account account, DeliverRequest deliverRequest) throws SxmpErrorException {
            return null;
        }
        public DeliveryReportResponse deliveryReport(Account account, DeliveryReportRequest deliveryRequest) throws SxmpErrorException {
            return null;
        }
    };
    SxmpSession session = new SxmpSession(processor, SxmpParser.VERSION_1_0);
    // this should actually not throw an error and should be an error response
    ErrorResponse response = (ErrorResponse)session.process(is);
    Assert.assertEquals(Operation.Type.SUBMIT, response.getType());
    Assert.assertEquals(SxmpErrorCode.AUTHENTICATION_FAILURE.getIntValue(), response.getErrorCode().intValue());
    //Assert.assertThat(e.getMessage(), CoreMatchers.containsString("Root element must be an [operation]"));
}