james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [14/22] james-project git commit: JAMES-2595 JMAP integration tests for Cassandra RabbitMQ Swift Guice product
Date Wed, 21 Nov 2018 10:07:24 GMT
JAMES-2595 JMAP integration tests for Cassandra RabbitMQ Swift Guice product


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

Branch: refs/heads/master
Commit: 2cc544c7aa10a0dcc61e1fa31c2b138e7af39b46
Parents: c4007e5
Author: tran tien duc <dtran@linagora.com>
Authored: Wed Nov 14 10:01:08 2018 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Wed Nov 21 16:48:26 2018 +0700

----------------------------------------------------------------------
 .../rabbitmq/DockerRabbitMQSingleton.java       |  31 ++++
 .../objectstorage/ObjectStorageBlobsDAO.java    |   6 +
 .../ObjectStorageBlobsDAOTest.java              |   9 +
 .../guice/DockerSwiftTestRule.java              |  30 +++-
 .../CassandraRabbitMQSwiftJmapTestRule.java     |  87 +++++++++
 .../james/modules/TestSwiftBlobStoreModule.java |  38 ++++
 .../protocols/jmap-integration-testing/pom.xml  |   1 +
 .../rabbitmq-jmap-integration-testing/pom.xml   | 176 +++++++++++++++++++
 .../james/jmap/rabbitmq/RabbitMQFilterTest.java |  50 ++++++
 .../RabbitMQForwardIntegrationTest.java         |  47 +++++
 .../RabbitMQGetMailboxesMethodTest.java         |  44 +++++
 .../RabbitMQGetMessageListMethodTest.java       |  50 ++++++
 .../RabbitMQGetVacationResponseTest.java        |  50 ++++++
 .../RabbitMQJmapAuthenticationTest.java         |  46 +++++
 .../jmap/rabbitmq/RabbitMQJmapExtension.java    | 130 ++++++++++++++
 .../jmap/rabbitmq/RabbitMQProvisioningTest.java |  44 +++++
 .../jmap/rabbitmq/RabbitMQQuotaMailingTest.java |  42 +++++
 .../rabbitmq/RabbitMQSendMDNMethodTest.java     |  51 ++++++
 .../RabbitMQSetMailboxesMethodTest.java         |  49 ++++++
 .../rabbitmq/RabbitMQSetMessagesMethodTest.java |  72 ++++++++
 .../RabbitMQSetVacationResponseTest.java        |  49 ++++++
 .../RabbitMQSpamAssassinContractTest.java       |  28 +++
 .../RabbitMQVacationIntegrationTest.java        |  49 ++++++
 .../RabbitMQVacationRelayIntegrationTest.java   |  60 +++++++
 .../src/test/resources/dnsservice.xml           |  29 +++
 .../src/test/resources/domainlist.xml           |  24 +++
 .../src/test/resources/imapserver.xml           |  54 ++++++
 .../src/test/resources/keystore                 | Bin 0 -> 2245 bytes
 .../src/test/resources/listeners.xml            |  53 ++++++
 .../src/test/resources/lmtpserver.xml           |  41 +++++
 .../src/test/resources/logback-test.xml         |  15 ++
 .../src/test/resources/mailetcontainer.xml      | 129 ++++++++++++++
 .../src/test/resources/mailrepositorystore.xml  |  36 ++++
 .../src/test/resources/pop3server.xml           |  42 +++++
 .../src/test/resources/smtpserver.xml           | 102 +++++++++++
 .../src/test/resources/spamassassin_db          |   1 +
 36 files changed, 1764 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerRabbitMQSingleton.java
