diff options
Diffstat (limited to 'juick-server/src/test/java/com/juick/tests')
-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; } |