You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2021/01/21 06:42:26 UTC

[james-project] branch master updated (e9bb797 -> ecd8f2e)

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git.


    from e9bb797  JAMES-3471 Refactor and generify the Factory for handling events with MailboxChange and EmailChange
     new b8960c5  JAMES-3431 Migrate Mailet integration tests to JUNIT 5
     new ecd8f2e  JAMES-3431 Migrate Mailet integration tests: JUNIT 5 related visibility changes

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../james/mailets/AddDeliveredToHeaderTest.java    |  32 +++---
 .../james/mailets/BounceIntegrationTest.java       |  61 ++++++-----
 .../mailets/CommonMailetConfigurationTest.java     |  35 ++++---
 .../apache/james/mailets/DKIMIntegrationTest.java  |  31 +++---
 ...ectResolutionRemoteDeliveryIntegrationTest.java |  49 +++++----
 .../GatewayRemoteDeliveryIntegrationTest.java      |  61 ++++++-----
 .../org/apache/james/mailets/MailetErrorsTest.java | 112 ++++++++++-----------
 .../mailets/NetworkMatcherIntegrationTest.java     |  58 +++++------
 .../RecipientRewriteTableIntegrationTest.java      |  46 ++++-----
 .../james/mailets/RemoteDeliveryErrorTest.java     |  62 ++++++------
 .../mailets/SenderIsLocalIntegrationTest.java      |  36 +++----
 .../org/apache/james/mailets/SieveDelivery.java    |  32 +++---
 .../mailets/SizeGreaterThanIntegrationTest.java    |  28 +++---
 .../james/mailets/SmtpAuthIntegrationTest.java     |  36 +++----
 .../configuration/MailetConfigurationTest.java     |  23 ++---
 .../configuration/SmtpConfigurationTest.java       |   2 +-
 .../crypto/SMIMEDecryptIntegrationTest.java        |  26 +++--
 .../mailets/crypto/SMIMESignIntegrationTest.java   |  27 +++--
 .../java/org/apache/james/smtp/DSNRelayTest.java   |  51 +++++-----
 .../james/smtp/SmtpAuthorizedAddressesTest.java    |  45 ++++-----
 .../james/smtp/SmtpBracketEnforcementTest.java     |  40 ++++----
 .../org/apache/james/smtp/SmtpContentTypeTest.java |  37 ++++---
 .../james/smtp/SmtpIdentityVerificationTest.java   |  37 ++++---
 .../org/apache/james/smtp/SmtpNullSenderTest.java  |  34 +++----
 .../apache/james/smtp/SmtpRandomStoringTest.java   |  35 ++++---
 .../apache/james/smtp/SmtpSizeLimitationTest.java  |  32 +++---
 .../james/smtp/extensions/SMTPHeloHooksTest.java   |  52 +++++-----
 .../james/smtp/extensions/StaticInputChecker.java  |   7 +-
 .../james/transport/mailets/AddFooterTest.java     |  36 +++----
 .../james/transport/mailets/AliasMappingTest.java  |  62 ++++++------
 .../mailets/AmqpForwardAttachmentTest.java         |  52 ++++------
 .../transport/mailets/ContactExtractorTest.java    |  49 ++++-----
 .../transport/mailets/DlpIntegrationTest.java      |  47 +++++----
 .../james/transport/mailets/DomainMappingTest.java |  42 ++++----
 .../transport/mailets/GroupMappingRelayTest.java   |  36 ++++---
 .../james/transport/mailets/GroupMappingTest.java  |  66 ++++++------
 .../mailets/ICSAttachmentWorkflowTest.java         |  81 +++++++--------
 .../transport/mailets/IsOverQuotaMatcherTest.java  |  42 ++++----
 .../mailets/MailReprocessingIntegrationTest.java   |  35 ++++---
 .../mailets/RemoteDeliveryErrorHandlingTest.java   |   2 +-
 .../mailets/SpamAssassinIntegrationTest.java       |  41 ++++----
 .../transport/mailets/StripAttachmentTest.java     |  32 +++---
 .../mailets/ToRepositoryIntegrationTest.java       |  36 +++----
 .../ToSenderDomainRepositoryIntegrationTest.java   |  51 +++++-----
 .../amqp/{AmqpRule.java => AmqpExtension.java}     |  47 ++++++---
 .../apache/james/util/docker/DockerContainer.java  |  14 ++-
 .../main/java/org/apache/james/utils/FakeSmtp.java |  21 +++-
 47 files changed, 951 insertions(+), 968 deletions(-)
 rename server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/{AmqpRule.java => AmqpExtension.java} (76%)


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


[james-project] 01/02: JAMES-3431 Migrate Mailet integration tests to JUNIT 5

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit b8960c53e4fdbbc8e87b4202d4aafe0a271aca0b
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Jan 19 11:19:10 2021 +0700

    JAMES-3431 Migrate Mailet integration tests to JUNIT 5
---
 .../james/mailets/AddDeliveredToHeaderTest.java    |  26 ++---
 .../james/mailets/BounceIntegrationTest.java       |  57 ++++++-----
 .../mailets/CommonMailetConfigurationTest.java     |  25 +++--
 .../apache/james/mailets/DKIMIntegrationTest.java  |  25 +++--
 ...ectResolutionRemoteDeliveryIntegrationTest.java |  47 +++++----
 .../GatewayRemoteDeliveryIntegrationTest.java      |  53 +++++-----
 .../org/apache/james/mailets/MailetErrorsTest.java | 108 ++++++++++-----------
 .../mailets/NetworkMatcherIntegrationTest.java     |  54 +++++------
 .../RecipientRewriteTableIntegrationTest.java      |  26 ++---
 .../james/mailets/RemoteDeliveryErrorTest.java     |  34 +++----
 .../mailets/SenderIsLocalIntegrationTest.java      |  26 ++---
 .../org/apache/james/mailets/SieveDelivery.java    |  26 ++---
 .../mailets/SizeGreaterThanIntegrationTest.java    |  26 ++---
 .../james/mailets/SmtpAuthIntegrationTest.java     |  26 ++---
 .../configuration/MailetConfigurationTest.java     |  23 ++---
 .../configuration/SmtpConfigurationTest.java       |   2 +-
 .../crypto/SMIMEDecryptIntegrationTest.java        |  26 +++--
 .../mailets/crypto/SMIMESignIntegrationTest.java   |  27 +++---
 .../java/org/apache/james/smtp/DSNRelayTest.java   |  34 +++----
 .../james/smtp/SmtpAuthorizedAddressesTest.java    |  41 ++++----
 .../james/smtp/SmtpBracketEnforcementTest.java     |  36 +++----
 .../org/apache/james/smtp/SmtpContentTypeTest.java |  33 +++----
 .../james/smtp/SmtpIdentityVerificationTest.java   |  32 +++---
 .../org/apache/james/smtp/SmtpNullSenderTest.java  |  26 ++---
 .../apache/james/smtp/SmtpRandomStoringTest.java   |  27 +++---
 .../apache/james/smtp/SmtpSizeLimitationTest.java  |  28 +++---
 .../james/smtp/extensions/SMTPHeloHooksTest.java   |  52 +++++-----
 .../james/smtp/extensions/StaticInputChecker.java  |   7 +-
 .../james/transport/mailets/AddFooterTest.java     |  28 +++---
 .../james/transport/mailets/AliasMappingTest.java  |  26 ++---
 .../mailets/AmqpForwardAttachmentTest.java         |  46 ++++-----
 .../transport/mailets/ContactExtractorTest.java    |  43 ++++----
 .../transport/mailets/DlpIntegrationTest.java      |  43 ++++----
 .../james/transport/mailets/DomainMappingTest.java |  26 ++---
 .../transport/mailets/GroupMappingRelayTest.java   |  30 +++---
 .../james/transport/mailets/GroupMappingTest.java  |  26 ++---
 .../mailets/ICSAttachmentWorkflowTest.java         |  61 +++++-------
 .../transport/mailets/IsOverQuotaMatcherTest.java  |  26 ++---
 .../mailets/MailReprocessingIntegrationTest.java   |  25 +++--
 .../mailets/SpamAssassinIntegrationTest.java       |  29 +++---
 .../transport/mailets/StripAttachmentTest.java     |  26 ++---
 .../mailets/ToRepositoryIntegrationTest.java       |  26 ++---
 .../ToSenderDomainRepositoryIntegrationTest.java   |  46 ++++-----
 .../amqp/{AmqpRule.java => AmqpExtension.java}     |  47 ++++++---
 .../apache/james/util/docker/DockerContainer.java  |  14 ++-
 .../main/java/org/apache/james/utils/FakeSmtp.java |  21 +++-
 46 files changed, 765 insertions(+), 777 deletions(-)

diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/AddDeliveredToHeaderTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/AddDeliveredToHeaderTest.java
index 4591e31..f56dca4 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/AddDeliveredToHeaderTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/AddDeliveredToHeaderTest.java
@@ -27,6 +27,8 @@ import static org.apache.james.mailets.configuration.Constants.RECIPIENT;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import org.apache.james.modules.protocols.ImapGuiceProbe;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
 import org.apache.james.probe.DataProbe;
