james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [15/44] james-project git commit: JAMES-2267 Factorize mailet integration common constants
Date Fri, 05 Jan 2018 03:00:59 GMT
JAMES-2267 Factorize mailet integration common constants


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

Branch: refs/heads/master
Commit: 9e639adb227a4b4603b6586409455d4cb6e68a48
Parents: 456972f
Author: benwa <btellier@linagora.com>
Authored: Tue Dec 19 16:09:39 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Fri Jan 5 09:33:19 2018 +0700

----------------------------------------------------------------------
 .../james/mailets/AddDeliveredToHeaderTest.java |  14 +-
 .../james/mailets/BounceIntegrationTest.java    |  55 ++--
 .../mailets/CommonMailetConfigurationTest.java  |  14 +-
 .../GatewayRemoteDeliveryIntegrationTest.java   |  55 ++--
 .../mailets/NetworkMatcherIntegrationTest.java  | 183 ++++++-----
 .../RecipientRewriteTableIntegrationTest.java   |  49 ++-
 .../org/apache/james/mailets/SieveDelivery.java |  40 +--
 .../james/mailets/SmtpAuthIntegrationTest.java  |  21 +-
 .../james/mailets/configuration/AwaitUtils.java |  34 ---
 .../james/mailets/configuration/Constants.java  |  40 +++
 .../crypto/SMIMEDecryptIntegrationTest.java     |   9 +-
 .../crypto/SMIMESignIntegrationTest.java        |  57 ++--
 .../james/smtp/SmtpAuthorizedAddressesTest.java |  25 +-
 .../james/smtp/SmtpBracketEnforcementTest.java  |  23 +-
 .../smtp/SmtpIdentityVerificationTest.java      |  22 +-
 .../james/smtp/SmtpSizeLimitationTest.java      |  19 +-
 .../mailets/AmqpForwardAttachmentTest.java      |  23 +-
 .../transport/mailets/ContactExtractorTest.java |  31 +-
 .../transport/mailets/GroupMappingTest.java     | 300 +++++++++----------
 .../mailets/ICSAttachmentWorkflowTest.java      |  41 ++-
 .../transport/mailets/StripAttachmentTest.java  |  23 +-
 21 files changed, 518 insertions(+), 560 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/AddDeliveredToHeaderTest.java
----------------------------------------------------------------------
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 4464056..bd47efb 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
@@ -20,7 +20,12 @@
 package org.apache.james.mailets;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.james.mailbox.model.MailboxConstants;
