Repository: fppt/jedis-mock
Pull request #79 (2020-01-12 21:50:27)

migrate JUnit4 to JUnit5
Migrate the tests from JUnit4 to JUnit5.

* More modern test framework

* More informative test reports:
![изображение](https://user-images.githubusercontent.com/20153286/72226128-a0606c00-359e-11ea-8506-4e7530fe31ed.png)



Patch:
diff --git a/pom.xml b/pom.xml
index 2cadb59..92629c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,7 +38,7 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <guava.version>19.0</guava.version>
-        <junit.version>4.12</junit.version>
+        <junit.version>5.5.2</junit.version>
         <redis.version>2.9.0</redis.version>
         <redis-embedded.version>0.6</redis-embedded.version>
         <findbugs.version>3.0.1</findbugs.version>
@@ -64,8 +64,8 @@
             <version>${guava.version}</version>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <version>${junit.version}</version>
             <scope>test</scope>
         </dependency>
@@ -138,7 +138,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <version>2.15</version>
+                <version>2.22.2</version>
                 <configuration>
                     <useFile>true</useFile>
                     <redirectTestOutputToFile>true</redirectTestOutputToFile>


Test patch:
diff --git a/src/test/java/com/github/fppt/jedismock/TestCommandParser.java b/src/test/java/com/github/fppt/jedismock/TestCommandParser.java
index 1cbd1cd..7e1f449 100644
--- a/src/test/java/com/github/fppt/jedismock/TestCommandParser.java
+++ b/src/test/java/com/github/fppt/jedismock/TestCommandParser.java
@@ -5,13 +5,14 @@ import com.github.fppt.jedismock.commands.RedisCommandParser;
 import com.github.fppt.jedismock.exception.EOFException;
 import com.github.fppt.jedismock.exception.ParseErrorException;
 import com.github.fppt.jedismock.server.SliceParser;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.fail;
 
 /**
  * Created by Xiaolu on 2015/4/20.
diff --git a/src/test/java/com/github/fppt/jedismock/TestJedisConnect.java b/src/test/java/com/github/fppt/jedismock/TestJedisConnect.java
index d6547d3..1af55c8 100644
--- a/src/test/java/com/github/fppt/jedismock/TestJedisConnect.java
+++ b/src/test/java/com/github/fppt/jedismock/TestJedisConnect.java
@@ -1,14 +1,14 @@
 package com.github.fppt.jedismock;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import redis.clients.jedis.Jedis;
 import redis.clients.jedis.Pipeline;
 
 import java.io.IOException;
 import java.util.List;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 /**
  * Created by Xiaolu on 2015/4/21.
diff --git a/src/test/java/com/github/fppt/jedismock/TestRedisOperationExecutor.java b/src/test/java/com/github/fppt/jedismock/TestRedisOperationExecutor.java
index 0da1f61..0bde873 100644
--- a/src/test/java/com/github/fppt/jedismock/TestRedisOperationExecutor.java
+++ b/src/test/java/com/github/fppt/jedismock/TestRedisOperationExecutor.java
@@ -1,21 +1,20 @@
 package com.github.fppt.jedismock;
 
 import com.github.fppt.jedismock.commands.RedisCommandParser;
-import com.github.fppt.jedismock.server.RedisOperationExecutor;
-import com.github.fppt.jedismock.exception.EOFException;
 import com.github.fppt.jedismock.exception.ParseErrorException;
+import com.github.fppt.jedismock.server.RedisOperationExecutor;
 import com.github.fppt.jedismock.server.Response;
 import com.github.fppt.jedismock.server.Slice;
 import com.github.fppt.jedismock.storage.OperationExecutorState;
 import com.github.fppt.jedismock.storage.RedisBase;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import java.util.HashMap;
 import java.util.Map;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * Created by Xiaolu on 2015/4/20.
@@ -46,35 +45,35 @@ public class TestRedisOperationExecutor {
         return "*1" + CRLF + "$-1" + CRLF;
     }
 
-    private void assertCommandEquals(String expect, String command) throws ParseErrorException, EOFException {
+    private void assertCommandEquals(String expect, String command) throws ParseErrorException {
         assertEquals(bulkString(expect), executor.execCommand(RedisCommandParser.parse(command)).toString());
     }
 
-    private void assertCommandEquals(long expect, String command) throws ParseErrorException, EOFException {
+    private void assertCommandEquals(long expect, String command) throws ParseErrorException {
         assertEquals(Response.integer(expect), executor.execCommand(RedisCommandParser.parse(command)));
     }
 
-    private void assertCommandEquals(double expect, String command) throws ParseErrorException, EOFException {
+    private void assertCommandEquals(double expect, String command) throws ParseErrorException {
         assertEquals(Response.doubleValue(expect), executor.execCommand(RedisCommandParser.parse(command)));
     }
 
-    private void assertCommandArrayEquals(String expectedArray, String command) throws ParseErrorException, EOFException {
+    private void assertCommandArrayEquals(String expectedArray, String command) throws ParseErrorException {
         assertEquals(expectedArray, executor.execCommand(RedisCommandParser.parse(command)).toString());
     }
 
-    private void assertCommandNull(String command) throws ParseErrorException, EOFException {
+    private void assertCommandNull(String command) throws ParseErrorException {
         assertEquals(Response.NULL, executor.execCommand(RedisCommandParser.parse(command)));
     }
 
-    private void assertCommandOK(String command) throws ParseErrorException, EOFException {
+    private void assertCommandOK(String command) throws ParseErrorException {
         assertEquals(Response.OK, executor.execCommand(RedisCommandParser.parse(command)));
     }
 
-    private void assertCommandError(String command) throws ParseErrorException, EOFException {
+    private void assertCommandError(String command) throws ParseErrorException {
         assertEquals('-', executor.execCommand(RedisCommandParser.parse(command)).data()[0]);
     }
 
-    @Before
+    @BeforeEach
     public void initCommandExecutor() {
         //TODO: Mock out the client here
         Map<Integer, RedisBase> redisBases = new HashMap<>();
@@ -84,7 +83,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testSetAndGet() throws ParseErrorException, EOFException {
+    public void testSetAndGet() throws ParseErrorException {
         assertCommandNull(array("GET", "ab"));
         assertCommandOK(array("SET", "ab", "abc"));
         assertCommandEquals("abc", array("GET", "ab"));
@@ -94,12 +93,12 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testUnknownCommand() throws ParseErrorException, EOFException {
+    public void testUnknownCommand() throws ParseErrorException {
         assertCommandError(array("unknown"));
     }
 
     @Test
-    public void testExpire() throws ParseErrorException, InterruptedException, EOFException {
+    public void testExpire() throws ParseErrorException, InterruptedException {
         assertCommandEquals(0, array("expire", "ab", "1"));
         assertCommandOK(array("SET", "ab", "abd"));
         assertCommandEquals(1, array("expire", "ab", "1"));
@@ -110,7 +109,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testTTL() throws ParseErrorException, InterruptedException, EOFException {
+    public void testTTL() throws ParseErrorException, InterruptedException {
         assertCommandEquals(-2, array("ttl", "ab"));
         assertCommandOK(array("SET", "ab", "abd"));
         assertCommandEquals(-1, array("ttl", "ab"));
@@ -123,7 +122,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testPTTL() throws ParseErrorException, InterruptedException, EOFException {
+    public void testPTTL() throws ParseErrorException, InterruptedException {
         assertCommandEquals(-2, array("pttl", "ab"));
         assertCommandOK(array("SET", "ab", "abd"));
         assertCommandEquals(-1, array("pttl", "ab"));
@@ -136,7 +135,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testIncr() throws ParseErrorException, EOFException {
+    public void testIncr() throws ParseErrorException {
         assertCommandEquals(1, array("incr", "a"));
         assertCommandEquals(2, array("incr", "a"));
         assertCommandOK(array("set", "a", "b"));
@@ -144,7 +143,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testIncrBy() throws ParseErrorException, EOFException {
+    public void testIncrBy() throws ParseErrorException {
         assertCommandEquals(5, array("incrby", "a", "5"));
         assertCommandEquals(11, array("incrby", "a", "6"));
         assertCommandOK(array("set", "a", "b"));
@@ -154,7 +153,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testIncrByFloat() throws ParseErrorException, EOFException {
+    public void testIncrByFloat() throws ParseErrorException {
         assertCommandEquals(5.0, array("incrbyfloat", "a", "5"));
         assertCommandEquals(11.01, array("incrbyfloat", "a", "6.01"));
         assertCommandEquals(9.51, array("incrbyfloat", "a", "-1.5"));
@@ -163,7 +162,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testDecr() throws ParseErrorException, EOFException {
+    public void testDecr() throws ParseErrorException {
         assertCommandEquals(-1, array("decr", "a"));
         assertCommandEquals(-2, array("decr", "a"));
         assertCommandOK(array("set", "a", "b"));
@@ -171,7 +170,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testDecrBy() throws ParseErrorException, EOFException {
+    public void testDecrBy() throws ParseErrorException {
         assertCommandEquals(-5, array("decrby", "a", "5"));
         assertCommandEquals(-11, array("decrby", "a", "6"));
         assertCommandOK(array("set", "a", "b"));
@@ -179,7 +178,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testHll() throws ParseErrorException, EOFException {
+    public void testHll() throws ParseErrorException {
         assertCommandEquals(1, array("pfadd", "a", "b", "c"));
         assertCommandEquals(0, array("pfadd", "a", "b", "c"));
         assertCommandEquals(2, array("pfcount", "a"));
@@ -198,14 +197,14 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testAppend() throws ParseErrorException, EOFException {
+    public void testAppend() throws ParseErrorException {
         assertCommandEquals(3, array("append", "ab", "abc"));
         assertCommandEquals(6, array("append", "ab", "abc"));
         assertCommandEquals("abcabc", array("GET", "ab"));
     }
 
     @Test
-    public void testSetAndGetBit() throws ParseErrorException, EOFException {
+    public void testSetAndGetBit() throws ParseErrorException {
         assertCommandEquals(0, array("getbit", "mykey", "7"));
         assertCommandEquals(0, array("setbit", "mykey", "7", "1"));
         assertCommandEquals(1, array("getbit", "mykey", "7"));
@@ -227,14 +226,14 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testSetex() throws ParseErrorException, EOFException {
+    public void testSetex() throws ParseErrorException {
         assertCommandOK(array("SETex", "ab", "100", "k"));
         assertCommandEquals(100, array("ttl", "ab"));
         assertCommandError(array("SETex", "ab", "10a", "k"));
     }
 
     @Test
-    public void testPsetex() throws ParseErrorException, EOFException {
+    public void testPsetex() throws ParseErrorException {
         assertCommandOK(array("pSETex", "ab", "99", "k"));
         assertTrue(executor.execCommand(RedisCommandParser.parse(array("pttl", "ab"))).compareTo(Response.integer(90)) > 0);
         assertTrue(executor.execCommand(RedisCommandParser.parse(array("pttl", "ab"))).compareTo(Response.integer(99)) <= 0);
@@ -242,7 +241,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testSetnx() throws ParseErrorException, EOFException {
+    public void testSetnx() throws ParseErrorException {
         assertCommandEquals(1, array("setnx", "k", "vvv"));
         assertCommandEquals("vvv", array("get", "k"));
         assertCommandEquals(0, array("setnx", "k", "ggg"));
@@ -250,7 +249,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testMset() throws ParseErrorException, EOFException {
+    public void testMset() throws ParseErrorException {
         assertCommandOK(array("mset", "k1", "a", "k2", "b"));
         assertCommandEquals("a", array("GET", "k1"));
         assertCommandEquals("b", array("GET", "k2"));
@@ -258,7 +257,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testMget() throws ParseErrorException, EOFException {
+    public void testMget() throws ParseErrorException {
         assertCommandOK(array("SET", "a", "abc"));
         assertCommandOK(array("SET", "b", "abd"));
 
@@ -267,34 +266,34 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testGetset() throws ParseErrorException, EOFException {
+    public void testGetset() throws ParseErrorException {
         assertCommandNull(array("getSET", "a", "abc"));
         assertCommandEquals("abc", array("getSET", "a", "abd"));
     }
 
     @Test
-    public void testHmsetAndHmget() throws EOFException {
+    public void testHmsetAndHmget() {
         assertCommandOK(array("hmset", "h", "a", "v1", "b", "v2"));
         assertCommandArrayEquals(array("v1"), array("hmget", "h", "a"));
         assertCommandArrayEquals(array("v2"), array("hmget", "h", "b"));
     }
 
     @Test
-    public void testDelHash() throws EOFException {
+    public void testDelHash() {
         assertCommandOK(array("hmset","h", "a", "v1", "b", "v2"));
         assertCommandEquals(1, array("del", "h"));
         assertCommandArrayEquals(nullArray(), array("hmget", "h", "a"));
     }
 
     @Test
-    public void testStrlen() throws ParseErrorException, EOFException {
+    public void testStrlen() throws ParseErrorException {
         assertCommandEquals(0, array("strlen", "a"));
         assertCommandOK(array("SET", "a", "abd"));
         assertCommandEquals(3, array("strlen", "a"));
     }
 
     @Test
-    public void testDel() throws ParseErrorException, EOFException {
+    public void testDel() throws ParseErrorException {
         assertCommandOK(array("set", "a", "v"));
         assertCommandOK(array("set", "b", "v"));
         assertCommandEquals(2, array("del", "a", "b", "c"));
@@ -303,14 +302,14 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testExists() throws ParseErrorException, EOFException {
+    public void testExists() throws ParseErrorException {
         assertCommandOK(array("set", "a", "v"));
         assertCommandEquals(1, array("exists", "a"));
         assertCommandEquals(0, array("exists", "b"));
     }
 
     @Test
-    public void testExpireAt() throws ParseErrorException, EOFException {
+    public void testExpireAt() throws ParseErrorException {
         assertCommandOK(array("set", "a", "v"));
         assertCommandEquals(1, array("expireat", "a", "1293840000"));
         assertCommandEquals(0, array("exists", "a"));
@@ -322,7 +321,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testPexpireAt() throws ParseErrorException, EOFException {
+    public void testPexpireAt() throws ParseErrorException {
         assertCommandOK(array("set", "a", "v"));
         assertCommandEquals(1, array("pexpireat", "a", "1293840000000"));
         assertCommandEquals(0, array("exists", "a"));
@@ -335,14 +334,14 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testPexpire() throws ParseErrorException, EOFException {
+    public void testPexpire() throws ParseErrorException {
         assertCommandOK(array("set", "a", "v"));
         assertCommandEquals(1, array("pexpire", "a", "1500000"));
         assertCommandEquals(1500, array("ttl", "a"));
     }
 
     @Test
-    public void testLpush() throws ParseErrorException, EOFException {
+    public void testLpush() throws ParseErrorException {
         assertCommandEquals(1, array("lpush", "mylist", "!"));
         assertCommandEquals(3, array("lpush", "mylist", "world", "hello"));
         assertEquals(array("hello", "world", "!"),
@@ -352,7 +351,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testLrange() throws ParseErrorException, EOFException {
+    public void testLrange() throws ParseErrorException {
         assertEquals(array(),
                 executor.execCommand(RedisCommandParser.parse(array("lrange", "mylist", "0", "-1"))).toString());
         assertCommandEquals(3, array("lpush", "mylist", "1", "2", "3"));
@@ -370,7 +369,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testLlen() throws ParseErrorException, EOFException {
+    public void testLlen() throws ParseErrorException {
         assertCommandEquals(0, array("llen", "a"));
         assertCommandEquals(3, array("lpush", "mylist", "3", "2", "1"));
         assertCommandEquals(3, array("llen", "mylist"));
@@ -379,7 +378,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testLpushx() throws ParseErrorException, EOFException {
+    public void testLpushx() throws ParseErrorException {
         assertCommandEquals(1, array("lpush", "a", "1"));
         assertCommandEquals(2, array("lpushx", "a", "2"));
         assertEquals(array("2", "1"),
@@ -390,7 +389,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testLpop() throws ParseErrorException, EOFException {
+    public void testLpop() throws ParseErrorException {
         assertCommandEquals(2, array("lpush", "list", "2", "1"));
         assertCommandEquals("1", array("lpop", "list"));
         assertCommandEquals("2", array("lpop", "list"));
@@ -401,7 +400,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testLindex() throws ParseErrorException, EOFException {
+    public void testLindex() throws ParseErrorException {
         assertCommandEquals(2, array("lpush", "list", "1", "2"));
         assertCommandEquals("2", array("lindex", "list", "0"));
         assertCommandEquals("1", array("lindex", "list", "-1"));
@@ -414,7 +413,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testRpush() throws ParseErrorException, EOFException {
+    public void testRpush() throws ParseErrorException {
         assertCommandEquals(1, array("rpush", "mylist", "!"));
         assertCommandEquals(3, array("rpush", "mylist", "world", "hello"));
         assertEquals(array("!", "world", "hello"),
@@ -424,7 +423,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testRename() throws EOFException {
+    public void testRename() {
         assertCommandError(array("rename", "old", "new"));
         assertCommandNull(array("get", "new"));
         assertCommandOK(array("set", "old", "abc"));
@@ -434,7 +433,7 @@ public class TestRedisOperationExecutor {
     }
 
     @Test
-    public void testRenameHash() throws EOFException {
+    public void testRenameHash() {
         assertCommandEquals(1, array("hset", "old", "a", "1"));
         assertCommandOK(array("rename", "old", "new"));
         assertCommandEquals("1", array("hget", "new", "a"));
diff --git a/src/test/java/com/github/fppt/jedismock/TestRedisServer.java b/src/test/java/com/github/fppt/jedismock/TestRedisServer.java
index 846817f..1c32421 100644
--- a/src/test/java/com/github/fppt/jedismock/TestRedisServer.java
+++ b/src/test/java/com/github/fppt/jedismock/TestRedisServer.java
@@ -1,14 +1,14 @@
 package com.github.fppt.jedismock;
 
 import com.github.fppt.jedismock.server.ServiceOptions;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import redis.clients.jedis.Jedis;
 import redis.clients.jedis.exceptions.JedisConnectionException;
 
 import java.io.IOException;
 import java.net.BindException;
 
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
 
 /**
  * Created by Xiaolu on 2015/4/18.
diff --git a/src/test/java/com/github/fppt/jedismock/TestUtils.java b/src/test/java/com/github/fppt/jedismock/TestUtils.java
index b41bc66..014941e 100644
--- a/src/test/java/com/github/fppt/jedismock/TestUtils.java
+++ b/src/test/java/com/github/fppt/jedismock/TestUtils.java
@@ -1,23 +1,18 @@
 package com.github.fppt.jedismock;
 
 import com.github.fppt.jedismock.server.Slice;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
+import org.junit.jupiter.api.Test;
 
 import java.io.IOException;
 import java.io.InputStream;
 
-import static org.junit.Assert.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
 
 /**
  * Created by Xiaolu on 2015/4/20.
  */
 public class TestUtils {
 
-    @Rule
-    public final ExpectedException exception = ExpectedException.none();
-
     @Test
     public void testCloseQuietly() {
         Utils.closeQuietly(null);
diff --git a/src/test/java/com/github/fppt/jedismock/comparisontests/AdvanceOperationsTest.java b/src/test/java/com/github/fppt/jedismock/comparisontests/AdvanceOperationsTest.java
index b958f5f..a8afea6 100644
--- a/src/test/java/com/github/fppt/jedismock/comparisontests/AdvanceOperationsTest.java
+++ b/src/test/java/com/github/fppt/jedismock/comparisontests/AdvanceOperationsTest.java
@@ -2,10 +2,9 @@ package com.github.fppt.jedismock.comparisontests;
 
 
 import com.github.fppt.jedismock.util.MockSubscriber;
-import org.junit.Ignore;
-import org.junit.experimental.theories.Theories;
-import org.junit.experimental.theories.Theory;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.TestTemplate;
+import org.junit.jupiter.api.extension.ExtendWith;
 import redis.clients.jedis.Client;
 import redis.clients.jedis.Jedis;
 import redis.clients.jedis.JedisPubSub;
@@ -18,12 +17,12 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
 
-@RunWith(Theories.class)
-public class AdvanceOperationsTest extends ComparisonBase {
+@ExtendWith(ComparisonBase.class)
+public class AdvanceOperationsTest {
 
-    @Theory
+    @TestTemplate
     public void whenTransactionWithMultiplePushesIsExecuted_EnsureResultsAreSaved(Jedis jedis) {
         String key = "my-list";
         assertEquals(new Long(0), jedis.llen(key));
@@ -37,21 +36,19 @@ public class AdvanceOperationsTest extends ComparisonBase {
         assertEquals(new Long(3), jedis.llen(key));
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingTransactionAndTryingToAccessJedis_Throw(Jedis jedis) {
         //Do Something random with Jedis
         assertNull(jedis.get("oobity-oobity-boo"));
 
         //Start transaction
-        Transaction transaction = jedis.multi();
-
-        expectedException.expect(JedisDataException.class);
-        expectedException.expectMessage("Cannot use Jedis when in Multi. Please use Transation or reset jedis state.");
-
-        jedis.get("oobity-oobity-boo");
+        jedis.multi();
+        assertEquals("Cannot use Jedis when in Multi. Please use Transation or reset jedis state.",
+                assertThrows(JedisDataException.class, () ->
+                        jedis.get("oobity-oobity-boo")).getMessage());
     }
 
-    @Theory
+    @TestTemplate
     public void whenSubscribingToAChannel_EnsurePublishedMessagesAreReceived(Jedis jedis) throws InterruptedException {
         String channel = "normalbob";
         String message = "SUPERBOB";
@@ -81,7 +78,7 @@ public class AdvanceOperationsTest extends ComparisonBase {
         subsciberThread.shutdownNow();
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingBrpoplpush_EnsureItBlocksAndCorrectResultsAreReturned(Jedis jedis) throws ExecutionException, InterruptedException {
         String list1key = "source list";
         String list2key = "target list";
@@ -111,7 +108,7 @@ public class AdvanceOperationsTest extends ComparisonBase {
         assertEquals(4, results.size());
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingBrpoplpushAndReachingTimeout_Return(Jedis jedis) {
         String list1key = "another source list";
         String list2key = "another target list";
@@ -121,7 +118,7 @@ public class AdvanceOperationsTest extends ComparisonBase {
         assertNull(result);
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingBrpoplpush_EnsureClientCanStillGetOtherResponsesInTimelyManner(Jedis jedis) {
         String list1key = "another another source list";
         String list2key = "another another target list";
@@ -149,9 +146,9 @@ public class AdvanceOperationsTest extends ComparisonBase {
         assertEquals("v5", jedis.get("k5"));
     }
 
-    @Ignore("This test fails with the embedded redis sometimes so I am at a loss")
-    @Theory
-    public void whenSubscribingToAChannelAndThenUnsubscribing_EnsureAllChannelsAreUbSubScribed(Jedis jedis) throws InterruptedException, ExecutionException {
+    @Disabled("This test fails with the embedded redis sometimes so I am at a loss")
+    @TestTemplate
+    public void whenSubscribingToAChannelAndThenUnsubscribing_EnsureAllChannelsAreUbSubScribed(Jedis jedis) throws InterruptedException {
         String channel1 = "normaltim1";
         String channel2 = "normaltim2";
         //String channel3 = "normaltim3";
@@ -195,7 +192,7 @@ public class AdvanceOperationsTest extends ComparisonBase {
         }, channel);
     }
 
-    @Theory
+    @TestTemplate
     public void whenChangingBetweenRedisDBS_EnsureChangesAreMutuallyExclusive(Jedis jedis) {
         String key1 = "k1";
         String key2 = "k2";
@@ -227,7 +224,7 @@ public class AdvanceOperationsTest extends ComparisonBase {
     }
 
 
-    @Theory
+    @TestTemplate
     public void whenUsingBlpop_EnsureItBlocksAndCorrectResultsAreReturned(Jedis jedis) throws ExecutionException, InterruptedException {
         String key = "list1_kfubdjkfnv";
         jedis.rpush(key, "d", "e", "f");
@@ -248,7 +245,7 @@ public class AdvanceOperationsTest extends ComparisonBase {
     }
 
 
-    @Theory
+    @TestTemplate
     public void whenUsingBlpop_EnsureItBlocksAndCorrectResultsAreReturnedOnMultipleList(Jedis jedis) throws ExecutionException, InterruptedException {
         String list1key = "list1_dkjfnvdk";
         String list2key = "list2_kjvnddkf";
@@ -276,7 +273,7 @@ public class AdvanceOperationsTest extends ComparisonBase {
         assertEquals(3, results.size());
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingBlpop_EnsureItTimeout(Jedis jedis) throws ExecutionException, InterruptedException {
         String list1key = "list1_kdjfnvdsu";
         String list2key = "list2_mbhkdushy";
diff --git a/src/test/java/com/github/fppt/jedismock/comparisontests/ComparisonBase.java b/src/test/java/com/github/fppt/jedismock/comparisontests/ComparisonBase.java
index e494d7b..8c1359f 100644
--- a/src/test/java/com/github/fppt/jedismock/comparisontests/ComparisonBase.java
+++ b/src/test/java/com/github/fppt/jedismock/comparisontests/ComparisonBase.java
@@ -2,23 +2,19 @@ package com.github.fppt.jedismock.comparisontests;
 
 import com.github.fppt.jedismock.RedisServer;
 import com.github.fppt.jedismock.util.EmbeddedRedis;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.experimental.theories.DataPoints;
-import org.junit.rules.ExpectedException;
+import org.junit.jupiter.api.extension.*;
 import redis.clients.jedis.Jedis;
 
-import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Stream;
 
-public class ComparisonBase {
+public class ComparisonBase implements TestTemplateInvocationContextProvider,
+        BeforeAllCallback, AfterAllCallback {
     private static RedisServer fakeServer;
 
-    @Rule
-    public final ExpectedException expectedException = ExpectedException.none();
-
-    @BeforeClass
-    public static void startupRedisServers() throws IOException {
+    @Override
+    public void beforeAll(ExtensionContext context) throws Exception {
         //Start up the real redis server
         EmbeddedRedis.start();
 
@@ -27,8 +23,8 @@ public class ComparisonBase {
         fakeServer.start();
     }
 
-    @AfterClass
-    public static void takeDownRedisServers(){
+    @Override
+    public void afterAll(ExtensionContext context) throws Exception {
         //Kill the real redis server
         EmbeddedRedis.stop();
 
@@ -36,16 +32,50 @@ public class ComparisonBase {
         fakeServer.stop();
     }
 
-    @DataPoints
-    public static Jedis[] jedis(){
-        Jedis[] jedis = new Jedis[2];
 
-        //Create real jedis connection
-        jedis[0] = new Jedis("localhost", EmbeddedRedis.PORT);
+    @Override
+    public boolean supportsTestTemplate(ExtensionContext context) {
+        return true;
+    }
+
+    @Override
+    public Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContexts(ExtensionContext context) {
+        return Stream.of(
+                new JedisTestTemplateInvocationContext("mock",
+                        new Jedis(fakeServer.getHost(), fakeServer.getBindPort(), 1000000)),
+                new JedisTestTemplateInvocationContext("real",
+                        new Jedis("localhost", EmbeddedRedis.PORT)));
+    }
+
+    private class JedisTestTemplateInvocationContext implements TestTemplateInvocationContext{
 
-        //Create mocked jedis connection
-        jedis[1] = new Jedis(fakeServer.getHost(), fakeServer.getBindPort(), 1000000);
+        private final String displayName;
+        private final Jedis jedis;
 
-        return jedis;
+        private JedisTestTemplateInvocationContext(String displayName, Jedis jedis) {
+            this.displayName = displayName;
+            this.jedis = jedis;
+        }
+
+        @Override
+        public String getDisplayName(int invocationIndex) {
+            return displayName;
+        }
+
+        @Override
+        public List<Extension> getAdditionalExtensions() {
+            return Collections.singletonList(new ParameterResolver() {
+                @Override
+                public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException {
+                    return parameterContext.getParameter().getType() == Jedis.class;
+                }
+
+                @Override
+                public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException {
+                    return jedis;
+                }
+            });
+        }
     }
+
 }
diff --git a/src/test/java/com/github/fppt/jedismock/comparisontests/SimpleOperationsTest.java b/src/test/java/com/github/fppt/jedismock/comparisontests/SimpleOperationsTest.java
index 98baaff..bf90798 100644
--- a/src/test/java/com/github/fppt/jedismock/comparisontests/SimpleOperationsTest.java
+++ b/src/test/java/com/github/fppt/jedismock/comparisontests/SimpleOperationsTest.java
@@ -1,8 +1,7 @@
 package com.github.fppt.jedismock.comparisontests;
 
-import org.junit.experimental.theories.Theories;
-import org.junit.experimental.theories.Theory;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.TestTemplate;
+import org.junit.jupiter.api.extension.ExtendWith;
 import redis.clients.jedis.*;
 import redis.clients.jedis.exceptions.JedisConnectionException;
 import redis.clients.jedis.exceptions.JedisDataException;
@@ -13,11 +12,10 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.*;
+import static org.junit.jupiter.api.Assertions.*;
 
-@RunWith(Theories.class)
-public class SimpleOperationsTest extends ComparisonBase {
+@ExtendWith(ComparisonBase.class)
+public class SimpleOperationsTest {
 
     private String HASH = "hash";
     private String FIELD_1 = "field1";
@@ -29,7 +27,7 @@ public class SimpleOperationsTest extends ComparisonBase {
     private String FIELD_4 = "field4";
     private String FIELD_5 = "field5";
 
-    @Theory
+    @TestTemplate
     public void whenSettingKeyAndRetrievingIt_CorrectResultIsReturned(Jedis jedis) {
         String key = "key";
         String value = "value";
@@ -39,14 +37,14 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(value, jedis.get(key));
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingRpop_EnsureTheLastElementPushedIsReturned(Jedis jedis) {
         String key = "Another key";
         jedis.rpush(key, "1", "2", "3");
         assertEquals(jedis.rpop(key), "3");
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingRpoplpush_CorrectResultsAreReturned(Jedis jedis) {
         String list1key = "list 1";
         String list2key = "list 2";
@@ -86,7 +84,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(results2.contains("c"));
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingFlushall_EnsureEverythingIsDeleted(Jedis jedis) {
         String key = "my-super-special-key";
         String value = "my-not-so-special-value";
@@ -98,7 +96,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertNull(jedis.get(key));
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingFlushdb_EnsureEverythingIsDeleted(Jedis jedis) {
         String key = "my-super-special-key";
         String value = "my-not-so-special-value";
@@ -110,7 +108,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertNull(jedis.get(key));
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingLrem_EnsureDeletionsWorkAsExpected(Jedis jedis) {
         String key = "my-super-special-sexy-key";
         String hello = "hello";
@@ -137,7 +135,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(foo, list.get(1));
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingQuit_EnsureTheConnectionIsClosed(Jedis jedis) {
         //Create a new connection
         Client client = jedis.getClient();
@@ -145,12 +143,11 @@ public class SimpleOperationsTest extends ComparisonBase {
         newJedis.set("A happy lucky key", "A sad value");
         assertEquals("OK", newJedis.quit());
 
-        expectedException.expect(JedisConnectionException.class);
-
-        newJedis.set("A happy lucky key", "A sad value 2");
+        assertThrows(JedisConnectionException.class,
+            ()->newJedis.set("A happy lucky key", "A sad value 2"));
     }
 
-    @Theory
+    @TestTemplate
     public void whenConcurrentlyIncrementingAndDecrementingCount_EnsureFinalCountIsCorrect(
             Jedis jedis) throws ExecutionException, InterruptedException {
         String key = "my-count-tracker";
@@ -178,12 +175,12 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(25, Integer.parseInt(jedis.get(key)));
     }
 
-    @Theory
+    @TestTemplate
     public void whenPinging_Pong(Jedis jedis) {
         assertEquals("PONG", jedis.ping());
     }
 
-    @Theory
+    @TestTemplate
     public void whenGettingKeys_EnsureCorrectKeysAreReturned(Jedis jedis) {
         jedis.flushAll();
         jedis.mset("one", "1", "two", "2", "three", "3", "four", "4");
@@ -205,7 +202,7 @@ public class SimpleOperationsTest extends ComparisonBase {
                 "four"));
     }
 
-    @Theory
+    @TestTemplate
     public void whenAddingToASet_EnsureTheSetIsUpdated(Jedis jedis) {
         String key = "my-set-key";
         Set<String> mySet = new HashSet<>(Arrays.asList("a", "b", "c", "d"));
@@ -217,14 +214,14 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(mySet, jedis.smembers(key));
     }
 
-    @Theory
+    @TestTemplate
     public void whenDuplicateValuesAddedToSet_ReturnsAddedValuesCountOnly(Jedis jedis) {
         String key = "my-set-key-sadd";
         assertEquals(3, jedis.sadd(key, "A", "B", "C", "B").intValue());
         assertEquals(1, jedis.sadd(key, "A", "C", "E", "B").intValue());
     }
 
-    @Theory
+    @TestTemplate
     public void whenIncrementingSet_ensureValuesAreCorrect(Jedis jedis) {
         String key = "my-set-key-hincr";
         jedis.hset(key, "E", "3.14e1");
@@ -258,7 +255,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(31.41, jedis.hincrByFloat(key, "E", 0.01), 0.00001);
     }
 
-    @Theory
+    @TestTemplate
     public void whenAddingToASet_ensureCountIsUpdated(Jedis jedis) {
         String key = "my-counted-set-key";
         Set<String> mySet = new HashSet<>(Arrays.asList("d", "e", "f"));
@@ -270,13 +267,13 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(mySet.size(), jedis.scard(key).intValue());
     }
 
-    @Theory
+    @TestTemplate
     public void whenCalledForNonExistentSet_ensureScardReturnsZero(Jedis jedis) {
         String key = "non-existent";
         assertEquals(0, jedis.scard(key).intValue());
     }
 
-    @Theory
+    @TestTemplate
     public void whenRemovingFromASet_EnsureTheSetIsUpdated(Jedis jedis) {
         String key = "my-set-key";
         Set<String> mySet = new HashSet<>(Arrays.asList("a", "b", "c", "d"));
@@ -295,7 +292,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(2, removed);
     }
 
-    @Theory
+    @TestTemplate
     public void whenPoppingFromASet_EnsureTheSetIsUpdated(Jedis jedis) {
 
         String key = "my-set-key-spop";
@@ -308,12 +305,12 @@ public class SimpleOperationsTest extends ComparisonBase {
         do {
             poppedValue = jedis.spop(key);
             if (poppedValue != null) {
-                assertTrue("Popped value not in set", mySet.contains(poppedValue));
+                assertTrue(mySet.contains(poppedValue), "Popped value not in set");
             }
         } while (poppedValue != null);
     }
 
-    @Theory
+    @TestTemplate
     public void ensureSismemberReturnsCorrectValues(Jedis jedis){
         String key = "my-set-key-sismember";
         jedis.sadd(key, "A", "B");
@@ -322,13 +319,13 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertFalse(jedis.sismember(key + "-nonexistent", "A"));
     }
 
-    @Theory
+    @TestTemplate
     public void whenHSettingOnTheSameKeys_EnsureReturnTypeIs1WhenKeysAreNew(Jedis jedis) {
         assertEquals(new Long(1L), jedis.hset(HASH, FIELD_1, VALUE_1));
         assertEquals(new Long(0L), jedis.hset(HASH, FIELD_1, VALUE_1));
     }
 
-    @Theory
+    @TestTemplate
     public void whenHSettingAndHGetting_EnsureValuesAreSetAndRetreived(Jedis jedis) {
         String field = "my-field";
         String hash = "my-hash";
@@ -339,7 +336,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(value, jedis.hget(hash, field));
     }
 
-    @Theory
+    @TestTemplate
     public void whenHSettingAndHGetting_EnsureValuesAreSetAndExist(Jedis jedis) {
         String field = "my-field";
         String hash = "my-hash";
@@ -350,7 +347,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(jedis.hexists(hash, field));
     }
 
-    @Theory
+    @TestTemplate
     public void whenHDeleting_EnsureValuesAreRemoved(Jedis jedis) {
         String field = "my-field-2";
         String hash = "my-hash-2";
@@ -363,7 +360,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertNull(jedis.hget(hash, field));
     }
 
-    @Theory
+    @TestTemplate
     public void whenHGetAll_EnsureAllKeysAndValuesReturned(Jedis jedis) {
         jedis.hset(HASH, FIELD_1, VALUE_1);
         jedis.hset(HASH, FIELD_2, VALUE_2);
@@ -388,7 +385,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(0, result.size());
     }
 
-    @Theory
+    @TestTemplate
     public void whenHKeys_EnsureAllKeysReturned(Jedis jedis) {
         jedis.hset(HASH, FIELD_1, VALUE_1);
         jedis.hset(HASH, FIELD_2, VALUE_2);
@@ -407,7 +404,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(result, toCompare);
     }
 
-    @Theory
+    @TestTemplate
     public void whenHVals_EnsureAllValuesReturned(Jedis jedis) {
         String key = "my-hvals-key";
         jedis.hset(key, FIELD_1, VALUE_1);
@@ -426,7 +423,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(result, toCompare);
     }
 
-    @Theory
+    @TestTemplate
     public void whenHLen_EnsureCorrectLengthReturned(Jedis jedis) {
         jedis.flushDB();
 
@@ -438,7 +435,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(2, result);
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingHsinter_EnsureSetIntersectionIsReturned(Jedis jedis) {
         String key1 = "my-set-key-1";
         Set<String> mySet1 = new HashSet<>(Arrays.asList("a", "b", "c", "d"));
@@ -462,7 +459,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(expectedIntersection2, intersection);
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingHMget_EnsureAllValuesReturnedForEachField(Jedis jedis) {
         jedis.hset(HASH, FIELD_1, VALUE_1);
         jedis.hset(HASH, FIELD_2, VALUE_2);
@@ -478,7 +475,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertNull(result.get(4));
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingHMset_EnsureAllValuesAreSetForEachField(Jedis jedis) {
         Map<String, String> map = new HashMap<>();
         map.put(FIELD_1, VALUE_1);
@@ -494,7 +491,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(VALUE_1, jedis.hget(HASH, FIELD_2));
     }
 
-    @Theory
+    @TestTemplate
     public void whenUsingHsetnx_EnsureValueIsOnlyPutIfOtherValueDoesNotExist(Jedis jedis) {
         assertNull(jedis.hget(HASH, FIELD_3));
         jedis.hsetnx(HASH, FIELD_3, VALUE_1);
@@ -503,12 +500,12 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(VALUE_1, jedis.hget(HASH, FIELD_3));
     }
 
-    @Theory
+    @TestTemplate
     public void whenGettingInfo_EnsureSomeDateIsReturned(Jedis jedis) {
         assertNotNull(jedis.info());
     }
 
-    @Theory
+    @TestTemplate
     public void whenCreatingKeys_existsValuesUpdated(Jedis jedis) {
         jedis.set("foo", "bar");
         assertTrue(jedis.exists("foo"));
@@ -519,7 +516,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(jedis.exists("bar"));
     }
 
-    @Theory
+    @TestTemplate
     public void deletionRemovesKeys(Jedis jedis) {
         String key1 = "hey_toremove";
         String key2 = "hmap_toremove";
@@ -533,7 +530,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertFalse(jedis.exists(key2));
     }
 
-    @Theory
+    @TestTemplate
     public void timeReturnsCurrentTime(Jedis jedis) {
         long currentTime = System.currentTimeMillis() / 1000;
         List<String> time = jedis.time();
@@ -543,7 +540,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         Long.parseLong(time.get(1));
     }
 
-    @Theory
+    @TestTemplate
     public void scanReturnsAllKey(Jedis jedis) {
 
         jedis.flushDB();
@@ -562,7 +559,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(result.getResult().contains(key2));
     }
 
-    @Theory
+    @TestTemplate
     public void scanReturnsMatchingKey(Jedis jedis) {
 
         jedis.flushDB();
@@ -581,7 +578,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(result.getResult().contains(key));
     }
 
-    @Theory
+    @TestTemplate
     public void scanIterates(Jedis jedis) {
 
         jedis.flushDB();
@@ -597,7 +594,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertNotEquals(ScanParams.SCAN_POINTER_START, result.getStringCursor());
     }
 
-    @Theory
+    @TestTemplate
     public void sscanReturnsAllValues(Jedis jedis) {
 
         jedis.flushDB();
@@ -616,7 +613,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(result.getResult().contains(values[1]));
     }
 
-    @Theory
+    @TestTemplate
     public void sscanReturnsPartialSet(Jedis jedis) {
 
         jedis.flushDB();
@@ -633,7 +630,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertNotEquals(ScanParams.SCAN_POINTER_START, result.getStringCursor());
     }
 
-    @Theory
+    @TestTemplate
     public void sscanReturnsMatchingSet(Jedis jedis) {
 
         jedis.flushDB();
@@ -654,7 +651,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(result.getResult().contains(values[0]));
     }
 
-    @Theory
+    @TestTemplate
     public void sscanIterates(Jedis jedis) {
 
         jedis.flushDB();
@@ -681,7 +678,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(results.containsAll(Arrays.asList(values)));
     }
 
-    @Theory
+    @TestTemplate
     public void zaddAddsKey(Jedis jedis) {
 
         jedis.flushDB();
@@ -700,7 +697,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(value, results.get(0));
     }
 
-    @Theory
+    @TestTemplate
     public void zaddAddsKeys(Jedis jedis) {
 
         jedis.flushDB();
@@ -721,7 +718,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals("myvalue2", results.get(1));
     }
 
-    @Theory
+    @TestTemplate
     public void zcardEmptyKey(Jedis jedis) {
         jedis.flushDB();
 
@@ -732,7 +729,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(0L, result);
     }
 
-    @Theory
+    @TestTemplate
     public void zcardReturnsCount(Jedis jedis) {
         jedis.flushDB();
 
@@ -748,7 +745,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(2L, result);
     }
 
-    @Theory
+    @TestTemplate
     public void zremRemovesKey(Jedis jedis) {
 
         jedis.flushDB();
@@ -778,7 +775,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals("myvalue2", results.get(0));
     }
 
-    @Theory
+    @TestTemplate
     public void zrangeKeysCorrectOrder(Jedis jedis) {
 
         jedis.flushDB();
@@ -803,7 +800,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals("myvalue4", results.get(3));
     }
 
-    @Theory
+    @TestTemplate
     public void zrangeIndexOutOfRange(Jedis jedis) {
 
         jedis.flushDB();
@@ -824,7 +821,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(0, results.size());
     }
 
-    @Theory
+    @TestTemplate
     public void zrangeWithScores(Jedis jedis) {
         jedis.flushDB();
 
@@ -852,7 +849,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(20d, results.get(3).getScore(), 0);
     }
 
-    @Theory
+    @TestTemplate
     public void zrangebylexKeysCorrectOrder(Jedis jedis) {
         jedis.flushDB();
 
@@ -882,7 +879,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals("ccc", results.get(1));
     }
 
-    @Theory
+    @TestTemplate
     public void incrDoesNotClearTtl(Jedis jedis) {
         jedis.flushDB();
 
@@ -896,7 +893,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(ttl > 0);
     }
 
-    @Theory
+    @TestTemplate
     public void incrByDoesNotClearTtl(Jedis jedis) {
         jedis.flushDB();
 
@@ -910,7 +907,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(ttl > 0);
     }
 
-    @Theory
+    @TestTemplate
     public void decrDoesNotClearTtl(Jedis jedis) {
         jedis.flushDB();
 
@@ -924,7 +921,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(ttl > 0);
     }
 
-    @Theory
+    @TestTemplate
     public void decrByDoesNotClearTtl(Jedis jedis) {
         jedis.flushDB();
 
@@ -938,7 +935,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertTrue(ttl > 0);
     }
 
-    @Theory
+    @TestTemplate
     public void dbSizeReturnsCount(Jedis jedis) {
         jedis.flushDB();
 
@@ -952,7 +949,7 @@ public class SimpleOperationsTest extends ComparisonBase {
         assertEquals(2, result);
     }
 
-    @Theory
+    @TestTemplate
     public void hashExpires(Jedis jedis) throws InterruptedException {
         jedis.flushDB();