aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick/tests
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-12-16 15:41:14 +0300
committerGravatar Vitaly Takmazov2016-12-16 15:41:14 +0300
commit300a0439b2a6e26d9025247ef780c886616d4ae1 (patch)
treebcdb7613c2c5f37b870cbe18241894dba9428fae /src/test/java/com/juick/tests
parent18a8595d2150edc92084c94b9dbb8f4309d3ed36 (diff)
CharEncoding.UTF_8
Diffstat (limited to 'src/test/java/com/juick/tests')
-rw-r--r--src/test/java/com/juick/tests/MessageTests.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/java/com/juick/tests/MessageTests.java b/src/test/java/com/juick/tests/MessageTests.java
index a0cfd444..6bc291e2 100644
--- a/src/test/java/com/juick/tests/MessageTests.java
+++ b/src/test/java/com/juick/tests/MessageTests.java
@@ -5,6 +5,7 @@ import static org.junit.Assert.assertEquals;
import com.juick.json.MessageSerializer;
import com.juick.util.DateFormattersHolder;
import com.juick.xmpp.extensions.JuickMessage;
+import org.apache.commons.lang3.CharEncoding;
import org.json.JSONObject;
import org.junit.Test;
@@ -40,7 +41,7 @@ public class MessageTests {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
- Document doc = db.parse(new ByteArrayInputStream(xmppMessage.toString().getBytes("UTF-8")));
+ Document doc = db.parse(new ByteArrayInputStream(xmppMessage.toString().getBytes(CharEncoding.UTF_8)));
Node juickNode = doc.getElementsByTagName("juick").item(0);
NamedNodeMap attrs = juickNode.getAttributes();
assertEquals("date should be in ts field", DateFormattersHolder.getMessageFormatterInstance().format(currentDate),