@@ -37,13 +42,6 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class AddDeliveredToHeaderTest {
-
-    private static final String DEFAULT_DOMAIN = "james.org";
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int IMAP_PORT = 1143;
-    private static final int SMTP_PORT = 1025;
-    private static final String PASSWORD = "secret";
-
     @Rule
     public TemporaryFolder temporaryFolder = new TemporaryFolder();
     @Rule

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
----------------------------------------------------------------------
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 b00b57e..b23082f 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
@@ -20,7 +20,12 @@
 package org.apache.james.mailets;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.configuration.CommonProcessors;
@@ -48,15 +53,9 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class BounceIntegrationTest {
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int SMTP_PORT = 1025;
-    private static final int IMAP_PORT = 1143;
-    private static final String PASSWORD = "secret";
-
-    private static final String JAMES_APACHE_ORG = "james.org";
-    public static final String POSTMASTER = "postmaster@" + JAMES_APACHE_ORG;
-    public static final String BOUNCE_RECEIVER = "bounce.receiver@" + JAMES_APACHE_ORG;
-    private static final String RECIPIENT = "to@" + JAMES_APACHE_ORG;
+    public static final String POSTMASTER = "postmaster@" + DEFAULT_DOMAIN;
+    public static final String BOUNCE_RECEIVER = "bounce.receiver@" + DEFAULT_DOMAIN;
+    private static final String RECIPIENT = "to@" + DEFAULT_DOMAIN;
 
     @Rule
     public TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -83,11 +82,11 @@ public class BounceIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(RECIPIENT, PASSWORD);
         dataProbe.addUser(BOUNCE_RECEIVER, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(BOUNCE_RECEIVER, RECIPIENT);
 
             imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
@@ -109,11 +108,11 @@ public class BounceIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(RECIPIENT, PASSWORD);
         dataProbe.addUser(BOUNCE_RECEIVER, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(BOUNCE_RECEIVER, RECIPIENT);
 
             imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
@@ -135,12 +134,12 @@ public class BounceIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(RECIPIENT, PASSWORD);
         dataProbe.addUser(BOUNCE_RECEIVER, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
-            messageSender.sendMessage("any@" + JAMES_APACHE_ORG, RECIPIENT);
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
+            messageSender.sendMessage("any@" + DEFAULT_DOMAIN, RECIPIENT);
 
             imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
                 .login(BOUNCE_RECEIVER, PASSWORD)
@@ -162,12 +161,12 @@ public class BounceIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(RECIPIENT, PASSWORD);
         dataProbe.addUser(BOUNCE_RECEIVER, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
-            messageSender.sendMessage("any@" + JAMES_APACHE_ORG, RECIPIENT);
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
+            messageSender.sendMessage("any@" + DEFAULT_DOMAIN, RECIPIENT);
 
             imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
                 .login(BOUNCE_RECEIVER, PASSWORD)
@@ -189,12 +188,12 @@ public class BounceIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(RECIPIENT, PASSWORD);
         dataProbe.addUser(BOUNCE_RECEIVER, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
-            messageSender.sendMessage("any@" + JAMES_APACHE_ORG, RECIPIENT);
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
+            messageSender.sendMessage("any@" + DEFAULT_DOMAIN, RECIPIENT);
 
             imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
                 .login(BOUNCE_RECEIVER, PASSWORD)
@@ -215,11 +214,11 @@ public class BounceIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(RECIPIENT, PASSWORD);
         dataProbe.addUser(BOUNCE_RECEIVER, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(BOUNCE_RECEIVER, RECIPIENT);
 
             imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
@@ -241,12 +240,12 @@ public class BounceIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(RECIPIENT, PASSWORD);
         dataProbe.addUser(POSTMASTER, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
-            messageSender.sendMessage("any@" + JAMES_APACHE_ORG, RECIPIENT);
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
+            messageSender.sendMessage("any@" + DEFAULT_DOMAIN, RECIPIENT);
 
             imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
                 .login(POSTMASTER, PASSWORD)

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/CommonMailetConfigurationTest.java
----------------------------------------------------------------------
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 1a7e217..2b61ade 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
@@ -20,7 +20,12 @@
 package org.apache.james.mailets;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.modules.MailboxProbeImpl;
@@ -35,13 +40,6 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class CommonMailetConfigurationTest {
-
-    private static final String DEFAULT_DOMAIN = "james.org";
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int IMAP_PORT = 1143;
-    private static final int SMTP_PORT = 1025;
-    private static final String PASSWORD = "secret";
-
     @Rule
     public TemporaryFolder temporaryFolder = new TemporaryFolder();
     @Rule

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
----------------------------------------------------------------------
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 0dbb573..75dc866 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
@@ -25,7 +25,12 @@ import static com.jayway.restassured.config.EncoderConfig.encoderConfig;
 import static com.jayway.restassured.config.RestAssuredConfig.newConfig;
 import static org.apache.james.MemoryJamesServerMain.SMTP_AND_IMAP_MODULE;
 import static org.apache.james.MemoryJamesServerMain.SMTP_ONLY_MODULE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasSize;
 
@@ -64,15 +69,9 @@ import com.jayway.restassured.builder.RequestSpecBuilder;
 import com.jayway.restassured.http.ContentType;
 
 public class GatewayRemoteDeliveryIntegrationTest {
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int SMTP_PORT = 1025;
-    private static final int IMAP_PORT = 1143;
-    private static final String PASSWORD = "secret";
-
-    private static final String JAMES_APACHE_ORG = "james.org";
     private static final String JAMES_ANOTHER_DOMAIN = "james.com";
 
-    private static final String FROM = "from@" + JAMES_APACHE_ORG;
+    private static final String FROM = "from@" + DEFAULT_DOMAIN;
     private static final String RECIPIENT = "touser@" + JAMES_ANOTHER_DOMAIN;
 
     @Rule
@@ -122,10 +121,10 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT);
 
             calmlyAwait.atMost(ONE_MINUTE).until(this::messageIsReceivedByTheSmtpServer);
@@ -142,10 +141,10 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT);
 
             calmlyAwait.atMost(ONE_MINUTE).until(this::messageIsReceivedByTheSmtpServer);
@@ -162,10 +161,10 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT);
 
             calmlyAwait.atMost(ONE_MINUTE).until(this::messageIsReceivedByTheSmtpServer);
@@ -182,10 +181,10 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT);
 
             calmlyAwait.atMost(ONE_MINUTE).until(this::messageIsReceivedByTheSmtpServer);
@@ -206,10 +205,10 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT);
 
             Thread.sleep(TimeUnit.SECONDS.toMillis(5));
@@ -231,7 +230,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .withBase(SMTP_AND_IMAP_MODULE)
             .withOverrides(binder -> binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             .withMailetContainer(MailetContainer.builder()
-                .postmaster("postmaster@" + JAMES_APACHE_ORG)
+                .postmaster("postmaster@" + DEFAULT_DOMAIN)
                 .addProcessor(root())
                 .addProcessor(CommonProcessors.error())
                 .addProcessor(relayAndLocalDeliveryTransport(gatewayProperty))
@@ -239,10 +238,10 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT);
 
             imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
@@ -263,7 +262,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .withBase(SMTP_AND_IMAP_MODULE)
             .withOverrides(binder -> binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             .withMailetContainer(MailetContainer.builder()
-                .postmaster("postmaster@" + JAMES_APACHE_ORG)
+                .postmaster("postmaster@" + DEFAULT_DOMAIN)
                 .addProcessor(root())
                 .addProcessor(CommonProcessors.error())
                 .addProcessor(ProcessorConfiguration.transport()
@@ -288,10 +287,10 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT);
 
             imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
@@ -311,7 +310,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .withBase(SMTP_ONLY_MODULE)
             .withOverrides(binder -> binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             .withMailetContainer(MailetContainer.builder()
-                .postmaster("postmaster@" + JAMES_APACHE_ORG)
+                .postmaster("postmaster@" + DEFAULT_DOMAIN)
                 .addProcessor(root())
                 .addProcessor(CommonProcessors.error())
                 .addProcessor(directResolutionTransport())
@@ -319,10 +318,10 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT);
 
             calmlyAwait.atMost(ONE_MINUTE).until(this::messageIsReceivedByTheSmtpServer);
@@ -346,7 +345,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
 
     private MailetContainer generateMailetContainerConfiguration(String gatewayProperty) {
         return MailetContainer.builder()
-            .postmaster("postmaster@" + JAMES_APACHE_ORG)
+            .postmaster("postmaster@" + DEFAULT_DOMAIN)
             .addProcessor(root())
             .addProcessor(CommonProcessors.error())
             .addProcessor(relayOnlyTransport(gatewayProperty))

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
----------------------------------------------------------------------
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 eba6574..f02ab31 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
@@ -20,7 +20,12 @@
 package org.apache.james.mailets;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.james.MemoryJamesServerMain;
@@ -45,19 +50,15 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class NetworkMatcherIntegrationTest {
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int SMTP_PORT = 1025;
-    private static final int IMAP_PORT = 1143;
-    private static final String PASSWORD = "secret";
-
-    private static final String JAMES_APACHE_ORG = "james.org";
-    private static final String FROM = "fromuser@" + JAMES_APACHE_ORG;
+    private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final String DROPPED_MAILS = "file://var/mail/dropped-mails/";
 
     @Rule
     public TemporaryFolder temporaryFolder = new TemporaryFolder();
     @Rule
     public IMAPMessageReader imapMessageReader = new IMAPMessageReader();
+    @Rule
+    public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
 
@@ -71,7 +72,7 @@ public class NetworkMatcherIntegrationTest {
             .build(temporaryFolder);
 
         DataProbe dataProbe = temporaryJamesServer.getProbe(DataProbeImpl.class);
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
         return temporaryJamesServer;
     }
@@ -107,17 +108,15 @@ public class NetworkMatcherIntegrationTest {
                 .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
-        try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, FROM, PASSWORD)) {
-
-            messageSender.sendMessage(FROM, FROM)
-                .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
+        messageSender.connect(LOCALHOST_IP, SMTP_PORT)
+            .authenticate(FROM, PASSWORD)
+            .sendMessage(FROM, FROM)
+            .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 
-            imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
-                .login(FROM, PASSWORD)
-                .select(IMAPMessageReader.INBOX)
-                .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
-        }
+        imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
+            .login(FROM, PASSWORD)
+            .select(IMAPMessageReader.INBOX)
+            .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
     }
 
     @Test
@@ -130,17 +129,15 @@ public class NetworkMatcherIntegrationTest {
                 .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
-        try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, FROM, PASSWORD)) {
-
-            messageSender.sendMessage(FROM, FROM)
-                .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
+        messageSender.connect(LOCALHOST_IP, SMTP_PORT)
+            .authenticate(FROM, PASSWORD)
+            .sendMessage(FROM, FROM)
+            .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 
-            imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
-                .login(FROM, PASSWORD)
-                .select(IMAPMessageReader.INBOX)
-                .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
-        }
+        imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
+            .login(FROM, PASSWORD)
+            .select(IMAPMessageReader.INBOX)
+            .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
     }
 
     @Test
@@ -153,17 +150,15 @@ public class NetworkMatcherIntegrationTest {
                 .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
-        try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, FROM, PASSWORD)) {
-
-            messageSender.sendMessage(FROM, FROM)
-                .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
+        messageSender.connect(LOCALHOST_IP, SMTP_PORT)
+            .authenticate(FROM, PASSWORD)
+            .sendMessage(FROM, FROM)
+            .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 
-            imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
-                .login(FROM, PASSWORD)
-                .select(IMAPMessageReader.INBOX)
-                .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
-        }
+        imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
+            .login(FROM, PASSWORD)
+            .select(IMAPMessageReader.INBOX)
+            .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
     }
 
     @Test
@@ -176,17 +171,15 @@ public class NetworkMatcherIntegrationTest {
                 .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
-        try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, FROM, PASSWORD)) {
-
-            messageSender.sendMessage(FROM, FROM)
-                .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
+        messageSender.connect(LOCALHOST_IP, SMTP_PORT)
+            .authenticate(FROM, PASSWORD)
+            .sendMessage(FROM, FROM)
+            .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 
-            imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
-                .login(FROM, PASSWORD)
-                .select(IMAPMessageReader.INBOX)
-                .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
-        }
+        imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
+            .login(FROM, PASSWORD)
+            .select(IMAPMessageReader.INBOX)
+            .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
     }
 
     @Test
@@ -199,17 +192,15 @@ public class NetworkMatcherIntegrationTest {
                 .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
-        try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, FROM, PASSWORD)) {
-
-            messageSender.sendMessage(FROM, FROM)
-                .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
+        messageSender.connect(LOCALHOST_IP, SMTP_PORT)
+            .authenticate(FROM, PASSWORD)
+            .sendMessage(FROM, FROM)
+            .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 
-            imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
-                .login(FROM, PASSWORD)
-                .select(IMAPMessageReader.INBOX)
-                .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
-        }
+        imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
+            .login(FROM, PASSWORD)
+            .select(IMAPMessageReader.INBOX)
+            .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
     }
 
     @Test
@@ -222,17 +213,15 @@ public class NetworkMatcherIntegrationTest {
                 .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
-        try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, FROM, PASSWORD)) {
+        messageSender.connect(LOCALHOST_IP, SMTP_PORT)
+            .authenticate(FROM, PASSWORD)
+            .sendMessage(FROM, FROM)
+            .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 
-            messageSender.sendMessage(FROM, FROM)
-                .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
-
-            imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
-                .login(FROM, PASSWORD)
-                .select(IMAPMessageReader.INBOX)
-                .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
-        }
+        imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
+            .login(FROM, PASSWORD)
+            .select(IMAPMessageReader.INBOX)
+            .awaitMessage(calmlyAwait.atMost(ONE_MINUTE));
     }
 
     @Test
