diff options
author | Vitaly Takmazov | 2017-06-25 15:06:49 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-06-25 15:06:49 +0300 |
commit | 1e29c8830246a17f060654d43d970a00ce94122a (patch) | |
tree | 1f3374cc843f0b8016ea99e1acfa514f77a57544 /juick-server/src/test/java/com/juick/tests/util | |
parent | 13d3c5eebeef3442bba6f7934d8cae08e8962f70 (diff) |
commons-lang3 deprecated classes -> commons-text and commons-codec
Diffstat (limited to 'juick-server/src/test/java/com/juick/tests/util')
-rw-r--r-- | juick-server/src/test/java/com/juick/tests/util/MockUtils.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/juick-server/src/test/java/com/juick/tests/util/MockUtils.java b/juick-server/src/test/java/com/juick/tests/util/MockUtils.java index c67b26ef..5344dd23 100644 --- a/juick-server/src/test/java/com/juick/tests/util/MockUtils.java +++ b/juick-server/src/test/java/com/juick/tests/util/MockUtils.java @@ -2,7 +2,7 @@ package com.juick.tests.util; import com.juick.Message; import com.juick.User; -import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.text.RandomStringGenerator; import java.util.Date; @@ -10,12 +10,13 @@ import java.util.Date; * Created by vitalyster on 12.01.2017. */ public class MockUtils { + final static RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange('a', 'z').build(); public static Message mockMessage(Integer mid, final User user, final String messageText) { Message msg = new Message(); msg.setMid(mid); msg.setUser(user); - msg.setText(messageText == null ? RandomStringUtils.randomAlphanumeric(24) : messageText); + msg.setText(messageText == null ? generator.generate(24) : messageText); msg.setDate(new Date()); return msg; } |