----------------------------------------------------------------------
diff --git a/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerRabbitMQSingleton.java b/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerRabbitMQSingleton.java
new file mode 100644
index 0000000..591b979
--- /dev/null
+++ b/backends-common/rabbitmq/src/test/java/org/apache/james/backend/rabbitmq/DockerRabbitMQSingleton.java
@@ -0,0 +1,31 @@
+/****************************************************************
+ * 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.backend.rabbitmq;
+
+public class DockerRabbitMQSingleton {
+
+    public static final DockerRabbitMQ SINGLETON = DockerRabbitMQ.withoutCookie();
+
+    static {
+        SINGLETON.start();
+    }
+
+    // Cleanup will be performed by test container resource reaper
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/blob/blob-objectstorage/src/main/java/org/apache/james/blob/objectstorage/ObjectStorageBlobsDAO.java
----------------------------------------------------------------------
diff --git a/server/blob/blob-objectstorage/src/main/java/org/apache/james/blob/objectstorage/ObjectStorageBlobsDAO.java b/server/blob/blob-objectstorage/src/main/java/org/apache/james/blob/objectstorage/ObjectStorageBlobsDAO.java
index d6ab0ce..5a1cc62 100644
--- a/server/blob/blob-objectstorage/src/main/java/org/apache/james/blob/objectstorage/ObjectStorageBlobsDAO.java
+++ b/server/blob/blob-objectstorage/src/main/java/org/apache/james/blob/objectstorage/ObjectStorageBlobsDAO.java
@@ -37,6 +37,7 @@ import org.jclouds.domain.Location;
 import org.jclouds.io.Payload;
 
 import com.github.fge.lambdas.Throwing;
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.hash.Hashing;
 import com.google.common.hash.HashingInputStream;
@@ -138,5 +139,10 @@ public class ObjectStorageBlobsDAO implements BlobStore {
         }
 
     }
+
+    @VisibleForTesting
+    public void deleteContainer() {
+        blobStore.deleteContainer(containerName.value());
+    }
 }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/blob/blob-objectstorage/src/test/java/org/apache/james/blob/objectstorage/ObjectStorageBlobsDAOTest.java
----------------------------------------------------------------------
diff --git a/server/blob/blob-objectstorage/src/test/java/org/apache/james/blob/objectstorage/ObjectStorageBlobsDAOTest.java b/server/blob/blob-objectstorage/src/test/java/org/apache/james/blob/objectstorage/ObjectStorageBlobsDAOTest.java
index 83131c3..e76477f 100644
--- a/server/blob/blob-objectstorage/src/test/java/org/apache/james/blob/objectstorage/ObjectStorageBlobsDAOTest.java
+++ b/server/blob/blob-objectstorage/src/test/java/org/apache/james/blob/objectstorage/ObjectStorageBlobsDAOTest.java
@@ -52,6 +52,8 @@ public class ObjectStorageBlobsDAOTest implements BlobStoreContract {
     private static final UserName USER_NAME = UserName.of("tester");
     private static final Credentials PASSWORD = Credentials.of("testing");
     private static final Identity SWIFT_IDENTITY = Identity.of(TENANT_NAME, USER_NAME);
+    private static final InputStream EMPTY_STREAM = new ByteArrayInputStream(new byte[]{});
+
     public static final String SAMPLE_SALT = "c603a7327ee3dcbc031d8d34b1096c605feca5e1";
 
     private ContainerName containerName;
@@ -149,5 +151,12 @@ public class ObjectStorageBlobsDAOTest implements BlobStoreContract {
         InputStream clearTextIs = encryptedDao.read(blobId);
         assertThat(clearTextIs).hasSameContentAs(new ByteArrayInputStream(bytes));
     }
+
+    @Test
+    void deleteContainerShouldDeleteSwiftContainer() {
+        testee.deleteContainer();
+        assertThat(blobStore.containerExists(containerName.value()))
+            .isFalse();
+    }
 }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/guice/DockerSwiftTestRule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/guice/DockerSwiftTestRule.java b/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/guice/DockerSwiftTestRule.java
index 00c0884..1f3c34a 100644
--- a/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/guice/DockerSwiftTestRule.java
+++ b/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/guice/DockerSwiftTestRule.java
@@ -21,8 +21,12 @@ package org.apache.james.modules.objectstorage.guice;
 
 import java.util.UUID;
 
+import javax.inject.Inject;
+
+import org.apache.james.CleanupTasksPerformer;
 import org.apache.james.GuiceModuleTestRule;
 import org.apache.james.blob.objectstorage.ContainerName;
+import org.apache.james.blob.objectstorage.ObjectStorageBlobsDAO;
 import org.apache.james.blob.objectstorage.swift.Credentials;
 import org.apache.james.blob.objectstorage.swift.SwiftKeystone2ObjectStorage;
 import org.apache.james.blob.objectstorage.swift.TenantName;
@@ -33,9 +37,27 @@ import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 
 import com.google.inject.Module;
+import com.google.inject.multibindings.Multibinder;
 
 public class DockerSwiftTestRule implements GuiceModuleTestRule {
 
+    private static class ContainerCleanUp implements CleanupTasksPerformer.CleanupTask {
+
+        private final ObjectStorageBlobsDAO blobsDAO;
+
+        @Inject
+        public ContainerCleanUp(ObjectStorageBlobsDAO blobsDAO) {
+            this.blobsDAO = blobsDAO;
+        }
+
+        @Override
+        public Result run() {
+            blobsDAO.deleteContainer();
+
+            return Result.COMPLETED;
+        }
+    }
+
     private final PayloadCodecFactory payloadCodecFactory;
     private org.apache.james.blob.objectstorage.DockerSwiftRule swiftContainer =
         new org.apache.james.blob.objectstorage.DockerSwiftRule();
@@ -76,7 +98,13 @@ public class DockerSwiftTestRule implements GuiceModuleTestRule {
             .aesPassword("dockerSwiftEncryption".toCharArray())
             .build();
 
-        return binder -> binder.bind(ObjectStorageBlobConfiguration.class).toInstance(configuration);
+        return binder -> {
+            binder.bind(ObjectStorageBlobConfiguration.class).toInstance(configuration);
+
+            Multibinder.newSetBinder(binder, CleanupTasksPerformer.CleanupTask.class)
+                .addBinding()
+                .to(ContainerCleanUp.class);
+        };
     }
 
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/CassandraRabbitMQSwiftJmapTestRule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/CassandraRabbitMQSwiftJmapTestRule.java b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/CassandraRabbitMQSwiftJmapTestRule.java
new file mode 100644
index 0000000..b969028
--- /dev/null
+++ b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/CassandraRabbitMQSwiftJmapTestRule.java
@@ -0,0 +1,87 @@
+/****************************************************************
+ * 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;
+
+import java.io.IOException;
+
+import org.apache.james.backend.rabbitmq.DockerRabbitMQSingleton;
+import org.apache.james.mailbox.extractor.TextExtractor;
+import org.apache.james.mailbox.store.search.PDFTextExtractor;
+import org.apache.james.modules.TestESMetricReporterModule;
+import org.apache.james.modules.TestJMAPServerModule;
+import org.apache.james.modules.TestRabbitMQModule;
+import org.apache.james.modules.TestSwiftBlobStoreModule;
+import org.apache.james.modules.blobstore.BlobStoreChoosingConfiguration;
+import org.apache.james.server.core.configuration.Configuration;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+import com.google.inject.Module;
+
+public class CassandraRabbitMQSwiftJmapTestRule implements TestRule {
+
+    private static final int LIMIT_TO_10_MESSAGES = 10;
+    private final TemporaryFolder temporaryFolder;
+
+    public static CassandraRabbitMQSwiftJmapTestRule defaultTestRule() {
+        return new CassandraRabbitMQSwiftJmapTestRule(new EmbeddedElasticSearchRule());
+    }
+
+    private final GuiceModuleTestRule guiceModuleTestRule;
+
+    public CassandraRabbitMQSwiftJmapTestRule(GuiceModuleTestRule... guiceModuleTestRule) {
+        TempFilesystemTestRule tempFilesystemTestRule = new TempFilesystemTestRule();
+        this.temporaryFolder = tempFilesystemTestRule.getTemporaryFolder();
+        this.guiceModuleTestRule =
+                AggregateGuiceModuleTestRule
+                    .of(guiceModuleTestRule)
+                    .aggregate(tempFilesystemTestRule);
+    }
+
+    public GuiceJamesServer jmapServer(Module... additionals) throws IOException {
+        Configuration configuration = Configuration.builder()
+            .workingDirectory(temporaryFolder.newFolder())
+            .configurationFromClasspath()
+            .build();
+
+        return GuiceJamesServer.forConfiguration(configuration)
+            .combineWith(CassandraRabbitMQJamesServerMain.MODULES)
+            .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class))
+            .overrideWith(new TestRabbitMQModule(DockerRabbitMQSingleton.SINGLETON))
+            .overrideWith(new TestSwiftBlobStoreModule())
+            .overrideWith(binder -> binder.bind(BlobStoreChoosingConfiguration.class)
+                .toInstance(BlobStoreChoosingConfiguration.objectStorage()))
+            .overrideWith(new TestJMAPServerModule(LIMIT_TO_10_MESSAGES))
+            .overrideWith(new TestESMetricReporterModule())
+            .overrideWith(guiceModuleTestRule.getModule())
+            .overrideWith(additionals);
+    }
+
+    @Override
+    public Statement apply(Statement base, Description description) {
+        return guiceModuleTestRule.apply(base, description);
+    }
+
+    public void await() {
+        guiceModuleTestRule.await();
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/TestSwiftBlobStoreModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/TestSwiftBlobStoreModule.java b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/TestSwiftBlobStoreModule.java
new file mode 100644
index 0000000..ef50cf7
--- /dev/null
+++ b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/TestSwiftBlobStoreModule.java
@@ -0,0 +1,38 @@
+/****************************************************************
+ * 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.modules;
+
+import org.apache.james.modules.objectstorage.guice.DockerSwiftTestRule;
+
+import com.google.inject.AbstractModule;
+
+public class TestSwiftBlobStoreModule extends AbstractModule {
+
+    private final DockerSwiftTestRule dockerSwiftTestRule;
+
+    public TestSwiftBlobStoreModule() {
+        this.dockerSwiftTestRule = new DockerSwiftTestRule();
+    }
+
+    @Override
+    protected void configure() {
+        install(dockerSwiftTestRule.getModule());
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/pom.xml b/server/protocols/jmap-integration-testing/pom.xml
index 736689c..25e5070 100644
--- a/server/protocols/jmap-integration-testing/pom.xml
+++ b/server/protocols/jmap-integration-testing/pom.xml
@@ -36,5 +36,6 @@
         <module>cassandra-jmap-integration-testing</module>
         <module>jmap-integration-testing-common</module>
         <module>memory-jmap-integration-testing</module>
+        <module>rabbitmq-jmap-integration-testing</module>
     </modules>
 </project>

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/pom.xml b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/pom.xml
new file mode 100644
index 0000000..157c6cd
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/pom.xml
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>jmap-integration-testing</artifactId>
+        <groupId>org.apache.james</groupId>
+        <version>3.3.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>rabbitmq-jmap-integration-testing</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Apache James :: Server :: JMAP :: RabbitMQ + Swift + Cassandra Integration testing</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>apache-james-backends-cassandra</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>apache-james-backends-es</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>apache-james-backends-rabbitmq</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>apache-james-mailbox-scanning-search</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>apache-james-spamassassin</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>blob-objectstorage</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>blob-objectstorage-guice</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-dnsservice-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-cassandra-guice</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-cassandra-rabbitmq-guice</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-cassandra-rabbitmq-guice</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-jmap-integration-testing</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-guice-common</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-guice-jmap</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-testing</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.rest-assured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.pdfbox</groupId>
+            <artifactId>pdfbox</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.assertj</groupId>
+            <artifactId>assertj-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>java-hamcrest</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.platform</groupId>
+            <artifactId>junit-platform-launcher</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.vintage</groupId>
+            <artifactId>junit-vintage-engine</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <argLine>-Xms512m -Xmx1024m</argLine>
+                    <reuseForks>true</reuseForks>
+                    <!-- Fail tests longer than 2 hours, prevent form random locking tests -->
+                    <forkedProcessTimeoutInSeconds>7200</forkedProcessTimeoutInSeconds>
+                    <groups combine.self="override">org.apache.james.jmap.categories.BasicFeature,org.apache.james.jmap.categories.EnableCucumber</groups>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.junit.jupiter</groupId>
+                        <artifactId>junit-jupiter-engine</artifactId>
+                        <version>${junit.jupiter.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.junit.vintage</groupId>
+                        <artifactId>junit-vintage-engine</artifactId>
+                        <version>${junit.vintage.version}</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQFilterTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQFilterTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQFilterTest.java
new file mode 100644
index 0000000..37fa065
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQFilterTest.java
@@ -0,0 +1,50 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.methods.integration.FilterTest;
+import org.apache.james.mailbox.cassandra.ids.CassandraId;
+import org.apache.james.mailbox.model.MailboxId;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQFilterTest extends FilterTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule());
+    }
+
+    @Override
+    protected MailboxId randomMailboxId() {
+        return CassandraId.timeBased();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQForwardIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQForwardIntegrationTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQForwardIntegrationTest.java
new file mode 100644
index 0000000..8f5ab38
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQForwardIntegrationTest.java
@@ -0,0 +1,47 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.methods.integration.ForwardIntegrationTest;
+import org.apache.james.webadmin.WebAdminConfiguration;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQForwardIntegrationTest extends ForwardIntegrationTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+    
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule(),
+            binder -> binder.bind(WebAdminConfiguration.class)
+                .toInstance(WebAdminConfiguration.TEST_CONFIGURATION));
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetMailboxesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetMailboxesMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetMailboxesMethodTest.java
new file mode 100644
index 0000000..55e90e2
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetMailboxesMethodTest.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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.methods.integration.GetMailboxesMethodTest;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQGetMailboxesMethodTest extends GetMailboxesMethodTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+    
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule());
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetMessageListMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetMessageListMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetMessageListMethodTest.java
new file mode 100644
index 0000000..80a62b3
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetMessageListMethodTest.java
@@ -0,0 +1,50 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.methods.integration.GetMessageListMethodTest;
+import org.apache.james.modules.TestJMAPServerModule;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQGetMessageListMethodTest extends GetMessageListMethodTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule(),
+            new TestJMAPServerModule(LIMIT_TO_3_MESSAGES));
+    }
+
+    @Override
+    protected void await() {
+        rule.await();
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetVacationResponseTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetVacationResponseTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetVacationResponseTest.java
new file mode 100644
index 0000000..17ba7e3
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQGetVacationResponseTest.java
@@ -0,0 +1,50 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.methods.integration.GetVacationResponseTest;
+import org.apache.james.util.date.ZonedDateTimeProvider;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQGetVacationResponseTest extends GetVacationResponseTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+    
+    @Override
+    protected GuiceJamesServer createJmapServer(ZonedDateTimeProvider zonedDateTimeProvider) throws IOException {
+        return rule.jmapServer(cassandra.getModule())
+                .overrideWith(binder -> binder.bind(ZonedDateTimeProvider.class).toInstance(zonedDateTimeProvider));
+    }
+
+    @Override
+    protected void await() {
+        rule.await();
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQJmapAuthenticationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQJmapAuthenticationTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQJmapAuthenticationTest.java
new file mode 100644
index 0000000..fd596c6
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQJmapAuthenticationTest.java
@@ -0,0 +1,46 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.FixedDateZonedDateTimeProvider;
+import org.apache.james.jmap.JMAPAuthenticationTest;
+import org.apache.james.util.date.ZonedDateTimeProvider;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQJmapAuthenticationTest extends JMAPAuthenticationTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+    
+    @Override
+    protected GuiceJamesServer createJmapServer(FixedDateZonedDateTimeProvider zonedDateTimeProvider) throws IOException {
+        return rule.jmapServer(cassandra.getModule())
+                .overrideWith(binder -> binder.bind(ZonedDateTimeProvider.class).toInstance(zonedDateTimeProvider));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQJmapExtension.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQJmapExtension.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQJmapExtension.java
new file mode 100644
index 0000000..9aa6a5f
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQJmapExtension.java
@@ -0,0 +1,130 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQJamesServerMain;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.backend.rabbitmq.DockerRabbitMQSingleton;
+import org.apache.james.backends.es.EmbeddedElasticSearch;
+import org.apache.james.jmap.methods.integration.JamesWithSpamAssassin;
+import org.apache.james.jmap.methods.integration.SpamAssassinModule;
+import org.apache.james.mailbox.extractor.TextExtractor;
+import org.apache.james.mailbox.store.search.PDFTextExtractor;
+import org.apache.james.modules.TestESMetricReporterModule;
+import org.apache.james.modules.TestElasticSearchModule;
+import org.apache.james.modules.TestJMAPServerModule;
+import org.apache.james.modules.TestRabbitMQModule;
+import org.apache.james.modules.TestSwiftBlobStoreModule;
+import org.apache.james.modules.blobstore.BlobStoreChoosingConfiguration;
+import org.apache.james.server.core.configuration.Configuration;
+import org.apache.james.spamassassin.SpamAssassinExtension;
+import org.apache.james.util.Runnables;
+import org.junit.jupiter.api.extension.AfterAllCallback;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ParameterContext;
+import org.junit.jupiter.api.extension.ParameterResolutionException;
+import org.junit.jupiter.api.extension.ParameterResolver;
+import org.junit.rules.TemporaryFolder;
+
+public class RabbitMQJmapExtension implements BeforeAllCallback, AfterAllCallback,
+    BeforeEachCallback, AfterEachCallback, ParameterResolver {
+
+    private static final int LIMIT_TO_20_MESSAGES = 20;
+
+    private final TemporaryFolder temporaryFolder;
+    private final DockerCassandraRule cassandra;
+    private final EmbeddedElasticSearch elasticSearch;
+    private final SpamAssassinExtension spamAssassinExtension;
+    private JamesWithSpamAssassin james;
+
+    public RabbitMQJmapExtension() {
+        this.temporaryFolder = new TemporaryFolder();
+        this.cassandra = new DockerCassandraRule();
+        this.elasticSearch = new EmbeddedElasticSearch(temporaryFolder);
+        this.spamAssassinExtension = new SpamAssassinExtension();
+    }
+
+    private JamesWithSpamAssassin james() throws IOException {
+        Configuration configuration = Configuration.builder()
+            .workingDirectory(temporaryFolder.newFolder())
+            .configurationFromClasspath()
+            .build();
+        return new JamesWithSpamAssassin(
+            GuiceJamesServer.forConfiguration(configuration)
+                    .combineWith(CassandraRabbitMQJamesServerMain.MODULES)
+                    .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class))
+                    .overrideWith(new TestRabbitMQModule(DockerRabbitMQSingleton.SINGLETON))
+                    .overrideWith(new TestSwiftBlobStoreModule())
+                    .overrideWith(binder -> binder.bind(BlobStoreChoosingConfiguration.class)
+                        .toInstance(BlobStoreChoosingConfiguration.objectStorage()))
+                    .overrideWith(new TestJMAPServerModule(LIMIT_TO_20_MESSAGES))
+                    .overrideWith(new TestESMetricReporterModule())
+                    .overrideWith(cassandra.getModule())
+                    .overrideWith(new TestElasticSearchModule(elasticSearch))
+                    .overrideWith(new SpamAssassinModule(spamAssassinExtension)),
+            spamAssassinExtension);
+    }
+
+    @Override
+    public void beforeAll(ExtensionContext context) throws Exception {
+        temporaryFolder.create();
+
+        Runnables.runParallel(
+            cassandra::start,
+            elasticSearch::before);
+    }
+
+    @Override
+    public void afterAll(ExtensionContext context) {
+        elasticSearch.after();
+
+        Runnables.runParallel(
+            cassandra::stop,
+            elasticSearch::after);
+    }
+
+    @Override
+    public void beforeEach(ExtensionContext context) throws Exception {
+        spamAssassinExtension.start();
+        james = james();
+        james.getJmapServer().start();
+    }
+
+    @Override
+    public void afterEach(ExtensionContext context) {
+        james.getJmapServer().stop();
+        spamAssassinExtension.stop();
+    }
+
+    @Override
+    public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException {
+        return parameterContext.getParameter().getType() == JamesWithSpamAssassin.class;
+    }
+
+    @Override
+    public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException {
+        return james;
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQProvisioningTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQProvisioningTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQProvisioningTest.java
new file mode 100644
index 0000000..b6bb874
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQProvisioningTest.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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.ProvisioningTest;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQProvisioningTest extends ProvisioningTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQQuotaMailingTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQQuotaMailingTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQQuotaMailingTest.java
new file mode 100644
index 0000000..93753a9
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQQuotaMailingTest.java
@@ -0,0 +1,42 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.methods.integration.QuotaMailingTest;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQQuotaMailingTest extends QuotaMailingTest {
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule());
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSendMDNMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSendMDNMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSendMDNMethodTest.java
new file mode 100644
index 0000000..14f132d
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSendMDNMethodTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.methods.integration.SendMDNMethodTest;
+import org.apache.james.mailbox.cassandra.ids.CassandraMessageId;
+import org.apache.james.mailbox.model.MessageId;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQSendMDNMethodTest extends SendMDNMethodTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule());
+    }
+    
+    @Override
+    protected MessageId randomMessageId() {
+        return new CassandraMessageId.Factory().generate();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetMailboxesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetMailboxesMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetMailboxesMethodTest.java
new file mode 100644
index 0000000..e21a651
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetMailboxesMethodTest.java
@@ -0,0 +1,49 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.methods.integration.SetMailboxesMethodTest;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQSetMailboxesMethodTest extends SetMailboxesMethodTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+    
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule());
+    }
+
+    @Override
+    protected void await() {
+        rule.await();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetMessagesMethodTest.java
new file mode 100644
index 0000000..dfa3992
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetMessagesMethodTest.java
@@ -0,0 +1,72 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.methods.integration.SetMessagesMethodTest;
+import org.apache.james.mailbox.cassandra.ids.CassandraMessageId;
+import org.apache.james.mailbox.model.MessageId;
+import org.junit.ClassRule;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class RabbitMQSetMessagesMethodTest extends SetMessagesMethodTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule());
+    }
+
+    @Override
+    protected void await() {
+        rule.await();
+    }
+    
+    @Override
+    protected MessageId randomMessageId() {
+        return new CassandraMessageId.Factory().generate();
+    }
+
+    @Ignore("JAMES-2221 Temporally ignored failed test")
+    @Override
+    @Test
+    public void attachmentsShouldBeRetrievedWhenChainingSetMessagesAndGetMessagesTextAttachment() throws Exception {
+
+    }
+
+
+    @Ignore("Temporally ignored CI failing test")
+    @Override
+    @Test
+    public void setMessagesWithABigBodyShouldReturnCreatedMessageWhenSendingMessage() {
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetVacationResponseTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetVacationResponseTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetVacationResponseTest.java
new file mode 100644
index 0000000..bbc6724
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSetVacationResponseTest.java
@@ -0,0 +1,49 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.methods.integration.SetVacationResponseTest;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQSetVacationResponseTest extends SetVacationResponseTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+    
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule());
+    }
+
+    @Override
+    protected void await() {
+        rule.await();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSpamAssassinContractTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSpamAssassinContractTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSpamAssassinContractTest.java
new file mode 100644
index 0000000..cc16910
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSpamAssassinContractTest.java
@@ -0,0 +1,28 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import org.apache.james.jmap.methods.integration.SpamAssassinContract;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+class RabbitMQSpamAssassinContractTest implements SpamAssassinContract {
+
+    @RegisterExtension
+    static RabbitMQJmapExtension jmapExtension = new RabbitMQJmapExtension();
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQVacationIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQVacationIntegrationTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQVacationIntegrationTest.java
new file mode 100644
index 0000000..3a18190
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQVacationIntegrationTest.java
@@ -0,0 +1,49 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.jmap.VacationIntegrationTest;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQVacationIntegrationTest extends VacationIntegrationTest {
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+    
+    @Override
+    protected GuiceJamesServer createJmapServer() throws IOException {
+        return rule.jmapServer(cassandra.getModule());
+    }
+
+    @Override
+    protected void await() {
+        rule.await();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQVacationRelayIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQVacationRelayIntegrationTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQVacationRelayIntegrationTest.java
new file mode 100644
index 0000000..a620860
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQVacationRelayIntegrationTest.java
@@ -0,0 +1,60 @@
+/****************************************************************
+ * 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.jmap.rabbitmq;
+
+import java.io.IOException;
+
+import org.apache.james.CassandraRabbitMQSwiftJmapTestRule;
+import org.apache.james.DockerCassandraRule;
+import org.apache.james.GuiceJamesServer;
+import org.apache.james.dnsservice.api.DNSService;
+import org.apache.james.dnsservice.api.InMemoryDNSService;
+import org.apache.james.jmap.VacationRelayIntegrationTest;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+public class RabbitMQVacationRelayIntegrationTest extends VacationRelayIntegrationTest {
+
+    private final InMemoryDNSService inMemoryDNSService = new InMemoryDNSService();
+
+    @ClassRule
+    public static DockerCassandraRule cassandra = new DockerCassandraRule();
+
+    @Rule
+    public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule();
+
+    @Override
+    protected GuiceJamesServer getJmapServer() throws IOException {
+        return rule.jmapServer(
+                cassandra.getModule(),
+                (binder) -> binder.bind(DNSService.class).toInstance(inMemoryDNSService));
+    }
+
+    @Override
+    protected void await() {
+        rule.await();
+    }
+
+    @Override
+    protected InMemoryDNSService getInMemoryDns() {
+        return inMemoryDNSService;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/dnsservice.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/dnsservice.xml b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/dnsservice.xml
new file mode 100644
index 0000000..0978a00
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/dnsservice.xml
@@ -0,0 +1,29 @@
+<?xml version="1.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.                                           
+ -->
+
+<dnsservice>
+  <servers>
+    <server>8.8.8.8</server>
+    <server>62.210.16.6</server>
+  </servers>
+  <autodiscover>false</autodiscover>
+  <authoritative>false</authoritative>
+  <maxcachesize>50000</maxcachesize>
+</dnsservice>

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/domainlist.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/domainlist.xml b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/domainlist.xml
new file mode 100644
index 0000000..fe17431
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/domainlist.xml
@@ -0,0 +1,24 @@
+<?xml version="1.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.                                           
+ -->
+
+<domainlist>
+    <autodetect>false</autodetect>
+    <autodetectIP>false</autodetectIP>
+</domainlist>

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/imapserver.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/imapserver.xml b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/imapserver.xml
new file mode 100644
index 0000000..e997022
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/imapserver.xml
@@ -0,0 +1,54 @@
+<?xml version="1.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.
+-->
+
+
+<imapservers>
+    <imapserver enabled="true">
+        <jmxName>imapserver</jmxName>
+        <bind>0.0.0.0:0</bind>
+        <connectionBacklog>200</connectionBacklog>
+        <tls socketTLS="false" startTLS="false">
+            <!-- To create a new keystore execute:
+            keytool -genkey -alias james -keyalg RSA -keystore /path/to/james/conf/keystore
+              -->
+            <keystore>file://conf/keystore</keystore>
+            <secret>james72laBalle</secret>
+            <provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+        </tls>
+        <connectionLimit>0</connectionLimit>
+        <connectionLimitPerIP>0</connectionLimitPerIP>
+    </imapserver>
+    <imapserver enabled="true">
+        <jmxName>imapserver-ssl</jmxName>
+        <bind>0.0.0.0:0</bind>
+        <connectionBacklog>200</connectionBacklog>
+        <tls socketTLS="false" startTLS="false">
+            <!-- To create a new keystore execute:
+              keytool -genkey -alias james -keyalg RSA -keystore /path/to/james/conf/keystore
+             -->
+            <keystore>file://conf/keystore</keystore>
+            <secret>james72laBalle</secret>
+            <provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+        </tls>
+        <connectionLimit>0</connectionLimit>
+        <connectionLimitPerIP>0</connectionLimitPerIP>
+    </imapserver>
+</imapservers>

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/keystore
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/keystore b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/keystore
new file mode 100644
index 0000000..536a6c7
Binary files /dev/null and b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/keystore differ

http://git-wip-us.apache.org/repos/asf/james-project/blob/2cc544c7/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/listeners.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/listeners.xml b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/listeners.xml
new file mode 100644
index 0000000..7227803
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/listeners.xml
@@ -0,0 +1,53 @@
+<?xml version="1.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.                                           
+ -->
+
+<listeners>
+  <poolSize>8</poolSize>
+
+  <listener>
+    <class>org.apache.james.mailbox.spamassassin.SpamAssassinListener</class>
+    <async>false</async>
+  </listener>
+  <listener>
+    <class>org.apache.james.mailbox.cassandra.MailboxOperationLoggingListener</class>
+  </listener>
+  <listener>
+    <class>org.apache.james.mailbox.quota.mailing.listeners.QuotaThresholdCrossingListener</class>
+    <configuration>
+      <thresholds>
+        <threshold>
+          <value>0.1</value>
+        </threshold>
+      </thresholds>
+      <name>first</name>
+    </configuration>
+  </listener>
+  <listener>
+    <class>org.apache.james.mailbox.quota.mailing.listeners.QuotaThresholdCrossingListener</class>
+    <configuration>
+      <thresholds>
+        <threshold>
+          <value>0.2</value>
+        </threshold>
+      </thresholds>
+      <name>second</name>
+    </configuration>
+  </listener>
+</listeners>
\ No newline at end of file


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


Mime
View raw message