@@ -245,21 +234,19 @@ public class NetworkMatcherIntegrationTest {
                 .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
-        try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
-
-            messageSender.sendMessage(FROM, FROM)
-                .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
-
-            MailRepositoryProbeImpl repositoryProbe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
-            calmlyAwait.atMost(ONE_MINUTE).until(() -> repositoryProbe.getRepositoryMailCount(DROPPED_MAILS) == 1);
-            assertThat(
-                imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
-                    .login(FROM, PASSWORD)
-                    .select(IMAPMessageReader.INBOX)
-                    .hasAMessage())
-                .isFalse();
-        }
+        messageSender.connect(LOCALHOST_IP, SMTP_PORT)
+            .authenticate(FROM, PASSWORD)
+            .sendMessage(FROM, FROM)
+            .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
+
+        MailRepositoryProbeImpl repositoryProbe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
+        calmlyAwait.atMost(ONE_MINUTE).until(() -> repositoryProbe.getRepositoryMailCount(DROPPED_MAILS) == 1);
+        assertThat(
+            imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
+                .login(FROM, PASSWORD)
+                .select(IMAPMessageReader.INBOX)
+                .hasAMessage())
+            .isFalse();
     }
 
     @Test
@@ -272,21 +259,19 @@ public class NetworkMatcherIntegrationTest {
                 .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
-        try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
-
-            messageSender.sendMessage(FROM, FROM)
-                .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
-
-            MailRepositoryProbeImpl repositoryProbe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
-            calmlyAwait.atMost(ONE_MINUTE).until(() -> repositoryProbe.getRepositoryMailCount(DROPPED_MAILS) == 1);
-            assertThat(
-                imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
-                    .login(FROM, PASSWORD)
-                    .select(IMAPMessageReader.INBOX)
-                    .hasAMessage())
-                .isFalse();
-        }
+        messageSender.connect(LOCALHOST_IP, SMTP_PORT)
+            .authenticate(FROM, PASSWORD)
+            .sendMessage(FROM, FROM)
+            .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
+
+        MailRepositoryProbeImpl repositoryProbe = jamesServer.getProbe(MailRepositoryProbeImpl.class);
+        calmlyAwait.atMost(ONE_MINUTE).until(() -> repositoryProbe.getRepositoryMailCount(DROPPED_MAILS) == 1);
+        assertThat(
+            imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
+                .login(FROM, PASSWORD)
+                .select(IMAPMessageReader.INBOX)
+                .hasAMessage())
+            .isFalse();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
----------------------------------------------------------------------
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 58b69e3..decf799 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
@@ -20,7 +20,12 @@
 package org.apache.james.mailets;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.modules.MailboxProbeImpl;
