aboutsummaryrefslogtreecommitdiff
path: root/juick-rss/src/test/java/com/juick/rss
diff options
context:
space:
mode:
Diffstat (limited to 'juick-rss/src/test/java/com/juick/rss')
-rw-r--r--juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java b/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java
index a9ac848c..5130f2bc 100644
--- a/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java
+++ b/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java
@@ -9,7 +9,7 @@ import com.juick.rss.configuration.RssMvcConfiguration;
import com.juick.service.MessagesService;
import com.juick.service.TagService;
import com.juick.service.UserService;
-import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.commons.text.RandomStringGenerator;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -80,13 +80,15 @@ public class RSSTests {
private User ugnich, freefd;
String ugnichName, ugnichPassword, freefdName, freefdPassword;
+ final static RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange('a', 'z').build();
+
private static Message getMessage(final User user, final String messageText) {
Message msg = new Message();
msg.setMid(1);
msg.setUser(user);
- msg.setText(messageText == null ? RandomStringUtils.randomAlphanumeric(24) : messageText);
- msg.setTags(Collections.singletonList(new Tag(RandomStringUtils.randomAlphabetic(4))));
+ msg.setText(messageText == null ? generator.generate(24) : messageText);
+ msg.setTags(Collections.singletonList(new Tag(generator.generate(4))));
return msg;
}