@Test
public void parseSubmitRequestWithUnicodeCharsInUTF8() throws Exception {

    StringBuilder xml = new StringBuilder(200)
        .append("<?xml version=\"1.0\"?>\n")
        .append("<operation type=\"submit\">\n")
        .append(" <account username=\"customer1\" password=\"test1\"/>\n")
        .append(" <submitRequest referenceId=\"TESTREF\">\n")
        .append("  <operatorId>20</operatorId>\n")
        //.append("  <deliveryReport>false</deliveryReport>\n")
        .append("  <sourceAddress type=\"network\">40404</sourceAddress>\n")
        .append("  <destinationAddress type=\"international\">+13135551212</destinationAddress>\n")
        .append("  <text encoding=\"UTF-8\">E282ACD8A3D987D984D8A720D987D8B0D98720D8A7D984D8AAD8ACD8B1D8A8D8A920D8A7D984D8A3D988D984D989</text>\n")
        .append(" </submitRequest>\n")
        .append("</operation>\n")
        .append("");
    ByteArrayInputStream is = new ByteArrayInputStream(xml.toString().getBytes());
    SxmpParser parser = new SxmpParser();
    Operation operation = parser.parse(is);
    logger.debug("{}", operation);
    Assert.assertEquals(Operation.Type.SUBMIT, operation.getType());
    Assert.assertEquals(true, operation.isRequest());
    SubmitRequest submitReq = (SubmitRequest)operation;
    Assert.assertEquals("customer1", submitReq.getAccount().getUsername());
    Assert.assertEquals("test1", submitReq.getAccount().getPassword());
    Assert.assertEquals("TESTREF", submitReq.getReferenceId());
    Assert.assertEquals(new Integer(20), submitReq.getOperatorId());
    Assert.assertEquals(new Boolean(false), submitReq.getDeliveryReport());
    Assert.assertEquals(MobileAddress.Type.NETWORK, submitReq.getSourceAddress().getType());
    Assert.assertEquals("40404", submitReq.getSourceAddress().getAddress());
    Assert.assertEquals(MobileAddress.Type.INTERNATIONAL, submitReq.getDestinationAddress().getType());
    Assert.assertEquals("+13135551212", submitReq.getDestinationAddress().getAddress());
    Assert.assertEquals("UTF-8", submitReq.getTextEncoding().getCharset());
    Assert.assertEquals("\u20AC\u0623\u0647\u0644\u0627\u0020\u0647\u0630\u0647\u0020\u0627\u0644\u062a\u062c\u0631\u0628\u0629\u0020\u0627\u0644\u0623\u0648\u0644\u0649", submitReq.getText());
}