You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2018/07/25 10:08:16 UTC

[14/15] james-project git commit: MAILBOX-342 Mutualize Cassandra ManageSieve MPT tests

MAILBOX-342 Mutualize Cassandra ManageSieve MPT tests


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/2862b0b5
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/2862b0b5
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/2862b0b5

Branch: refs/heads/master
Commit: 2862b0b57e60165b6e2aeed28536a53144c50e18
Parents: 7f2dfbf
Author: benwa <bt...@linagora.com>
Authored: Fri Jul 13 18:43:00 2018 +0700
Committer: benwa <bt...@linagora.com>
Committed: Wed Jul 25 16:56:27 2018 +0700

----------------------------------------------------------------------
 mpt/impl/managesieve/cassandra/pom.xml          |  5 ++
 .../cassandra/CassandraAuthenticateTest.java    | 54 ----------------
 .../cassandra/CassandraCapabilityTest.java      | 54 ----------------
 .../cassandra/CassandraCheckScriptTest.java     | 54 ----------------
 .../cassandra/CassandraDeleteScriptTest.java    | 54 ----------------
 .../cassandra/CassandraGetScriptTest.java       | 54 ----------------
 .../cassandra/CassandraHaveSpaceTest.java       | 54 ----------------
 .../cassandra/CassandraListScriptsTest.java     | 54 ----------------
 .../cassandra/CassandraLogoutTest.java          | 54 ----------------
 .../cassandra/CassandraManageSieveMPTTest.java  | 66 ++++++++++++++++++++
 .../managesieve/cassandra/CassandraModule.java  | 47 --------------
 .../cassandra/CassandraNoopTest.java            | 54 ----------------
 .../cassandra/CassandraPutScriptTest.java       | 54 ----------------
 .../cassandra/CassandraRenameScriptTest.java    | 54 ----------------
 .../cassandra/CassandraSetActiveTest.java       | 54 ----------------
 .../cassandra/CassandraStartTlsTest.java        | 54 ----------------
 .../cassandra/CassandraUnauthenticatedTest.java | 54 ----------------
 .../cassandra/host/CassandraHostSystem.java     |  9 ++-
 mpt/impl/managesieve/core/pom.xml               |  8 ++-
 .../apache/james/mpt/HostSystemProvider.java    | 26 ++++++++
 .../mpt/testsuite/AuthenticateContract.java     | 44 +++++++++++++
 .../james/mpt/testsuite/AuthenticateTest.java   | 60 ------------------
 .../james/mpt/testsuite/CapabilityContract.java | 44 +++++++++++++
 .../james/mpt/testsuite/CapabilityTest.java     | 60 ------------------
 .../mpt/testsuite/CheckScriptContract.java      | 44 +++++++++++++
 .../james/mpt/testsuite/CheckScriptTest.java    | 60 ------------------
 .../mpt/testsuite/DeleteScriptContract.java     | 48 ++++++++++++++
 .../james/mpt/testsuite/DeleteScriptTest.java   | 60 ------------------
 .../james/mpt/testsuite/GetScriptContract.java  | 44 +++++++++++++
 .../james/mpt/testsuite/GetScriptTest.java      | 60 ------------------
 .../james/mpt/testsuite/HaveSpaceContract.java  | 48 ++++++++++++++
 .../james/mpt/testsuite/HaveSpaceTest.java      | 63 -------------------
 .../mpt/testsuite/ListScriptsContract.java      | 44 +++++++++++++
 .../james/mpt/testsuite/ListScriptsTest.java    | 60 ------------------
 .../james/mpt/testsuite/LogoutContract.java     | 48 ++++++++++++++
 .../apache/james/mpt/testsuite/LogoutTest.java  | 60 ------------------
 .../james/mpt/testsuite/NoopContract.java       | 45 +++++++++++++
 .../apache/james/mpt/testsuite/NoopTest.java    | 61 ------------------
 .../james/mpt/testsuite/PutScriptContract.java  | 47 ++++++++++++++
 .../james/mpt/testsuite/PutScriptTest.java      | 61 ------------------
 .../mpt/testsuite/RenameScriptContract.java     | 44 +++++++++++++
 .../james/mpt/testsuite/RenameScriptTest.java   | 60 ------------------
 .../james/mpt/testsuite/SetActiveContract.java  | 44 +++++++++++++
 .../james/mpt/testsuite/SetActiveTest.java      | 60 ------------------
 .../james/mpt/testsuite/StartTlsContract.java   | 45 +++++++++++++
 .../james/mpt/testsuite/StartTlsTest.java       | 60 ------------------
 .../mpt/testsuite/UnauthenticatedContract.java  | 45 +++++++++++++
 .../mpt/testsuite/UnauthenticatedTest.java      | 61 ------------------
 mpt/impl/managesieve/file/pom.xml               |  5 ++
 .../managesieve/file/FileAuthenticateTest.java  | 26 ++++----
 .../managesieve/file/FileCapabilityTest.java    | 26 ++++----
 .../managesieve/file/FileCheckScriptTest.java   | 26 ++++----
 .../managesieve/file/FileDeleteScriptTest.java  | 26 ++++----
 .../mpt/managesieve/file/FileGetScriptTest.java | 26 ++++----
 .../mpt/managesieve/file/FileHaveSpaceTest.java | 26 ++++----
 .../managesieve/file/FileListScriptsTest.java   | 26 ++++----
 .../mpt/managesieve/file/FileLogoutTest.java    | 25 ++++----
 .../mpt/managesieve/file/FileNoopTest.java      | 26 ++++----
 .../mpt/managesieve/file/FilePutScriptTest.java | 26 ++++----
 .../managesieve/file/FileRenameScriptTest.java  | 26 ++++----
 .../mpt/managesieve/file/FileSetActiveTest.java | 26 ++++----
 .../mpt/managesieve/file/FileStartTlsTest.java  | 26 ++++----
 .../file/FileUnauthenticatedTest.java           | 26 ++++----
 63 files changed, 902 insertions(+), 1863 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/pom.xml
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/pom.xml b/mpt/impl/managesieve/cassandra/pom.xml
index 5ce4426..b500a5e 100644
--- a/mpt/impl/managesieve/cassandra/pom.xml
+++ b/mpt/impl/managesieve/cassandra/pom.xml
@@ -49,6 +49,11 @@
             <groupId>${james.groupId}</groupId>
             <artifactId>james-server-data-cassandra</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.junit.platform</groupId>
