james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [22/22] james-project git commit: JAMES-2595 RegistrableExtension allow to resolve paramter programmatically
Date Wed, 21 Nov 2018 10:07:32 GMT
JAMES-2595 RegistrableExtension allow to resolve paramter programmatically


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

Branch: refs/heads/master
Commit: 3a25b92a8960f46037f30378e9e666f162f8ac34
Parents: 9dd5640
Author: tran tien duc <dtran@linagora.com>
Authored: Tue Nov 20 18:02:24 2018 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Wed Nov 21 16:52:33 2018 +0700

----------------------------------------------------------------------
 .../apache/james/AggregateJunitExtension.java   | 21 ++++++++
 .../apache/james/GuiceModuleTestExtension.java  | 17 +++++++
 .../org/apache/james/JamesServerExtension.java  |  6 ++-
 .../org/apache/james/RegistrableExtension.java  | 15 +++++-
 .../CassandraSpamAssassinContractTest.java      |  6 ---
 .../integration/SpamAssassinContract.java       | 51 +++++++++++---------
 .../SpamAssassinModuleExtension.java            | 14 +++++-
 .../memory/MemorySpamAssassinContractTest.java  |  6 ---
 .../RabbitMQSpamAssassinContractTest.java       |  6 ---
 9 files changed, 98 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/3a25b92a/server/container/guice/guice-common/src/test/java/org/apache/james/AggregateJunitExtension.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/test/java/org/apache/james/AggregateJunitExtension.java
b/server/container/guice/guice-common/src/test/java/org/apache/james/AggregateJunitExtension.java
index 15ad8c4..a8d867c 100644
--- a/server/container/guice/guice-common/src/test/java/org/apache/james/AggregateJunitExtension.java
+++ b/server/container/guice/guice-common/src/test/java/org/apache/james/AggregateJunitExtension.java
@@ -20,9 +20,12 @@
 package org.apache.james;
 
 import java.util.List;
+import java.util.Optional;
 
 import org.apache.james.util.Runnables;
 import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ParameterContext;
+import org.junit.jupiter.api.extension.ParameterResolutionException;
 
 import com.github.fge.lambdas.Throwing;
 import com.google.common.collect.Lists;
@@ -63,4 +66,22 @@ public class AggregateJunitExtension implements RegistrableExtension {
             .map(ext -> Throwing.runnable(() -> ext.afterAll(extensionContext))));
     }
 
