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-server/src/test/java/com/juick/tests/util/MockUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'juick-server/src') 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; } -- cgit v1.2.3