From f81f75177c4387eb9d2265f84bce91ad156e1550 Mon Sep 17 00:00:00 2001 From: Daniel Josefsson Date: Sat, 8 Feb 2014 10:10:45 +0000 Subject: [PATCH] Simplified unit test for compatibility with JDK6. --- .../jedis/tests/commands/ScriptingCommandsTest.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/test/java/redis/clients/jedis/tests/commands/ScriptingCommandsTest.java b/src/test/java/redis/clients/jedis/tests/commands/ScriptingCommandsTest.java index 8752311..f40c8d3 100644 --- a/src/test/java/redis/clients/jedis/tests/commands/ScriptingCommandsTest.java +++ b/src/test/java/redis/clients/jedis/tests/commands/ScriptingCommandsTest.java @@ -1,9 +1,8 @@ package redis.clients.jedis.tests.commands; import org.hamcrest.CoreMatchers; -import org.hamcrest.core.CombinableMatcher; +import org.hamcrest.Matcher; import org.junit.Test; - import redis.clients.jedis.BinaryJedis; import redis.clients.jedis.exceptions.JedisDataException; import redis.clients.util.SafeEncoder; @@ -11,9 +10,7 @@ import redis.clients.util.SafeEncoder; import java.util.ArrayList; import java.util.List; -import static org.hamcrest.CoreMatchers.both; import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.hasItem; public class ScriptingCommandsTest extends JedisCommandTestBase { @@ -204,7 +201,7 @@ public class ScriptingCommandsTest extends JedisCommandTestBase { assertEquals("2", results.get(3)); } - private CombinableMatcher> listWithItem(T expected) { - return both(CoreMatchers.>instanceOf(List.class)).and(hasItem(equalTo(expected))); + private Matcher> listWithItem(T expected) { + return CoreMatchers.hasItem(equalTo(expected)); } }