+    @Override
+    public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext
extensionContext) throws ParameterResolutionException {
+        return extensionSupportParam(parameterContext, extensionContext)
+            .isPresent();
+    }
+
+    @Override
+    public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
throws ParameterResolutionException {
+        return extensionSupportParam(parameterContext, extensionContext)
+            .map(extension -> extension.resolveParameter(parameterContext, extensionContext))
+            .orElseThrow(() -> new IllegalArgumentException("parameter is not resolved
by registrableExtensions"));
+    }
+
+    private Optional<? extends RegistrableExtension> extensionSupportParam(ParameterContext
parameterContext, ExtensionContext extensionContext) {
+        return registrableExtensions.stream()
+            .filter(extension -> extension.supportsParameter(parameterContext, extensionContext))
+            .findFirst();
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/3a25b92a/server/container/guice/guice-common/src/test/java/org/apache/james/GuiceModuleTestExtension.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/test/java/org/apache/james/GuiceModuleTestExtension.java
b/server/container/guice/guice-common/src/test/java/org/apache/james/GuiceModuleTestExtension.java
index e0bf5e1..581ca1c 100644
--- a/server/container/guice/guice-common/src/test/java/org/apache/james/GuiceModuleTestExtension.java
+++ b/server/container/guice/guice-common/src/test/java/org/apache/james/GuiceModuleTestExtension.java
@@ -19,6 +19,12 @@
 
 package org.apache.james;
 
+import java.util.Optional;
+
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ParameterContext;
+import org.junit.jupiter.api.extension.ParameterResolutionException;
+
 import com.google.inject.Module;
 
 public interface GuiceModuleTestExtension extends RegistrableExtension {
@@ -28,4 +34,15 @@ public interface GuiceModuleTestExtension extends RegistrableExtension
{
     }
 
     default void await() {}
+
+    default Optional<Class<?>> supportedParameterClass() {
+        return Optional.empty();
+    }
+
+    @Override
+    default boolean supportsParameter(ParameterContext parameterContext, ExtensionContext
extensionContext) throws ParameterResolutionException {
+        return supportedParameterClass()
+            .map(clazz -> parameterContext.getParameter().getType() == clazz)
+            .orElse(false);
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/3a25b92a/server/container/guice/guice-common/src/test/java/org/apache/james/JamesServerExtension.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/test/java/org/apache/james/JamesServerExtension.java
b/server/container/guice/guice-common/src/test/java/org/apache/james/JamesServerExtension.java
index 722826c..99c42b2 100644
--- a/server/container/guice/guice-common/src/test/java/org/apache/james/JamesServerExtension.java
+++ b/server/container/guice/guice-common/src/test/java/org/apache/james/JamesServerExtension.java
@@ -87,11 +87,15 @@ public class JamesServerExtension implements BeforeAllCallback, BeforeEachCallba
 
     @Override
     public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext
extensionContext) throws ParameterResolutionException {
-        return (parameterContext.getParameter().getType() == GuiceJamesServer.class);
+        return (parameterContext.getParameter().getType() == GuiceJamesServer.class)
+            || registrableExtension.supportsParameter(parameterContext, extensionContext);
     }
 
     @Override
     public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
throws ParameterResolutionException {
+        if (registrableExtension.supportsParameter(parameterContext, extensionContext)) {
+            return registrableExtension.resolveParameter(parameterContext, extensionContext);
+        }
         return guiceJamesServer;
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/3a25b92a/server/container/guice/guice-common/src/test/java/org/apache/james/RegistrableExtension.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/test/java/org/apache/james/RegistrableExtension.java
b/server/container/guice/guice-common/src/test/java/org/apache/james/RegistrableExtension.java
index 534ce49..1786d3e 100644
--- a/server/container/guice/guice-common/src/test/java/org/apache/james/RegistrableExtension.java
+++ b/server/container/guice/guice-common/src/test/java/org/apache/james/RegistrableExtension.java
@@ -24,8 +24,11 @@ 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;
 
-public interface RegistrableExtension extends BeforeAllCallback, BeforeEachCallback, AfterEachCallback,
AfterAllCallback {
+public interface RegistrableExtension extends BeforeAllCallback, BeforeEachCallback, AfterEachCallback,
AfterAllCallback, ParameterResolver {
     @Override
     default void afterAll(ExtensionContext extensionContext) throws Exception {
 
@@ -45,4 +48,14 @@ public interface RegistrableExtension extends BeforeAllCallback, BeforeEachCallb
     default void beforeEach(ExtensionContext extensionContext) throws Exception {
 
     }
+
+    @Override
+    default boolean supportsParameter(ParameterContext parameterContext, ExtensionContext
extensionContext) throws ParameterResolutionException {
+        return false;
+    }
+
+    @Override
+    default Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
throws ParameterResolutionException {
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/3a25b92a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSpamAssassinContractTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSpamAssassinContractTest.java
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSpamAssassinContractTest.java
index 0772c1c..610d0d3 100644
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSpamAssassinContractTest.java
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSpamAssassinContractTest.java
@@ -30,7 +30,6 @@ import org.apache.james.jmap.methods.integration.SpamAssassinModuleExtension;
 import org.apache.james.mailbox.extractor.TextExtractor;
 import org.apache.james.mailbox.store.search.PDFTextExtractor;
 import org.apache.james.modules.TestJMAPServerModule;
-import org.apache.james.spamassassin.SpamAssassinExtension;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
 class CassandraSpamAssassinContractTest implements SpamAssassinContract {
@@ -48,9 +47,4 @@ class CassandraSpamAssassinContractTest implements SpamAssassinContract
{
             .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class))
             .overrideWith(new TestJMAPServerModule(LIMIT_TO_20_MESSAGES)))
         .build();
-
-    @Override
-    public SpamAssassinExtension.SpamAssassin spamAssassin() {
-        return spamAssassinExtension.spamAssassinExtension().getSpamAssassin();
-    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/3a25b92a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SpamAssassinContract.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SpamAssassinContract.java
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SpamAssassinContract.java
index cb8cd57..a6bdb53 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SpamAssassinContract.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SpamAssassinContract.java
@@ -85,21 +85,20 @@ public interface SpamAssassinContract {
     }
 
     @AfterEach
-    default void tearDown() throws Exception {
-        spamAssassin().clear(ALICE);
+    default void tearDown(SpamAssassinExtension.SpamAssassin spamAssassin) throws Exception
{
+        spamAssassin.clear(ALICE);
     }
 
-    SpamAssassinExtension.SpamAssassin spamAssassin();
-
     default AccessToken accessTokenFor(GuiceJamesServer james, String user, String password)
{
         return authenticateJamesUser(baseUri(james), user, password);
     }
 
     @Test
     default void spamShouldBeDeliveredInSpamMailboxWhenSameMessageHasAlreadyBeenMovedToSpam(
-        GuiceJamesServer jamesServer) throws Exception {
+        GuiceJamesServer jamesServer,
+        SpamAssassinExtension.SpamAssassin spamAssassin) throws Exception {
 
-        spamAssassin().train(ALICE);
+        spamAssassin.train(ALICE);
         AccessToken aliceAccessToken = accessTokenFor(jamesServer, ALICE, ALICE_PASSWORD);
         AccessToken bobAccessToken = accessTokenFor(jamesServer, BOB, BOB_PASSWORD);
 
@@ -148,8 +147,9 @@ public interface SpamAssassinContract {
     }
 
     @Test
-    default void imapCopiesToSpamMailboxShouldBeConsideredAsSpam(GuiceJamesServer jamesServer)
throws Exception {
-        spamAssassin().train(ALICE);
+    default void imapCopiesToSpamMailboxShouldBeConsideredAsSpam(GuiceJamesServer jamesServer,
+                                                                 SpamAssassinExtension.SpamAssassin
spamAssassin) throws Exception {
+        spamAssassin.train(ALICE);
         AccessToken aliceAccessToken = accessTokenFor(jamesServer, ALICE, ALICE_PASSWORD);
         AccessToken bobAccessToken = accessTokenFor(jamesServer, BOB, BOB_PASSWORD);
 
@@ -195,8 +195,9 @@ public interface SpamAssassinContract {
     }
 
     @Test
-    default void imapMovesToSpamMailboxShouldBeConsideredAsSpam(GuiceJamesServer jamesServer)
throws Exception {
-        spamAssassin().train(ALICE);
+    default void imapMovesToSpamMailboxShouldBeConsideredAsSpam(GuiceJamesServer jamesServer,
+                                                                SpamAssassinExtension.SpamAssassin
spamAssassin) throws Exception {
+        spamAssassin.train(ALICE);
         AccessToken aliceAccessToken = accessTokenFor(jamesServer, ALICE, ALICE_PASSWORD);
         AccessToken bobAccessToken = accessTokenFor(jamesServer, BOB, BOB_PASSWORD);
 
@@ -242,8 +243,9 @@ public interface SpamAssassinContract {
     }
 
     @Test
-    default void spamAssassinShouldForgetMessagesMovedOutOfSpamFolderUsingJMAP(GuiceJamesServer
jamesServer) throws Exception {
-        spamAssassin().train(ALICE);
+    default void spamAssassinShouldForgetMessagesMovedOutOfSpamFolderUsingJMAP(GuiceJamesServer
jamesServer,
+                                                                               SpamAssassinExtension.SpamAssassin
spamAssassin) throws Exception {
+        spamAssassin.train(ALICE);
         AccessToken aliceAccessToken = accessTokenFor(jamesServer, ALICE, ALICE_PASSWORD);
         AccessToken bobAccessToken = accessTokenFor(jamesServer, BOB, BOB_PASSWORD);
 
@@ -305,8 +307,9 @@ public interface SpamAssassinContract {
     }
 
     @Test
-    default void movingAMailToTrashShouldNotImpactSpamassassinLearning(GuiceJamesServer jamesServer)
throws Exception {
-        spamAssassin().train(ALICE);
+    default void movingAMailToTrashShouldNotImpactSpamassassinLearning(GuiceJamesServer jamesServer,
+                                                                       SpamAssassinExtension.SpamAssassin
spamAssassin) throws Exception {
+        spamAssassin.train(ALICE);
         AccessToken aliceAccessToken = accessTokenFor(jamesServer, ALICE, ALICE_PASSWORD);
         AccessToken bobAccessToken = accessTokenFor(jamesServer, BOB, BOB_PASSWORD);
 
@@ -368,8 +371,9 @@ public interface SpamAssassinContract {
     }
 
     @Test
-    default void spamAssassinShouldForgetMessagesMovedOutOfSpamFolderUsingIMAP(GuiceJamesServer
jamesServer) throws Exception {
-        spamAssassin().train(ALICE);
+    default void spamAssassinShouldForgetMessagesMovedOutOfSpamFolderUsingIMAP(GuiceJamesServer
jamesServer,
+                                                                               SpamAssassinExtension.SpamAssassin
spamAssassin) throws Exception {
+        spamAssassin.train(ALICE);
         AccessToken aliceAccessToken = accessTokenFor(jamesServer, ALICE, ALICE_PASSWORD);
         AccessToken bobAccessToken = accessTokenFor(jamesServer, BOB, BOB_PASSWORD);
 
@@ -428,8 +432,9 @@ public interface SpamAssassinContract {
     }
 
     @Test
-    default void expungingSpamMessageShouldNotImpactSpamAssassinState(GuiceJamesServer jamesServer)
throws Exception {
-        spamAssassin().train(ALICE);
+    default void expungingSpamMessageShouldNotImpactSpamAssassinState(GuiceJamesServer jamesServer,
+                                                                      SpamAssassinExtension.SpamAssassin
spamAssassin) throws Exception {
+        spamAssassin.train(ALICE);
         AccessToken aliceAccessToken = accessTokenFor(jamesServer, ALICE, ALICE_PASSWORD);
         AccessToken bobAccessToken = accessTokenFor(jamesServer, BOB, BOB_PASSWORD);
 
@@ -489,8 +494,9 @@ public interface SpamAssassinContract {
     }
 
     @Test
-    default void deletingSpamMessageShouldNotImpactSpamAssassinState(GuiceJamesServer jamesServer)
throws Exception {
-        spamAssassin().train(ALICE);
+    default void deletingSpamMessageShouldNotImpactSpamAssassinState(GuiceJamesServer jamesServer,
+                                                                     SpamAssassinExtension.SpamAssassin
spamAssassin) throws Exception {
+        spamAssassin.train(ALICE);
         AccessToken aliceAccessToken = accessTokenFor(jamesServer, ALICE, ALICE_PASSWORD);
         AccessToken bobAccessToken = accessTokenFor(jamesServer, BOB, BOB_PASSWORD);
 
@@ -570,8 +576,9 @@ public interface SpamAssassinContract {
     }
 
     @Test
-    default void spamShouldBeDeliveredInSpamMailboxOrInboxWhenMultipleRecipientsConfigurations(GuiceJamesServer
jamesServer) throws Exception {
-        spamAssassin().train(ALICE);
+    default void spamShouldBeDeliveredInSpamMailboxOrInboxWhenMultipleRecipientsConfigurations(GuiceJamesServer
jamesServer,
+                                                                                        
      SpamAssassinExtension.SpamAssassin spamAssassin) throws Exception {
+        spamAssassin.train(ALICE);
         AccessToken aliceAccessToken = accessTokenFor(jamesServer, ALICE, ALICE_PASSWORD);
         AccessToken bobAccessToken = accessTokenFor(jamesServer, BOB, BOB_PASSWORD);
         AccessToken paulAccessToken = accessTokenFor(jamesServer, PAUL, PAUL_PASSWORD);

http://git-wip-us.apache.org/repos/asf/james-project/blob/3a25b92a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SpamAssassinModuleExtension.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SpamAssassinModuleExtension.java
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SpamAssassinModuleExtension.java
index a4e6e2d..52c3cb5 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SpamAssassinModuleExtension.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SpamAssassinModuleExtension.java
@@ -19,9 +19,13 @@
 
 package org.apache.james.jmap.methods.integration;
 
+import java.util.Optional;
+
 import org.apache.james.GuiceModuleTestExtension;
 import org.apache.james.spamassassin.SpamAssassinExtension;
 import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ParameterContext;
+import org.junit.jupiter.api.extension.ParameterResolutionException;
 
 import com.google.inject.Module;
 
@@ -48,7 +52,13 @@ public class SpamAssassinModuleExtension implements GuiceModuleTestExtension
{
         return new SpamAssassinModule(spamAssassin);
     }
 
-    public SpamAssassinExtension spamAssassinExtension() {
-        return spamAssassin;
+    @Override
+    public Optional<Class<?>> supportedParameterClass() {
+        return Optional.of(SpamAssassinExtension.SpamAssassin.class);
+    }
+
+    @Override
+    public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
throws ParameterResolutionException {
+        return spamAssassin.getSpamAssassin();
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/3a25b92a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySpamAssassinContractTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySpamAssassinContractTest.java
b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySpamAssassinContractTest.java
index 29c501c..5d1ab3e 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySpamAssassinContractTest.java
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySpamAssassinContractTest.java
@@ -31,7 +31,6 @@ import org.apache.james.mailbox.store.search.MessageSearchIndex;
 import org.apache.james.mailbox.store.search.PDFTextExtractor;
 import org.apache.james.mailbox.store.search.SimpleMessageSearchIndex;
 import org.apache.james.modules.TestJMAPServerModule;
-import org.apache.james.spamassassin.SpamAssassinExtension;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
 class MemorySpamAssassinContractTest implements SpamAssassinContract {
@@ -49,9 +48,4 @@ class MemorySpamAssassinContractTest implements SpamAssassinContract {
             .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class))
             .overrideWith(binder -> binder.bind(MessageSearchIndex.class).to(SimpleMessageSearchIndex.class)))
         .build();
-
-    @Override
-    public SpamAssassinExtension.SpamAssassin spamAssassin() {
-        return spamAssassinExtension.spamAssassinExtension().getSpamAssassin();
-    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/3a25b92a/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
index ac332a1..ecb72e5 100644
--- 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
@@ -32,7 +32,6 @@ import org.apache.james.modules.RabbitMQExtension;
 import org.apache.james.modules.SwiftBlobStoreExtension;
 import org.apache.james.modules.TestJMAPServerModule;
 import org.apache.james.modules.blobstore.BlobStoreChoosingConfiguration;
-import org.apache.james.spamassassin.SpamAssassinExtension;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
 class RabbitMQSpamAssassinContractTest implements SpamAssassinContract {
@@ -54,9 +53,4 @@ class RabbitMQSpamAssassinContractTest implements SpamAssassinContract {
                 .toInstance(BlobStoreChoosingConfiguration.objectStorage()))
             .overrideWith(new TestJMAPServerModule(LIMIT_TO_20_MESSAGES)))
         .build();
-
-    @Override
-    public SpamAssassinExtension.SpamAssassin spamAssassin() {
-        return spamAssassinExtension.spamAssassinExtension().getSpamAssassin();
-    }
 }


---------------------------------------------------------------------
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