@@ -35,19 +40,13 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class RecipientRewriteTableIntegrationTest {
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int IMAP_PORT = 1143;
-    private static final int SMTP_PORT = 1025;
-    private static final String PASSWORD = "secret";
-
-    private static final String JAMES_APACHE_ORG = "james.org";
     private static final String JAMES_ANOTHER_DOMAIN = "james.com";
 
-    private static final String FROM = "fromUser@" + JAMES_APACHE_ORG;
-    private static final String RECIPIENT = "touser@" + JAMES_APACHE_ORG;
+    private static final String FROM = "fromUser@" + DEFAULT_DOMAIN;
+    private static final String RECIPIENT = "touser@" + DEFAULT_DOMAIN;
 
-    private static final String ANY_AT_JAMES = "any@" + JAMES_APACHE_ORG;
-    private static final String OTHER_AT_JAMES = "other@" + JAMES_APACHE_ORG;
+    private static final String ANY_AT_JAMES = "any@" + DEFAULT_DOMAIN;
+    private static final String OTHER_AT_JAMES = "other@" + DEFAULT_DOMAIN;
 
     private static final String ANY_AT_ANOTHER_DOMAIN = "any@" + JAMES_ANOTHER_DOMAIN;
 
@@ -65,7 +64,7 @@ public class RecipientRewriteTableIntegrationTest {
         jamesServer = TemporaryJamesServer.builder().build(temporaryFolder);
         dataProbe = jamesServer.getProbe(DataProbeImpl.class);
 
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addDomain(JAMES_ANOTHER_DOMAIN);
     }
 
@@ -81,10 +80,10 @@ public class RecipientRewriteTableIntegrationTest {
         createUserInbox(ANY_AT_JAMES);
         createUserInbox(OTHER_AT_JAMES);
 
-        dataProbe.addAddressMapping("touser", JAMES_APACHE_ORG, ANY_AT_JAMES);
-        dataProbe.addAddressMapping("touser", JAMES_APACHE_ORG, OTHER_AT_JAMES);
+        dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, ANY_AT_JAMES);
+        dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, OTHER_AT_JAMES);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 
@@ -107,10 +106,10 @@ public class RecipientRewriteTableIntegrationTest {
         createUserInbox(ANY_AT_JAMES);
         createUserInbox(OTHER_AT_JAMES);
 
-        dataProbe.addAddressMapping("touser", JAMES_APACHE_ORG, ANY_AT_JAMES);
-        dataProbe.addAddressMapping("touser", JAMES_APACHE_ORG, OTHER_AT_JAMES);
+        dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, ANY_AT_JAMES);
+        dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, OTHER_AT_JAMES);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 
@@ -131,10 +130,10 @@ public class RecipientRewriteTableIntegrationTest {
         createUserInbox(localUser);
         createUserInbox(OTHER_AT_JAMES);
 
-        dataProbe.addAddressMapping("touser", JAMES_APACHE_ORG, nonDomainUser);
-        dataProbe.addAddressMapping("touser", JAMES_APACHE_ORG, OTHER_AT_JAMES);
+        dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, nonDomainUser);
+        dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, OTHER_AT_JAMES);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, RECIPIENT)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 
@@ -151,12 +150,12 @@ public class RecipientRewriteTableIntegrationTest {
 
     @Test
     public void messageShouldRedirectToTheSameUserWhenDomainMapping() throws Exception {
-        dataProbe.addDomainAliasMapping(JAMES_APACHE_ORG, JAMES_ANOTHER_DOMAIN);
+        dataProbe.addDomainAliasMapping(DEFAULT_DOMAIN, JAMES_ANOTHER_DOMAIN);
 
         createUserInbox(ANY_AT_JAMES);
         createUserInbox(ANY_AT_ANOTHER_DOMAIN);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, ANY_AT_JAMES)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 
@@ -169,12 +168,12 @@ public class RecipientRewriteTableIntegrationTest {
 
     @Test
     public void messageShouldNotSendToRecipientWhenDomainMapping() throws Exception {
-        dataProbe.addDomainAliasMapping(JAMES_APACHE_ORG, JAMES_ANOTHER_DOMAIN);
+        dataProbe.addDomainAliasMapping(DEFAULT_DOMAIN, JAMES_ANOTHER_DOMAIN);
 
         createUserInbox(ANY_AT_JAMES);
         createUserInbox(ANY_AT_ANOTHER_DOMAIN);
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(FROM, ANY_AT_JAMES)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SieveDelivery.java
----------------------------------------------------------------------
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 40666af..3d5fc03 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
@@ -20,7 +20,12 @@
 package org.apache.james.mailets;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailbox.store.probe.MailboxProbe;
@@ -37,43 +42,42 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class SieveDelivery {
-
-    private static final String DEFAULT_DOMAIN = "james.org";
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int IMAP_PORT = 1143;
-    private static final int SMTP_PORT = 1025;
-    private static final String PASSWORD = "secret";
-
     @Rule
     public TemporaryFolder temporaryFolder = new TemporaryFolder();
     @Rule
     public IMAPMessageReader imapMessageReader = new IMAPMessageReader();
 
     private TemporaryJamesServer jamesServer;
+    private String targetedMailbox;
+    private String recipient;
+    private String from;
 
     @Before
     public void setup() throws Exception {
         jamesServer = TemporaryJamesServer.builder().build(temporaryFolder);
-    }
 
-    @After
-    public void tearDown() {
-        jamesServer.shutdown();
-    }
 
-    @Test
-    public void simpleMailShouldBeSent() throws Exception {
-        String from = "user@" + DEFAULT_DOMAIN;
-        String recipient = "user2@" + DEFAULT_DOMAIN;
-        String targetedMailbox = "INBOX.any";
+        from = "user@" + DEFAULT_DOMAIN;
+        recipient = "user2@" + DEFAULT_DOMAIN;
+        targetedMailbox = "INBOX.any";
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
         dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(from, PASSWORD);
         dataProbe.addUser(recipient, PASSWORD);
+
         MailboxProbe mailboxProbe = jamesServer.getProbe(MailboxProbeImpl.class);
         mailboxProbe.createMailbox(MailboxConstants.USER_NAMESPACE, recipient, "INBOX");
         mailboxProbe.createMailbox(MailboxConstants.USER_NAMESPACE, recipient, targetedMailbox);
+    }
+
+    @After
+    public void tearDown() {
+        jamesServer.shutdown();
+    }
+
+    @Test
+    public void simpleMailShouldBeSent() throws Exception {
         jamesServer.getProbe(SieveProbeImpl.class).addActiveSieveScript(recipient, "myscript.sieve", "require \"fileinto\";\n" +
             "\n" +
             "fileinto \"" + targetedMailbox + "\";");

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
----------------------------------------------------------------------
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 53e96e5..68385ae 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
@@ -20,7 +20,12 @@
 package org.apache.james.mailets;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.james.MemoryJamesServerMain;
@@ -45,13 +50,7 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class SmtpAuthIntegrationTest {
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int SMTP_PORT = 1025;
-    private static final int IMAP_PORT = 1143;
-    private static final String PASSWORD = "secret";
-
-    private static final String JAMES_APACHE_ORG = "james.org";
-    private static final String FROM = "fromuser@" + JAMES_APACHE_ORG;
+    private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final String DROPPED_MAILS = "file://var/mail/dropped-mails/";
 
     @Rule
@@ -87,7 +86,7 @@ public class SmtpAuthIntegrationTest {
             .withMailetContainer(mailetContainer)
             .build(temporaryFolder);
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
     }
 
@@ -119,7 +118,7 @@ public class SmtpAuthIntegrationTest {
     @Test
     public void authenticatedSmtpSessionsShouldBeDelivered() throws Exception {
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, FROM, PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, FROM, PASSWORD)) {
 
             messageSender.sendMessage(FROM, FROM)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
@@ -134,7 +133,7 @@ public class SmtpAuthIntegrationTest {
     @Test
     public void nonAuthenticatedSmtpSessionsShouldNotBeDelivered() throws Exception {
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+                 SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
 
             messageSender.sendMessage(FROM, FROM)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/AwaitUtils.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/AwaitUtils.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/AwaitUtils.java
deleted file mode 100644
index 6ecbaa8..0000000
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/AwaitUtils.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mailets.configuration;
-
-import com.jayway.awaitility.Awaitility;
-import com.jayway.awaitility.Duration;
-import com.jayway.awaitility.core.ConditionFactory;
-
-public class AwaitUtils {
-    public static Duration slowPacedPollInterval = Duration.FIVE_HUNDRED_MILLISECONDS;
-    public static ConditionFactory calmlyAwait = Awaitility.with()
-        .pollInterval(slowPacedPollInterval)
-        .and()
-        .with()
-        .pollDelay(slowPacedPollInterval)
-        .await();
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/Constants.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/Constants.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/Constants.java
new file mode 100644
index 0000000..0d2bd72
--- /dev/null
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/Constants.java
@@ -0,0 +1,40 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mailets.configuration;
+
+import com.jayway.awaitility.Awaitility;
+import com.jayway.awaitility.Duration;
+import com.jayway.awaitility.core.ConditionFactory;
+
+public class Constants {
+    public static Duration slowPacedPollInterval = Duration.FIVE_HUNDRED_MILLISECONDS;
+    public static ConditionFactory calmlyAwait = Awaitility.with()
+        .pollInterval(slowPacedPollInterval)
+        .and()
+        .with()
+        .pollDelay(slowPacedPollInterval)
+        .await();
+
+    public static final String DEFAULT_DOMAIN = "james.org";
+    public static final String LOCALHOST_IP = "127.0.0.1";
+    public static final int IMAP_PORT = 1143;
+    public static final int SMTP_PORT = 1025;
+    public static final String PASSWORD = "secret";
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
----------------------------------------------------------------------
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 c95a095..16e9ccc 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
@@ -20,7 +20,10 @@
 package org.apache.james.mailets.crypto;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+import static org.apache.james.mailets.configuration.Constants.LOCALHOST_IP;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import java.nio.charset.StandardCharsets;
@@ -51,11 +54,7 @@ import org.junit.rules.TemporaryFolder;
 
 public class SMIMEDecryptIntegrationTest {
     private static final ZonedDateTime DATE_2015 = ZonedDateTime.parse("2015-10-15T14:10:00Z");
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int IMAP_PORT = 1143;
     private static final int SMTP_SECURE_PORT = 10465;
-
-    private static final String DEFAULT_DOMAIN = "localdomain";
     private static final String FROM = "sender@" + DEFAULT_DOMAIN;
     private static final String PASSWORD = "secret";
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
----------------------------------------------------------------------
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 366513d..d13c5ac 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
@@ -20,7 +20,11 @@
 package org.apache.james.mailets.crypto;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.calmlyAwait;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import java.time.ZonedDateTime;
@@ -53,17 +57,14 @@ import org.junit.rules.TemporaryFolder;
 public class SMIMESignIntegrationTest {
 
     private static final ZonedDateTime DATE_2015 = ZonedDateTime.parse("2015-10-15T14:10:00Z");
-    private static final String DEFAULT_DOMAIN = "domain";
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int IMAP_PORT = 1143;
-    private static final int SMTP_PORT = 1025;
     private static final int SMTP_SECURE_PORT = 10465;
-    private static final String PASSWORD = "secret";
 
     @Rule
     public TemporaryFolder temporaryFolder = new TemporaryFolder();
     @Rule
     public IMAPMessageReader imapMessageReader = new IMAPMessageReader();
+    @Rule
+    public SMTPMessageSender messageSender = new SMTPMessageSender(DEFAULT_DOMAIN);
 
     private TemporaryJamesServer jamesServer;
     public static final String FROM = "user@" + DEFAULT_DOMAIN;
@@ -120,33 +121,31 @@ public class SMIMESignIntegrationTest {
 
     @Test
     public void authenticatedMessagesShouldBeSigned() throws Exception {
-
-        try (SMTPMessageSender messageSender = SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_SECURE_PORT, DEFAULT_DOMAIN, FROM, PASSWORD);) {
-            messageSender.sendMessage(FROM, RECIPIENT)
-                .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
-
-            imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
-                .login(RECIPIENT, PASSWORD)
-                .select(IMAPMessageReader.INBOX);
-            calmlyAwait.atMost(ONE_MINUTE).until(imapMessageReader::hasAMessage);
-            assertThat(imapMessageReader.readFirstMessage())
-                .containsSequence("Content-Description: S/MIME Cryptographic Signature");
-        }
+        messageSender.connect(LOCALHOST_IP, SMTP_SECURE_PORT)
+            .authenticate(FROM, PASSWORD)
+            .sendMessage(FROM, RECIPIENT)
+            .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
+
+        imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
+            .login(RECIPIENT, PASSWORD)
+            .select(IMAPMessageReader.INBOX);
+        calmlyAwait.atMost(ONE_MINUTE).until(imapMessageReader::hasAMessage);
+        assertThat(imapMessageReader.readFirstMessage())
+            .containsSequence("Content-Description: S/MIME Cryptographic Signature");
     }
 
     @Test
     public void NonAuthenticatedMessagesShouldNotBeSigned() throws Exception {
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
-            messageSender.sendMessage(FROM, RECIPIENT)
-                .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
-
-            imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
-                .login(RECIPIENT, PASSWORD)
-                .select(IMAPMessageReader.INBOX);
-            calmlyAwait.atMost(ONE_MINUTE).until(imapMessageReader::hasAMessage);
-            assertThat(imapMessageReader.readFirstMessage())
-                .doesNotContain("Content-Description: S/MIME Cryptographic Signature");
-        }
+        messageSender.connect(LOCALHOST_IP, SMTP_SECURE_PORT)
+            .sendMessage(FROM, RECIPIENT)
+            .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
+
+        imapMessageReader.connect(LOCALHOST_IP, IMAP_PORT)
+            .login(RECIPIENT, PASSWORD)
+            .select(IMAPMessageReader.INBOX);
+        calmlyAwait.atMost(ONE_MINUTE).until(imapMessageReader::hasAMessage);
+        assertThat(imapMessageReader.readFirstMessage())
+            .doesNotContain("Content-Description: S/MIME Cryptographic Signature");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
----------------------------------------------------------------------
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 f09218a..489ee06 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
@@ -23,7 +23,12 @@ import static com.jayway.awaitility.Duration.ONE_MINUTE;
 import static com.jayway.restassured.RestAssured.when;
 import static com.jayway.restassured.config.EncoderConfig.encoderConfig;
 import static com.jayway.restassured.config.RestAssuredConfig.newConfig;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasSize;
 
@@ -60,13 +65,7 @@ import com.jayway.restassured.builder.RequestSpecBuilder;
 import com.jayway.restassured.http.ContentType;
 
 public class SmtpAuthorizedAddressesTest {
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int SMTP_PORT = 1025;
-    public static final int IMAP_PORT = 1143;
-    private static final String PASSWORD = "secret";
-
-    private static final String JAMES_APACHE_ORG = "james.org";
-    private static final String FROM = "fromuser@" + JAMES_APACHE_ORG;
+    private static final String FROM = "fromuser@" + DEFAULT_DOMAIN;
     private static final String TO = "to@any.com";
 
     private final TemporaryFolder smtpFolder = new TemporaryFolder();
@@ -137,7 +136,7 @@ public class SmtpAuthorizedAddressesTest {
             .build(temporaryFolder);
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
     }
 
@@ -155,7 +154,7 @@ public class SmtpAuthorizedAddressesTest {
             .withAutorizedAddresses("127.0.0.0/8"));
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+                 SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
 
             messageSender.sendMessage(FROM, TO)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
@@ -172,7 +171,7 @@ public class SmtpAuthorizedAddressesTest {
             .withAutorizedAddresses("172.0.0.0/8"));
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+                 SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
 
             messageSender.sendMessage(FROM, TO);
             calmlyAwait.atMost(ONE_MINUTE).until(messageSender::messageSendingFailed);
@@ -186,7 +185,7 @@ public class SmtpAuthorizedAddressesTest {
             .withAutorizedAddresses("172.0.0.0/8"));
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, FROM, PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, FROM, PASSWORD)) {
 
             messageSender.sendMessage(FROM, TO)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
@@ -203,7 +202,7 @@ public class SmtpAuthorizedAddressesTest {
             .withAutorizedAddresses("172.0.0.0/8"));
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+                 SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
 
             messageSender.sendMessage(TO, FROM)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
----------------------------------------------------------------------
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 6c9726b..0dc6295 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
@@ -20,7 +20,11 @@
 package org.apache.james.smtp;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.TemporaryJamesServer;
@@ -42,12 +46,7 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class SmtpBracketEnforcementTest {
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int SMTP_PORT = 1025;
-    private static final String PASSWORD = "secret";
-
-    private static final String JAMES_APACHE_ORG = "james.org";
-    private static final String USER = "user@" + JAMES_APACHE_ORG;
+    private static final String USER = "user@" + DEFAULT_DOMAIN;
 
     @Rule
     public TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -82,7 +81,7 @@ public class SmtpBracketEnforcementTest {
             .build(temporaryFolder);
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(USER, PASSWORD);
     }
 
@@ -99,7 +98,7 @@ public class SmtpBracketEnforcementTest {
             .doNotRequireBracketEnforcement());
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, USER, PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, USER, PASSWORD)) {
 
             messageSender.sendMessage(USER, USER)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
@@ -112,7 +111,7 @@ public class SmtpBracketEnforcementTest {
             .doNotRequireBracketEnforcement());
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, USER, PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, USER, PASSWORD)) {
 
             messageSender.sendMessageNoBracket(USER, USER)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
@@ -125,7 +124,7 @@ public class SmtpBracketEnforcementTest {
             .requireBracketEnforcement());
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, USER, PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, USER, PASSWORD)) {
 
             messageSender.sendMessage(USER, USER)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
@@ -138,7 +137,7 @@ public class SmtpBracketEnforcementTest {
             .requireBracketEnforcement());
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, USER, PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, USER, PASSWORD)) {
 
             messageSender.sendMessageNoBracket(USER, USER);
             calmlyAwait.atMost(ONE_MINUTE).until(messageSender::messageSendingFailed);

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
----------------------------------------------------------------------
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 58a7c05..f56a476 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
@@ -20,7 +20,11 @@
 package org.apache.james.smtp;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.TemporaryJamesServer;
@@ -42,14 +46,10 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class SmtpIdentityVerificationTest {
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int SMTP_PORT = 1025;
-    private static final String PASSWORD = "secret";
     private static final String ATTACKER_PASSWORD = "secret";
 
-    private static final String JAMES_APACHE_ORG = "james.org";
-    private static final String ATTACKER = "attacker@" + JAMES_APACHE_ORG;
-    private static final String USER = "user@" + JAMES_APACHE_ORG;
+    private static final String ATTACKER = "attacker@" + DEFAULT_DOMAIN;
+    private static final String USER = "user@" + DEFAULT_DOMAIN;
 
     @Rule
     public TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -80,7 +80,7 @@ public class SmtpIdentityVerificationTest {
             .build(temporaryFolder);
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(USER, PASSWORD);
         dataProbe.addUser(ATTACKER, ATTACKER_PASSWORD);
     }
@@ -99,7 +99,7 @@ public class SmtpIdentityVerificationTest {
             .verifyIdentity());
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, USER, PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, USER, PASSWORD)) {
 
             messageSender.sendMessage(USER, USER)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
@@ -113,7 +113,7 @@ public class SmtpIdentityVerificationTest {
             .doNotVerifyIdentity());
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, ATTACKER, ATTACKER_PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, ATTACKER, ATTACKER_PASSWORD)) {
 
             messageSender.sendMessage(USER, USER)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
@@ -127,7 +127,7 @@ public class SmtpIdentityVerificationTest {
             .verifyIdentity());
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, ATTACKER, ATTACKER_PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, ATTACKER, ATTACKER_PASSWORD)) {
 
             messageSender.sendMessage(USER, USER);
             calmlyAwait.atMost(ONE_MINUTE).until(messageSender::messageSendingFailed);

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
----------------------------------------------------------------------
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 4bedf38..0716d4e 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
@@ -20,7 +20,11 @@
 package org.apache.james.smtp;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.TemporaryJamesServer;
@@ -44,12 +48,7 @@ import org.junit.rules.TemporaryFolder;
 import com.google.common.base.Strings;
 
 public class SmtpSizeLimitationTest {
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int SMTP_PORT = 1025;
-    private static final String PASSWORD = "secret";
-
-    private static final String JAMES_APACHE_ORG = "james.org";
-    private static final String USER = "user@" + JAMES_APACHE_ORG;
+    private static final String USER = "user@" + DEFAULT_DOMAIN;
 
     @Rule
     public TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -84,7 +83,7 @@ public class SmtpSizeLimitationTest {
             .build(temporaryFolder);
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
-        dataProbe.addDomain(JAMES_APACHE_ORG);
+        dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(USER, PASSWORD);
     }
 
@@ -102,7 +101,7 @@ public class SmtpSizeLimitationTest {
             .withMaxMessageSizeInKb(10));
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, USER, PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, USER, PASSWORD)) {
 
             messageSender.sendMessageWithHeaders(USER, USER, Strings.repeat("Long message", 1024));
             calmlyAwait.atMost(ONE_MINUTE).until(messageSender::messageSendingFailed);
@@ -116,7 +115,7 @@ public class SmtpSizeLimitationTest {
             .withMaxMessageSizeInKb(10));
 
         try (SMTPMessageSender messageSender =
-                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG, USER, PASSWORD)) {
+                 SMTPMessageSender.authentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN, USER, PASSWORD)) {
 
             messageSender.sendMessageWithHeaders(USER, USER,"Short message")
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
----------------------------------------------------------------------
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 6218137..34ff43d 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
@@ -20,7 +20,12 @@
 package org.apache.james.transport.mailets;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import java.nio.charset.StandardCharsets;
@@ -54,16 +59,8 @@ import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
 public class AmqpForwardAttachmentTest {
-
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int IMAP_PORT = 1143;
-    private static final int SMTP_PORT = 1025;
-    private static final String PASSWORD = "secret";
-
-    private static final String JAMES_APACHE_ORG = "james.org";
-
-    private static final String FROM = "fromUser@" + JAMES_APACHE_ORG;
-    private static final String RECIPIENT = "touser@" + JAMES_APACHE_ORG;
+    private static final String FROM = "fromUser@" + DEFAULT_DOMAIN;
+    private static final String RECIPIENT = "touser@" + DEFAULT_DOMAIN;
     
     private static final String MAIL_ATTRIBUTE = "my.attribute";
     private static final String EXCHANGE_NAME = "myExchange";
@@ -118,7 +115,7 @@ public class AmqpForwardAttachmentTest {
             .build(temporaryFolder);
 
         DataProbe dataprobe = jamesServer.getProbe(DataProbeImpl.class);
-        dataprobe.addDomain(JAMES_APACHE_ORG);
+        dataprobe.addDomain(DEFAULT_DOMAIN);
         dataprobe.addUser(FROM, PASSWORD);
         dataprobe.addUser(RECIPIENT, PASSWORD);
         jamesServer.getProbe(MailboxProbeImpl.class).createMailbox(MailboxConstants.USER_NAMESPACE, RECIPIENT, "INBOX");
@@ -147,7 +144,7 @@ public class AmqpForwardAttachmentTest {
               .recipient(new MailAddress(RECIPIENT))
               .build();
 
-        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, JAMES_APACHE_ORG)) {
+        try (SMTPMessageSender messageSender = SMTPMessageSender.noAuthentication(LOCALHOST_IP, SMTP_PORT, DEFAULT_DOMAIN)) {
             messageSender.sendMessage(mail)
                 .awaitSent(calmlyAwait.atMost(ONE_MINUTE));
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/9e639adb/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
----------------------------------------------------------------------
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 164fae9..52379cd 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
@@ -20,7 +20,13 @@ package org.apache.james.transport.mailets;
 
 import static com.jayway.awaitility.Duration.ONE_MINUTE;
 import static net.javacrumbs.jsonunit.fluent.JsonFluentAssert.assertThatJson;
-import static org.apache.james.mailets.configuration.AwaitUtils.calmlyAwait;
+import static org.apache.james.mailets.configuration.Constants.DEFAULT_DOMAIN;
+import static org.apache.james.mailets.configuration.Constants.IMAP_PORT;
+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.SMTP_PORT;
+import static org.apache.james.mailets.configuration.Constants.calmlyAwait;
+import static org.apache.mailet.base.MailAddressFixture.JAMES_APACHE_ORG;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import java.util.Optional;
@@ -51,20 +57,13 @@ import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
 public class ContactExtractorTest {
-    private static final String LOCALHOST_IP = "127.0.0.1";
-    private static final int IMAP_PORT = 1143;
-    private static final int SMTP_PORT = 1025;
-    private static final String JAMES_APACHE_ORG = "james.org";
-
-    public static final String JAMES_ORG = "james.org";
-    public static final String SENDER = "sender@" + JAMES_ORG;
-    public static final String TO = "to@" + JAMES_ORG;
-    public static final String TO2 = "to2@" + JAMES_ORG;
-    public static final String CC = "cc@" + JAMES_ORG;
-    public static final String CC2 = "cc2@" + JAMES_ORG;
-    public static final String BCC = "bcc@" + JAMES_ORG;
-    public static final String BCC2 = "bcc2@" + JAMES_ORG;
-    public static final String PASSWORD = "secret";
+    public static final String SENDER = "sender@" + DEFAULT_DOMAIN;
+    public static final String TO = "to@" + DEFAULT_DOMAIN;
+    public static final String TO2 = "to2@" + DEFAULT_DOMAIN;
+    public static final String CC = "cc@" + DEFAULT_DOMAIN;
+    public static final String CC2 = "cc2@" + DEFAULT_DOMAIN;
+    public static final String BCC = "bcc@" + DEFAULT_DOMAIN;
+    public static final String BCC2 = "bcc2@" + DEFAULT_DOMAIN;
     public static final String EXCHANGE = "collector:email";
     public static final String ROUTING_KEY = "";
 
@@ -108,7 +107,7 @@ public class ContactExtractorTest {
             .withMailetContainer(mailets)
             .build(folder);
         DataProbeImpl probe = jamesServer.getProbe(DataProbeImpl.class);
-        probe.addDomain(JAMES_ORG);
+        probe.addDomain(DEFAULT_DOMAIN);
         probe.addUser(SENDER, PASSWORD);
         probe.addUser(TO, PASSWORD);
         probe.addUser(TO2, PASSWORD);


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


Mime
View raw message