From 1e29c8830246a17f060654d43d970a00ce94122a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 25 Jun 2017 15:06:49 +0300 Subject: commons-lang3 deprecated classes -> commons-text and commons-codec --- juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'juick-rss/src/test/java/com/juick') 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; } -- cgit v1.2.3