+            <artifactId>junit-platform-launcher</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java
deleted file mode 100644
index 7fc1f12..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.AuthenticateTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraAuthenticateTest extends AuthenticateTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java
deleted file mode 100644
index 7d26e5e..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.CapabilityTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraCapabilityTest extends CapabilityTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCheckScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCheckScriptTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCheckScriptTest.java
deleted file mode 100644
index 334fd8f..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCheckScriptTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.CheckScriptTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraCheckScriptTest extends CheckScriptTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraDeleteScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraDeleteScriptTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraDeleteScriptTest.java
deleted file mode 100644
index a6d635b..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraDeleteScriptTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.DeleteScriptTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraDeleteScriptTest extends DeleteScriptTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraGetScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraGetScriptTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraGetScriptTest.java
deleted file mode 100644
index 01ee375..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraGetScriptTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.GetScriptTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraGetScriptTest extends GetScriptTest {
-    
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraHaveSpaceTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraHaveSpaceTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraHaveSpaceTest.java
deleted file mode 100644
index ec3a602..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraHaveSpaceTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.HaveSpaceTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraHaveSpaceTest extends HaveSpaceTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraListScriptsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraListScriptsTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraListScriptsTest.java
deleted file mode 100644
index 0fea827..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraListScriptsTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.ListScriptsTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public abstract class CassandraListScriptsTest extends ListScriptsTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraLogoutTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraLogoutTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraLogoutTest.java
deleted file mode 100644
index 87caae7..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraLogoutTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.LogoutTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraLogoutTest extends LogoutTest {
-    
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraManageSieveMPTTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraManageSieveMPTTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraManageSieveMPTTest.java
new file mode 100644
index 0000000..110ea85
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraManageSieveMPTTest.java
@@ -0,0 +1,66 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mpt.managesieve.cassandra;
+
+import org.apache.james.backends.cassandra.DockerCassandraExtension;
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
+import org.apache.james.mpt.testsuite.AuthenticateContract;
+import org.apache.james.mpt.testsuite.CapabilityContract;
+import org.apache.james.mpt.testsuite.CheckScriptContract;
+import org.apache.james.mpt.testsuite.DeleteScriptContract;
+import org.apache.james.mpt.testsuite.GetScriptContract;
+import org.apache.james.mpt.testsuite.HaveSpaceContract;
+import org.apache.james.mpt.testsuite.ListScriptsContract;
+import org.apache.james.mpt.testsuite.LogoutContract;
+import org.apache.james.mpt.testsuite.NoopContract;
+import org.apache.james.mpt.testsuite.PutScriptContract;
+import org.apache.james.mpt.testsuite.RenameScriptContract;
+import org.apache.james.mpt.testsuite.SetActiveContract;
+import org.apache.james.mpt.testsuite.StartTlsContract;
+import org.apache.james.mpt.testsuite.UnauthenticatedContract;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+@ExtendWith(DockerCassandraExtension.class)
+class CassandraManageSieveMPTTest implements AuthenticateContract, CapabilityContract, CheckScriptContract,
+                                             DeleteScriptContract, GetScriptContract, HaveSpaceContract,
+                                             ListScriptsContract, LogoutContract, NoopContract, PutScriptContract,
+                                             RenameScriptContract, SetActiveContract, StartTlsContract,
+                                             UnauthenticatedContract {
+    private ManageSieveHostSystem system;
+
+    @BeforeEach
+    void setUp(DockerCassandraExtension.DockerCassandra dockerCassandra) throws Exception {
+        system = new CassandraHostSystem(dockerCassandra.getHost());
+        system.beforeTest();
+    }
+
+    @Override
+    public ManageSieveHostSystem hostSystem() {
+        return system;
+    }
+
+    @AfterEach
+    void tearDown() throws Exception {
+        hostSystem().afterTest();
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraModule.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraModule.java
deleted file mode 100644
index dcc4e21..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraModule.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.util.Host;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Provides;
-import com.google.inject.Singleton;
-
-public class CassandraModule extends AbstractModule {
-
-    private final Host cassandraHost;
-
-    public CassandraModule(Host cassandraHost) {
-        this.cassandraHost = cassandraHost;
-    }
-    
-    @Override
-    protected void configure() {
-    }
-
-    @Provides
-    @Singleton
-    public ManageSieveHostSystem provideHostSystem() throws Exception {
-        return new CassandraHostSystem(cassandraHost);
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraNoopTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraNoopTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraNoopTest.java
deleted file mode 100644
index 5dff427..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraNoopTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.NoopTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraNoopTest extends NoopTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraPutScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraPutScriptTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraPutScriptTest.java
deleted file mode 100644
index 07b0507..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraPutScriptTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.PutScriptTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraPutScriptTest extends PutScriptTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraRenameScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraRenameScriptTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraRenameScriptTest.java
deleted file mode 100644
index 9070ab3..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraRenameScriptTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.RenameScriptTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraRenameScriptTest extends RenameScriptTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraSetActiveTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraSetActiveTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraSetActiveTest.java
deleted file mode 100644
index 702f4e0..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraSetActiveTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.SetActiveTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraSetActiveTest extends SetActiveTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraStartTlsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraStartTlsTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraStartTlsTest.java
deleted file mode 100644
index b70ec77..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraStartTlsTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.StartTlsTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraStartTlsTest extends StartTlsTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraUnauthenticatedTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraUnauthenticatedTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraUnauthenticatedTest.java
deleted file mode 100644
index badc1b9..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraUnauthenticatedTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.managesieve.cassandra;
-
-import org.apache.james.backends.cassandra.DockerCassandraRule;
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.managesieve.cassandra.host.CassandraHostSystem;
-import org.apache.james.mpt.testsuite.UnauthenticatedTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-
-public class CassandraUnauthenticatedTest extends UnauthenticatedTest {
-
-    @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
-    private ManageSieveHostSystem system;
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        system = new CassandraHostSystem(cassandraServer.getHost());
-        system.beforeTest();
-        super.setUp();
-    }
-    
-    @Override
-    protected ManageSieveHostSystem createManageSieveHostSystem() {
-        return system;
-    }
-
-    @Override
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/host/CassandraHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/host/CassandraHostSystem.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/host/CassandraHostSystem.java
index 3d5013f..62c07ce 100644
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/host/CassandraHostSystem.java
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/host/CassandraHostSystem.java
@@ -35,14 +35,13 @@ import org.apache.james.user.cassandra.CassandraUsersRepositoryModule;
 import org.apache.james.util.Host;
 
 public class CassandraHostSystem extends JamesManageSieveHostSystem {
-    
     private final Host cassandraHost;
     private CassandraCluster cassandra;
 
     public CassandraHostSystem(Host cassandraHost) {
         this.cassandraHost = cassandraHost;
     }
-    
+
     @Override
     public void beforeTest() throws Exception {
         CassandraModuleComposite modules = new CassandraModuleComposite(
@@ -53,7 +52,7 @@ public class CassandraHostSystem extends JamesManageSieveHostSystem {
     }
 
     @Override
-    protected SieveRepository createSieveRepository() throws Exception {
+    protected SieveRepository createSieveRepository() {
         return new CassandraSieveRepository(
             new CassandraSieveDAO(cassandra.getConf()),
             new CassandraSieveQuotaDAO(cassandra.getConf()),
@@ -67,4 +66,8 @@ public class CassandraHostSystem extends JamesManageSieveHostSystem {
         return cassandraUsersRepository;
     }
 
+    @Override
+    public void afterTest() {
+        cassandra.close();
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/pom.xml
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/pom.xml b/mpt/impl/managesieve/core/pom.xml
index 8e115ea..8455f10 100644
--- a/mpt/impl/managesieve/core/pom.xml
+++ b/mpt/impl/managesieve/core/pom.xml
@@ -44,8 +44,12 @@
             <artifactId>guice</artifactId>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.vintage</groupId>
+            <artifactId>junit-vintage-engine</artifactId>
         </dependency>
         <dependency>
             <groupId>${james.protocols.groupId}</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/HostSystemProvider.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/HostSystemProvider.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/HostSystemProvider.java
new file mode 100644
index 0000000..ecf8608
--- /dev/null
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/HostSystemProvider.java
@@ -0,0 +1,26 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mpt;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+
+public interface HostSystemProvider {
+    ManageSieveHostSystem hostSystem();
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateContract.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateContract.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateContract.java
new file mode 100644
index 0000000..cc383f1
--- /dev/null
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateContract.java
@@ -0,0 +1,44 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mpt.testsuite;
+
+import java.util.Locale;
+
+import org.apache.james.mpt.HostSystemProvider;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.jupiter.api.Test;
+
+public interface AuthenticateContract extends HostSystemProvider {
+    String USER = "user";
+    String PASSWORD = "password";
+
+    default SimpleScriptedTestProtocol authenticateContractProtocol() throws Exception {
+        return new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem())
+                .withUser(USER, PASSWORD)
+                .withLocale(Locale.US);
+    }
+
+    @Test
+    default void authenticateShouldWork() throws Exception {
+        authenticateContractProtocol()
+            .withLocale(Locale.US)
+            .run("authenticate");
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
deleted file mode 100644
index 5dd6bf0..0000000
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.testsuite;
-
-import java.util.Locale;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public abstract class AuthenticateTest {
-
-    public static final String USER = "user";
-    public static final String PASSWORD = "password";
-    
-    protected abstract ManageSieveHostSystem createManageSieveHostSystem();
-    
-    private ManageSieveHostSystem hostSystem;
-    private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
-
-    @Before
-    public void setUp() throws Exception {
-        hostSystem = createManageSieveHostSystem();
-        hostSystem.beforeTest();
-        simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
-                .withUser(USER, PASSWORD)
-                .withLocale(Locale.US);
-    }
-    
-    @After
-    public void tearDown() throws Exception {
-        hostSystem.afterTest();
-    }
-
-    @Test
-    public void authenticateShouldWork() throws Exception {
-        simpleScriptedTestProtocol
-            .withLocale(Locale.US)
-            .run("authenticate");
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityContract.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityContract.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityContract.java
new file mode 100644
index 0000000..15ea395
--- /dev/null
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityContract.java
@@ -0,0 +1,44 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mpt.testsuite;
+
+import java.util.Locale;
+
+import org.apache.james.mpt.HostSystemProvider;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.jupiter.api.Test;
+
+public interface CapabilityContract extends HostSystemProvider {
+    String USER = "user";
+    String PASSWORD = "password";
+
+    default SimpleScriptedTestProtocol capabilityContractProtocol() throws Exception {
+        return new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem())
+                .withUser(USER, PASSWORD)
+                .withLocale(Locale.US);
+    }
+
+    @Test
+    default void capabilityShouldWork() throws Exception {
+        capabilityContractProtocol()
+            .withLocale(Locale.US)
+            .run("capability");
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
deleted file mode 100644
index 2af78f2..0000000
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.testsuite;
-
-import java.util.Locale;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public abstract class CapabilityTest {
-
-    public static final String USER = "user";
-    public static final String PASSWORD = "password";
-    
-    protected abstract ManageSieveHostSystem createManageSieveHostSystem();
-    
-    private ManageSieveHostSystem hostSystem;
-    private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
-
-    @Before
-    public void setUp() throws Exception {
-        hostSystem = createManageSieveHostSystem();
-        hostSystem.beforeTest();
-        simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
-                .withUser(USER, PASSWORD)
-                .withLocale(Locale.US);
-    }
-    
-    @After
-    public void tearDown() throws Exception {
-        hostSystem.afterTest();
-    }
-
-    @Test
-    public void capabilityShouldWork() throws Exception {
-        simpleScriptedTestProtocol
-            .withLocale(Locale.US)
-            .run("capability");
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptContract.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptContract.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptContract.java
new file mode 100644
index 0000000..413dcd0
--- /dev/null
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptContract.java
@@ -0,0 +1,44 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mpt.testsuite;
+
+import java.util.Locale;
+
+import org.apache.james.mpt.HostSystemProvider;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.jupiter.api.Test;
+
+public interface CheckScriptContract extends HostSystemProvider {
+    String USER = "user";
+    String PASSWORD = "password";
+
+    default SimpleScriptedTestProtocol checkScriptContractProtocol() throws Exception {
+        return new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem())
+                .withUser(USER, PASSWORD)
+                .withLocale(Locale.US);
+    }
+
+    @Test
+    default void checkScriptShouldWork() throws Exception {
+        checkScriptContractProtocol()
+            .withLocale(Locale.US)
+            .run("checkscript");
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
deleted file mode 100644
index 0aa1760..0000000
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.testsuite;
-
-import java.util.Locale;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public abstract class CheckScriptTest {
-
-    public static final String USER = "user";
-    public static final String PASSWORD = "password";
-    
-    protected abstract ManageSieveHostSystem createManageSieveHostSystem();
-    
-    private ManageSieveHostSystem hostSystem;
-    private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
-
-    @Before
-    public void setUp() throws Exception {
-        hostSystem = createManageSieveHostSystem();
-        hostSystem.beforeTest();
-        simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
-                .withUser(USER, PASSWORD)
-                .withLocale(Locale.US);
-    }
-    
-    @After
-    public void tearDown() throws Exception {
-        hostSystem.afterTest();
-    }
-
-    @Test
-    public void checkScriptShouldWork() throws Exception {
-        simpleScriptedTestProtocol
-            .withLocale(Locale.US)
-            .run("checkscript");
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptContract.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptContract.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptContract.java
new file mode 100644
index 0000000..2380ff6
--- /dev/null
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptContract.java
@@ -0,0 +1,48 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mpt.testsuite;
+
+import java.util.Locale;
+
+import org.apache.james.mpt.HostSystemProvider;
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.jupiter.api.Test;
+
+public interface DeleteScriptContract extends HostSystemProvider {
+
+    String USER = "user";
+    String PASSWORD = "password";
+    
+    ManageSieveHostSystem hostSystem();
+
+    default SimpleScriptedTestProtocol deleteScriptContractProtocol() throws Exception {
+        return new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem())
+                .withUser(USER, PASSWORD)
+                .withLocale(Locale.US);
+    }
+
+    @Test
+    default void deleteScriptShouldWork() throws Exception {
+        deleteScriptContractProtocol()
+            .withLocale(Locale.US)
+            .run("deletescript");
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
deleted file mode 100644
index ef7d972..0000000
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.testsuite;
-
-import java.util.Locale;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public abstract class DeleteScriptTest {
-
-    public static final String USER = "user";
-    public static final String PASSWORD = "password";
-    
-    protected abstract ManageSieveHostSystem createManageSieveHostSystem();
-    
-    private ManageSieveHostSystem hostSystem;
-    private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
-
-    @Before
-    public void setUp() throws Exception {
-        hostSystem = createManageSieveHostSystem();
-        hostSystem.beforeTest();
-        simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
-                .withUser(USER, PASSWORD)
-                .withLocale(Locale.US);
-    }
-    
-    @After
-    public void tearDown() throws Exception {
-        hostSystem.afterTest();
-    }
-
-    @Test
-    public void deleteScriptShouldWork() throws Exception {
-        simpleScriptedTestProtocol
-            .withLocale(Locale.US)
-            .run("deletescript");
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptContract.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptContract.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptContract.java
new file mode 100644
index 0000000..8fab8a4
--- /dev/null
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptContract.java
@@ -0,0 +1,44 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mpt.testsuite;
+
+import java.util.Locale;
+
+import org.apache.james.mpt.HostSystemProvider;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.jupiter.api.Test;
+
+public interface GetScriptContract extends HostSystemProvider {
+    String USER = "user";
+    String PASSWORD = "password";
+
+    default SimpleScriptedTestProtocol getScriptContractProtocol() throws Exception {
+        return new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem())
+                .withUser(USER, PASSWORD)
+                .withLocale(Locale.US);
+    }
+
+    @Test
+    default void getScriptShouldWork() throws Exception {
+        getScriptContractProtocol()
+            .withLocale(Locale.US)
+            .run("getscript");
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2862b0b5/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
deleted file mode 100644
index 16db749..0000000
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.testsuite;
-
-import java.util.Locale;
-
-import org.apache.james.mpt.host.ManageSieveHostSystem;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public abstract class GetScriptTest {
-
-    public static final String USER = "user";
-    public static final String PASSWORD = "password";
-    
-    protected abstract ManageSieveHostSystem createManageSieveHostSystem();
-    
-    private ManageSieveHostSystem hostSystem;
-    private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
-
-    @Before
-    public void setUp() throws Exception {
-        hostSystem = createManageSieveHostSystem();
-        hostSystem.beforeTest();
-        simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
-                .withUser(USER, PASSWORD)
-                .withLocale(Locale.US);
-    }
-    
-    @After
-    public void tearDown() throws Exception {
-        hostSystem.afterTest();
-    }
-
-    @Test
-    public void getScriptShouldWork() throws Exception {
-        simpleScriptedTestProtocol
-            .withLocale(Locale.US)
-            .run("getscript");
-    }
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org