@@ -34,25 +36,23 @@ import org.apache.james.transport.mailets.AddDeliveredToHeader;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class AddDeliveredToHeaderTest {
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setup() throws Exception {
-        jamesServer = TemporaryJamesServer.builder().build(temporaryFolder.newFolder());
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = TemporaryJamesServer.builder().build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -60,7 +60,7 @@ public class AddDeliveredToHeaderTest {
         dataProbe.addUser(RECIPIENT, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
index aea61c4..43e337b 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
@@ -26,6 +26,7 @@ import static org.apache.james.mailets.configuration.Constants.RECIPIENT;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
 import java.util.Arrays;
 
 import javax.mail.internet.MimeMessage;
@@ -52,10 +53,10 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
 import org.apache.mailet.Mailet;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class BounceIntegrationTest {
     public static final String POSTMASTER = "postmaster@" + DEFAULT_DOMAIN;
@@ -65,23 +66,21 @@ public class BounceIntegrationTest {
     public static final String OTHER = "other@" + DEFAULT_DOMAIN;
     public static final String OTHER_PASSWORD = "otherSecret";
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void dsnBounceMailetShouldDeliverBounce() throws Exception {
-        setup(DSNBounce.class);
+    public void dsnBounceMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+        setup(temporaryFolder, DSNBounce.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(SENDER, RECIPIENT);
@@ -93,8 +92,8 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void dsnBounceMailetShouldDeliverBounceToTheMailFromAddress() throws Exception {
-        setup(DSNBounce.class);
+    public void dsnBounceMailetShouldDeliverBounceToTheMailFromAddress(@TempDir File temporaryFolder) throws Exception {
+        setup(temporaryFolder, DSNBounce.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessageWithHeaders(SENDER, RECIPIENT,
@@ -112,8 +111,8 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void dsnBounceMailetBouncedMailShouldBeAdressedToTheSenderInEnvelopeAndHeader() throws Exception {
-        setup(DSNBounce.class);
+    public void dsnBounceMailetBouncedMailShouldBeAdressedToTheSenderInEnvelopeAndHeader(@TempDir File temporaryFolder) throws Exception {
+        setup(temporaryFolder, DSNBounce.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessageWithHeaders(SENDER, RECIPIENT,
@@ -132,7 +131,7 @@ public class BounceIntegrationTest {
         assertThat(mimeMessage.getHeader("To")[0]).isEqualTo(SENDER);
     }
 
-    private void setup(Class<? extends Mailet> mailet, Pair<String, String>... additionalProperties) throws Exception {
+    private void setup(File tempDir, Class<? extends Mailet> mailet, Pair<String, String>... additionalProperties) throws Exception {
         MailetConfiguration.Builder mailetConfiguration = MailetConfiguration.builder()
                 .matcher(All.class)
                 .mailet(mailet)
@@ -145,7 +144,7 @@ public class BounceIntegrationTest {
                 .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
                 .withMailetContainer(
                         generateMailetContainerConfiguration(mailetConfiguration))
-                .build(temporaryFolder.newFolder());
+                .build(tempDir);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class)
@@ -158,8 +157,8 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void bounceMailetShouldDeliverBounce() throws Exception {
-        setup(Bounce.class);
+    public void bounceMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+        setup(temporaryFolder, Bounce.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(SENDER, RECIPIENT);
@@ -171,8 +170,8 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void forwardMailetShouldDeliverBounce() throws Exception {
-        setup(Forward.class, Pair.of("forwardTo", SENDER));
+    public void forwardMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+        setup(temporaryFolder, Forward.class, Pair.of("forwardTo", SENDER));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage("any@" + DEFAULT_DOMAIN, RECIPIENT);
@@ -184,8 +183,8 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void redirectMailetShouldDeliverBounce() throws Exception {
-        setup(Redirect.class, Pair.of("recipients", SENDER));
+    public void redirectMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+        setup(temporaryFolder, Redirect.class, Pair.of("recipients", SENDER));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage("any@" + DEFAULT_DOMAIN, RECIPIENT);
@@ -197,8 +196,8 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void resendMailetShouldDeliverBounce() throws Exception {
-        setup(Resend.class, Pair.of("recipients", SENDER));
+    public void resendMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+        setup(temporaryFolder, Resend.class, Pair.of("recipients", SENDER));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage("any@" + DEFAULT_DOMAIN, RECIPIENT);
@@ -210,8 +209,8 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void notifySenderMailetShouldDeliverBounce() throws Exception {
-        setup(NotifySender.class);
+    public void notifySenderMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+        setup(temporaryFolder, NotifySender.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(SENDER, RECIPIENT);
@@ -223,8 +222,8 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void notifyPostmasterMailetShouldDeliverBounce() throws Exception {
-        setup(NotifyPostmaster.class);
+    public void notifyPostmasterMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+        setup(temporaryFolder, NotifyPostmaster.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage("any@" + DEFAULT_DOMAIN, RECIPIENT);
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/CommonMailetConfigurationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/CommonMailetConfigurationTest.java
index a2694a9..26984c2 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/CommonMailetConfigurationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/CommonMailetConfigurationTest.java
@@ -26,6 +26,7 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.RECIPIENT;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 
+import java.io.File;
 import java.util.Locale;
 
 import org.apache.james.modules.protocols.ImapGuiceProbe;
@@ -34,25 +35,23 @@ import org.apache.james.probe.DataProbe;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class CommonMailetConfigurationTest {
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setup() throws Exception {
-        jamesServer = TemporaryJamesServer.builder().build(temporaryFolder.newFolder());
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = TemporaryJamesServer.builder().build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -60,7 +59,7 @@ public class CommonMailetConfigurationTest {
         dataProbe.addUser(RECIPIENT, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DKIMIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DKIMIntegrationTest.java
index 0b2dc92..19ce6e3 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DKIMIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DKIMIntegrationTest.java
@@ -25,6 +25,7 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
@@ -46,11 +47,11 @@ import org.apache.james.transport.matchers.All;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class DKIMIntegrationTest {
 
@@ -99,18 +100,16 @@ public class DKIMIntegrationTest {
             "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYDaYKXzwVYwqWbLhmuJ66aTAN8wmDR+rfHE8HfnkSOax0oIoTM5zquZrTLo30870YMfYzxwfB6j/Nz3QdwrUD/t0YMYJiUKyWJnCKfZXHJBJ+yfRHr7oW+UW3cVo9CG2bBfIxsInwYe175g9UjyntJpWueqdEIo1c2bhv9Mp66QIDAQAB;",
             "selector", "example.com");
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
     private List<Optional<String>> dkimAuthResults;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         dkimAuthResults = new ArrayList<>();
         ExtractAttributeStub.setDkimAuthResultInspector(value -> dkimAuthResults.add(value.map(result -> (String) result)));
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
@@ -125,7 +124,7 @@ public class DKIMIntegrationTest {
             .withBase(MemoryJamesServerMain.IN_MEMORY_SERVER_AGGREGATE_MODULE)
             .withOverrides(binder -> binder.bind(PublicKeyRecordRetriever.class).toInstance(MOCK_PUBLIC_KEY_RECORD_RETRIEVER))
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -134,7 +133,7 @@ public class DKIMIntegrationTest {
         dataProbe.addUser(RECIPIENT, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DirectResolutionRemoteDeliveryIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DirectResolutionRemoteDeliveryIntegrationTest.java
index cdd54c2..90693a8 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DirectResolutionRemoteDeliveryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DirectResolutionRemoteDeliveryIntegrationTest.java
@@ -29,6 +29,7 @@ import static org.apache.james.mailets.configuration.MailetConfiguration.LOCAL_D
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasSize;
 
+import java.io.File;
 import java.net.InetAddress;
 import java.util.List;
 
@@ -46,12 +47,11 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.FakeSmtp;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.ClassRule;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import com.google.common.collect.ImmutableList;
 
@@ -67,30 +67,27 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
     private static final ImmutableList<InetAddress> ADDRESS_EMPTY_LIST = ImmutableList.of();
     private static final ImmutableList<String> RECORD_EMPTY_LIST = ImmutableList.of();
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
-    @ClassRule
+    @RegisterExtension
     public static FakeSmtp fakeSmtp = FakeSmtp.withDefaultPort();
-    @ClassRule
+    @RegisterExtension
     public static FakeSmtp fakeSmtpOnPort26 = FakeSmtp.withSmtpPort(26);
 
     private TemporaryJamesServer jamesServer;
     private DataProbe dataProbe;
 
-    @After
+    @AfterEach
     public void tearDown() {
-        fakeSmtp.clean();
         if (jamesServer != null) {
             jamesServer.shutdown();
         }
     }
 
     @Test
-    public void directResolutionShouldBeWellPerformed() throws Exception {
+    public void directResolutionShouldBeWellPerformed(@TempDir File temporaryFolder) throws Exception {
         InMemoryDNSService inMemoryDNSService = new InMemoryDNSService()
             .registerMxRecord(JAMES_ANOTHER_DOMAIN, fakeSmtp.getContainer().getContainerIp());
 
@@ -100,7 +97,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
             .withMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
                 .putProcessor(directResolutionTransport())
                 .putProcessor(CommonProcessors.bounces()))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -115,7 +112,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void directResolutionShouldFailoverOnSecondMxWhenFirstMxFailed() throws Exception {
+    public void directResolutionShouldFailoverOnSecondMxWhenFirstMxFailed(@TempDir File temporaryFolder) throws Exception {
         InMemoryDNSService inMemoryDNSService = new InMemoryDNSService()
             .registerRecord(JAMES_ANOTHER_DOMAIN, ADDRESS_EMPTY_LIST, JAMES_ANOTHER_MX_DOMAINS, RECORD_EMPTY_LIST)
             .registerMxRecord(JAMES_ANOTHER_MX_DOMAIN_1, fakeSmtpOnPort26.getContainer().getContainerIp())
@@ -127,7 +124,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
             .withMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
                 .putProcessor(directResolutionTransport())
                 .putProcessor(CommonProcessors.bounces()))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -142,7 +139,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void directResolutionShouldBounceUponUnreachableMxRecords() throws Exception {
+    public void directResolutionShouldBounceUponUnreachableMxRecords(@TempDir File temporaryFolder) throws Exception {
         InMemoryDNSService inMemoryDNSService = new InMemoryDNSService()
             .registerRecord(JAMES_ANOTHER_DOMAIN, ADDRESS_EMPTY_LIST, ImmutableList.of("unknown"), RECORD_EMPTY_LIST);
 
@@ -152,7 +149,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
             .withMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
                 .putProcessor(transport())
                 .putProcessor(CommonProcessors.bounces()))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -169,7 +166,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void directResolutionShouldBounceWhenNoMxRecord() throws Exception {
+    public void directResolutionShouldBounceWhenNoMxRecord(@TempDir File temporaryFolder) throws Exception {
         InMemoryDNSService inMemoryDNSService = new InMemoryDNSService()
             .registerRecord(JAMES_ANOTHER_DOMAIN, ADDRESS_EMPTY_LIST, RECORD_EMPTY_LIST, RECORD_EMPTY_LIST);
 
@@ -179,7 +176,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
             .withMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
                 .putProcessor(transport())
                 .putProcessor(CommonProcessors.bounces()))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -195,9 +192,9 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
             .awaitMessage(awaitAtMostOneMinute);
     }
 
-    @Ignore("JAMES-2913 PerRecipientHeaders are not handled by RemoteDelivery")
+    @Disabled("JAMES-2913 PerRecipientHeaders are not handled by RemoteDelivery")
     @Test
-    public void remoteDeliveryShouldAddPerRecipientHeaders() throws Exception {
+    public void remoteDeliveryShouldAddPerRecipientHeaders(@TempDir File temporaryFolder) throws Exception {
         InMemoryDNSService inMemoryDNSService = new InMemoryDNSService()
             .registerMxRecord(JAMES_ANOTHER_DOMAIN, fakeSmtp.getContainer().getContainerIp());
 
@@ -215,7 +212,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
                     .addMailet(MailetConfiguration.remoteDeliveryBuilder()
                         .matcher(All.class)))
                 .putProcessor(CommonProcessors.bounces()))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
index b2ad4d9..a9f3dbf 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
@@ -28,6 +28,8 @@ import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMin
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasSize;
 
+import java.io.File;
+
 import org.apache.james.dnsservice.api.DNSService;
 import org.apache.james.dnsservice.api.InMemoryDNSService;
 import org.apache.james.mailets.configuration.CommonProcessors;
@@ -42,12 +44,11 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.FakeSmtp;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class GatewayRemoteDeliveryIntegrationTest {
     private static final String JAMES_ANOTHER_DOMAIN = "james.com";
@@ -55,26 +56,24 @@ public class GatewayRemoteDeliveryIntegrationTest {
     private static final String FROM = "from@" + DEFAULT_DOMAIN;
     private static final String RECIPIENT = "touser@" + JAMES_ANOTHER_DOMAIN;
 
-    @ClassRule
+    @RegisterExtension
     public static FakeSmtp fakeSmtp = FakeSmtp.withDefaultPort();
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
     private DataProbe dataProbe;
     private InMemoryDNSService inMemoryDNSService;
 
-    @Before
+    @BeforeEach
     public void setup() throws Exception {
         inMemoryDNSService = new InMemoryDNSService()
             .registerMxRecord(JAMES_ANOTHER_DOMAIN, fakeSmtp.getContainer().getContainerIp());
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         fakeSmtp.clean();
         if (jamesServer != null) {
@@ -83,13 +82,13 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void outgoingMailShouldTransitThroughGatewayWhenNoPort() throws Exception {
+    public void outgoingMailShouldTransitThroughGatewayWhenNoPort(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = fakeSmtp.getContainer().getContainerIp();
 
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(generateMailetContainerConfiguration(gatewayProperty))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -104,13 +103,13 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void outgoingMailShouldTransitThroughGatewayWhenPort() throws Exception {
+    public void outgoingMailShouldTransitThroughGatewayWhenPort(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = fakeSmtp.getContainer().getContainerIp() + ":25";
 
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(generateMailetContainerConfiguration(gatewayProperty))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -124,13 +123,13 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void outgoingMailShouldTransitThroughGatewayWhenSeveralIps() throws Exception {
+    public void outgoingMailShouldTransitThroughGatewayWhenSeveralIps(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = fakeSmtp.getContainer().getContainerIp() + ",invalid.domain";
 
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(generateMailetContainerConfiguration(gatewayProperty))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -145,13 +144,13 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void outgoingMailShouldFallbackToSecondGatewayWhenFirstInvalid() throws Exception {
+    public void outgoingMailShouldFallbackToSecondGatewayWhenFirstInvalid(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = "invalid.domain," + fakeSmtp.getContainer().getContainerIp();
 
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(generateMailetContainerConfiguration(gatewayProperty))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -166,14 +165,14 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void outgoingMailShouldNotBeSentDirectlyToTheHostWhenGatewayFails() throws Exception {
+    public void outgoingMailShouldNotBeSentDirectlyToTheHostWhenGatewayFails(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = "invalid.domain";
 
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_AND_IMAP_MODULE)
             .withOverrides(binder -> binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             .withMailetContainer(generateMailetContainerConfiguration(gatewayProperty))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -192,14 +191,14 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void remoteDeliveryShouldBounceUponFailure() throws Exception {
+    public void remoteDeliveryShouldBounceUponFailure(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = "invalid.domain";
 
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_AND_IMAP_MODULE)
             .withOverrides(binder -> binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             .withMailetContainer(generateMailetContainerConfiguration(gatewayProperty))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -216,7 +215,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void remoteDeliveryShouldBounceUponFailureWhenNoBounceProcessor() throws Exception {
+    public void remoteDeliveryShouldBounceUponFailureWhenNoBounceProcessor(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = "invalid.domain";
 
         jamesServer = TemporaryJamesServer.builder()
@@ -229,7 +228,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
                     .addMailet(MailetConfiguration.remoteDeliveryBuilderNoBounces()
                         .matcher(All.class)
                         .addProperty("gateway", gatewayProperty))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java
index f14aa8b..fe83f2d 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java
@@ -26,6 +26,8 @@ import static org.apache.james.mailets.configuration.Constants.FROM;
 import static org.apache.james.mailets.configuration.Constants.LOCALHOST_IP;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 
+import java.io.File;
+
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
 import org.apache.james.mailets.configuration.MailetContainer;
@@ -48,23 +50,21 @@ import org.apache.james.transport.matchers.All;
 import org.apache.james.transport.matchers.HasException;
 import org.apache.james.utils.MailRepositoryProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class MailetErrorsTest {
     public static final String CUSTOM_PROCESSOR = "custom";
     public static final MailRepositoryUrl CUSTOM_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/custom/");
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender smtpMessageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @After
+    @AfterEach
     public void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
@@ -72,7 +72,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void mailetProcessorsShouldHandleMessagingException() throws Exception {
+    public void mailetProcessorsShouldHandleMessagingException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -82,7 +82,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(ErrorMailet.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -92,7 +92,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void mailetProcessingShouldHandleClassNotFoundException() throws Exception {
+    public void mailetProcessingShouldHandleClassNotFoundException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -102,7 +102,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(NoClassDefFoundErrorMailet.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -112,7 +112,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void matcherProcessingShouldHandleClassNotFoundException() throws Exception {
+    public void matcherProcessingShouldHandleClassNotFoundException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -122,7 +122,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(NoClassDefFoundErrorMatcher.class)
                         .mailet(Null.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -132,7 +132,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void mailetProcessorsShouldHandleRuntimeException() throws Exception {
+    public void mailetProcessorsShouldHandleRuntimeException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -142,7 +142,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(RuntimeExceptionMailet.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -152,7 +152,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void spoolerShouldEventuallyProcessUponTemporaryError() throws Exception {
+    public void spoolerShouldEventuallyProcessUponTemporaryError(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -166,7 +166,7 @@ public class MailetErrorsTest {
                         .matcher(All.class)
                         .mailet(ToRepository.class)
                         .addProperty("repositoryPath", CUSTOM_REPOSITORY.asString()))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -176,7 +176,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void spoolerShouldEventuallyProcessMailsAfterThreadSuicide() throws Exception {
+    public void spoolerShouldEventuallyProcessMailsAfterThreadSuicide(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -190,7 +190,7 @@ public class MailetErrorsTest {
                         .matcher(All.class)
                         .mailet(ToRepository.class)
                         .addProperty("repositoryPath", CUSTOM_REPOSITORY.asString()))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -200,7 +200,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void spoolerShouldNotInfinitLoopUponPermanentError() throws Exception {
+    public void spoolerShouldNotInfinitLoopUponPermanentError(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -210,7 +210,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(RuntimeErrorMailet.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -220,7 +220,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void mailetProcessorsShouldHandleMessagingExceptionWhenSpecificErrorHandlingSpecified() throws Exception {
+    public void mailetProcessorsShouldHandleMessagingExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -232,7 +232,7 @@ public class MailetErrorsTest {
                         .matcher(All.class)
                         .mailet(ErrorMailet.class)
                         .addProperty("onMailetException", CUSTOM_PROCESSOR))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -243,7 +243,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void mailetProcessorsShouldHandleRuntimeExceptionWhenSpecificErrorHandlingSpecified() throws Exception {
+    public void mailetProcessorsShouldHandleRuntimeExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -255,7 +255,7 @@ public class MailetErrorsTest {
                         .matcher(All.class)
                         .mailet(RuntimeExceptionMailet.class)
                         .addProperty("onMailetException", CUSTOM_PROCESSOR))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -265,7 +265,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onExceptionIgnoreShouldContinueProcessingWhenRuntimeException() throws Exception {
+    public void onExceptionIgnoreShouldContinueProcessingWhenRuntimeException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -281,7 +281,7 @@ public class MailetErrorsTest {
                         .matcher(All.class)
                         .mailet(ToRepository.class)
                         .addProperty("repositoryPath", CUSTOM_REPOSITORY.asString()))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -291,7 +291,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onExceptionIgnoreShouldContinueProcessingWhenMessagingException() throws Exception {
+    public void onExceptionIgnoreShouldContinueProcessingWhenMessagingException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -307,7 +307,7 @@ public class MailetErrorsTest {
                         .matcher(All.class)
                         .mailet(ToRepository.class)
                         .addProperty("repositoryPath", CUSTOM_REPOSITORY.asString()))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -317,7 +317,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void matcherProcessorsShouldHandleMessagingException() throws Exception {
+    public void matcherProcessorsShouldHandleMessagingException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -327,7 +327,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(ErrorMatcher.class)
                         .mailet(NoopMailet.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -337,7 +337,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void matcherProcessorsShouldHandleRuntimeException() throws Exception {
+    public void matcherProcessorsShouldHandleRuntimeException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -347,7 +347,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(RuntimeExceptionMatcher.class)
                         .mailet(NoopMailet.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -357,7 +357,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void matcherProcessorsShouldHandleMessagingExceptionWhenSpecificErrorHandlingSpecified() throws Exception {
+    public void matcherProcessorsShouldHandleMessagingExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -369,7 +369,7 @@ public class MailetErrorsTest {
                         .matcher(ErrorMatcher.class)
                         .mailet(NoopMailet.class)
                         .addProperty("onMatchException", CUSTOM_PROCESSOR))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -379,7 +379,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void matcherProcessorsShouldHandleRuntimeExceptionWhenSpecificErrorHandlingSpecified() throws Exception {
+    public void matcherProcessorsShouldHandleRuntimeExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -391,7 +391,7 @@ public class MailetErrorsTest {
                         .matcher(RuntimeExceptionMatcher.class)
                         .mailet(NoopMailet.class)
                         .addProperty("onMatchException", CUSTOM_PROCESSOR))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -401,7 +401,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onMatcherExceptionIgnoreShouldNotMatchWhenRuntimeExceptionAndNoMatchConfigured() throws Exception {
+    public void onMatcherExceptionIgnoreShouldNotMatchWhenRuntimeExceptionAndNoMatchConfigured(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -417,7 +417,7 @@ public class MailetErrorsTest {
                         .matcher(All.class)
                         .mailet(ToRepository.class)
                         .addProperty("repositoryPath", CUSTOM_REPOSITORY.asString()))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -427,7 +427,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onMatcherExceptionIgnoreShouldNotMatchWhenMessagingExceptionAndNoMatchConfigured() throws Exception {
+    public void onMatcherExceptionIgnoreShouldNotMatchWhenMessagingExceptionAndNoMatchConfigured(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -443,7 +443,7 @@ public class MailetErrorsTest {
                         .matcher(All.class)
                         .mailet(ToRepository.class)
                         .addProperty("repositoryPath", CUSTOM_REPOSITORY.asString()))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -453,7 +453,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onMatcherExceptionIgnoreShouldMatchWhenRuntimeExceptionAndAllMatchConfigured() throws Exception {
+    public void onMatcherExceptionIgnoreShouldMatchWhenRuntimeExceptionAndAllMatchConfigured(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -469,7 +469,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(Null.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -479,7 +479,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onMatcherExceptionIgnoreShouldMatchWhenMessagingExceptionAndAllMatchConfigured() throws Exception {
+    public void onMatcherExceptionIgnoreShouldMatchWhenMessagingExceptionAndAllMatchConfigured(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -495,7 +495,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(Null.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -505,7 +505,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void hasExceptionMatcherShouldMatchWhenMatcherThrowsExceptionSpecified() throws Exception {
+    public void hasExceptionMatcherShouldMatchWhenMatcherThrowsExceptionSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -525,7 +525,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(ErrorMatcher.class)
                         .mailet(Null.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -535,7 +535,7 @@ public class MailetErrorsTest {
     }
     
     @Test
-    public void hasExceptionMatcherShouldNotMatchWhenMatcherThrowsExceptionNotSpecified() throws Exception {
+    public void hasExceptionMatcherShouldNotMatchWhenMatcherThrowsExceptionNotSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -555,7 +555,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(RuntimeExceptionMatcher.class)
                         .mailet(Null.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -565,7 +565,7 @@ public class MailetErrorsTest {
     }
     
     @Test
-    public void hasExceptionMatcherShouldMatchWhenMailetThrowsExceptionSpecified() throws Exception {
+    public void hasExceptionMatcherShouldMatchWhenMailetThrowsExceptionSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -585,7 +585,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(ErrorMailet.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -595,7 +595,7 @@ public class MailetErrorsTest {
     }
     
     @Test
-    public void hasExceptionMatcherShouldNotMatchWhenMailetThrowsExceptionNotSpecified() throws Exception {
+    public void hasExceptionMatcherShouldNotMatchWhenMailetThrowsExceptionNotSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -615,7 +615,7 @@ public class MailetErrorsTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(RuntimeExceptionMailet.class))))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         MailRepositoryProbeImpl probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
index e808404..c42e2ef 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
@@ -25,6 +25,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
@@ -42,31 +44,29 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.MailRepositoryProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class NetworkMatcherIntegrationTest {
     private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final MailRepositoryUrl DROPPED_MAILS = MailRepositoryUrl.from("memory://var/mail/dropped-mails/");
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    private TemporaryJamesServer createJamesServerWithRootProcessor(ProcessorConfiguration.Builder rootProcessor) throws Exception {
+    private TemporaryJamesServer createJamesServerWithRootProcessor(File temporaryFolder, ProcessorConfiguration.Builder rootProcessor) throws Exception {
         TemporaryJamesServer temporaryJamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withMailetContainer(TemporaryJamesServer.defaultMailetContainerConfiguration()
                 .putProcessor(rootProcessor)
                 .putProcessor(CommonProcessors.deliverOnlyTransport()))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         temporaryJamesServer.start();
 
         DataProbe dataProbe = temporaryJamesServer.getProbe(DataProbeImpl.class);
@@ -82,14 +82,14 @@ public class NetworkMatcherIntegrationTest {
             .addProperty("repositoryPath", DROPPED_MAILS.asString());
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void mailsFromAuthorizedNetworksShouldBeDeliveredWithRemoteAddrInNetwork() throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
+    public void mailsFromAuthorizedNetworksShouldBeDeliveredWithRemoteAddrInNetwork(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("127.0.0.0/8")
@@ -108,8 +108,8 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void mailsFromAuthorizedNetworksShouldBeDeliveredWithRemoteAddrNotInNetwork() throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
+    public void mailsFromAuthorizedNetworksShouldBeDeliveredWithRemoteAddrNotInNetwork(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrNotInNetwork.class)
                 .matcherCondition("172.0.0.0/8")
@@ -128,8 +128,8 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void remoteAddrInNetworkShouldSupportLargerMask() throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
+    public void remoteAddrInNetworkShouldSupportLargerMask(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("127.0.0.0/2")
@@ -148,8 +148,8 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void remoteAddrInNetworkShouldSupportRangesDefinedByAMiddleIp() throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
+    public void remoteAddrInNetworkShouldSupportRangesDefinedByAMiddleIp(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("127.0.4.108/8")
@@ -168,8 +168,8 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void remoteAddrInNetworkShouldSupportRangesDefinedByEndingIp() throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
+    public void remoteAddrInNetworkShouldSupportRangesDefinedByEndingIp(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("127.255.255.255/8")
@@ -188,8 +188,8 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void remoteAddrInNetworkShouldSupportRangesWithNonEightMultipleSubMasks() throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
+    public void remoteAddrInNetworkShouldSupportRangesWithNonEightMultipleSubMasks(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("126.0.0.0/4")
@@ -208,8 +208,8 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void mailsFromNonAuthorizedNetworksShouldNotBeDeliveredWithRemoteAddrInNetwork() throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
+    public void mailsFromNonAuthorizedNetworksShouldNotBeDeliveredWithRemoteAddrInNetwork(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("172.0.0.0/8")
@@ -232,8 +232,8 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void mailsFromNonAuthorizedNetworksShouldNotBeDeliveredWithRemoteAddrNotInNetwork() throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
+    public void mailsFromNonAuthorizedNetworksShouldNotBeDeliveredWithRemoteAddrNotInNetwork(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrNotInNetwork.class)
                 .matcherCondition("127.0.0.0/8")
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
index 2546309..b0453e1 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
@@ -25,6 +25,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import org.apache.james.modules.MailboxProbeImpl;
 import org.apache.james.modules.protocols.ImapGuiceProbe;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
@@ -35,11 +37,11 @@ import org.apache.james.utils.TestIMAPClient;
 import org.apache.james.utils.WebAdminGuiceProbe;
 import org.apache.james.webadmin.WebAdminUtils;
 import org.apache.james.webadmin.routes.ForwardRoutes;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
@@ -57,20 +59,18 @@ public class RecipientRewriteTableIntegrationTest {
     private static final String GROUP_LOCAL_PART = "group";
     private static final String GROUP = GROUP_LOCAL_PART + "@" + DEFAULT_DOMAIN;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
     private DataProbe dataProbe;
     private RequestSpecification webAdminApi;
 
-    @Before
-    public void setup() throws Exception {
-        jamesServer = TemporaryJamesServer.builder().build(temporaryFolder.newFolder());
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = TemporaryJamesServer.builder().build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -84,7 +84,7 @@ public class RecipientRewriteTableIntegrationTest {
         webAdminApi = WebAdminUtils.spec(jamesServer.getProbe(WebAdminGuiceProbe.class).getWebAdminPort());
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorTest.java
index 2923665..1b40895 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorTest.java
@@ -31,6 +31,7 @@ import static org.apache.james.mock.smtp.server.ConfigurationClient.BehaviorsPar
 import static org.apache.james.util.docker.Images.MOCK_SMTP_SERVER;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
 import java.net.InetAddress;
 
 import javax.mail.internet.AddressException;
@@ -56,13 +57,12 @@ import org.apache.james.util.docker.DockerContainer;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -102,22 +102,20 @@ public class RemoteDeliveryErrorTest {
     private ConfigurationClient mockSMTP1Configuration;
     private ConfigurationClient mockSMTP2Configuration;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
-    @ClassRule
+    @RegisterExtension
     public static DockerContainer mockSmtp = DockerContainer.fromName(MOCK_SMTP_SERVER)
         .withLogConsumer(outputFrame -> LOGGER.debug("MockSMTP 1: " + outputFrame.getUtf8String()));
-    @ClassRule
+    @RegisterExtension
     public static DockerContainer mockSmtp2 = DockerContainer.fromName(MOCK_SMTP_SERVER)
         .withLogConsumer(outputFrame -> LOGGER.debug("MockSMTP 2: " + outputFrame.getUtf8String()));
 
     private TemporaryJamesServer jamesServer;
 
-    @BeforeClass
+    @BeforeAll
     public static void setUpClass() throws AddressException {
         FROM_ADDRESS = new MailAddress(FROM);
         RECIPIENT_ADDRESS = new MailAddress(RECIPIENT);
@@ -129,8 +127,8 @@ public class RemoteDeliveryErrorTest {
         FROM_RECIPIENT2_ENVELOPE = Mail.Envelope.ofAddresses(FROM_ADDRESS, RECIPIENT2_ADDRESS);
     }
 
-    @Before
-    public void setUp() throws Exception {
+    @BeforeEach
+    public void setUp(@TempDir File temporaryFolder) throws Exception {
         inMemoryDNSService = new InMemoryDNSService()
             .registerMxRecord(DEFAULT_DOMAIN, LOCALHOST_IP)
             .registerMxRecord(ANOTHER_DOMAIN, mockSmtp.getContainerIp());
@@ -143,7 +141,7 @@ public class RemoteDeliveryErrorTest {
                 .putProcessor(CommonProcessors.error())
                 .putProcessor(directResolutionTransport())
                 .putProcessor(CommonProcessors.bounces()))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class)
@@ -158,7 +156,7 @@ public class RemoteDeliveryErrorTest {
         assertThat(mockSMTP2Configuration.version()).isEqualTo("0.2");
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SenderIsLocalIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SenderIsLocalIntegrationTest.java
index 8230865..ab96740 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SenderIsLocalIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SenderIsLocalIntegrationTest.java
@@ -26,6 +26,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.RECIPIENT;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 
+import java.io.File;
+
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
@@ -43,11 +45,11 @@ import org.apache.james.utils.TestIMAPClient;
 import org.apache.james.utils.WebAdminGuiceProbe;
 import org.apache.james.webadmin.WebAdminUtils;
 import org.apache.james.webadmin.routes.AliasRoutes;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
@@ -56,25 +58,23 @@ public class SenderIsLocalIntegrationTest {
     private static final MailRepositoryUrl LOCAL_SENDER_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/local/sender/");
     private static final MailRepositoryUrl REMOTE_SENDER_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/remote/sender/");
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
     private MailRepositoryProbeImpl probe;
     private RequestSpecification webAdminApi;
 
-    @Before
-    public void setUp() throws Exception {
+    @BeforeEach
+    public void setUp(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.IN_MEMORY_SERVER_AGGREGATE_MODULE)
             .withMailetContainer(TemporaryJamesServer.defaultMailetContainerConfiguration()
                 .postmaster(POSTMASTER)
                 .putProcessor(transport()))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
         probe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
 
@@ -84,7 +84,7 @@ public class SenderIsLocalIntegrationTest {
         webAdminApi = WebAdminUtils.spec(jamesServer.getProbe(WebAdminGuiceProbe.class).getWebAdminPort());
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SieveDelivery.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SieveDelivery.java
index 3406c55..85cabbe 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SieveDelivery.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SieveDelivery.java
@@ -26,6 +26,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.RECIPIENT;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 
+import java.io.File;
+
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.modules.MailboxProbeImpl;
 import org.apache.james.modules.protocols.ImapGuiceProbe;
@@ -35,27 +37,25 @@ import org.apache.james.probe.DataProbe;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SieveDelivery {
     private static final String TARGETED_MAILBOX = "INBOX.any";
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setup() throws Exception {
-        jamesServer = TemporaryJamesServer.builder().build(temporaryFolder.newFolder());
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
+        jamesServer = TemporaryJamesServer.builder().build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -66,7 +66,7 @@ public class SieveDelivery {
             .createMailbox(MailboxConstants.USER_NAMESPACE, RECIPIENT, TARGETED_MAILBOX);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SizeGreaterThanIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SizeGreaterThanIntegrationTest.java
index 184b02b..62af8f8 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SizeGreaterThanIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SizeGreaterThanIntegrationTest.java
@@ -26,6 +26,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.RECIPIENT;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 
+import java.io.File;
+
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
@@ -39,32 +41,30 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.MailRepositoryProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SizeGreaterThanIntegrationTest {
     public static final String POSTMASTER = "postmaster@" + DEFAULT_DOMAIN;
     public static final String SENDER = "sender@" + DEFAULT_DOMAIN;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withMailetContainer(
                 generateMailetContainerConfiguration())
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class)
@@ -74,7 +74,7 @@ public class SizeGreaterThanIntegrationTest {
             .addUser(SENDER, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
index dc9a41d..d6a877b 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
@@ -25,6 +25,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
@@ -42,28 +44,26 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.MailRepositoryProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SmtpAuthIntegrationTest {
     private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final MailRepositoryUrl DROPPED_MAILS = MailRepositoryUrl.from("memory://var/mail/dropped-mails/");
 
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
     private MailRepositoryProbeImpl repositoryProbe;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         ProcessorConfiguration.Builder rootProcessor = ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(SMTPAuthSuccessful.class)
@@ -79,7 +79,7 @@ public class SmtpAuthIntegrationTest {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -96,7 +96,7 @@ public class SmtpAuthIntegrationTest {
                 .addProperty("repositoryPath", DROPPED_MAILS.asString()));
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/MailetConfigurationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/MailetConfigurationTest.java
index 3144adf..36434a6 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/MailetConfigurationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/MailetConfigurationTest.java
@@ -19,32 +19,27 @@
 package org.apache.james.mailets.configuration;
 
 import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
 import org.apache.james.transport.mailets.ToProcessor;
 import org.apache.james.transport.matchers.All;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
+import org.junit.jupiter.api.Test;
 
 public class MailetConfigurationTest {
-
-    @Rule
-    public ExpectedException expectedException = ExpectedException.none();
-
     @Test
     public void builderShouldThrowWhenMatcherIsNull() {
-        expectedException.expect(IllegalStateException.class);
-        MailetConfiguration.builder()
-            .mailet(ToProcessor.class)
-            .build();
+        assertThatThrownBy(() -> MailetConfiguration.builder()
+                .mailet(ToProcessor.class)
+                .build())
+            .isInstanceOf(IllegalStateException.class);
     }
 
     @Test
     public void builderShouldThrowWhenMailetIsNull() {
-        expectedException.expect(IllegalStateException.class);
-        MailetConfiguration.builder()
+        assertThatThrownBy(() -> MailetConfiguration.builder()
             .matcher(All.class)
-            .build();
+            .build())
+            .isInstanceOf(IllegalStateException.class);
     }
 
     @Test
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/SmtpConfigurationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/SmtpConfigurationTest.java
index abd0c3f..2bb3b0a 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/SmtpConfigurationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/SmtpConfigurationTest.java
@@ -28,7 +28,7 @@ import java.io.IOException;
 import javax.xml.transform.Source;
 
 import org.assertj.core.api.Assertions;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.w3c.dom.Node;
 import org.xmlunit.builder.Input;
 import org.xmlunit.xpath.JAXPXPathEngine;
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
index e8fa1fe..c415c25 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
@@ -42,29 +42,27 @@ import org.apache.james.util.date.ZonedDateTimeProvider;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SMIMEDecryptIntegrationTest {
     private static final ZonedDateTime DATE_2015 = ZonedDateTime.parse("2015-10-15T14:10:00Z");
     private static final String FROM = "sender@" + DEFAULT_DOMAIN;
     private static final String PASSWORD = "secret";
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setup() throws Exception {
-        File workingDir = temporaryFolder.newFolder();
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer mailetContainer = MailetContainer.builder()
             .putProcessor(CommonProcessors.root())
             .putProcessor(CommonProcessors.error())
@@ -73,7 +71,7 @@ public class SMIMEDecryptIntegrationTest {
                 .addMailet(MailetConfiguration.builder()
                     .mailet(SMIMEDecrypt.class)
                     .matcher(All.class)
-                    .addProperty("keyStoreFileName", workingDir.toPath().resolve("conf").resolve("smime.p12").toAbsolutePath().toString())
+                    .addProperty("keyStoreFileName", temporaryFolder.toPath().resolve("conf").resolve("smime.p12").toAbsolutePath().toString())
                     .addProperty("keyStorePassword", "secret")
                     .addProperty("keyStoreType", "PKCS12")
                     .addProperty("debug", "true"))
@@ -84,7 +82,7 @@ public class SMIMEDecryptIntegrationTest {
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withOverrides(binder -> binder.bind(ZonedDateTimeProvider.class).toInstance(() -> DATE_2015))
             .withMailetContainer(mailetContainer)
-            .build(workingDir);
+            .build(temporaryFolder);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class)
@@ -93,7 +91,7 @@ public class SMIMEDecryptIntegrationTest {
             .addUser(FROM, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
index 90c9709..8feee6e 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
@@ -45,30 +45,27 @@ import org.apache.james.util.date.ZonedDateTimeProvider;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SMIMESignIntegrationTest {
 
     private static final ZonedDateTime DATE_2015 = ZonedDateTime.parse("2015-10-15T14:10:00Z");
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
     public static final String FROM = "user@" + DEFAULT_DOMAIN;
     public static final String RECIPIENT = "user2@" + DEFAULT_DOMAIN;
 
-    @Before
-    public void setup() throws Exception {
-        File workingDir = temporaryFolder.newFolder();
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer mailetContainer = MailetContainer.builder()
             .putProcessor(CommonProcessors.root())
             .putProcessor(CommonProcessors.error())
@@ -83,7 +80,7 @@ public class SMIMESignIntegrationTest {
                 .addMailet(MailetConfiguration.builder()
                     .mailet(SMIMESign.class)
                     .matcher(SenderIsLocal.class)
-                    .addProperty("keyStoreFileName", workingDir.toPath().resolve("conf").resolve("smime.p12").toAbsolutePath().toString())
+                    .addProperty("keyStoreFileName", temporaryFolder.toPath().resolve("conf").resolve("smime.p12").toAbsolutePath().toString())
                     .addProperty("keyStorePassword", "secret")
                     .addProperty("keyStoreType", "PKCS12")
                     .addProperty("debug", "true"))
@@ -94,7 +91,7 @@ public class SMIMESignIntegrationTest {
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withOverrides(binder -> binder.bind(ZonedDateTimeProvider.class).toInstance(() -> DATE_2015))
             .withMailetContainer(mailetContainer)
-            .build(workingDir);
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -103,7 +100,7 @@ public class SMIMESignIntegrationTest {
         dataProbe.addUser(RECIPIENT, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/DSNRelayTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/DSNRelayTest.java
index 3a1b00d..2e49c37 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/DSNRelayTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/DSNRelayTest.java
@@ -28,8 +28,9 @@ import static org.apache.james.util.docker.Images.MOCK_SMTP_SERVER;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.awaitility.Duration.TEN_SECONDS;
 
+import java.io.File;
+
 import org.apache.commons.net.smtp.AuthenticatingSMTPClient;
-import org.apache.james.core.Domain;
 import org.apache.james.core.MailAddress;
 import org.apache.james.dnsservice.api.DNSService;
 import org.apache.james.dnsservice.api.InMemoryDNSService;
@@ -56,13 +57,12 @@ import org.apache.james.util.docker.DockerContainer;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -78,20 +78,18 @@ public class DSNRelayTest {
     private InMemoryDNSService inMemoryDNSService;
     private ConfigurationClient mockSMTPConfiguration;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
-    @ClassRule
+    @RegisterExtension
     public static DockerContainer mockSmtp = DockerContainer.fromName(MOCK_SMTP_SERVER)
         .withLogConsumer(outputFrame -> LOGGER.debug("MockSMTP 1: " + outputFrame.getUtf8String()));
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setUp() throws Exception {
+    @BeforeEach
+    public void setUp(@TempDir File temporaryFolder) throws Exception {
         inMemoryDNSService = new InMemoryDNSService()
             .registerMxRecord(DEFAULT_DOMAIN, LOCALHOST_IP)
             .registerMxRecord(ANOTHER_DOMAIN, mockSmtp.getContainerIp());
@@ -109,7 +107,7 @@ public class DSNRelayTest {
                 .addHook(DSNMailParameterHook.class.getName())
                 .addHook(DSNRcptParameterHook.class.getName())
                 .addHook(DSNMessageHook.class.getName()))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class)
@@ -123,14 +121,14 @@ public class DSNRelayTest {
         assertThat(mockSMTPConfiguration.version()).isEqualTo("0.2");
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
 
         mockSMTPConfiguration.cleanServer();
     }
 
-    @Ignore("JAMES-3431 No javax.mail support for ORCPT DSN parameter...")
+    @Disabled("JAMES-3431 No javax.mail support for ORCPT DSN parameter...")
     @Test
     public void orcptIsUnsupported() throws Exception {
         AuthenticatingSMTPClient smtpClient = new AuthenticatingSMTPClient("TLS", "UTF-8");
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
index e74ca1e..256bead 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
@@ -27,6 +27,8 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasSize;
 
+import java.io.File;
+
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.CommonProcessors;
@@ -44,28 +46,25 @@ import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.SMTPSendingException;
 import org.apache.james.utils.SmtpSendingStep;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SmtpAuthorizedAddressesTest {
     private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final String TO = "to@any.com";
 
-    @ClassRule
+    @RegisterExtension
     public static FakeSmtp fakeSmtp = FakeSmtp.withDefaultPort();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
 
     private TemporaryJamesServer jamesServer;
 
-    private void createJamesServer(SmtpConfiguration.Builder smtpConfiguration) throws Exception {
+    private void createJamesServer(File temporaryFolder, SmtpConfiguration.Builder smtpConfiguration) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                 .addMailetsFrom(CommonProcessors.deliverOnlyTransport())
@@ -78,7 +77,7 @@ public class SmtpAuthorizedAddressesTest {
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withSmtpConfiguration(smtpConfiguration)
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -86,7 +85,7 @@ public class SmtpAuthorizedAddressesTest {
         dataProbe.addUser(FROM, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         fakeSmtp.clean();
         if (jamesServer != null) {
@@ -95,8 +94,8 @@ public class SmtpAuthorizedAddressesTest {
     }
 
     @Test
-    public void userShouldBeAbleToRelayMessagesWhenInAcceptedNetwork() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void userShouldBeAbleToRelayMessagesWhenInAcceptedNetwork(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("127.0.0.0/8"));
 
@@ -111,8 +110,8 @@ public class SmtpAuthorizedAddressesTest {
     }
 
     @Test
-    public void userShouldNotBeAbleToRelayMessagesWhenOutOfAcceptedNetwork() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void userShouldNotBeAbleToRelayMessagesWhenOutOfAcceptedNetwork(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("172.0.0.0/8"));
 
@@ -123,8 +122,8 @@ public class SmtpAuthorizedAddressesTest {
     }
 
     @Test
-    public void userShouldBeAbleToRelayMessagesWhenOutOfAcceptedNetworkButAuthenticated() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void userShouldBeAbleToRelayMessagesWhenOutOfAcceptedNetworkButAuthenticated(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("172.0.0.0/8"));
 
@@ -140,8 +139,8 @@ public class SmtpAuthorizedAddressesTest {
     }
 
     @Test
-    public void localDeliveryShouldBePossibleFromNonAuthenticatedNonAuthorizedSender() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void localDeliveryShouldBePossibleFromNonAuthenticatedNonAuthorizedSender(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("172.0.0.0/8"));
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
index 742af1c..f95cfa3 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
@@ -24,6 +24,8 @@ import static org.apache.james.mailets.configuration.Constants.LOCALHOST_IP;
 import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
+import java.io.File;
+
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.SmtpConfiguration;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
@@ -32,25 +34,23 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.SMTPSendingException;
 import org.apache.james.utils.SmtpSendingStep;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SmtpBracketEnforcementTest {
     private static final String USER = "user@" + DEFAULT_DOMAIN;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    private void createJamesServer(SmtpConfiguration.Builder smtpConfiguration) throws Exception {
+    private void createJamesServer(File temporaryFolder, SmtpConfiguration.Builder smtpConfiguration) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withSmtpConfiguration(smtpConfiguration)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -58,7 +58,7 @@ public class SmtpBracketEnforcementTest {
         dataProbe.addUser(USER, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
@@ -66,8 +66,8 @@ public class SmtpBracketEnforcementTest {
     }
 
     @Test
-    public void recipientWithBracketsShouldBeAcceptedWhenNoBracketRequired() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void recipientWithBracketsShouldBeAcceptedWhenNoBracketRequired(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .doNotRequireBracketEnforcement());
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -76,8 +76,8 @@ public class SmtpBracketEnforcementTest {
     }
 
     @Test
-    public void recipientWithNoBracketsShouldBeAcceptedWhenNoBracketRequired() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void recipientWithNoBracketsShouldBeAcceptedWhenNoBracketRequired(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .doNotRequireBracketEnforcement());
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -86,8 +86,8 @@ public class SmtpBracketEnforcementTest {
     }
 
     @Test
-    public void recipientWithBracketsShouldBeAcceptedWhenBracketRequired() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void recipientWithBracketsShouldBeAcceptedWhenBracketRequired(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireBracketEnforcement());
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -96,8 +96,8 @@ public class SmtpBracketEnforcementTest {
     }
 
     @Test
-    public void recipientWithNoBracketsShouldBeRejectedWhenBracketRequired() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void recipientWithNoBracketsShouldBeRejectedWhenBracketRequired(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireBracketEnforcement());
 
         assertThatThrownBy(() ->
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpContentTypeTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpContentTypeTest.java
index 6e75bd1..e6b8898 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpContentTypeTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpContentTypeTest.java
@@ -28,6 +28,8 @@ import static org.hamcrest.Matchers.hasSize;
 import static org.hamcrest.Matchers.not;
 import static org.hamcrest.Matchers.startsWith;
 
+import java.io.File;
+
 import javax.mail.MessagingException;
 
 import org.apache.james.MemoryJamesServerMain;
@@ -47,29 +49,26 @@ import org.apache.james.utils.FakeSmtp;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
 import org.apache.mailet.Mail;
-import org.junit.After;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SmtpContentTypeTest {
     private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final String TO = "to@any.com";
     public static final String SUBJECT = "test";
 
-    @ClassRule
+    @RegisterExtension
     public static FakeSmtp fakeSmtp = FakeSmtp.withDefaultPort();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
 
     private TemporaryJamesServer jamesServer;
 
-    private void createJamesServer(SmtpConfiguration.Builder smtpConfiguration) throws Exception {
+    private void createJamesServer(File temporaryFolder, SmtpConfiguration.Builder smtpConfiguration) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                 .addMailetsFrom(CommonProcessors.deliverOnlyTransport())
@@ -82,7 +81,7 @@ public class SmtpContentTypeTest {
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withSmtpConfiguration(smtpConfiguration)
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -90,7 +89,7 @@ public class SmtpContentTypeTest {
         dataProbe.addUser(FROM, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         fakeSmtp.clean();
         if (jamesServer != null) {
@@ -99,8 +98,8 @@ public class SmtpContentTypeTest {
     }
 
     @Test
-    public void userShouldBeAbleToReceiveMessagesWithGoodContentType() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void userShouldBeAbleToReceiveMessagesWithGoodContentType(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("172.0.0.0/8"));
 
@@ -117,8 +116,8 @@ public class SmtpContentTypeTest {
     }
 
     @Test
-    public void userShouldBeAbleToReceiveMessagesWithBadContentType() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void userShouldBeAbleToReceiveMessagesWithBadContentType(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("172.0.0.0/8"));
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
index c448373..cb9173b 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
@@ -24,6 +24,8 @@ import static org.apache.james.mailets.configuration.Constants.LOCALHOST_IP;
 import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
+import java.io.File;
+
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.SmtpConfiguration;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
@@ -32,10 +34,10 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.SMTPSendingException;
 import org.apache.james.utils.SmtpSendingStep;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SmtpIdentityVerificationTest {
     private static final String ATTACKER_PASSWORD = "secret";
@@ -43,17 +45,15 @@ public class SmtpIdentityVerificationTest {
     private static final String ATTACKER = "attacker@" + DEFAULT_DOMAIN;
     private static final String USER = "user@" + DEFAULT_DOMAIN;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    private void createJamesServer(SmtpConfiguration.Builder smtpConfiguration) throws Exception {
+    private void createJamesServer(File temporaryFolder, SmtpConfiguration.Builder smtpConfiguration) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withSmtpConfiguration(smtpConfiguration)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -62,7 +62,7 @@ public class SmtpIdentityVerificationTest {
         dataProbe.addUser(ATTACKER, ATTACKER_PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
@@ -70,8 +70,8 @@ public class SmtpIdentityVerificationTest {
     }
 
     @Test
-    public void smtpShouldAcceptMessageWhenIdentityIsMatching() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void smtpShouldAcceptMessageWhenIdentityIsMatching(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .verifyIdentity());
 
@@ -80,8 +80,8 @@ public class SmtpIdentityVerificationTest {
     }
 
     @Test
-    public void smtpShouldAcceptMessageWhenIdentityIsNotMatchingButNotChecked() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void smtpShouldAcceptMessageWhenIdentityIsNotMatchingButNotChecked(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .doNotVerifyIdentity());
 
@@ -91,8 +91,8 @@ public class SmtpIdentityVerificationTest {
     }
 
     @Test
-    public void smtpShouldRejectMessageWhenIdentityIsNotMatching() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void smtpShouldRejectMessageWhenIdentityIsNotMatching(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .verifyIdentity());
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpNullSenderTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpNullSenderTest.java
index 34618ac..5099f2c 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpNullSenderTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpNullSenderTest.java
@@ -24,6 +24,8 @@ import static org.apache.james.mailets.configuration.Constants.LOCALHOST_IP;
 import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 
+import java.io.File;
+
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.modules.protocols.ImapGuiceProbe;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
@@ -31,28 +33,26 @@ import org.apache.james.probe.DataProbe;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SmtpNullSenderTest {
     private static final String USER = "user@" + DEFAULT_DOMAIN;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setUp() throws Exception {
+    @BeforeEach
+    public void setUp(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -60,7 +60,7 @@ public class SmtpNullSenderTest {
         dataProbe.addUser(USER, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpRandomStoringTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpRandomStoringTest.java
index ef7b734..753bbef 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpRandomStoringTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpRandomStoringTest.java
@@ -25,6 +25,7 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.stream.IntStream;
@@ -55,11 +56,11 @@ import org.apache.james.utils.TestIMAPClient;
 import org.apache.mailet.Mail;
 import org.awaitility.Duration;
 import org.awaitility.core.ConditionFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import com.github.fge.lambdas.Throwing;
 import com.github.steveash.guavate.Guavate;
@@ -84,18 +85,16 @@ public class SmtpRandomStoringTest {
             .mailet(RandomStoring.class)
             .build();
 
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
 
     private TemporaryJamesServer jamesServer;
     private ImapGuiceProbe imapProbe;
     private Collection<TestIMAPClient> connections;
 
-    @Before
-    public void setUp() throws Exception {
-        createJamesServer();
+    @BeforeEach
+    public void setUp(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder);
 
         createUsersAndMailboxes();
 
@@ -130,7 +129,7 @@ public class SmtpRandomStoringTest {
         }
     }
 
-    private void createJamesServer() throws Exception {
+    private void createJamesServer(File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                 .addMailet(RANDOM_STORING)
@@ -139,7 +138,7 @@ public class SmtpRandomStoringTest {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
     }
 
@@ -155,7 +154,7 @@ public class SmtpRandomStoringTest {
         }
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         connections.forEach(Throwing.consumer(TestIMAPClient::close).sneakyThrow());
         jamesServer.shutdown();
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
index 906d102..a41c288 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
@@ -24,6 +24,8 @@ import static org.apache.james.mailets.configuration.Constants.LOCALHOST_IP;
 import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
+import java.io.File;
+
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.SmtpConfiguration;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
@@ -32,27 +34,25 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.SMTPSendingException;
 import org.apache.james.utils.SmtpSendingStep;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import com.google.common.base.Strings;
 
 public class SmtpSizeLimitationTest {
     private static final String USER = "user@" + DEFAULT_DOMAIN;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    private void createJamesServer(SmtpConfiguration.Builder smtpConfiguration) throws Exception {
+    private void createJamesServer(File temporaryFolder, SmtpConfiguration.Builder smtpConfiguration) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withSmtpConfiguration(smtpConfiguration)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -60,7 +60,7 @@ public class SmtpSizeLimitationTest {
         dataProbe.addUser(USER, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
@@ -68,8 +68,8 @@ public class SmtpSizeLimitationTest {
     }
 
     @Test
-    public void messageShouldNotBeAcceptedWhenOverSized() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void messageShouldNotBeAcceptedWhenOverSized(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .doNotVerifyIdentity()
             .withMaxMessageSizeInKb(10));
 
@@ -81,8 +81,8 @@ public class SmtpSizeLimitationTest {
     }
 
     @Test
-    public void messageShouldBeAcceptedWhenNotOverSized() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void messageShouldBeAcceptedWhenNotOverSized(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .doNotVerifyIdentity()
             .withMaxMessageSizeInKb(10));
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/extensions/SMTPHeloHooksTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/extensions/SMTPHeloHooksTest.java
index 753475f..7dde9e9 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/extensions/SMTPHeloHooksTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/extensions/SMTPHeloHooksTest.java
@@ -26,6 +26,8 @@ import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMin
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
+import java.io.File;
+
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.TemporaryJamesServer;
@@ -44,27 +46,25 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.SMTPSendingException;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class SMTPHeloHooksTest {
     private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final String TO = "to@" + DEFAULT_DOMAIN;
 
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public StaticInputChecker resultChecker = new StaticInputChecker();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
 
     private TemporaryJamesServer jamesServer;
 
-    private void createJamesServer(SmtpConfiguration.Builder smtpConfiguration) throws Exception {
+    private void createJamesServer(File temporaryFolder, SmtpConfiguration.Builder smtpConfiguration) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(CommonProcessors.deliverOnlyTransport());
 
@@ -72,7 +72,7 @@ public class SMTPHeloHooksTest {
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withSmtpConfiguration(smtpConfiguration)
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -81,7 +81,7 @@ public class SMTPHeloHooksTest {
         dataProbe.addUser(TO, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
@@ -89,8 +89,8 @@ public class SMTPHeloHooksTest {
     }
 
     @Test
-    public void heloHookShouldBeCalledWithTheRightArgument() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void heloHookShouldBeCalledWithTheRightArgument(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .addHook(RecordingHeloHook.class.getCanonicalName()));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -102,8 +102,8 @@ public class SMTPHeloHooksTest {
     }
 
     @Test
-    public void mailShouldBeWellDeliveredUponDeclinedHeloHook() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void mailShouldBeWellDeliveredUponDeclinedHeloHook(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .addHook(DeclinedHeloHook.class.getCanonicalName()));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -116,8 +116,8 @@ public class SMTPHeloHooksTest {
     }
 
     @Test
-    public void mailShouldBeWellDeliveredUponOKHeloHook() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void mailShouldBeWellDeliveredUponOKHeloHook(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .addHook(OkHeloHook.class.getCanonicalName()));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -130,8 +130,8 @@ public class SMTPHeloHooksTest {
     }
 
     @Test
-    public void mailShouldBeWellDeliveredUponOKHeloHookFollowedByADenyHook() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void mailShouldBeWellDeliveredUponOKHeloHookFollowedByADenyHook(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .addHook(OkHeloHook.class.getCanonicalName())
             .addHook(DenyHeloHook.class.getCanonicalName()));
 
@@ -145,8 +145,8 @@ public class SMTPHeloHooksTest {
     }
 
     @Test
-    public void denyHeloHookShouldBeAppliedAfterADeclinedHeloHook() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void denyHeloHookShouldBeAppliedAfterADeclinedHeloHook(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .addHook(DeclinedHeloHook.class.getCanonicalName())
             .addHook(DenyHeloHook.class.getCanonicalName()));
 
@@ -158,8 +158,8 @@ public class SMTPHeloHooksTest {
     }
 
     @Test
-    public void smtpSessionShouldBeAbortedUponDenyHeloHook() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void smtpSessionShouldBeAbortedUponDenyHeloHook(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .addHook(DenyHeloHook.class.getCanonicalName()));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort());
@@ -170,8 +170,8 @@ public class SMTPHeloHooksTest {
     }
 
     @Test
-    public void smtpSessionShouldBeAbortedUponDenySoftHeloHook() throws Exception {
-        createJamesServer(SmtpConfiguration.builder()
+    public void smtpSessionShouldBeAbortedUponDenySoftHeloHook(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .addHook(DenySoftHeloHook.class.getCanonicalName()));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort());
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/extensions/StaticInputChecker.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/extensions/StaticInputChecker.java
index 4b57559..179af30 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/extensions/StaticInputChecker.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/extensions/StaticInputChecker.java
@@ -23,11 +23,12 @@ import java.util.ArrayList;
 
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.james.protocols.smtp.hook.Hook;
-import org.junit.rules.ExternalResource;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
 
 import com.google.common.collect.ImmutableList;
 
-public class StaticInputChecker extends ExternalResource {
+public class StaticInputChecker implements AfterEachCallback {
     private static final ArrayList<Pair<Class<? extends Hook>, ?>> results = new ArrayList<>();
 
     public static void registerHookResult(Class<? extends Hook> clazz, Object result) {
@@ -35,7 +36,7 @@ public class StaticInputChecker extends ExternalResource {
     }
 
     @Override
-    protected void after() {
+    public void afterEach(ExtensionContext extensionContext) {
         results.clear();
     }
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java
index 30bd565..02c8bfb 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java
@@ -27,40 +27,40 @@ import static org.apache.james.mailets.configuration.Constants.RECIPIENT;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import org.apache.james.core.builder.MimeMessageBuilder;
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
 import org.apache.james.mailets.configuration.ProcessorConfiguration;
-import org.apache.james.modules.queue.activemq.ActiveMQQueueModule;
 import org.apache.james.modules.protocols.ImapGuiceProbe;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
+import org.apache.james.modules.queue.activemq.ActiveMQQueueModule;
 import org.apache.james.probe.DataProbe;
 import org.apache.james.transport.matchers.All;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class AddFooterTest {
     public static final String MATCH_ME = "Match me";
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender smtpMessageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withOverrides(new ActiveMQQueueModule())
             .withMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
@@ -70,7 +70,7 @@ public class AddFooterTest {
                         .mailet(AddFooter.class)
                         .addProperty("text", MATCH_ME))
                     .addMailetsFrom(CommonProcessors.transport())))
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -78,7 +78,7 @@ public class AddFooterTest {
         dataProbe.addUser(RECIPIENT, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java
index 2a5666e..7a4ba04 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java
@@ -25,6 +25,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import javax.mail.internet.MimeMessage;
 
 import org.apache.james.core.Username;
@@ -48,11 +50,11 @@ import org.apache.james.webadmin.routes.AliasRoutes;
 import org.apache.james.webadmin.routes.ForwardRoutes;
 import org.apache.james.webadmin.routes.GroupsRoutes;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
@@ -85,22 +87,20 @@ public class AliasMappingTest {
     private DataProbe dataProbe;
     private RequestSpecification webAdminApi;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(CommonProcessors.rrtErrorEnabledTransport())
             .putProcessor(CommonProcessors.rrtErrorProcessor());
 
         jamesServer = TemporaryJamesServer.builder()
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -123,7 +123,7 @@ public class AliasMappingTest {
             .build();
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
index a173679..d03be06 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
@@ -25,6 +25,7 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
 import java.nio.charset.StandardCharsets;
 
 import org.apache.james.MemoryJamesServerMain;
@@ -37,22 +38,17 @@ import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.modules.protocols.ImapGuiceProbe;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
 import org.apache.james.probe.DataProbe;
-import org.apache.james.transport.mailets.amqp.AmqpRule;
+import org.apache.james.transport.mailets.amqp.AmqpExtension;
 import org.apache.james.transport.matchers.All;
-import org.apache.james.util.docker.DockerContainer;
-import org.apache.james.util.docker.Images;
-import org.apache.james.util.docker.RateLimiters;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.RuleChain;
-import org.junit.rules.TemporaryFolder;
-import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class AmqpForwardAttachmentTest {
     private static final String FROM = "fromUser@" + DEFAULT_DOMAIN;
@@ -64,25 +60,17 @@ public class AmqpForwardAttachmentTest {
     
     private static final byte[] TEST_ATTACHMENT_CONTENT = "Test attachment content".getBytes(StandardCharsets.UTF_8);
 
-    public DockerContainer rabbitMqContainer = DockerContainer.fromName(Images.RABBITMQ)
-        .withAffinityToContainer()
-        .waitingFor(new HostPortWaitStrategy()
-            .withRateLimiter(RateLimiters.TWENTIES_PER_SECOND));
-
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    public AmqpRule amqpRule = new AmqpRule(rabbitMqContainer, EXCHANGE_NAME, ROUTING_KEY);
-
-    @Rule
-    public final RuleChain chain = RuleChain.outerRule(temporaryFolder).around(rabbitMqContainer).around(amqpRule);
-    @Rule
+    @RegisterExtension
+    public static AmqpExtension amqpExtension = new AmqpExtension(EXCHANGE_NAME, ROUTING_KEY);
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
     
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                 .addMailet(MailetConfiguration.builder()
@@ -97,7 +85,7 @@ public class AmqpForwardAttachmentTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(AmqpForwardAttribute.class)
-                    .addProperty(AmqpForwardAttribute.URI_PARAMETER_NAME, amqpRule.getAmqpUri())
+                    .addProperty(AmqpForwardAttribute.URI_PARAMETER_NAME, amqpExtension.getAmqpUri())
                     .addProperty(AmqpForwardAttribute.EXCHANGE_PARAMETER_NAME, EXCHANGE_NAME)
                     .addProperty(AmqpForwardAttribute.ATTRIBUTE_PARAMETER_NAME, MAIL_ATTRIBUTE)
                     .addProperty(AmqpForwardAttribute.ROUTING_KEY_PARAMETER_NAME, ROUTING_KEY))
@@ -106,7 +94,7 @@ public class AmqpForwardAttachmentTest {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataprobe = jamesServer.getProbe(DataProbeImpl.class);
@@ -114,7 +102,7 @@ public class AmqpForwardAttachmentTest {
         dataprobe.addUser(RECIPIENT, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() throws Exception {
         jamesServer.shutdown();
     }
@@ -143,7 +131,7 @@ public class AmqpForwardAttachmentTest {
             .select(TestIMAPClient.INBOX)
             .awaitMessage(awaitAtMostOneMinute);
 
-        assertThat(amqpRule.readContentAsBytes()).contains(TEST_ATTACHMENT_CONTENT);
+        assertThat(amqpExtension.readContentAsBytes()).contains(TEST_ATTACHMENT_CONTENT);
     }
 
 }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
index 85cf9f3..864eb6a 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
@@ -25,6 +25,7 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
 import java.util.Optional;
 
 import org.apache.james.MemoryJamesServerMain;
@@ -36,23 +37,18 @@ import org.apache.james.mailets.configuration.MailetContainer;
 import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.modules.protocols.ImapGuiceProbe;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
-import org.apache.james.transport.mailets.amqp.AmqpRule;
+import org.apache.james.transport.mailets.amqp.AmqpExtension;
 import org.apache.james.transport.matchers.All;
 import org.apache.james.transport.matchers.SMTPAuthSuccessful;
-import org.apache.james.util.docker.DockerContainer;
-import org.apache.james.util.docker.Images;
-import org.apache.james.util.docker.RateLimiters;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.RuleChain;
-import org.junit.rules.TemporaryFolder;
-import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class ContactExtractorTest {
     public static final String SENDER = "sender@" + DEFAULT_DOMAIN;
@@ -65,22 +61,17 @@ public class ContactExtractorTest {
     public static final String EXCHANGE = "collector:email";
     public static final String ROUTING_KEY = "";
 
-    public DockerContainer rabbit = DockerContainer.fromName(Images.RABBITMQ)
-        .waitingFor(new HostPortWaitStrategy().withRateLimiter(RateLimiters.TWENTIES_PER_SECOND));
-    public AmqpRule amqpRule = new AmqpRule(rabbit, EXCHANGE, ROUTING_KEY);
-    public TemporaryFolder folder = new TemporaryFolder();
-
-    @Rule
-    public RuleChain chain = RuleChain.outerRule(rabbit).around(amqpRule).around(folder);
-    @Rule
+    @RegisterExtension
+    public static AmqpExtension amqpExtension = new AmqpExtension(EXCHANGE, ROUTING_KEY);
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         String attribute = "ExtractedContacts";
         MailetContainer.Builder mailets = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .postmaster(SENDER)
@@ -93,7 +84,7 @@ public class ContactExtractorTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(AmqpForwardAttribute.class)
-                        .addProperty(AmqpForwardAttribute.URI_PARAMETER_NAME, amqpRule.getAmqpUri())
+                        .addProperty(AmqpForwardAttribute.URI_PARAMETER_NAME, amqpExtension.getAmqpUri())
                         .addProperty(AmqpForwardAttribute.EXCHANGE_PARAMETER_NAME, EXCHANGE)
                         .addProperty(AmqpForwardAttribute.ATTRIBUTE_PARAMETER_NAME, attribute))
                     .addMailetsFrom(CommonProcessors.deliverOnlyTransport()));
@@ -101,7 +92,7 @@ public class ContactExtractorTest {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withMailetContainer(mailets)
-            .build(folder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class)
@@ -116,7 +107,7 @@ public class ContactExtractorTest {
             .addUser(BCC2, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
@@ -143,7 +134,7 @@ public class ContactExtractorTest {
             .select(TestIMAPClient.INBOX)
             .awaitMessage(awaitAtMostOneMinute);
 
-        Optional<String> actual = amqpRule.readContent();
+        Optional<String> actual = amqpExtension.readContent();
         assertThat(actual).isNotEmpty();
         assertThatJson(actual.get()).isEqualTo("{"
             + "\"userEmail\" : \"sender@james.org\", "
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java
index 65a17de..f83a088 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java
@@ -29,6 +29,8 @@ import static org.apache.james.mailets.configuration.Constants.RECIPIENT2;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.core.builder.MimeMessageBuilder;
 import org.apache.james.mailets.TemporaryJamesServer;
@@ -47,10 +49,10 @@ import org.apache.james.utils.WebAdminGuiceProbe;
 import org.apache.james.webadmin.WebAdminUtils;
 import org.apache.mailet.base.test.FakeMail;
 import org.eclipse.jetty.http.HttpStatus;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import com.google.inject.util.Modules;
 
@@ -59,18 +61,15 @@ import io.restassured.specification.RequestSpecification;
 public class DlpIntegrationTest {
     public static final String REPOSITORY_PREFIX = "memory://var/mail/dlp/quarantine/";
 
-    @Rule
-    public TemporaryFolder folder = new TemporaryFolder();
-
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
     private RequestSpecification specification;
 
-    private void createJamesServer(MailetConfiguration.Builder dlpMailet) throws Exception {
+    private void createJamesServer(File folder, MailetConfiguration.Builder dlpMailet) throws Exception {
         MailetContainer.Builder mailets = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(
                 ProcessorConfiguration.transport()
@@ -81,7 +80,7 @@ public class DlpIntegrationTest {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(Modules.combine(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE, MemoryJamesServerMain.WEBADMIN_TESTING))
             .withMailetContainer(mailets)
-            .build(folder.newFolder());
+            .build(folder);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class)
@@ -93,14 +92,14 @@ public class DlpIntegrationTest {
         specification = WebAdminUtils.spec(jamesServer.getProbe(WebAdminGuiceProbe.class).getWebAdminPort());
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void dlpShouldStoreMatchingEmails() throws Exception {
-        createJamesServer(MailetConfiguration.builder()
+    public void dlpShouldStoreMatchingEmails(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, MailetConfiguration.builder()
             .matcher(Dlp.class)
             .mailet(ToSenderDomainRepository.class)
             .addProperty(ToSenderDomainRepository.URL_PREFIX, REPOSITORY_PREFIX));
@@ -131,8 +130,8 @@ public class DlpIntegrationTest {
     }
 
     @Test
-    public void dlpShouldNotCreateRepositoryWhenNotAllowed() throws Exception {
-        createJamesServer(MailetConfiguration.builder()
+    public void dlpShouldNotCreateRepositoryWhenNotAllowed(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, MailetConfiguration.builder()
             .matcher(Dlp.class)
             .mailet(ToSenderDomainRepository.class)
             .addProperty(ToSenderDomainRepository.URL_PREFIX, REPOSITORY_PREFIX)
@@ -169,8 +168,8 @@ public class DlpIntegrationTest {
     }
 
     @Test
-    public void dlpShouldCreateRepositoryWhenAllowed() throws Exception {
-        createJamesServer(MailetConfiguration.builder()
+    public void dlpShouldCreateRepositoryWhenAllowed(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, MailetConfiguration.builder()
             .matcher(Dlp.class)
             .mailet(ToSenderDomainRepository.class)
             .addProperty(ToSenderDomainRepository.URL_PREFIX, REPOSITORY_PREFIX)
@@ -203,8 +202,8 @@ public class DlpIntegrationTest {
     }
 
     @Test
-    public void dlpShouldStoreMailWhenNotAllowedButRepositoryExists() throws Exception {
-        createJamesServer(MailetConfiguration.builder()
+    public void dlpShouldStoreMailWhenNotAllowedButRepositoryExists(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, MailetConfiguration.builder()
             .matcher(Dlp.class)
             .mailet(ToSenderDomainRepository.class)
             .addProperty(ToSenderDomainRepository.URL_PREFIX, REPOSITORY_PREFIX)
@@ -242,8 +241,8 @@ public class DlpIntegrationTest {
     }
 
     @Test
-    public void dlpShouldBeAbleToReadMailContentWithAttachments() throws Exception {
-        createJamesServer(MailetConfiguration.builder()
+    public void dlpShouldBeAbleToReadMailContentWithAttachments(@TempDir File temporaryFolder) throws Exception {
+        createJamesServer(temporaryFolder, MailetConfiguration.builder()
             .matcher(Dlp.class)
             .mailet(ToSenderDomainRepository.class)
             .addProperty(ToSenderDomainRepository.URL_PREFIX, REPOSITORY_PREFIX)
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DomainMappingTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DomainMappingTest.java
index 81ffdc5..1b3e804 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DomainMappingTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DomainMappingTest.java
@@ -26,6 +26,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import javax.mail.internet.MimeMessage;
 
 import org.apache.james.core.Username;
@@ -45,11 +47,11 @@ import org.apache.james.utils.TestIMAPClient;
 import org.apache.james.utils.WebAdminGuiceProbe;
 import org.apache.james.webadmin.WebAdminUtils;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
@@ -69,22 +71,20 @@ public class DomainMappingTest {
     private MimeMessage message;
     private RequestSpecification webAdminApi;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(CommonProcessors.rrtErrorEnabledTransport())
             .putProcessor(CommonProcessors.rrtErrorProcessor());
 
         jamesServer = TemporaryJamesServer.builder()
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class).fluent()
@@ -104,7 +104,7 @@ public class DomainMappingTest {
             .build();
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingRelayTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingRelayTest.java
index 26b224a..7ad4f44 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingRelayTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingRelayTest.java
@@ -25,6 +25,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.hamcrest.Matchers.equalTo;
 
+import java.io.File;
+
 import javax.mail.internet.MimeMessage;
 
 import org.apache.james.core.builder.MimeMessageBuilder;
@@ -43,12 +45,11 @@ import org.apache.james.utils.WebAdminGuiceProbe;
 import org.apache.james.webadmin.WebAdminUtils;
 import org.apache.james.webadmin.routes.GroupsRoutes;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
@@ -65,17 +66,15 @@ public class GroupMappingRelayTest {
     private MimeMessage message;
     private RequestSpecification webAdminApi;
 
-    @ClassRule
+    @RegisterExtension
     public static final FakeSmtp fakeSmtp = FakeSmtp.withDefaultPort();
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(CommonProcessors.rrtErrorEnabledTransport()
                 .addMailet(MailetConfiguration.remoteDeliveryBuilder()
@@ -85,7 +84,7 @@ public class GroupMappingRelayTest {
 
         jamesServer = TemporaryJamesServer.builder()
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -101,9 +100,8 @@ public class GroupMappingRelayTest {
             .build();
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
-        fakeSmtp.clean();
         jamesServer.shutdown();
     }
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
index ea0c288..6822f11 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
@@ -26,6 +26,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import javax.mail.internet.MimeMessage;
 
 import org.apache.james.core.Username;
@@ -47,11 +49,11 @@ import org.apache.james.utils.WebAdminGuiceProbe;
 import org.apache.james.webadmin.WebAdminUtils;
 import org.apache.james.webadmin.routes.GroupsRoutes;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
@@ -73,22 +75,20 @@ public class GroupMappingTest {
     private DataProbe dataProbe;
     private RequestSpecification webAdminApi;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(CommonProcessors.rrtErrorEnabledTransport())
             .putProcessor(CommonProcessors.rrtErrorProcessor());
 
         jamesServer = TemporaryJamesServer.builder()
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -111,7 +111,7 @@ public class GroupMappingTest {
             .build();
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
index 8c97801..08d79a1 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
@@ -25,6 +25,7 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
 import java.nio.charset.StandardCharsets;
 import java.util.Optional;
 
@@ -41,23 +42,18 @@ import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.modules.protocols.ImapGuiceProbe;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
 import org.apache.james.probe.DataProbe;
-import org.apache.james.transport.mailets.amqp.AmqpRule;
+import org.apache.james.transport.mailets.amqp.AmqpExtension;
 import org.apache.james.transport.matchers.All;
 import org.apache.james.util.MimeMessageUtil;
-import org.apache.james.util.docker.DockerContainer;
-import org.apache.james.util.docker.Images;
-import org.apache.james.util.docker.RateLimiters;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import com.google.common.collect.ImmutableList;
 import com.jayway.jsonpath.Configuration;
@@ -428,18 +424,12 @@ public class ICSAttachmentWorkflowTest {
             "END:VCALENDAR\r\n" +
             "";
 
-    @ClassRule
-    public static DockerContainer rabbitMqContainer = DockerContainer.fromName(Images.RABBITMQ)
-        .withAffinityToContainer()
-        .waitingFor(new HostPortWaitStrategy().withRateLimiter(RateLimiters.TWENTIES_PER_SECOND));
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
-    public AmqpRule amqpRule = new AmqpRule(rabbitMqContainer, EXCHANGE_NAME, ROUTING_KEY);
 
-    @Rule
+    @RegisterExtension
+    public static AmqpExtension amqpExtension = new AmqpExtension(EXCHANGE_NAME, ROUTING_KEY);
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
@@ -449,8 +439,8 @@ public class ICSAttachmentWorkflowTest {
     private MimeMessage messageWithThreeICSAttached;
     private MimeMessage yahooInvitationMessage;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                 .addMailet(MailetConfiguration.builder()
@@ -483,7 +473,7 @@ public class ICSAttachmentWorkflowTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(AmqpForwardAttribute.class)
-                    .addProperty("uri", amqpRule.getAmqpUri())
+                    .addProperty("uri", amqpExtension.getAmqpUri())
                     .addProperty("exchange", EXCHANGE_NAME)
                     .addProperty("attribute", JSON_MAIL_ATTRIBUTE)
                     .addProperty("routing_key", ROUTING_KEY))
@@ -492,7 +482,7 @@ public class ICSAttachmentWorkflowTest {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -552,10 +542,9 @@ public class ICSAttachmentWorkflowTest {
             .build();
     }
 
-    @After
-    public void tearDown() throws Exception {
+    @AfterEach
+    public void tearDown() {
         jamesServer.shutdown();
-        amqpRule.readAll();
     }
 
     @Test
@@ -572,7 +561,7 @@ public class ICSAttachmentWorkflowTest {
             .select(TestIMAPClient.INBOX)
             .awaitMessage(awaitAtMostOneMinute);
 
-        assertThat(amqpRule.readContent()).isEmpty();
+        assertThat(amqpExtension.readContent()).isEmpty();
     }
 
     @Test
@@ -589,7 +578,7 @@ public class ICSAttachmentWorkflowTest {
             .select(TestIMAPClient.INBOX)
             .awaitMessage(awaitAtMostOneMinute);
 
-        Optional<String> content = amqpRule.readContent();
+        Optional<String> content = amqpExtension.readContent();
         assertThat(content).isPresent();
         DocumentContext jsonPath = toJsonPath(content.get());
         assertThat(jsonPath.<String>read("ical")).isEqualTo(ICS_1);
@@ -686,7 +675,7 @@ public class ICSAttachmentWorkflowTest {
             .select(TestIMAPClient.INBOX)
             .awaitMessage(awaitAtMostOneMinute);
 
-        Optional<String> content = amqpRule.readContent();
+        Optional<String> content = amqpExtension.readContent();
         assertThat(content).isPresent();
         DocumentContext jsonPath = toJsonPath(content.get());
         assertThat(jsonPath.<String>read("sender")).isEqualTo(FROM);
@@ -712,7 +701,7 @@ public class ICSAttachmentWorkflowTest {
             .select(TestIMAPClient.INBOX)
             .awaitMessage(awaitAtMostOneMinute);
 
-        Optional<String> content = amqpRule.readContent();
+        Optional<String> content = amqpExtension.readContent();
         assertThat(content).isPresent();
         DocumentContext jsonPath = toJsonPath(content.get());
         assertThat(jsonPath.<String>read("sender")).isEqualTo("obmlinagora@yahoo.fr");
@@ -760,15 +749,15 @@ public class ICSAttachmentWorkflowTest {
             .select(TestIMAPClient.INBOX)
             .awaitMessage(awaitAtMostOneMinute);
 
-        Optional<String> content1 = amqpRule.readContent();
+        Optional<String> content1 = amqpExtension.readContent();
         assertThat(content1).isPresent();
         DocumentContext jsonPath1 = toJsonPath(content1.get());
 
-        Optional<String> content2 = amqpRule.readContent();
+        Optional<String> content2 = amqpExtension.readContent();
         assertThat(content2).isPresent();
         DocumentContext jsonPath2 = toJsonPath(content2.get());
 
-        Optional<String> content3 = amqpRule.readContent();
+        Optional<String> content3 = amqpExtension.readContent();
         assertThat(content3).isPresent();
         DocumentContext jsonPath3 = toJsonPath(content3.get());
 
@@ -780,7 +769,7 @@ public class ICSAttachmentWorkflowTest {
                 "f1514f44bf39311568d640727cff54e819573448d09d2e5677987ff29caa01a9e047feb2aab16e43439a608f28671ab7c10e754ce92be513f8e04ae9ff15e65a9819cf285a6962bd",
                 "f1514f44bf39311568d640727cff54e819573448d09d2e5677987ff29caa01a9e047feb2aab16e43439a608f28671ab7c10e754ce92be513f8e04ae9ff15e65a9819cf285a6962be");
 
-        assertThat(amqpRule.readContent()).isEmpty();
+        assertThat(amqpExtension.readContent()).isEmpty();
     }
 
     @Test
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/IsOverQuotaMatcherTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/IsOverQuotaMatcherTest.java
index 9a5c45d..be89608 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/IsOverQuotaMatcherTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/IsOverQuotaMatcherTest.java
@@ -25,6 +25,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.core.quota.QuotaCountLimit;
 import org.apache.james.core.quota.QuotaSizeLimit;
@@ -42,11 +44,11 @@ import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
 import org.apache.james.utils.WebAdminGuiceProbe;
 import org.apache.james.webadmin.WebAdminUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
@@ -63,18 +65,16 @@ public class IsOverQuotaMatcherTest {
     private static final QuotaCountLimit SMALL_COUNT = QuotaCountLimit.count(0);
     private static final QuotaCountLimit LARGE_COUNT = QuotaCountLimit.count(100);
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
     
     private TemporaryJamesServer jamesServer;
     private RequestSpecification webAdminApi;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.defaultMailetContainerConfiguration()
                 .putProcessor(ProcessorConfiguration.transport()
                         .addMailet(MailetConfiguration.builder()
@@ -88,7 +88,7 @@ public class IsOverQuotaMatcherTest {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.IN_MEMORY_SERVER_AGGREGATE_MODULE)
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         webAdminApi = WebAdminUtils.spec(jamesServer.getProbe(WebAdminGuiceProbe.class).getWebAdminPort());
@@ -101,7 +101,7 @@ public class IsOverQuotaMatcherTest {
         dataProbe.addUser(BOUNCE_SENDER, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java
index a17929f..2ff4c8c 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java
@@ -31,6 +31,8 @@ import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMin
 import static org.apache.james.mailets.configuration.ProcessorConfiguration.TRANSPORT_PROCESSOR;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.core.builder.MimeMessageBuilder;
 import org.apache.james.mailets.TemporaryJamesServer;
@@ -46,11 +48,11 @@ import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.WebAdminGuiceProbe;
 import org.apache.james.webadmin.WebAdminUtils;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import com.google.inject.util.Modules;
 
@@ -60,17 +62,14 @@ public class MailReprocessingIntegrationTest {
     private static final MailRepositoryUrl REPOSITORY_A = MailRepositoryUrl.from("memory://var/mail/a");
     private static final MailRepositoryUrl REPOSITORY_B = MailRepositoryUrl.from("memory://var/mail/b");
 
-    @Rule
-    public TemporaryFolder folder = new TemporaryFolder();
-
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
     private RequestSpecification specification;
 
-    @Before
-    public void createJamesServer() throws Exception {
+    @BeforeEach
+    public void createJamesServer(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailets = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                     .addMailet(MailetConfiguration.BCC_STRIPPER)
@@ -87,7 +86,7 @@ public class MailReprocessingIntegrationTest {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(Modules.combine(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE, MemoryJamesServerMain.WEBADMIN_TESTING))
             .withMailetContainer(mailets)
-            .build(folder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class)
@@ -100,7 +99,7 @@ public class MailReprocessingIntegrationTest {
         specification = WebAdminUtils.spec(jamesServer.getProbe(WebAdminGuiceProbe.class).getWebAdminPort());
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinIntegrationTest.java
index 833d598..e25d25f 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinIntegrationTest.java
@@ -28,6 +28,8 @@ import static org.apache.james.mailets.configuration.Constants.RECIPIENT2;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import javax.mail.MessagingException;
 
 import org.apache.james.core.builder.MimeMessageBuilder;
@@ -47,33 +49,30 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
 
 public class SpamAssassinIntegrationTest {
     private static final String SPAM_CONTENT = "XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X";
 
-    @ClassRule
+    @RegisterExtension
     public static DockerContainer spamAssassinContainer = DockerContainer.fromName(Images.SPAMASSASSIN)
         .withExposedPorts(783)
         .withAffinityToContainer()
         .waitingFor(new HostPortWaitStrategy().withRateLimiter(RateLimiters.TWENTIES_PER_SECOND));
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient messageReader = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailets = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(
                 ProcessorConfiguration.transport()
@@ -86,7 +85,7 @@ public class SpamAssassinIntegrationTest {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_AND_IMAP_MODULE)
             .withMailetContainer(mailets)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class)
@@ -97,7 +96,7 @@ public class SpamAssassinIntegrationTest {
             .addUser(RECIPIENT2, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
index a80f1e0..5458448 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
@@ -25,6 +25,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import javax.mail.internet.MimeMessage;
 
 import org.apache.james.MemoryJamesServerMain;
@@ -42,27 +44,25 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
 import org.apache.mailet.base.test.FakeMail;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class StripAttachmentTest {
     private static final String FROM = "fromUser@" + DEFAULT_DOMAIN;
     private static final String RECIPIENT = "touser@" + DEFAULT_DOMAIN;
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                 .addMailet(MailetConfiguration.builder()
@@ -83,7 +83,7 @@ public class StripAttachmentTest {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -91,7 +91,7 @@ public class StripAttachmentTest {
         dataProbe.addUser(RECIPIENT, PASSWORD);
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryIntegrationTest.java
index e016d19..79fb660 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryIntegrationTest.java
@@ -25,6 +25,8 @@ import static org.apache.james.mailets.configuration.Constants.LOCALHOST_IP;
 import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 
+import java.io.File;
+
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.MailetConfiguration;
 import org.apache.james.mailets.configuration.MailetContainer;
@@ -43,11 +45,11 @@ import org.apache.james.utils.WebAdminGuiceProbe;
 import org.apache.james.webadmin.WebAdminUtils;
 import org.apache.james.webadmin.routes.MailRepositoriesRoutes;
 import org.apache.james.webadmin.routes.TasksRoutes;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
@@ -55,19 +57,17 @@ public class ToRepositoryIntegrationTest {
     private static final String RECIPIENT = "touser@" + DEFAULT_DOMAIN;
     public static final MailRepositoryUrl CUSTOM_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/custom/");
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
     private MailRepositoryProbeImpl probe;
     private RequestSpecification webAdminAPI;
 
-    @Before
-    public void setup() throws Exception {
+    @BeforeEach
+    public void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
@@ -77,7 +77,7 @@ public class ToRepositoryIntegrationTest {
 
         jamesServer = TemporaryJamesServer.builder()
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
@@ -91,7 +91,7 @@ public class ToRepositoryIntegrationTest {
             .build();
     }
 
-    @After
+    @AfterEach
     public void tearDown() {
         jamesServer.shutdown();
     }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryIntegrationTest.java
index a6d6432..062a2b8 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryIntegrationTest.java
@@ -25,6 +25,8 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.awaitAtMostOneMinute;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.io.File;
+
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.MailetConfiguration;
 import org.apache.james.mailets.configuration.MailetContainer;
@@ -36,10 +38,10 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.MailRepositoryProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.TestIMAPClient;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
 public class ToSenderDomainRepositoryIntegrationTest {
 
@@ -48,16 +50,14 @@ public class ToSenderDomainRepositoryIntegrationTest {
     public static final MailRepositoryUrl DOMAIN_URL = MailRepositoryUrl.from(CUSTOM_REPOSITORY_PREFIX + DEFAULT_DOMAIN);
     public static final MailRepositoryUrl AWAIT_REPOSITORY_PATH = MailRepositoryUrl.from("memory://var/mail/await/");
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-    @Rule
+    @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
-    @Rule
+    @RegisterExtension
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
-    @After
+    @AfterEach
     public void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
@@ -65,8 +65,8 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailShouldBeStoredInCorrespondingMailRepository() throws Exception {
-        startJamesServerWithMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
+    public void incomingMailShouldBeStoredInCorrespondingMailRepository(@TempDir File temporaryFolder) throws Exception {
+        startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
@@ -85,8 +85,8 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailShouldBeStoredWhenRepositoryDoesNotExistAndAllowedToCreateRepository() throws Exception {
-        startJamesServerWithMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
+    public void incomingMailShouldBeStoredWhenRepositoryDoesNotExistAndAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
+        startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
@@ -106,8 +106,8 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailShouldBeStoredWhenRepositoryExistsAndAllowedToCreateRepository() throws Exception {
-        startJamesServerWithMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
+    public void incomingMailShouldBeStoredWhenRepositoryExistsAndAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
+        startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
@@ -129,8 +129,8 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailShouldBeIgnoredWhenRepositoryDoesNotExistAndNotAllowedToCreateRepository() throws Exception {
-        startJamesServerWithMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
+    public void incomingMailShouldBeIgnoredWhenRepositoryDoesNotExistAndNotAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
+        startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
@@ -155,8 +155,8 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailShouldBeStoredWhenRepositoryExistsAndNotAllowedToCreateRepository() throws Exception {
-        startJamesServerWithMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
+    public void incomingMailShouldBeStoredWhenRepositoryExistsAndNotAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
+        startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
@@ -178,8 +178,8 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailsShouldBeStoredInCorrespondingMailRepository() throws Exception {
-        startJamesServerWithMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
+    public void incomingMailsShouldBeStoredInCorrespondingMailRepository(@TempDir File temporaryFolder) throws Exception {
+        startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
@@ -198,10 +198,10 @@ public class ToSenderDomainRepositoryIntegrationTest {
             .isEqualTo(2);
     }
 
-    private void startJamesServerWithMailetContainer(MailetContainer.Builder mailetContainer) throws Exception {
+    private void startJamesServerWithMailetContainer(File temporaryFolder, MailetContainer.Builder mailetContainer) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withMailetContainer(mailetContainer)
-            .build(temporaryFolder.newFolder());
+            .build(temporaryFolder);
         jamesServer.start();
 
         jamesServer.getProbe(DataProbeImpl.class)
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpExtension.java
similarity index 76%
rename from server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java
rename to server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpExtension.java
index 0dbd192..6a37166 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpExtension.java
@@ -26,8 +26,16 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.apache.james.util.docker.DockerContainer;
+import org.apache.james.util.docker.Images;
+import org.apache.james.util.docker.RateLimiters;
 import org.awaitility.Awaitility;
+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.rules.ExternalResource;
+import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
 
 import com.rabbitmq.client.BuiltinExchangeType;
 import com.rabbitmq.client.Channel;
@@ -35,8 +43,7 @@ import com.rabbitmq.client.Connection;
 import com.rabbitmq.client.ConnectionFactory;
 import com.rabbitmq.client.GetResponse;
 
-public class AmqpRule extends ExternalResource {
-
+public class AmqpExtension implements BeforeAllCallback, AfterAllCallback, AfterEachCallback {
     private static final boolean AUTO_ACK = true;
 
     private final DockerContainer rabbitMqContainer;
@@ -47,14 +54,18 @@ public class AmqpRule extends ExternalResource {
     private Connection connection;
     private String amqpUri;
 
-    public AmqpRule(DockerContainer rabbitMqContainer, String exchangeName, String routingKey) {
-        this.rabbitMqContainer = rabbitMqContainer;
+    public AmqpExtension(String exchangeName, String routingKey) {
+        this.rabbitMqContainer = DockerContainer.fromName(Images.RABBITMQ)
+            .withAffinityToContainer()
+            .waitingFor(new HostPortWaitStrategy()
+                .withRateLimiter(RateLimiters.TWENTIES_PER_SECOND));;
         this.exchangeName = exchangeName;
         this.routingKey = routingKey;
     }
 
     @Override
-    protected void before() throws Throwable {
+    public void beforeAll(ExtensionContext extensionContext) throws Exception {
+        rabbitMqContainer.start();
         amqpUri = "amqp://" + rabbitMqContainer.getContainerIp();
         ConnectionFactory factory = new ConnectionFactory();
         factory.setUri(amqpUri);
@@ -66,6 +77,22 @@ public class AmqpRule extends ExternalResource {
         channel.queueBind(queueName, exchangeName, routingKey);
     }
 
+    @Override
+    public void afterAll(ExtensionContext extensionContext) {
+        try {
+            channel.close();
+            connection.close();
+            rabbitMqContainer.stop();
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public void afterEach(ExtensionContext extensionContext) throws Exception {
+        readAll();
+    }
+
     public String getAmqpUri() {
         return amqpUri;
     }
@@ -86,16 +113,6 @@ public class AmqpRule extends ExternalResource {
             .map(GetResponse::getBody);
     }
 
-    @Override
-    protected void after() {
-        try {
-            channel.close();
-            connection.close();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
     private void waitingForRabbitToBeReady(ConnectionFactory factory) {
         Awaitility
             .await()
diff --git a/server/testing/src/main/java/org/apache/james/util/docker/DockerContainer.java b/server/testing/src/main/java/org/apache/james/util/docker/DockerContainer.java
index d14d785..9fbeccd 100644
--- a/server/testing/src/main/java/org/apache/james/util/docker/DockerContainer.java
+++ b/server/testing/src/main/java/org/apache/james/util/docker/DockerContainer.java
@@ -26,6 +26,9 @@ import java.util.Map;
 import java.util.function.Consumer;
 
 import org.junit.AssumptionViolatedException;
+import org.junit.jupiter.api.extension.AfterAllCallback;
+import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.rules.TestRule;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
@@ -42,7 +45,7 @@ import org.testcontainers.images.builder.ImageFromDockerfile;
 import com.github.dockerjava.api.model.ContainerNetwork;
 import com.google.common.base.Strings;
 
-public class DockerContainer implements TestRule {
+public class DockerContainer implements TestRule, BeforeAllCallback, AfterAllCallback {
     private static final Logger LOGGER = LoggerFactory.getLogger(DockerContainer.class);
     private static final String DOCKER_CONTAINER = "DOCKER_CONTAINER";
 
@@ -187,4 +190,13 @@ public class DockerContainer implements TestRule {
         };
     }
 
+    @Override
+    public void afterAll(ExtensionContext extensionContext) {
+        container.stop();
+    }
+
+    @Override
+    public void beforeAll(ExtensionContext extensionContext) {
+        container.start();
+    }
 }
diff --git a/server/testing/src/main/java/org/apache/james/utils/FakeSmtp.java b/server/testing/src/main/java/org/apache/james/utils/FakeSmtp.java
index 89c15d1..416806c 100644
--- a/server/testing/src/main/java/org/apache/james/utils/FakeSmtp.java
+++ b/server/testing/src/main/java/org/apache/james/utils/FakeSmtp.java
@@ -30,6 +30,10 @@ import java.util.function.Consumer;
 import org.apache.james.util.docker.DockerContainer;
 import org.apache.james.util.docker.Images;
 import org.apache.james.util.docker.RateLimiters;
+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.ExtensionContext;
 import org.junit.rules.TestRule;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
@@ -42,7 +46,7 @@ import io.restassured.response.ValidatableResponse;
 import io.restassured.specification.RequestSpecification;
 import io.restassured.specification.ResponseSpecification;
 
-public class FakeSmtp implements TestRule {
+public class FakeSmtp implements TestRule, BeforeAllCallback, AfterAllCallback, AfterEachCallback {
     public static void clean(RequestSpecification requestSpecification) {
         given(requestSpecification, RESPONSE_SPECIFICATION)
             .get("/api/email")
@@ -89,6 +93,21 @@ public class FakeSmtp implements TestRule {
         return container.apply(statement, description);
     }
 
+    @Override
+    public void afterAll(ExtensionContext extensionContext) {
+        container.stop();
+    }
+
+    @Override
+    public void afterEach(ExtensionContext extensionContext) {
+        clean();
+    }
+
+    @Override
+    public void beforeAll(ExtensionContext extensionContext) {
+        container.start();
+    }
+
     public void assertEmailReceived(Consumer<ValidatableResponse> expectations) {
         expectations.accept(
             given(requestSpecification(), RESPONSE_SPECIFICATION)


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


[james-project] 02/02: JAMES-3431 Migrate Mailet integration tests: JUNIT 5 related visibility changes

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit ecd8f2e68245f7c167f9e998fc48fbcec26d29bc
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Jan 20 11:43:53 2021 +0700

    JAMES-3431 Migrate Mailet integration tests: JUNIT 5 related visibility changes
---
 .../james/mailets/AddDeliveredToHeaderTest.java    |  8 ++--
 .../james/mailets/BounceIntegrationTest.java       | 22 +++++-----
 .../mailets/CommonMailetConfigurationTest.java     | 12 +++---
 .../apache/james/mailets/DKIMIntegrationTest.java  |  8 ++--
 ...ectResolutionRemoteDeliveryIntegrationTest.java | 12 +++---
 .../GatewayRemoteDeliveryIntegrationTest.java      | 20 ++++-----
 .../org/apache/james/mailets/MailetErrorsTest.java | 50 +++++++++++-----------
 .../mailets/NetworkMatcherIntegrationTest.java     | 20 ++++-----
 .../RecipientRewriteTableIntegrationTest.java      | 22 +++++-----
 .../james/mailets/RemoteDeliveryErrorTest.java     | 30 ++++++-------
 .../mailets/SenderIsLocalIntegrationTest.java      | 12 +++---
 .../org/apache/james/mailets/SieveDelivery.java    |  8 ++--
 .../mailets/SizeGreaterThanIntegrationTest.java    |  4 +-
 .../james/mailets/SmtpAuthIntegrationTest.java     | 12 +++---
 .../java/org/apache/james/smtp/DSNRelayTest.java   | 19 ++++----
 .../james/smtp/SmtpAuthorizedAddressesTest.java    | 12 +++---
 .../james/smtp/SmtpBracketEnforcementTest.java     | 12 +++---
 .../org/apache/james/smtp/SmtpContentTypeTest.java |  8 ++--
 .../james/smtp/SmtpIdentityVerificationTest.java   | 11 +++--
 .../org/apache/james/smtp/SmtpNullSenderTest.java  | 10 ++---
 .../apache/james/smtp/SmtpRandomStoringTest.java   | 10 ++---
 .../apache/james/smtp/SmtpSizeLimitationTest.java  |  8 ++--
 .../james/transport/mailets/AddFooterTest.java     | 10 ++---
 .../james/transport/mailets/AliasMappingTest.java  | 38 ++++++++--------
 .../mailets/AmqpForwardAttachmentTest.java         |  8 ++--
 .../transport/mailets/ContactExtractorTest.java    |  8 ++--
 .../transport/mailets/DlpIntegrationTest.java      | 14 +++---
 .../james/transport/mailets/DomainMappingTest.java | 18 ++++----
 .../transport/mailets/GroupMappingRelayTest.java   |  8 ++--
 .../james/transport/mailets/GroupMappingTest.java  | 42 +++++++++---------
 .../mailets/ICSAttachmentWorkflowTest.java         | 24 +++++------
 .../transport/mailets/IsOverQuotaMatcherTest.java  | 18 ++++----
 .../mailets/MailReprocessingIntegrationTest.java   | 12 +++---
 .../mailets/RemoteDeliveryErrorHandlingTest.java   |  2 +-
 .../mailets/SpamAssassinIntegrationTest.java       | 14 +++---
 .../transport/mailets/StripAttachmentTest.java     |  8 ++--
 .../mailets/ToRepositoryIntegrationTest.java       | 12 +++---
 .../ToSenderDomainRepositoryIntegrationTest.java   | 17 ++++----
 38 files changed, 289 insertions(+), 294 deletions(-)

diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/AddDeliveredToHeaderTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/AddDeliveredToHeaderTest.java
index f56dca4..9215550 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/AddDeliveredToHeaderTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/AddDeliveredToHeaderTest.java
@@ -42,7 +42,7 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class AddDeliveredToHeaderTest {
+class AddDeliveredToHeaderTest {
     @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
     @RegisterExtension
@@ -51,7 +51,7 @@ public class AddDeliveredToHeaderTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder().build(temporaryFolder);
         jamesServer.start();
 
@@ -61,12 +61,12 @@ public class AddDeliveredToHeaderTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void receivedMessagesShouldContainDeliveredToHeaders() throws Exception {
+    void receivedMessagesShouldContainDeliveredToHeaders() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FROM, RECIPIENT);
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
index 43e337b..b38a372 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
@@ -58,7 +58,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class BounceIntegrationTest {
+class BounceIntegrationTest {
     public static final String POSTMASTER = "postmaster@" + DEFAULT_DOMAIN;
     public static final String POSTMASTER_PASSWORD = "postmasterSecret";
     public static final String SENDER = "bounce.receiver@" + DEFAULT_DOMAIN;
@@ -74,12 +74,12 @@ public class BounceIntegrationTest {
     private TemporaryJamesServer jamesServer;
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void dsnBounceMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+    void dsnBounceMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
         setup(temporaryFolder, DSNBounce.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -92,7 +92,7 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void dsnBounceMailetShouldDeliverBounceToTheMailFromAddress(@TempDir File temporaryFolder) throws Exception {
+    void dsnBounceMailetShouldDeliverBounceToTheMailFromAddress(@TempDir File temporaryFolder) throws Exception {
         setup(temporaryFolder, DSNBounce.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -111,7 +111,7 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void dsnBounceMailetBouncedMailShouldBeAdressedToTheSenderInEnvelopeAndHeader(@TempDir File temporaryFolder) throws Exception {
+    void dsnBounceMailetBouncedMailShouldBeAdressedToTheSenderInEnvelopeAndHeader(@TempDir File temporaryFolder) throws Exception {
         setup(temporaryFolder, DSNBounce.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -157,7 +157,7 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void bounceMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+    void bounceMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
         setup(temporaryFolder, Bounce.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -170,7 +170,7 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void forwardMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+    void forwardMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
         setup(temporaryFolder, Forward.class, Pair.of("forwardTo", SENDER));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -183,7 +183,7 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void redirectMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+    void redirectMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
         setup(temporaryFolder, Redirect.class, Pair.of("recipients", SENDER));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -196,7 +196,7 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void resendMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+    void resendMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
         setup(temporaryFolder, Resend.class, Pair.of("recipients", SENDER));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -209,7 +209,7 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void notifySenderMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+    void notifySenderMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
         setup(temporaryFolder, NotifySender.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -222,7 +222,7 @@ public class BounceIntegrationTest {
     }
 
     @Test
-    public void notifyPostmasterMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
+    void notifyPostmasterMailetShouldDeliverBounce(@TempDir File temporaryFolder) throws Exception {
         setup(temporaryFolder, NotifyPostmaster.class);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/CommonMailetConfigurationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/CommonMailetConfigurationTest.java
index 26984c2..2a10803 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/CommonMailetConfigurationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/CommonMailetConfigurationTest.java
@@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class CommonMailetConfigurationTest {
+class CommonMailetConfigurationTest {
     @RegisterExtension
     public TestIMAPClient testIMAPClient = new TestIMAPClient();
     @RegisterExtension
@@ -50,7 +50,7 @@ public class CommonMailetConfigurationTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder().build(temporaryFolder);
         jamesServer.start();
 
@@ -60,16 +60,16 @@ public class CommonMailetConfigurationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void startingJamesWithCommonMailetConfigurationShouldWork() throws Exception {
+    void startingJamesWithCommonMailetConfigurationShouldWork() {
     }
 
     @Test
-    public void simpleMailShouldBeSent() throws Exception {
+    void simpleMailShouldBeSent() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FROM, RECIPIENT);
 
@@ -80,7 +80,7 @@ public class CommonMailetConfigurationTest {
     }
 
     @Test
-    public void simpleMailShouldBeSentToUpperCaseRecipient() throws Exception {
+    void simpleMailShouldBeSentToUpperCaseRecipient() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FROM, RECIPIENT.toUpperCase(Locale.US));
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DKIMIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DKIMIntegrationTest.java
index 19ce6e3..bd833da 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DKIMIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DKIMIntegrationTest.java
@@ -53,7 +53,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class DKIMIntegrationTest {
+class DKIMIntegrationTest {
 
     private static final String FROM_LOCAL_PART = "fromUser";
     private static final String FROM = FROM_LOCAL_PART + "@" + DEFAULT_DOMAIN;
@@ -109,7 +109,7 @@ public class DKIMIntegrationTest {
     private List<Optional<String>> dkimAuthResults;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         dkimAuthResults = new ArrayList<>();
         ExtractAttributeStub.setDkimAuthResultInspector(value -> dkimAuthResults.add(value.map(result -> (String) result)));
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
@@ -134,12 +134,12 @@ public class DKIMIntegrationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void incomingMessageShouldBeReceivedSignedAndChecked() throws Exception {
+    void incomingMessageShouldBeReceivedSignedAndChecked() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FROM, RECIPIENT);
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DirectResolutionRemoteDeliveryIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DirectResolutionRemoteDeliveryIntegrationTest.java
index 90693a8..a6260ea 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DirectResolutionRemoteDeliveryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/DirectResolutionRemoteDeliveryIntegrationTest.java
@@ -80,14 +80,14 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
     private DataProbe dataProbe;
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
         }
     }
 
     @Test
-    public void directResolutionShouldBeWellPerformed(@TempDir File temporaryFolder) throws Exception {
+    void directResolutionShouldBeWellPerformed(@TempDir File temporaryFolder) throws Exception {
         InMemoryDNSService inMemoryDNSService = new InMemoryDNSService()
             .registerMxRecord(JAMES_ANOTHER_DOMAIN, fakeSmtp.getContainer().getContainerIp());
 
@@ -112,7 +112,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void directResolutionShouldFailoverOnSecondMxWhenFirstMxFailed(@TempDir File temporaryFolder) throws Exception {
+    void directResolutionShouldFailoverOnSecondMxWhenFirstMxFailed(@TempDir File temporaryFolder) throws Exception {
         InMemoryDNSService inMemoryDNSService = new InMemoryDNSService()
             .registerRecord(JAMES_ANOTHER_DOMAIN, ADDRESS_EMPTY_LIST, JAMES_ANOTHER_MX_DOMAINS, RECORD_EMPTY_LIST)
             .registerMxRecord(JAMES_ANOTHER_MX_DOMAIN_1, fakeSmtpOnPort26.getContainer().getContainerIp())
@@ -139,7 +139,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void directResolutionShouldBounceUponUnreachableMxRecords(@TempDir File temporaryFolder) throws Exception {
+    void directResolutionShouldBounceUponUnreachableMxRecords(@TempDir File temporaryFolder) throws Exception {
         InMemoryDNSService inMemoryDNSService = new InMemoryDNSService()
             .registerRecord(JAMES_ANOTHER_DOMAIN, ADDRESS_EMPTY_LIST, ImmutableList.of("unknown"), RECORD_EMPTY_LIST);
 
@@ -166,7 +166,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void directResolutionShouldBounceWhenNoMxRecord(@TempDir File temporaryFolder) throws Exception {
+    void directResolutionShouldBounceWhenNoMxRecord(@TempDir File temporaryFolder) throws Exception {
         InMemoryDNSService inMemoryDNSService = new InMemoryDNSService()
             .registerRecord(JAMES_ANOTHER_DOMAIN, ADDRESS_EMPTY_LIST, RECORD_EMPTY_LIST, RECORD_EMPTY_LIST);
 
@@ -194,7 +194,7 @@ public class DirectResolutionRemoteDeliveryIntegrationTest {
 
     @Disabled("JAMES-2913 PerRecipientHeaders are not handled by RemoteDelivery")
     @Test
-    public void remoteDeliveryShouldAddPerRecipientHeaders(@TempDir File temporaryFolder) throws Exception {
+    void remoteDeliveryShouldAddPerRecipientHeaders(@TempDir File temporaryFolder) throws Exception {
         InMemoryDNSService inMemoryDNSService = new InMemoryDNSService()
             .registerMxRecord(JAMES_ANOTHER_DOMAIN, fakeSmtp.getContainer().getContainerIp());
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
index a9f3dbf..943396b 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
@@ -50,7 +50,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class GatewayRemoteDeliveryIntegrationTest {
+class GatewayRemoteDeliveryIntegrationTest {
     private static final String JAMES_ANOTHER_DOMAIN = "james.com";
 
     private static final String FROM = "from@" + DEFAULT_DOMAIN;
@@ -68,13 +68,13 @@ public class GatewayRemoteDeliveryIntegrationTest {
     private InMemoryDNSService inMemoryDNSService;
 
     @BeforeEach
-    public void setup() throws Exception {
+    void setup() throws Exception {
         inMemoryDNSService = new InMemoryDNSService()
             .registerMxRecord(JAMES_ANOTHER_DOMAIN, fakeSmtp.getContainer().getContainerIp());
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         fakeSmtp.clean();
         if (jamesServer != null) {
             jamesServer.shutdown();
@@ -82,7 +82,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void outgoingMailShouldTransitThroughGatewayWhenNoPort(@TempDir File temporaryFolder) throws Exception {
+    void outgoingMailShouldTransitThroughGatewayWhenNoPort(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = fakeSmtp.getContainer().getContainerIp();
 
         jamesServer = TemporaryJamesServer.builder()
@@ -103,7 +103,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void outgoingMailShouldTransitThroughGatewayWhenPort(@TempDir File temporaryFolder) throws Exception {
+    void outgoingMailShouldTransitThroughGatewayWhenPort(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = fakeSmtp.getContainer().getContainerIp() + ":25";
 
         jamesServer = TemporaryJamesServer.builder()
@@ -123,7 +123,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void outgoingMailShouldTransitThroughGatewayWhenSeveralIps(@TempDir File temporaryFolder) throws Exception {
+    void outgoingMailShouldTransitThroughGatewayWhenSeveralIps(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = fakeSmtp.getContainer().getContainerIp() + ",invalid.domain";
 
         jamesServer = TemporaryJamesServer.builder()
@@ -144,7 +144,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void outgoingMailShouldFallbackToSecondGatewayWhenFirstInvalid(@TempDir File temporaryFolder) throws Exception {
+    void outgoingMailShouldFallbackToSecondGatewayWhenFirstInvalid(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = "invalid.domain," + fakeSmtp.getContainer().getContainerIp();
 
         jamesServer = TemporaryJamesServer.builder()
@@ -165,7 +165,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void outgoingMailShouldNotBeSentDirectlyToTheHostWhenGatewayFails(@TempDir File temporaryFolder) throws Exception {
+    void outgoingMailShouldNotBeSentDirectlyToTheHostWhenGatewayFails(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = "invalid.domain";
 
         jamesServer = TemporaryJamesServer.builder()
@@ -191,7 +191,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void remoteDeliveryShouldBounceUponFailure(@TempDir File temporaryFolder) throws Exception {
+    void remoteDeliveryShouldBounceUponFailure(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = "invalid.domain";
 
         jamesServer = TemporaryJamesServer.builder()
@@ -215,7 +215,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     @Test
-    public void remoteDeliveryShouldBounceUponFailureWhenNoBounceProcessor(@TempDir File temporaryFolder) throws Exception {
+    void remoteDeliveryShouldBounceUponFailureWhenNoBounceProcessor(@TempDir File temporaryFolder) throws Exception {
         String gatewayProperty = "invalid.domain";
 
         jamesServer = TemporaryJamesServer.builder()
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java
index fe83f2d..15fd7ec 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java
@@ -55,7 +55,7 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class MailetErrorsTest {
+class MailetErrorsTest {
     public static final String CUSTOM_PROCESSOR = "custom";
     public static final MailRepositoryUrl CUSTOM_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/custom/");
 
@@ -65,14 +65,14 @@ public class MailetErrorsTest {
     private TemporaryJamesServer jamesServer;
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
         }
     }
 
     @Test
-    public void mailetProcessorsShouldHandleMessagingException(@TempDir File temporaryFolder) throws Exception {
+    void mailetProcessorsShouldHandleMessagingException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -92,7 +92,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void mailetProcessingShouldHandleClassNotFoundException(@TempDir File temporaryFolder) throws Exception {
+    void mailetProcessingShouldHandleClassNotFoundException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -112,7 +112,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void matcherProcessingShouldHandleClassNotFoundException(@TempDir File temporaryFolder) throws Exception {
+    void matcherProcessingShouldHandleClassNotFoundException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -132,7 +132,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void mailetProcessorsShouldHandleRuntimeException(@TempDir File temporaryFolder) throws Exception {
+    void mailetProcessorsShouldHandleRuntimeException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -152,7 +152,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void spoolerShouldEventuallyProcessUponTemporaryError(@TempDir File temporaryFolder) throws Exception {
+    void spoolerShouldEventuallyProcessUponTemporaryError(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -176,7 +176,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void spoolerShouldEventuallyProcessMailsAfterThreadSuicide(@TempDir File temporaryFolder) throws Exception {
+    void spoolerShouldEventuallyProcessMailsAfterThreadSuicide(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -200,7 +200,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void spoolerShouldNotInfinitLoopUponPermanentError(@TempDir File temporaryFolder) throws Exception {
+    void spoolerShouldNotInfinitLoopUponPermanentError(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -220,7 +220,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void mailetProcessorsShouldHandleMessagingExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
+    void mailetProcessorsShouldHandleMessagingExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -243,7 +243,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void mailetProcessorsShouldHandleRuntimeExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
+    void mailetProcessorsShouldHandleRuntimeExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -265,7 +265,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onExceptionIgnoreShouldContinueProcessingWhenRuntimeException(@TempDir File temporaryFolder) throws Exception {
+    void onExceptionIgnoreShouldContinueProcessingWhenRuntimeException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -291,7 +291,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onExceptionIgnoreShouldContinueProcessingWhenMessagingException(@TempDir File temporaryFolder) throws Exception {
+    void onExceptionIgnoreShouldContinueProcessingWhenMessagingException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -317,7 +317,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void matcherProcessorsShouldHandleMessagingException(@TempDir File temporaryFolder) throws Exception {
+    void matcherProcessorsShouldHandleMessagingException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -337,7 +337,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void matcherProcessorsShouldHandleRuntimeException(@TempDir File temporaryFolder) throws Exception {
+    void matcherProcessorsShouldHandleRuntimeException(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -357,7 +357,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void matcherProcessorsShouldHandleMessagingExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
+    void matcherProcessorsShouldHandleMessagingExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -379,7 +379,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void matcherProcessorsShouldHandleRuntimeExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
+    void matcherProcessorsShouldHandleRuntimeExceptionWhenSpecificErrorHandlingSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -401,7 +401,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onMatcherExceptionIgnoreShouldNotMatchWhenRuntimeExceptionAndNoMatchConfigured(@TempDir File temporaryFolder) throws Exception {
+    void onMatcherExceptionIgnoreShouldNotMatchWhenRuntimeExceptionAndNoMatchConfigured(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -427,7 +427,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onMatcherExceptionIgnoreShouldNotMatchWhenMessagingExceptionAndNoMatchConfigured(@TempDir File temporaryFolder) throws Exception {
+    void onMatcherExceptionIgnoreShouldNotMatchWhenMessagingExceptionAndNoMatchConfigured(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -453,7 +453,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onMatcherExceptionIgnoreShouldMatchWhenRuntimeExceptionAndAllMatchConfigured(@TempDir File temporaryFolder) throws Exception {
+    void onMatcherExceptionIgnoreShouldMatchWhenRuntimeExceptionAndAllMatchConfigured(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -479,7 +479,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void onMatcherExceptionIgnoreShouldMatchWhenMessagingExceptionAndAllMatchConfigured(@TempDir File temporaryFolder) throws Exception {
+    void onMatcherExceptionIgnoreShouldMatchWhenMessagingExceptionAndAllMatchConfigured(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -505,7 +505,7 @@ public class MailetErrorsTest {
     }
 
     @Test
-    public void hasExceptionMatcherShouldMatchWhenMatcherThrowsExceptionSpecified(@TempDir File temporaryFolder) throws Exception {
+    void hasExceptionMatcherShouldMatchWhenMatcherThrowsExceptionSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -535,7 +535,7 @@ public class MailetErrorsTest {
     }
     
     @Test
-    public void hasExceptionMatcherShouldNotMatchWhenMatcherThrowsExceptionNotSpecified(@TempDir File temporaryFolder) throws Exception {
+    void hasExceptionMatcherShouldNotMatchWhenMatcherThrowsExceptionNotSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -565,7 +565,7 @@ public class MailetErrorsTest {
     }
     
     @Test
-    public void hasExceptionMatcherShouldMatchWhenMailetThrowsExceptionSpecified(@TempDir File temporaryFolder) throws Exception {
+    void hasExceptionMatcherShouldMatchWhenMailetThrowsExceptionSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
@@ -595,7 +595,7 @@ public class MailetErrorsTest {
     }
     
     @Test
-    public void hasExceptionMatcherShouldNotMatchWhenMailetThrowsExceptionNotSpecified(@TempDir File temporaryFolder) throws Exception {
+    void hasExceptionMatcherShouldNotMatchWhenMailetThrowsExceptionNotSpecified(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(SMTP_ONLY_MODULE)
             .withMailetContainer(MailetContainer.builder()
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
index c42e2ef..5bf023b 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
@@ -49,7 +49,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class NetworkMatcherIntegrationTest {
+class NetworkMatcherIntegrationTest {
     private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final MailRepositoryUrl DROPPED_MAILS = MailRepositoryUrl.from("memory://var/mail/dropped-mails/");
 
@@ -83,12 +83,12 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void mailsFromAuthorizedNetworksShouldBeDeliveredWithRemoteAddrInNetwork(@TempDir File temporaryFolder) throws Exception {
+    void mailsFromAuthorizedNetworksShouldBeDeliveredWithRemoteAddrInNetwork(@TempDir File temporaryFolder) throws Exception {
         jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
@@ -108,7 +108,7 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void mailsFromAuthorizedNetworksShouldBeDeliveredWithRemoteAddrNotInNetwork(@TempDir File temporaryFolder) throws Exception {
+    void mailsFromAuthorizedNetworksShouldBeDeliveredWithRemoteAddrNotInNetwork(@TempDir File temporaryFolder) throws Exception {
         jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrNotInNetwork.class)
@@ -128,7 +128,7 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void remoteAddrInNetworkShouldSupportLargerMask(@TempDir File temporaryFolder) throws Exception {
+    void remoteAddrInNetworkShouldSupportLargerMask(@TempDir File temporaryFolder) throws Exception {
         jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
@@ -148,7 +148,7 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void remoteAddrInNetworkShouldSupportRangesDefinedByAMiddleIp(@TempDir File temporaryFolder) throws Exception {
+    void remoteAddrInNetworkShouldSupportRangesDefinedByAMiddleIp(@TempDir File temporaryFolder) throws Exception {
         jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
@@ -168,7 +168,7 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void remoteAddrInNetworkShouldSupportRangesDefinedByEndingIp(@TempDir File temporaryFolder) throws Exception {
+    void remoteAddrInNetworkShouldSupportRangesDefinedByEndingIp(@TempDir File temporaryFolder) throws Exception {
         jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
@@ -188,7 +188,7 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void remoteAddrInNetworkShouldSupportRangesWithNonEightMultipleSubMasks(@TempDir File temporaryFolder) throws Exception {
+    void remoteAddrInNetworkShouldSupportRangesWithNonEightMultipleSubMasks(@TempDir File temporaryFolder) throws Exception {
         jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
@@ -208,7 +208,7 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void mailsFromNonAuthorizedNetworksShouldNotBeDeliveredWithRemoteAddrInNetwork(@TempDir File temporaryFolder) throws Exception {
+    void mailsFromNonAuthorizedNetworksShouldNotBeDeliveredWithRemoteAddrInNetwork(@TempDir File temporaryFolder) throws Exception {
         jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
@@ -232,7 +232,7 @@ public class NetworkMatcherIntegrationTest {
     }
 
     @Test
-    public void mailsFromNonAuthorizedNetworksShouldNotBeDeliveredWithRemoteAddrNotInNetwork(@TempDir File temporaryFolder) throws Exception {
+    void mailsFromNonAuthorizedNetworksShouldNotBeDeliveredWithRemoteAddrNotInNetwork(@TempDir File temporaryFolder) throws Exception {
         jamesServer = createJamesServerWithRootProcessor(temporaryFolder, ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrNotInNetwork.class)
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
index b0453e1..3981a12 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
@@ -69,7 +69,7 @@ public class RecipientRewriteTableIntegrationTest {
     private RequestSpecification webAdminApi;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder().build(temporaryFolder);
         jamesServer.start();
 
@@ -85,12 +85,12 @@ public class RecipientRewriteTableIntegrationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void rrtServiceShouldNotImpactRecipientsNotMatchingAnyRRT() throws Exception {
+    void rrtServiceShouldNotImpactRecipientsNotMatchingAnyRRT() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FROM, RECIPIENT);
 
@@ -102,7 +102,7 @@ public class RecipientRewriteTableIntegrationTest {
     }
 
     @Test
-    public void rrtServiceShouldDeliverEmailToMappingRecipients() throws Exception {
+    void rrtServiceShouldDeliverEmailToMappingRecipients() throws Exception {
         dataProbe.addAddressMapping(RECIPIENT_LOCAL_PART, DEFAULT_DOMAIN, ANY_AT_JAMES);
         dataProbe.addAddressMapping(RECIPIENT_LOCAL_PART, DEFAULT_DOMAIN, OTHER_AT_JAMES);
 
@@ -122,7 +122,7 @@ public class RecipientRewriteTableIntegrationTest {
     }
 
     @Test
-    public void rrtServiceShouldNotDeliverEmailToRecipientWhenHaveMappingRecipients() throws Exception {
+    void rrtServiceShouldNotDeliverEmailToRecipientWhenHaveMappingRecipients() throws Exception {
         dataProbe.addAddressMapping(RECIPIENT_LOCAL_PART, DEFAULT_DOMAIN, ANY_AT_JAMES);
         dataProbe.addAddressMapping(RECIPIENT_LOCAL_PART, DEFAULT_DOMAIN, OTHER_AT_JAMES);
 
@@ -137,7 +137,7 @@ public class RecipientRewriteTableIntegrationTest {
     }
 
     @Test
-    public void rrtServiceShouldDeliverEmailToRecipientOnLocalWhenMappingContainsNonDomain() throws Exception {
+    void rrtServiceShouldDeliverEmailToRecipientOnLocalWhenMappingContainsNonDomain() throws Exception {
         String nonDomainUser = "nondomain";
         String localUser = nonDomainUser + "@" + dataProbe.getDefaultDomain();
         dataProbe.addUser(localUser, PASSWORD);
@@ -161,7 +161,7 @@ public class RecipientRewriteTableIntegrationTest {
     }
 
     @Test
-    public void messageShouldRedirectToTheSameUserWhenDomainMapping() throws Exception {
+    void messageShouldRedirectToTheSameUserWhenDomainMapping() throws Exception {
         dataProbe.addDomainAliasMapping(DEFAULT_DOMAIN, JAMES_ANOTHER_DOMAIN);
         dataProbe.addUser(ANY_AT_ANOTHER_DOMAIN, PASSWORD);
 
@@ -176,7 +176,7 @@ public class RecipientRewriteTableIntegrationTest {
     }
 
     @Test
-    public void messageShouldNotSendToRecipientWhenDomainMapping() throws Exception {
+    void messageShouldNotSendToRecipientWhenDomainMapping() throws Exception {
         dataProbe.addDomainAliasMapping(DEFAULT_DOMAIN, JAMES_ANOTHER_DOMAIN);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -190,7 +190,7 @@ public class RecipientRewriteTableIntegrationTest {
     }
 
     @Test
-    public void rrtServiceShouldDeliverEmailToForwardRecipients() throws Exception {
+    void rrtServiceShouldDeliverEmailToForwardRecipients() throws Exception {
         webAdminApi.put(ForwardRoutes.ROOT_PATH + "/" + RECIPIENT + "/targets/" + ANY_AT_JAMES);
         webAdminApi.put(ForwardRoutes.ROOT_PATH + "/" + RECIPIENT + "/targets/" + OTHER_AT_JAMES);
 
@@ -209,7 +209,7 @@ public class RecipientRewriteTableIntegrationTest {
     }
 
     @Test
-    public void rrtServiceShouldFollowForwardWhenSendingToAGroup() throws Exception {
+    void rrtServiceShouldFollowForwardWhenSendingToAGroup() throws Exception {
         dataProbe.addAddressMapping(GROUP_LOCAL_PART, DEFAULT_DOMAIN, ANY_AT_JAMES);
 
         webAdminApi.put(ForwardRoutes.ROOT_PATH + "/" + ANY_AT_JAMES + "/targets/" + OTHER_AT_JAMES);
@@ -225,7 +225,7 @@ public class RecipientRewriteTableIntegrationTest {
     }
 
     @Test
-    public void domainAliasMappingShouldNotCreateNonExistedUserWhenReRouting() throws Exception {
+    void domainAliasMappingShouldNotCreateNonExistedUserWhenReRouting() throws Exception {
         dataProbe.addDomain("domain1.com");
         dataProbe.addDomain("domain2.com");
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorTest.java
index 1b40895..aee9e52 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorTest.java
@@ -68,7 +68,7 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.ImmutableList;
 
-public class RemoteDeliveryErrorTest {
+class RemoteDeliveryErrorTest {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(RemoteDeliveryErrorTest.class);
 
@@ -116,7 +116,7 @@ public class RemoteDeliveryErrorTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeAll
-    public static void setUpClass() throws AddressException {
+    static void setUpClass() throws AddressException {
         FROM_ADDRESS = new MailAddress(FROM);
         RECIPIENT_ADDRESS = new MailAddress(RECIPIENT);
         RECIPIENT1_ADDRESS = new MailAddress(RECIPIENT1);
@@ -128,7 +128,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @BeforeEach
-    public void setUp(@TempDir File temporaryFolder) throws Exception {
+    void setUp(@TempDir File temporaryFolder) throws Exception {
         inMemoryDNSService = new InMemoryDNSService()
             .registerMxRecord(DEFAULT_DOMAIN, LOCALHOST_IP)
             .registerMxRecord(ANOTHER_DOMAIN, mockSmtp.getContainerIp());
@@ -157,7 +157,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
 
         mockSMTP1Configuration.cleanServer();
@@ -165,7 +165,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldBounceWhenAlwaysRCPT421() throws Exception {
+    void remoteDeliveryShouldBounceWhenAlwaysRCPT421() throws Exception {
         mockSMTP1Configuration
             .addNewBehavior()
                 .expect(SMTPCommand.RCPT_TO)
@@ -186,7 +186,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldBounceWhenAlwaysFROM421() throws Exception {
+    void remoteDeliveryShouldBounceWhenAlwaysFROM421() throws Exception {
         mockSMTP1Configuration
             .addNewBehavior()
                 .expect(SMTPCommand.MAIL_FROM)
@@ -207,7 +207,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldBounceWhenAlwaysDATA421() throws Exception {
+    void remoteDeliveryShouldBounceWhenAlwaysDATA421() throws Exception {
         mockSMTP1Configuration
             .addNewBehavior()
                 .expect(SMTPCommand.DATA)
@@ -228,7 +228,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldNotRetryWhenRCPT500() throws Exception {
+    void remoteDeliveryShouldNotRetryWhenRCPT500() throws Exception {
         mockSMTP1Configuration
             .addNewBehavior()
                 .expect(SMTPCommand.RCPT_TO)
@@ -249,7 +249,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldNotRetryWhenFROM500() throws Exception {
+    void remoteDeliveryShouldNotRetryWhenFROM500() throws Exception {
         mockSMTP1Configuration
             .addNewBehavior()
                 .expect(SMTPCommand.MAIL_FROM)
@@ -270,7 +270,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldNotRetryWhenDATA500() throws Exception {
+    void remoteDeliveryShouldNotRetryWhenDATA500() throws Exception {
         mockSMTP1Configuration
             .addNewBehavior()
                 .expect(SMTPCommand.DATA)
@@ -291,7 +291,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldRetryWhenRCPT421() throws Exception {
+    void remoteDeliveryShouldRetryWhenRCPT421() throws Exception {
         mockSMTP1Configuration
             .addNewBehavior()
                 .expect(SMTPCommand.RCPT_TO)
@@ -313,7 +313,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldRetryWhenFROM421() throws Exception {
+    void remoteDeliveryShouldRetryWhenFROM421() throws Exception {
         mockSMTP1Configuration
             .addNewBehavior()
                 .expect(SMTPCommand.MAIL_FROM)
@@ -335,7 +335,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldRetryWhenDATA421() throws Exception {
+    void remoteDeliveryShouldRetryWhenDATA421() throws Exception {
         mockSMTP1Configuration
             .addNewBehavior()
                 .expect(SMTPCommand.DATA)
@@ -357,7 +357,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldNotDuplicateContentWhenSendPartial() throws Exception {
+    void remoteDeliveryShouldNotDuplicateContentWhenSendPartial() throws Exception {
         mockSMTP1Configuration
             .addNewBehavior()
                 .expect(SMTPCommand.RCPT_TO)
@@ -383,7 +383,7 @@ public class RemoteDeliveryErrorTest {
     }
 
     @Test
-    public void remoteDeliveryShouldNotDuplicateContentWhenSendPartialWhenFailover() throws Exception {
+    void remoteDeliveryShouldNotDuplicateContentWhenSendPartialWhenFailover() throws Exception {
         ImmutableList<InetAddress> addresses = ImmutableList.of(InetAddress.getByName(mockSmtp.getContainerIp()));
         ImmutableList<String> mxs = ImmutableList.of(mockSmtp.getContainerIp(), mockSmtp2.getContainerIp());
         ImmutableList<String> txtRecords = ImmutableList.of();
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SenderIsLocalIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SenderIsLocalIntegrationTest.java
index ab96740..fbcb82e 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SenderIsLocalIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SenderIsLocalIntegrationTest.java
@@ -53,7 +53,7 @@ import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
-public class SenderIsLocalIntegrationTest {
+class SenderIsLocalIntegrationTest {
     private static final String POSTMASTER = "postmaster@" + DEFAULT_DOMAIN;
     private static final MailRepositoryUrl LOCAL_SENDER_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/local/sender/");
     private static final MailRepositoryUrl REMOTE_SENDER_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/remote/sender/");
@@ -68,7 +68,7 @@ public class SenderIsLocalIntegrationTest {
     private RequestSpecification webAdminApi;
 
     @BeforeEach
-    public void setUp(@TempDir File temporaryFolder) throws Exception {
+    void setUp(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.IN_MEMORY_SERVER_AGGREGATE_MODULE)
             .withMailetContainer(TemporaryJamesServer.defaultMailetContainerConfiguration()
@@ -85,12 +85,12 @@ public class SenderIsLocalIntegrationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void shouldMatchLocalSender() throws Exception {
+    void shouldMatchLocalSender() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(RECIPIENT, RECIPIENT);
 
@@ -98,7 +98,7 @@ public class SenderIsLocalIntegrationTest {
     }
 
     @Test
-    public void shouldMatchLocalSenderAlias() throws Exception {
+    void shouldMatchLocalSenderAlias() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + RECIPIENT + "/sources/" + ALIAS);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -108,7 +108,7 @@ public class SenderIsLocalIntegrationTest {
     }
 
     @Test
-    public void shouldNotMatchRemoteSender() throws Exception {
+    void shouldNotMatchRemoteSender() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage("sender@domain.com", RECIPIENT);
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SieveDelivery.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SieveDelivery.java
index 85cabbe..522d9d5 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SieveDelivery.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SieveDelivery.java
@@ -43,7 +43,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class SieveDelivery {
+class SieveDelivery {
     private static final String TARGETED_MAILBOX = "INBOX.any";
 
     @RegisterExtension
@@ -54,7 +54,7 @@ public class SieveDelivery {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder().build(temporaryFolder);
         jamesServer.start();
 
@@ -67,12 +67,12 @@ public class SieveDelivery {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void simpleMailShouldBeSent() throws Exception {
+    void simpleMailShouldBeSent() throws Exception {
         jamesServer.getProbe(SieveProbeImpl.class).addActiveSieveScript(RECIPIENT, "myscript.sieve",
             "require \"fileinto\";\n" +
             "\n" +
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SizeGreaterThanIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SizeGreaterThanIntegrationTest.java
index 62af8f8..fec80ae 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SizeGreaterThanIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SizeGreaterThanIntegrationTest.java
@@ -47,7 +47,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class SizeGreaterThanIntegrationTest {
+class SizeGreaterThanIntegrationTest {
     public static final String POSTMASTER = "postmaster@" + DEFAULT_DOMAIN;
     public static final String SENDER = "sender@" + DEFAULT_DOMAIN;
 
@@ -59,7 +59,7 @@ public class SizeGreaterThanIntegrationTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withBase(MemoryJamesServerMain.SMTP_AND_IMAP_MODULE)
             .withMailetContainer(
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
index d6a877b..13f0c79 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
@@ -50,7 +50,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class SmtpAuthIntegrationTest {
+class SmtpAuthIntegrationTest {
     private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final MailRepositoryUrl DROPPED_MAILS = MailRepositoryUrl.from("memory://var/mail/dropped-mails/");
 
@@ -63,7 +63,7 @@ public class SmtpAuthIntegrationTest {
     private MailRepositoryProbeImpl repositoryProbe;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         ProcessorConfiguration.Builder rootProcessor = ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(SMTPAuthSuccessful.class)
@@ -97,12 +97,12 @@ public class SmtpAuthIntegrationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void authenticatedSmtpSessionsShouldBeDelivered() throws Exception {
+    void authenticatedSmtpSessionsShouldBeDelivered() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .authenticate(FROM, PASSWORD)
             .sendMessage(FROM, FROM);
@@ -114,7 +114,7 @@ public class SmtpAuthIntegrationTest {
     }
 
     @Test
-    public void nonAuthenticatedSmtpSessionsShouldNotBeDelivered() throws Exception {
+    void nonAuthenticatedSmtpSessionsShouldNotBeDelivered() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FROM, FROM);
 
@@ -128,7 +128,7 @@ public class SmtpAuthIntegrationTest {
     }
 
     @Test
-    public void mixedCaseSenderMailShouldBeDelivered() throws Exception {
+    void mixedCaseSenderMailShouldBeDelivered() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .authenticate(FROM, PASSWORD)
             .sendMessage("FROMUSER@" + DEFAULT_DOMAIN, FROM);
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/DSNRelayTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/DSNRelayTest.java
index 2e49c37..c7afc79 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/DSNRelayTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/DSNRelayTest.java
@@ -66,7 +66,7 @@ import org.junit.jupiter.api.io.TempDir;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class DSNRelayTest {
+class DSNRelayTest {
     private static final Logger LOGGER = LoggerFactory.getLogger(DSNRelayTest.class);
 
     private static final String ANOTHER_DOMAIN = "other.com";
@@ -89,7 +89,7 @@ public class DSNRelayTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setUp(@TempDir File temporaryFolder) throws Exception {
+    void setUp(@TempDir File temporaryFolder) throws Exception {
         inMemoryDNSService = new InMemoryDNSService()
             .registerMxRecord(DEFAULT_DOMAIN, LOCALHOST_IP)
             .registerMxRecord(ANOTHER_DOMAIN, mockSmtp.getContainerIp());
@@ -122,7 +122,7 @@ public class DSNRelayTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
 
         mockSMTPConfiguration.cleanServer();
@@ -130,7 +130,7 @@ public class DSNRelayTest {
 
     @Disabled("JAMES-3431 No javax.mail support for ORCPT DSN parameter...")
     @Test
-    public void orcptIsUnsupported() throws Exception {
+    void orcptIsUnsupported() throws Exception {
         AuthenticatingSMTPClient smtpClient = new AuthenticatingSMTPClient("TLS", "UTF-8");
 
         try {
@@ -171,7 +171,7 @@ public class DSNRelayTest {
     }
 
     @Test
-    public void remoteDeliveryShouldCarryOverDSNParameters() throws Exception {
+    void remoteDeliveryShouldCarryOverDSNParameters() throws Exception {
         AuthenticatingSMTPClient smtpClient = new AuthenticatingSMTPClient("TLS", "UTF-8");
 
         try {
@@ -242,7 +242,7 @@ public class DSNRelayTest {
     }
 
     @Test
-    public void remoteDeliveryShouldDeliverSimilarDsnNotifyParametersTogether() throws Exception {
+    void remoteDeliveryShouldDeliverSimilarDsnNotifyParametersTogether() throws Exception {
         AuthenticatingSMTPClient smtpClient = new AuthenticatingSMTPClient("TLS", "UTF-8");
 
         try {
@@ -290,7 +290,7 @@ public class DSNRelayTest {
     }
 
     @Test
-    public void remoteDeliveryShouldCarryOverDSNParametersWhenSingleRecipient() throws Exception {
+    void remoteDeliveryShouldCarryOverDSNParametersWhenSingleRecipient() throws Exception {
         AuthenticatingSMTPClient smtpClient = new AuthenticatingSMTPClient("TLS", "UTF-8");
 
         try {
@@ -327,7 +327,7 @@ public class DSNRelayTest {
     }
 
     @Test
-    public void dsnShouldBeCarriedAfterRRT() throws Exception {
+    void dsnShouldBeCarriedAfterRRT() throws Exception {
         DataProbeImpl dataProbe = jamesServer.getProbe(DataProbeImpl.class);
         dataProbe.addDomain(ANOTHER_DOMAIN);
         dataProbe.addAddressMapping("touser", ANOTHER_DOMAIN, "touser-alias@other.com");
@@ -368,7 +368,7 @@ public class DSNRelayTest {
     }
 
     @Test
-    public void remoteDeliveryShouldCarryOverDSNMailParameters() throws Exception {
+    void remoteDeliveryShouldCarryOverDSNMailParameters() throws Exception {
         AuthenticatingSMTPClient smtpClient = new AuthenticatingSMTPClient("TLS", "UTF-8");
 
         try {
@@ -400,7 +400,6 @@ public class DSNRelayTest {
                 .build()));
     }
 
-
     private ProcessorConfiguration.Builder directResolutionTransport() {
         return ProcessorConfiguration.transport()
             .addMailet(MailetConfiguration.BCC_STRIPPER)
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
index 256bead..6019431 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
@@ -51,7 +51,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class SmtpAuthorizedAddressesTest {
+class SmtpAuthorizedAddressesTest {
     private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final String TO = "to@any.com";
 
@@ -86,7 +86,7 @@ public class SmtpAuthorizedAddressesTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         fakeSmtp.clean();
         if (jamesServer != null) {
             jamesServer.shutdown();
@@ -94,7 +94,7 @@ public class SmtpAuthorizedAddressesTest {
     }
 
     @Test
-    public void userShouldBeAbleToRelayMessagesWhenInAcceptedNetwork(@TempDir File temporaryFolder) throws Exception {
+    void userShouldBeAbleToRelayMessagesWhenInAcceptedNetwork(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("127.0.0.0/8"));
@@ -110,7 +110,7 @@ public class SmtpAuthorizedAddressesTest {
     }
 
     @Test
-    public void userShouldNotBeAbleToRelayMessagesWhenOutOfAcceptedNetwork(@TempDir File temporaryFolder) throws Exception {
+    void userShouldNotBeAbleToRelayMessagesWhenOutOfAcceptedNetwork(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("172.0.0.0/8"));
@@ -122,7 +122,7 @@ public class SmtpAuthorizedAddressesTest {
     }
 
     @Test
-    public void userShouldBeAbleToRelayMessagesWhenOutOfAcceptedNetworkButAuthenticated(@TempDir File temporaryFolder) throws Exception {
+    void userShouldBeAbleToRelayMessagesWhenOutOfAcceptedNetworkButAuthenticated(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("172.0.0.0/8"));
@@ -139,7 +139,7 @@ public class SmtpAuthorizedAddressesTest {
     }
 
     @Test
-    public void localDeliveryShouldBePossibleFromNonAuthenticatedNonAuthorizedSender(@TempDir File temporaryFolder) throws Exception {
+    void localDeliveryShouldBePossibleFromNonAuthenticatedNonAuthorizedSender(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("172.0.0.0/8"));
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
index f95cfa3..915cc78 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class SmtpBracketEnforcementTest {
+class SmtpBracketEnforcementTest {
     private static final String USER = "user@" + DEFAULT_DOMAIN;
 
     @RegisterExtension
@@ -59,14 +59,14 @@ public class SmtpBracketEnforcementTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
         }
     }
 
     @Test
-    public void recipientWithBracketsShouldBeAcceptedWhenNoBracketRequired(@TempDir File temporaryFolder) throws Exception {
+    void recipientWithBracketsShouldBeAcceptedWhenNoBracketRequired(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .doNotRequireBracketEnforcement());
 
@@ -76,7 +76,7 @@ public class SmtpBracketEnforcementTest {
     }
 
     @Test
-    public void recipientWithNoBracketsShouldBeAcceptedWhenNoBracketRequired(@TempDir File temporaryFolder) throws Exception {
+    void recipientWithNoBracketsShouldBeAcceptedWhenNoBracketRequired(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .doNotRequireBracketEnforcement());
 
@@ -86,7 +86,7 @@ public class SmtpBracketEnforcementTest {
     }
 
     @Test
-    public void recipientWithBracketsShouldBeAcceptedWhenBracketRequired(@TempDir File temporaryFolder) throws Exception {
+    void recipientWithBracketsShouldBeAcceptedWhenBracketRequired(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireBracketEnforcement());
 
@@ -96,7 +96,7 @@ public class SmtpBracketEnforcementTest {
     }
 
     @Test
-    public void recipientWithNoBracketsShouldBeRejectedWhenBracketRequired(@TempDir File temporaryFolder) throws Exception {
+    void recipientWithNoBracketsShouldBeRejectedWhenBracketRequired(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireBracketEnforcement());
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpContentTypeTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpContentTypeTest.java
index e6b8898..1191990 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpContentTypeTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpContentTypeTest.java
@@ -54,7 +54,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class SmtpContentTypeTest {
+class SmtpContentTypeTest {
     private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final String TO = "to@any.com";
     public static final String SUBJECT = "test";
@@ -90,7 +90,7 @@ public class SmtpContentTypeTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         fakeSmtp.clean();
         if (jamesServer != null) {
             jamesServer.shutdown();
@@ -98,7 +98,7 @@ public class SmtpContentTypeTest {
     }
 
     @Test
-    public void userShouldBeAbleToReceiveMessagesWithGoodContentType(@TempDir File temporaryFolder) throws Exception {
+    void userShouldBeAbleToReceiveMessagesWithGoodContentType(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("172.0.0.0/8"));
@@ -116,7 +116,7 @@ public class SmtpContentTypeTest {
     }
 
     @Test
-    public void userShouldBeAbleToReceiveMessagesWithBadContentType(@TempDir File temporaryFolder) throws Exception {
+    void userShouldBeAbleToReceiveMessagesWithBadContentType(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .withAutorizedAddresses("172.0.0.0/8"));
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
index cb9173b..61b21c7 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class SmtpIdentityVerificationTest {
+class SmtpIdentityVerificationTest {
     private static final String ATTACKER_PASSWORD = "secret";
 
     private static final String ATTACKER = "attacker@" + DEFAULT_DOMAIN;
@@ -63,14 +63,14 @@ public class SmtpIdentityVerificationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
         }
     }
 
     @Test
-    public void smtpShouldAcceptMessageWhenIdentityIsMatching(@TempDir File temporaryFolder) throws Exception {
+    void smtpShouldAcceptMessageWhenIdentityIsMatching(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .verifyIdentity());
@@ -80,7 +80,7 @@ public class SmtpIdentityVerificationTest {
     }
 
     @Test
-    public void smtpShouldAcceptMessageWhenIdentityIsNotMatchingButNotChecked(@TempDir File temporaryFolder) throws Exception {
+    void smtpShouldAcceptMessageWhenIdentityIsNotMatchingButNotChecked(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .doNotVerifyIdentity());
@@ -91,7 +91,7 @@ public class SmtpIdentityVerificationTest {
     }
 
     @Test
-    public void smtpShouldRejectMessageWhenIdentityIsNotMatching(@TempDir File temporaryFolder) throws Exception {
+    void smtpShouldRejectMessageWhenIdentityIsNotMatching(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .requireAuthentication()
             .verifyIdentity());
@@ -102,5 +102,4 @@ public class SmtpIdentityVerificationTest {
                 .sendMessage(USER, USER))
             .isEqualTo(new SMTPSendingException(SmtpSendingStep.RCPT, "503 5.7.1 Incorrect Authentication for Specified Email Address\n"));
     }
-
 }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpNullSenderTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpNullSenderTest.java
index 5099f2c..01c6968 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpNullSenderTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpNullSenderTest.java
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class SmtpNullSenderTest {
+class SmtpNullSenderTest {
     private static final String USER = "user@" + DEFAULT_DOMAIN;
 
     @RegisterExtension
@@ -50,7 +50,7 @@ public class SmtpNullSenderTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setUp(@TempDir File temporaryFolder) throws Exception {
+    void setUp(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .build(temporaryFolder);
         jamesServer.start();
@@ -61,18 +61,18 @@ public class SmtpNullSenderTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void smtpLayerShouldAcceptEmptySenders() throws Exception {
+    void smtpLayerShouldAcceptEmptySenders() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessageWithHeaders("", USER,"Short message");
     }
 
     @Test
-    public void mailProcessingShouldDeliverNullSender() throws Exception {
+    void mailProcessingShouldDeliverNullSender() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessageWithHeaders("", USER,"Short message");
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpRandomStoringTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpRandomStoringTest.java
index 753bbef..675a192 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpRandomStoringTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpRandomStoringTest.java
@@ -66,7 +66,7 @@ import com.github.fge.lambdas.Throwing;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.collect.ImmutableList;
 
-public class SmtpRandomStoringTest {
+class SmtpRandomStoringTest {
     private static final String FROM = "from@" + DEFAULT_DOMAIN;
     private static final String TO = "to@any.com";
     private static final Long USERS_NUMBERS = 10L;
@@ -93,7 +93,7 @@ public class SmtpRandomStoringTest {
     private Collection<TestIMAPClient> connections;
 
     @BeforeEach
-    public void setUp(@TempDir File temporaryFolder) throws Exception {
+    void setUp(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder);
 
         createUsersAndMailboxes();
@@ -155,13 +155,13 @@ public class SmtpRandomStoringTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         connections.forEach(Throwing.consumer(TestIMAPClient::close).sneakyThrow());
         jamesServer.shutdown();
     }
 
     @Test
-    public void oneHundredMailsShouldHaveBeenStoredBetweenFourAndEightTimes() {
+    void oneHundredMailsShouldHaveBeenStoredBetweenFourAndEightTimes() {
         connections = USERS
             .stream()
             .map(this::createIMAPConnection)
@@ -172,7 +172,7 @@ public class SmtpRandomStoringTest {
     }
 
     @Test
-    public void messagesShouldBeRandomlyAssignedToEveryMailboxesOfEveryUsers() {
+    void messagesShouldBeRandomlyAssignedToEveryMailboxesOfEveryUsers() {
         connections = USERS
             .stream()
             .map(this::createIMAPConnection)
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
index a41c288..9b73aaf 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
@@ -41,7 +41,7 @@ import org.junit.jupiter.api.io.TempDir;
 
 import com.google.common.base.Strings;
 
-public class SmtpSizeLimitationTest {
+class SmtpSizeLimitationTest {
     private static final String USER = "user@" + DEFAULT_DOMAIN;
 
     @RegisterExtension
@@ -61,14 +61,14 @@ public class SmtpSizeLimitationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
         }
     }
 
     @Test
-    public void messageShouldNotBeAcceptedWhenOverSized(@TempDir File temporaryFolder) throws Exception {
+    void messageShouldNotBeAcceptedWhenOverSized(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .doNotVerifyIdentity()
             .withMaxMessageSizeInKb(10));
@@ -81,7 +81,7 @@ public class SmtpSizeLimitationTest {
     }
 
     @Test
-    public void messageShouldBeAcceptedWhenNotOverSized(@TempDir File temporaryFolder) throws Exception {
+    void messageShouldBeAcceptedWhenNotOverSized(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, SmtpConfiguration.builder()
             .doNotVerifyIdentity()
             .withMaxMessageSizeInKb(10));
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java
index 02c8bfb..e2c1cee 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java
@@ -49,7 +49,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class AddFooterTest {
+class AddFooterTest {
     public static final String MATCH_ME = "Match me";
 
     @RegisterExtension
@@ -60,7 +60,7 @@ public class AddFooterTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         jamesServer = TemporaryJamesServer.builder()
             .withOverrides(new ActiveMQQueueModule())
             .withMailetContainer(TemporaryJamesServer.simpleMailetContainerConfiguration()
@@ -79,12 +79,12 @@ public class AddFooterTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void shouldAddFooterWhenSimpleMessage() throws Exception {
+    void shouldAddFooterWhenSimpleMessage() throws Exception {
         smtpMessageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
@@ -103,7 +103,7 @@ public class AddFooterTest {
     }
 
     @Test
-    public void shouldAddFooterWhenMultipartMessage() throws Exception {
+    void shouldAddFooterWhenMultipartMessage() throws Exception {
         smtpMessageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java
index 7a4ba04..9fb9b07 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java
@@ -58,7 +58,7 @@ import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
-public class AliasMappingTest {
+class AliasMappingTest {
     private static final String DOMAIN = "domain.tld";
     private static final String DOMAIN_2 = "domain2.tld";
 
@@ -93,7 +93,7 @@ public class AliasMappingTest {
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(CommonProcessors.rrtErrorEnabledTransport())
             .putProcessor(CommonProcessors.rrtErrorProcessor());
@@ -124,12 +124,12 @@ public class AliasMappingTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void messageShouldRedirectToUserWhenSentToHisAlias() throws Exception {
+    void messageShouldRedirectToUserWhenSentToHisAlias() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + BOB_ALIAS);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -147,7 +147,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserWhenSentToHisUpperCaseAlias() throws Exception {
+    void messageShouldRedirectToUserWhenSentToHisUpperCaseAlias() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + BOB_ALIAS);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -165,7 +165,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserWhenLowerCaseAliasMappedToUpperCaseUser() throws Exception {
+    void messageShouldRedirectToUserWhenLowerCaseAliasMappedToUpperCaseUser() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + UPPER_BOB_ADDRESS + "/sources/" + BOB_ALIAS);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -183,7 +183,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserWithUpperCaseDefinedAliasWhenSentToHisLowerCaseAlias() throws Exception {
+    void messageShouldRedirectToUserWithUpperCaseDefinedAliasWhenSentToHisLowerCaseAlias() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + UPPER_BOB_ALIAS);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -201,7 +201,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToForwardOfUserWhenSentToHisAlias() throws Exception {
+    void messageShouldRedirectToForwardOfUserWhenSentToHisAlias() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + BOB_ALIAS);
         webAdminApi.put(ForwardRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/targets/" + CEDRIC_ADDRESS);
 
@@ -220,7 +220,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserWhenForwardedToHisAlias() throws Exception {
+    void messageShouldRedirectToUserWhenForwardedToHisAlias() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + BOB_ALIAS);
         webAdminApi.put(ForwardRoutes.ROOT_PATH + "/" + ALICE_ADDRESS + "/targets/" + BOB_ALIAS);
 
@@ -239,7 +239,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserWhenHisAliasIsPartOfGroup() throws Exception {
+    void messageShouldRedirectToUserWhenHisAliasIsPartOfGroup() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + BOB_ALIAS);
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ADDRESS + "/" + BOB_ALIAS);
 
@@ -258,7 +258,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToMembersWhenSentToGroupAlias() throws Exception {
+    void messageShouldRedirectToMembersWhenSentToGroupAlias() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + GROUP_ADDRESS + "/sources/" + GROUP_ALIAS);
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ADDRESS + "/" + BOB_ADDRESS);
 
@@ -277,7 +277,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserWithAliasesCascading() throws Exception {
+    void messageShouldRedirectToUserWithAliasesCascading() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + BOB_ALIAS);
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ALIAS + "/sources/" + BOB_ALIAS_2);
 
@@ -296,7 +296,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUsersSharingSameAlias() throws Exception {
+    void messageShouldRedirectToUsersSharingSameAlias() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + BOB_ALIAS);
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + ALICE_ADDRESS + "/sources/" + BOB_ALIAS);
 
@@ -320,9 +320,8 @@ public class AliasMappingTest {
         assertThat(testIMAPClient.readFirstMessage()).contains(MESSAGE_CONTENT);
     }
 
-
     @Test
-    public void messageShouldRedirectFromAliasContainingSlash() throws Exception {
+    void messageShouldRedirectFromAliasContainingSlash() throws Exception {
         String aliasWithSlash = "bob/alias@" + DOMAIN;
         String aliasWithEncodedSlash = "bob%2Falias@" + DOMAIN;
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + aliasWithEncodedSlash);
@@ -341,7 +340,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserContainingSlash() throws Exception {
+    void messageShouldRedirectToUserContainingSlash() throws Exception {
         String userWithSlash = "bob/a@" + DOMAIN;
         dataProbe.addUser(userWithSlash, PASSWORD);
         String userWithEncodedSlash = "bob%2Fa@" + DOMAIN;
@@ -361,7 +360,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserWhenEncodingAt() throws Exception {
+    void messageShouldRedirectToUserWhenEncodingAt() throws Exception {
         String userWithEncodedAt = "bob%40" + DOMAIN;
         String aliasWithEncodedAt = "bob-alias%40" + DOMAIN;
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + userWithEncodedAt + "/sources/" + aliasWithEncodedAt);
@@ -380,7 +379,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void messageShouldBeStoredInRepositoryWhenAliasLoopMapping() throws Exception {
+    void messageShouldBeStoredInRepositoryWhenAliasLoopMapping() throws Exception {
         String bobAlias2 = BOB_USER + "@" + DOMAIN_2;
 
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + bobAlias2);
@@ -399,7 +398,7 @@ public class AliasMappingTest {
     }
 
     @Test
-    public void userShouldNotReceiveDuplicatesWhenUserAndAliasRegisteredToAGroup() throws Exception {
+    void userShouldNotReceiveDuplicatesWhenUserAndAliasRegisteredToAGroup() throws Exception {
         webAdminApi.put(AliasRoutes.ROOT_PATH + "/" + BOB_ADDRESS + "/sources/" + BOB_ALIAS);
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ADDRESS + "/" + BOB_ADDRESS);
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ADDRESS + "/" + BOB_ALIAS);
@@ -416,5 +415,4 @@ public class AliasMappingTest {
             .select(TestIMAPClient.INBOX)
             .awaitMessageCount(awaitAtMostOneMinute, 1);
     }
-
 }
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
index d03be06..eea1afe 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
@@ -50,7 +50,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class AmqpForwardAttachmentTest {
+class AmqpForwardAttachmentTest {
     private static final String FROM = "fromUser@" + DEFAULT_DOMAIN;
     private static final String RECIPIENT = "touser@" + DEFAULT_DOMAIN;
     
@@ -70,7 +70,7 @@ public class AmqpForwardAttachmentTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                 .addMailet(MailetConfiguration.builder()
@@ -103,12 +103,12 @@ public class AmqpForwardAttachmentTest {
     }
 
     @AfterEach
-    public void tearDown() throws Exception {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void stripAttachmentShouldPutAttachmentsInMailAttributeWhenConfiguredForIt() throws Exception {
+    void stripAttachmentShouldPutAttachmentsInMailAttributeWhenConfiguredForIt() throws Exception {
         MimeMessageBuilder message = MimeMessageBuilder.mimeMessageBuilder()
             .setMultipartWithBodyParts(
                 MimeMessageBuilder.bodyPartBuilder()
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
index 864eb6a..8ac3e3d 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
@@ -50,7 +50,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class ContactExtractorTest {
+class ContactExtractorTest {
     public static final String SENDER = "sender@" + DEFAULT_DOMAIN;
     public static final String TO = "to@" + DEFAULT_DOMAIN;
     public static final String TO2 = "to2@" + DEFAULT_DOMAIN;
@@ -71,7 +71,7 @@ public class ContactExtractorTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         String attribute = "ExtractedContacts";
         MailetContainer.Builder mailets = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .postmaster(SENDER)
@@ -108,12 +108,12 @@ public class ContactExtractorTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void recipientsShouldBePublishedToAmqpWhenSendingEmail() throws Exception {
+    void recipientsShouldBePublishedToAmqpWhenSendingEmail() throws Exception {
         MimeMessageBuilder message = MimeMessageBuilder.mimeMessageBuilder()
             .setSender(SENDER)
             .addToRecipient(TO, "John To2 <" + TO2 + ">")
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java
index f83a088..0f231be 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java
@@ -58,7 +58,7 @@ import com.google.inject.util.Modules;
 
 import io.restassured.specification.RequestSpecification;
 
-public class DlpIntegrationTest {
+class DlpIntegrationTest {
     public static final String REPOSITORY_PREFIX = "memory://var/mail/dlp/quarantine/";
 
     @RegisterExtension
@@ -93,12 +93,12 @@ public class DlpIntegrationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void dlpShouldStoreMatchingEmails(@TempDir File temporaryFolder) throws Exception {
+    void dlpShouldStoreMatchingEmails(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, MailetConfiguration.builder()
             .matcher(Dlp.class)
             .mailet(ToSenderDomainRepository.class)
@@ -130,7 +130,7 @@ public class DlpIntegrationTest {
     }
 
     @Test
-    public void dlpShouldNotCreateRepositoryWhenNotAllowed(@TempDir File temporaryFolder) throws Exception {
+    void dlpShouldNotCreateRepositoryWhenNotAllowed(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, MailetConfiguration.builder()
             .matcher(Dlp.class)
             .mailet(ToSenderDomainRepository.class)
@@ -168,7 +168,7 @@ public class DlpIntegrationTest {
     }
 
     @Test
-    public void dlpShouldCreateRepositoryWhenAllowed(@TempDir File temporaryFolder) throws Exception {
+    void dlpShouldCreateRepositoryWhenAllowed(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, MailetConfiguration.builder()
             .matcher(Dlp.class)
             .mailet(ToSenderDomainRepository.class)
@@ -202,7 +202,7 @@ public class DlpIntegrationTest {
     }
 
     @Test
-    public void dlpShouldStoreMailWhenNotAllowedButRepositoryExists(@TempDir File temporaryFolder) throws Exception {
+    void dlpShouldStoreMailWhenNotAllowedButRepositoryExists(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, MailetConfiguration.builder()
             .matcher(Dlp.class)
             .mailet(ToSenderDomainRepository.class)
@@ -241,7 +241,7 @@ public class DlpIntegrationTest {
     }
 
     @Test
-    public void dlpShouldBeAbleToReadMailContentWithAttachments(@TempDir File temporaryFolder) throws Exception {
+    void dlpShouldBeAbleToReadMailContentWithAttachments(@TempDir File temporaryFolder) throws Exception {
         createJamesServer(temporaryFolder, MailetConfiguration.builder()
             .matcher(Dlp.class)
             .mailet(ToSenderDomainRepository.class)
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DomainMappingTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DomainMappingTest.java
index 1b3e804..b67537c 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DomainMappingTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DomainMappingTest.java
@@ -55,7 +55,7 @@ import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
-public class DomainMappingTest {
+class DomainMappingTest {
     private static final String DOMAIN1 = "domain1.com";
     private static final String DOMAIN2 = "domain2.com";
 
@@ -77,7 +77,7 @@ public class DomainMappingTest {
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(CommonProcessors.rrtErrorEnabledTransport())
             .putProcessor(CommonProcessors.rrtErrorProcessor());
@@ -105,12 +105,12 @@ public class DomainMappingTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void messageShouldRedirectToUserWhenBelongingToGroup() throws Exception {
+    void messageShouldRedirectToUserWhenBelongingToGroup() throws Exception {
         webAdminApi.body(DOMAIN1).put("/domainMappings/" + DOMAIN2);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -128,7 +128,7 @@ public class DomainMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserOfTheDestinationDomainWhenSentToTheAliasDomain() throws Exception {
+    void messageShouldRedirectToUserOfTheDestinationDomainWhenSentToTheAliasDomain() throws Exception {
         webAdminApi.put("/domains/" + DOMAIN1 + "/aliases/" + DOMAIN2);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -146,7 +146,7 @@ public class DomainMappingTest {
     }
 
     @Test
-    public void mailShouldGoToRRTErrorMailRepositoryUponDomainLoop() throws Exception {
+    void mailShouldGoToRRTErrorMailRepositoryUponDomainLoop() throws Exception {
         webAdminApi.put("/domains/" + DOMAIN1 + "/aliases/" + DOMAIN2);
         webAdminApi.put("/domains/" + DOMAIN2 + "/aliases/" + DOMAIN1);
 
@@ -163,7 +163,7 @@ public class DomainMappingTest {
     }
 
     @Test
-    public void mailShouldGoToRRTErrorMailRepositoryUponLoopCombiningDomainAndAlias() throws Exception {
+    void mailShouldGoToRRTErrorMailRepositoryUponLoopCombiningDomainAndAlias() throws Exception {
         jamesServer.getProbe(DataProbeImpl.class).addUser(BOB_DOMAIN2, PASSWORD);
 
         webAdminApi.put("/address/aliases/" + BOB_DOMAIN2 + "/sources/" + BOB_DOMAIN1);
@@ -182,7 +182,7 @@ public class DomainMappingTest {
     }
 
     @Test
-    public void domainAliasShouldBeIgnoredWhenUserAlias() throws Exception {
+    void domainAliasShouldBeIgnoredWhenUserAlias() throws Exception {
         jamesServer.getProbe(DataProbeImpl.class).addUser(BOB_DOMAIN1, PASSWORD);
 
         webAdminApi.put("/address/aliases/" + BOB_DOMAIN1 + "/sources/" + USER_DOMAIN2);
@@ -203,7 +203,7 @@ public class DomainMappingTest {
     }
 
     @Test
-    public void domainAliasShouldBeChainedIfApplicableAfterUserAliasRewrite() throws Exception {
+    void domainAliasShouldBeChainedIfApplicableAfterUserAliasRewrite() throws Exception {
         jamesServer.getProbe(DataProbeImpl.class).addUser(BOB_DOMAIN1, PASSWORD);
 
         webAdminApi.put("/address/aliases/" + BOB_DOMAIN2 + "/sources/" + USER_DOMAIN2);
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingRelayTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingRelayTest.java
index 7ad4f44..36a56eb 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingRelayTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingRelayTest.java
@@ -53,7 +53,7 @@ import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
-public class GroupMappingRelayTest {
+class GroupMappingRelayTest {
     private static final String DOMAIN1 = "domain1.com";
 
     public static final String SENDER_LOCAL_PART = "fromuser";
@@ -74,7 +74,7 @@ public class GroupMappingRelayTest {
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(CommonProcessors.rrtErrorEnabledTransport()
                 .addMailet(MailetConfiguration.remoteDeliveryBuilder()
@@ -101,12 +101,12 @@ public class GroupMappingRelayTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void sendMessageShouldSendAMessageToAnExternalGroupMember() throws Exception {
+    void sendMessageShouldSendAMessageToAnExternalGroupMember() throws Exception {
         String externalMail = "ray@yopmail.com";
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + externalMail);
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
index 6822f11..6225eab 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
@@ -57,7 +57,7 @@ import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
-public class GroupMappingTest {
+class GroupMappingTest {
     private static final String DOMAIN1 = "domain1.com";
     private static final String DOMAIN2 = "domain2.com";
 
@@ -81,7 +81,7 @@ public class GroupMappingTest {
     public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(CommonProcessors.rrtErrorEnabledTransport())
             .putProcessor(CommonProcessors.rrtErrorProcessor());
@@ -112,12 +112,12 @@ public class GroupMappingTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void messageShouldRedirectToUserWhenBelongingToGroup() throws Exception {
+    void messageShouldRedirectToUserWhenBelongingToGroup() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + USER_DOMAIN1);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -135,7 +135,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserDoesNotHaveSameDomainWhenBelongingToGroup() throws Exception {
+    void messageShouldRedirectToUserDoesNotHaveSameDomainWhenBelongingToGroup() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + USER_DOMAIN2);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -153,7 +153,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToAllUsersBelongingToGroup() throws Exception {
+    void messageShouldRedirectToAllUsersBelongingToGroup() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + USER_DOMAIN1);
 
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + USER_DOMAIN2);
@@ -176,7 +176,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectWhenGroupBelongingToAnotherGroup() throws Exception {
+    void messageShouldRedirectWhenGroupBelongingToAnotherGroup() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN2 + "/" + USER_DOMAIN2);
 
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + GROUP_ON_DOMAIN2);
@@ -196,7 +196,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldNotBeDuplicatedWhenUserBelongingToTwoGroups() throws Exception {
+    void messageShouldNotBeDuplicatedWhenUserBelongingToTwoGroups() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + USER_DOMAIN1);
 
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN2 + "/" + USER_DOMAIN1);
@@ -217,7 +217,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldNotBeDuplicatedWhenRecipientIsAlsoPartOfGroup() throws Exception {
+    void messageShouldNotBeDuplicatedWhenRecipientIsAlsoPartOfGroup() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + USER_DOMAIN1);
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
@@ -234,7 +234,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void groupMappingShouldSupportTreeStructure() throws Exception {
+    void groupMappingShouldSupportTreeStructure() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + USER_DOMAIN1);
 
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN2 + "/" + USER_DOMAIN2);
@@ -260,7 +260,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldBeStoredInRepositoryWhenGroupLoopMapping() throws Exception {
+    void messageShouldBeStoredInRepositoryWhenGroupLoopMapping() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + USER_DOMAIN1);
 
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN2 + "/" + USER_DOMAIN2);
@@ -282,7 +282,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldBeWellDeliveredToRecipientNotPartOfTheLoop() throws Exception {
+    void messageShouldBeWellDeliveredToRecipientNotPartOfTheLoop() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + GROUP_ON_DOMAIN2);
 
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN2 + "/" + GROUP_ON_DOMAIN1);
@@ -301,7 +301,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void senderShouldReceiveABounceUponRRTFailure() throws Exception {
+    void senderShouldReceiveABounceUponRRTFailure() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + GROUP_ON_DOMAIN2);
         jamesServer.getProbe(DataProbeImpl.class).addDomainAliasMapping(DOMAIN2, DOMAIN1);
 
@@ -319,7 +319,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void senderShouldNotReceiveABounceUponRRTFailureWhenPartOfTheLoop() throws Exception {
+    void senderShouldNotReceiveABounceUponRRTFailureWhenPartOfTheLoop() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + GROUP_ON_DOMAIN2);
         jamesServer.getProbe(DataProbeImpl.class).addDomainAliasMapping(DOMAIN2, DOMAIN1);
 
@@ -337,7 +337,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void avoidInfiniteBouncingLoopWhenSenderIsPartOfRRTLoop() throws Exception {
+    void avoidInfiniteBouncingLoopWhenSenderIsPartOfRRTLoop() throws Exception {
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + GROUP_ON_DOMAIN2);
         jamesServer.getProbe(DataProbeImpl.class).addDomainAliasMapping(DOMAIN2, DOMAIN1);
 
@@ -354,7 +354,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserWhenDomainMapping() throws Exception {
+    void messageShouldRedirectToUserWhenDomainMapping() throws Exception {
         dataProbe.addDomainAliasMapping(DOMAIN1, DOMAIN2);
 
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + USER_DOMAIN1);
@@ -373,7 +373,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldNotSendToUserBelongingToGroupWhenDomainMapping() throws Exception {
+    void messageShouldNotSendToUserBelongingToGroupWhenDomainMapping() throws Exception {
         dataProbe.addDomainAliasMapping(DOMAIN1, DOMAIN2);
 
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN1 + "/" + USER_DOMAIN1);
@@ -392,7 +392,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToGroupWhenDomainMapping() throws Exception {
+    void messageShouldRedirectToGroupWhenDomainMapping() throws Exception {
         dataProbe.addDomainAliasMapping(DOMAIN1, DOMAIN2);
 
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + GROUP_ON_DOMAIN2 + "/" + USER_DOMAIN2);
@@ -411,7 +411,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToGroupContainingSlash() throws Exception {
+    void messageShouldRedirectToGroupContainingSlash() throws Exception {
         String groupWithSlash = "a/a@" + DOMAIN1;
         String groupWithEncodedSlash = "a%2Fa@" + DOMAIN1;
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + groupWithEncodedSlash + "/" + USER_DOMAIN1);
@@ -430,7 +430,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserContainingSlash() throws Exception {
+    void messageShouldRedirectToUserContainingSlash() throws Exception {
         String userWithSlash = "a/a@" + DOMAIN1;
         dataProbe.addUser(userWithSlash, PASSWORD);
         String userWithEncodedSlash = "a%2Fa@" + DOMAIN1;
@@ -450,7 +450,7 @@ public class GroupMappingTest {
     }
 
     @Test
-    public void messageShouldRedirectToUserWhenEncodingAt() throws Exception {
+    void messageShouldRedirectToUserWhenEncodingAt() throws Exception {
         String userWithEncodedAt = "user%40" + DOMAIN1;
         String groupWithEncodedAt = "group%40" + DOMAIN1;
         webAdminApi.put(GroupsRoutes.ROOT_PATH + "/" + groupWithEncodedAt + "/" + userWithEncodedAt);
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
index 08d79a1..338883d 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
@@ -440,7 +440,7 @@ public class ICSAttachmentWorkflowTest {
     private MimeMessage yahooInvitationMessage;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                 .addMailet(MailetConfiguration.builder()
@@ -543,12 +543,12 @@ public class ICSAttachmentWorkflowTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void calendarAttachmentShouldNotBePublishedInMQWhenNoICalAttachment() throws Exception {
+    void calendarAttachmentShouldNotBePublishedInMQWhenNoICalAttachment() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
@@ -565,7 +565,7 @@ public class ICSAttachmentWorkflowTest {
     }
 
     @Test
-    public void calendarAttachmentShouldBePublishedInMQWhenMatchingWorkflowConfiguration() throws Exception {
+    void calendarAttachmentShouldBePublishedInMQWhenMatchingWorkflowConfiguration() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
@@ -598,7 +598,7 @@ public class ICSAttachmentWorkflowTest {
     }
 
     @Test
-    public void headersShouldNotBeAddedInMailWhenNoICalAttachment() throws Exception {
+    void headersShouldNotBeAddedInMailWhenNoICalAttachment() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
@@ -620,7 +620,7 @@ public class ICSAttachmentWorkflowTest {
     }
 
     @Test
-    public void headersShouldBeAddedInMailWhenOneICalAttachment() throws Exception {
+    void headersShouldBeAddedInMailWhenOneICalAttachment() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
@@ -641,7 +641,7 @@ public class ICSAttachmentWorkflowTest {
     }
 
     @Test
-    public void headersShouldBeAddedInMailWhenOneBase64ICalAttachment() throws Exception {
+    void headersShouldBeAddedInMailWhenOneBase64ICalAttachment() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
@@ -662,7 +662,7 @@ public class ICSAttachmentWorkflowTest {
     }
 
     @Test
-    public void base64CalendarAttachmentShouldBePublishedInMQWhenMatchingWorkflowConfiguration() throws Exception {
+    void base64CalendarAttachmentShouldBePublishedInMQWhenMatchingWorkflowConfiguration() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
@@ -688,7 +688,7 @@ public class ICSAttachmentWorkflowTest {
     }
 
     @Test
-    public void yahooBase64CalendarAttachmentShouldBePublishedInMQWhenMatchingWorkflowConfiguration() throws Exception {
+    void yahooBase64CalendarAttachmentShouldBePublishedInMQWhenMatchingWorkflowConfiguration() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
@@ -715,7 +715,7 @@ public class ICSAttachmentWorkflowTest {
     }
 
     @Test
-    public void headersShouldBeFilledOnlyWithOneICalAttachmentWhenMailHasSeveral() throws Exception {
+    void headersShouldBeFilledOnlyWithOneICalAttachmentWhenMailHasSeveral() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
@@ -736,7 +736,7 @@ public class ICSAttachmentWorkflowTest {
     }
 
     @Test
-    public void pipelineShouldSendSeveralJSONOverRabbitMQWhenSeveralAttachments() throws Exception {
+    void pipelineShouldSendSeveralJSONOverRabbitMQWhenSeveralAttachments() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
                 .name("name")
@@ -773,7 +773,7 @@ public class ICSAttachmentWorkflowTest {
     }
 
     @Test
-    public void mailShouldNotContainCalendarContentInTextBodyButAttachment() throws Exception {
+    void mailShouldNotContainCalendarContentInTextBodyButAttachment() throws Exception {
         MimeMessage calendarMessage = MimeMessageUtil.mimeMessageFromStream(ClassLoader.getSystemResourceAsStream("eml/calendar.eml"));
 
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/IsOverQuotaMatcherTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/IsOverQuotaMatcherTest.java
index be89608..790c7f9 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/IsOverQuotaMatcherTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/IsOverQuotaMatcherTest.java
@@ -52,7 +52,7 @@ import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
-public class IsOverQuotaMatcherTest {
+class IsOverQuotaMatcherTest {
 
     private static final String OTHER_DOMAIN = "other.com";
     private static final String FROM = "fromuser@" + OTHER_DOMAIN;
@@ -74,7 +74,7 @@ public class IsOverQuotaMatcherTest {
     private RequestSpecification webAdminApi;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.defaultMailetContainerConfiguration()
                 .putProcessor(ProcessorConfiguration.transport()
                         .addMailet(MailetConfiguration.builder()
@@ -102,12 +102,12 @@ public class IsOverQuotaMatcherTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void aBounceMessageShouldBeSentToTheSenderWhenRecipientAsReachedHisSizeQuota() throws Exception {
+    void aBounceMessageShouldBeSentToTheSenderWhenRecipientAsReachedHisSizeQuota() throws Exception {
         webAdminApi.given()
             .body(SMALL_SIZE.asLong())
             .put("/quota/users/" + RECIPIENT + "/size");
@@ -125,7 +125,7 @@ public class IsOverQuotaMatcherTest {
     }
 
     @Test
-    public void aBounceMessageShouldBeSentToTheSenderWhenRecipientAsReachedHisDomainSizeQuota() throws Exception {
+    void aBounceMessageShouldBeSentToTheSenderWhenRecipientAsReachedHisDomainSizeQuota() throws Exception {
         webAdminApi.given()
             .body(SMALL_SIZE.asLong())
             .put("/quota/domains/" + DEFAULT_DOMAIN + "/size");
@@ -143,7 +143,7 @@ public class IsOverQuotaMatcherTest {
     }
 
     @Test
-    public void aBounceMessageShouldBeSentToTheRecipientWhenRecipientSizeQuotaIsNotExceeded() throws Exception {
+    void aBounceMessageShouldBeSentToTheRecipientWhenRecipientSizeQuotaIsNotExceeded() throws Exception {
         webAdminApi.given()
             .body(LARGE_SIZE.asLong())
             .put("/quota/users/" + RECIPIENT + "/size");
@@ -158,7 +158,7 @@ public class IsOverQuotaMatcherTest {
     }
 
     @Test
-    public void aBounceMessageShouldBeSentToTheSenderWhenRecipientAsReachedHisCountQuota() throws Exception {
+    void aBounceMessageShouldBeSentToTheSenderWhenRecipientAsReachedHisCountQuota() throws Exception {
         webAdminApi.given()
             .body(SMALL_COUNT.asLong())
             .put("/quota/users/" + RECIPIENT + "/count");
@@ -176,7 +176,7 @@ public class IsOverQuotaMatcherTest {
     }
 
     @Test
-    public void aBounceMessageShouldBeSentToTheSenderWhenRecipientAsReachedHisDomainCountQuota() throws Exception {
+    void aBounceMessageShouldBeSentToTheSenderWhenRecipientAsReachedHisDomainCountQuota() throws Exception {
         webAdminApi.given()
             .body(SMALL_COUNT.asLong())
             .put("/quota/domains/" + DEFAULT_DOMAIN + "/count");
@@ -194,7 +194,7 @@ public class IsOverQuotaMatcherTest {
     }
 
     @Test
-    public void aBounceMessageShouldBeSentToTheRecipientWhenRecipientCountQuotaIsNotExceeded() throws Exception {
+    void aBounceMessageShouldBeSentToTheRecipientWhenRecipientCountQuotaIsNotExceeded() throws Exception {
         webAdminApi.given()
             .body(LARGE_COUNT.asLong())
             .put("/quota/users/" + RECIPIENT + "/count");
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java
index 2ff4c8c..5b4d1af 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java
@@ -58,7 +58,7 @@ import com.google.inject.util.Modules;
 
 import io.restassured.specification.RequestSpecification;
 
-public class MailReprocessingIntegrationTest {
+class MailReprocessingIntegrationTest {
     private static final MailRepositoryUrl REPOSITORY_A = MailRepositoryUrl.from("memory://var/mail/a");
     private static final MailRepositoryUrl REPOSITORY_B = MailRepositoryUrl.from("memory://var/mail/b");
 
@@ -69,7 +69,7 @@ public class MailReprocessingIntegrationTest {
     private RequestSpecification specification;
 
     @BeforeEach
-    public void createJamesServer(@TempDir File temporaryFolder) throws Exception {
+    void createJamesServer(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailets = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                     .addMailet(MailetConfiguration.BCC_STRIPPER)
@@ -100,12 +100,12 @@ public class MailReprocessingIntegrationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void reprocessingShouldAllowToTargetASpecificProcessor() throws Exception {
+    void reprocessingShouldAllowToTargetASpecificProcessor() throws Exception {
         // Given an incoming email
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
@@ -133,7 +133,7 @@ public class MailReprocessingIntegrationTest {
     }
 
     @Test
-    public void reprocessingShouldPreserveStateWhenProcessorIsNotSpecified() throws Exception {
+    void reprocessingShouldPreserveStateWhenProcessorIsNotSpecified() throws Exception {
         // Given an incoming email
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
@@ -177,7 +177,7 @@ public class MailReprocessingIntegrationTest {
     }
 
     @Test
-    public void reprocessingShouldProcessAsErrorWhenUnknownMailProcessor() throws Exception {
+    void reprocessingShouldProcessAsErrorWhenUnknownMailProcessor() throws Exception {
         // Given an incoming email
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(FakeMail.builder()
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/RemoteDeliveryErrorHandlingTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/RemoteDeliveryErrorHandlingTest.java
index a818426..a85009b 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/RemoteDeliveryErrorHandlingTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/RemoteDeliveryErrorHandlingTest.java
@@ -66,7 +66,7 @@ import com.google.inject.util.Modules;
 
 import io.restassured.specification.RequestSpecification;
 
-public class RemoteDeliveryErrorHandlingTest {
+class RemoteDeliveryErrorHandlingTest {
     private static final String FROM = "from@" + DEFAULT_DOMAIN;
     private static final String RECIPIENT_DOMAIN = "test.com";
     private static final String RECIPIENT = "touser@" + RECIPIENT_DOMAIN;
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinIntegrationTest.java
index e25d25f..1e79738 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/SpamAssassinIntegrationTest.java
@@ -56,7 +56,7 @@ import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
 
-public class SpamAssassinIntegrationTest {
+class SpamAssassinIntegrationTest {
     private static final String SPAM_CONTENT = "XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X";
 
     @RegisterExtension
@@ -72,7 +72,7 @@ public class SpamAssassinIntegrationTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailets = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(
                 ProcessorConfiguration.transport()
@@ -97,12 +97,12 @@ public class SpamAssassinIntegrationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void spamAssassinShouldAppendNewHeaderOnMessage() throws Exception {
+    void spamAssassinShouldAppendNewHeaderOnMessage() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(mailWithContent("This is the content", RECIPIENT));
 
@@ -118,7 +118,7 @@ public class SpamAssassinIntegrationTest {
     }
 
     @Test
-    public void spamAssassinShouldAppendNewHeaderWhichDetectIsSpamWhenSpamMessage() throws Exception {
+    void spamAssassinShouldAppendNewHeaderWhichDetectIsSpamWhenSpamMessage() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(mailWithContent(SPAM_CONTENT, RECIPIENT));
 
@@ -133,7 +133,7 @@ public class SpamAssassinIntegrationTest {
     }
 
     @Test
-    public void spamAssassinShouldAppendNewHeaderWhichNoWhenNonSpamMessage() throws Exception {
+    void spamAssassinShouldAppendNewHeaderWhichNoWhenNonSpamMessage() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(mailWithContent("This is the content", RECIPIENT));
 
@@ -148,7 +148,7 @@ public class SpamAssassinIntegrationTest {
     }
 
     @Test
-    public void spamAssassinShouldAppendNewHeaderPerRecipientOnMessage() throws Exception {
+    void spamAssassinShouldAppendNewHeaderPerRecipientOnMessage() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(mailWithContent("This is the content", RECIPIENT, RECIPIENT2));
 
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
index 5458448..709361c 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
@@ -50,7 +50,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class StripAttachmentTest {
+class StripAttachmentTest {
     private static final String FROM = "fromUser@" + DEFAULT_DOMAIN;
     private static final String RECIPIENT = "touser@" + DEFAULT_DOMAIN;
 
@@ -62,7 +62,7 @@ public class StripAttachmentTest {
     private TemporaryJamesServer jamesServer;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.defaultMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.transport()
                 .addMailet(MailetConfiguration.builder()
@@ -92,7 +92,7 @@ public class StripAttachmentTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
@@ -103,7 +103,7 @@ public class StripAttachmentTest {
      * - RecoverAttachment recovers attachments from attribute
      */
     @Test
-    public void stripAttachmentShouldPutAttachmentsInMailAttributeWhenConfiguredForIt() throws Exception {
+    void stripAttachmentShouldPutAttachmentsInMailAttributeWhenConfiguredForIt() throws Exception {
         MimeMessage message = MimeMessageBuilder.mimeMessageBuilder()
             .setMultipartWithBodyParts(
                 MimeMessageBuilder.bodyPartBuilder()
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryIntegrationTest.java
index 79fb660..01ffac1 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryIntegrationTest.java
@@ -53,7 +53,7 @@ import org.junit.jupiter.api.io.TempDir;
 
 import io.restassured.specification.RequestSpecification;
 
-public class ToRepositoryIntegrationTest {
+class ToRepositoryIntegrationTest {
     private static final String RECIPIENT = "touser@" + DEFAULT_DOMAIN;
     public static final MailRepositoryUrl CUSTOM_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/custom/");
 
@@ -67,7 +67,7 @@ public class ToRepositoryIntegrationTest {
     private RequestSpecification webAdminAPI;
 
     @BeforeEach
-    public void setup(@TempDir File temporaryFolder) throws Exception {
+    void setup(@TempDir File temporaryFolder) throws Exception {
         MailetContainer.Builder mailetContainer = TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
@@ -92,12 +92,12 @@ public class ToRepositoryIntegrationTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         jamesServer.shutdown();
     }
 
     @Test
-    public void incomingShouldBeStoredInProcessorByDefault() throws Exception {
+    void incomingShouldBeStoredInProcessorByDefault() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(RECIPIENT, RECIPIENT)
             .sendMessage(RECIPIENT, RECIPIENT);
@@ -106,7 +106,7 @@ public class ToRepositoryIntegrationTest {
     }
 
     @Test
-    public void userShouldBeAbleToAccessReprocessedMails() throws Exception {
+    void userShouldBeAbleToAccessReprocessedMails() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(RECIPIENT, RECIPIENT)
             .sendMessage(RECIPIENT, RECIPIENT);
@@ -136,7 +136,7 @@ public class ToRepositoryIntegrationTest {
     }
 
     @Test
-    public void userShouldBeAbleToAccessReprocessedMail() throws Exception {
+    void userShouldBeAbleToAccessReprocessedMail() throws Exception {
         messageSender.connect(LOCALHOST_IP, jamesServer.getProbe(SmtpGuiceProbe.class).getSmtpPort())
             .sendMessage(RECIPIENT, RECIPIENT)
             .sendMessage(RECIPIENT, RECIPIENT);
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryIntegrationTest.java
index 062a2b8..98653b9 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryIntegrationTest.java
@@ -43,8 +43,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.io.TempDir;
 
-public class ToSenderDomainRepositoryIntegrationTest {
-
+class ToSenderDomainRepositoryIntegrationTest {
     private static final String RECIPIENT = "touser@" + DEFAULT_DOMAIN;
     private static final String CUSTOM_REPOSITORY_PREFIX = "memory://var/mail/custom/";
     public static final MailRepositoryUrl DOMAIN_URL = MailRepositoryUrl.from(CUSTOM_REPOSITORY_PREFIX + DEFAULT_DOMAIN);
@@ -58,14 +57,14 @@ public class ToSenderDomainRepositoryIntegrationTest {
     private TemporaryJamesServer jamesServer;
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         if (jamesServer != null) {
             jamesServer.shutdown();
         }
     }
 
     @Test
-    public void incomingMailShouldBeStoredInCorrespondingMailRepository(@TempDir File temporaryFolder) throws Exception {
+    void incomingMailShouldBeStoredInCorrespondingMailRepository(@TempDir File temporaryFolder) throws Exception {
         startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
@@ -85,7 +84,7 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailShouldBeStoredWhenRepositoryDoesNotExistAndAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
+    void incomingMailShouldBeStoredWhenRepositoryDoesNotExistAndAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
         startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
@@ -106,7 +105,7 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailShouldBeStoredWhenRepositoryExistsAndAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
+    void incomingMailShouldBeStoredWhenRepositoryExistsAndAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
         startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
@@ -129,7 +128,7 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailShouldBeIgnoredWhenRepositoryDoesNotExistAndNotAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
+    void incomingMailShouldBeIgnoredWhenRepositoryDoesNotExistAndNotAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
         startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
@@ -155,7 +154,7 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailShouldBeStoredWhenRepositoryExistsAndNotAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
+    void incomingMailShouldBeStoredWhenRepositoryExistsAndNotAllowedToCreateRepository(@TempDir File temporaryFolder) throws Exception {
         startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
@@ -178,7 +177,7 @@ public class ToSenderDomainRepositoryIntegrationTest {
     }
 
     @Test
-    public void incomingMailsShouldBeStoredInCorrespondingMailRepository(@TempDir File temporaryFolder) throws Exception {
+    void incomingMailsShouldBeStoredInCorrespondingMailRepository(@TempDir File temporaryFolder) throws Exception {
         startJamesServerWithMailetContainer(temporaryFolder, TemporaryJamesServer.simpleMailetContainerConfiguration()
             .putProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()


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