james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [03/44] james-project git commit: JAMES-2267 Mailet integration testing: implicit build calling for Mailet configuration
Date Fri, 05 Jan 2018 03:00:47 GMT
JAMES-2267 Mailet integration testing: implicit build calling for Mailet configuration


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

Branch: refs/heads/master
Commit: 3e6b0574cf6726207e82466e3e7666fa94dac3f7
Parents: c53a7b9
Author: benwa <btellier@linagora.com>
Authored: Tue Dec 19 10:52:39 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Fri Jan 5 09:13:50 2018 +0700

----------------------------------------------------------------------
 .../james/smtp/SmtpAuthorizedAddressesTest.java | 17 ++++-------
 .../james/smtp/SmtpBracketEnforcementTest.java  | 14 +++------
 .../smtp/SmtpIdentityVerificationTest.java      | 11 ++-----
 .../james/smtp/SmtpSizeLimitationTest.java      | 14 +++------
 .../mailets/AmqpForwardAttachmentTest.java      | 19 ++++--------
 .../transport/mailets/ContactExtractorTest.java | 16 ++++------
 .../transport/mailets/GroupMappingTest.java     | 29 ++++++------------
 .../mailets/ICSAttachmentWorkflowTest.java      | 31 +++++++-------------
 .../transport/mailets/StripAttachmentTest.java  | 19 ++++--------
 9 files changed, 52 insertions(+), 118 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/3e6b0574/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 3222dac..052df4d 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
@@ -116,9 +116,7 @@ public class SmtpAuthorizedAddressesTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")
-                    .build())
-                .build())
+                    .addProperty("processor", "transport")))
             .addProcessor(CommonProcessors.error())
             .addProcessor(ProcessorConfiguration.builder()
                 .state("transport")
@@ -126,12 +124,10 @@ public class SmtpAuthorizedAddressesTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc")
-                    .build())
+                    .addProperty("name", "bcc"))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
-                    .mailet(LocalDelivery.class)
-                    .build())
+                    .mailet(LocalDelivery.class))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(SMTPIsAuthNetwork.class)
                     .mailet(RemoteDelivery.class)
@@ -142,14 +138,11 @@ public class SmtpAuthorizedAddressesTest {
                     .addProperty("deliveryThreads", "10")
                     .addProperty("sendpartial", "true")
                     .addProperty("bounceProcessor", "bounces")
-                    .addProperty("gateway", fakeSmtp.getContainerIp())
-                    .build())
+                    .addProperty("gateway", fakeSmtp.getContainerIp()))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "bounces")
-                    .build())
-                .build())
+                    .addProperty("processor", "bounces")))
             .addProcessor(CommonProcessors.localAddressError())
             .addProcessor(CommonProcessors.relayDenied())
             .addProcessor(CommonProcessors.bounces())

http://git-wip-us.apache.org/repos/asf/james-project/blob/3e6b0574/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 3480a8e..4507903 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
@@ -79,9 +79,7 @@ public class SmtpBracketEnforcementTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")
-                    .build())
-                .build())
+                    .addProperty("processor", "transport")))
             .addProcessor(CommonProcessors.error())
             .addProcessor(ProcessorConfiguration.builder()
                 .state("transport")
@@ -89,18 +87,14 @@ public class SmtpBracketEnforcementTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc")
-                    .build())
+                    .addProperty("name", "bcc"))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
-                    .mailet(LocalDelivery.class)
-                    .build())
+                    .mailet(LocalDelivery.class))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "bounces")
-                    .build())
-                .build())
+                    .addProperty("processor", "bounces")))
             .addProcessor(CommonProcessors.localAddressError())
             .addProcessor(CommonProcessors.relayDenied())
             .addProcessor(CommonProcessors.bounces())

http://git-wip-us.apache.org/repos/asf/james-project/blob/3e6b0574/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 114d902..61ebd81 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
@@ -81,9 +81,7 @@ public class SmtpIdentityVerificationTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")
-                    .build())
-                .build())
+                    .addProperty("processor", "transport")))
             .addProcessor(CommonProcessors.error())
             .addProcessor(ProcessorConfiguration.builder()
                 .state("transport")
@@ -91,13 +89,10 @@ public class SmtpIdentityVerificationTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc")
-                    .build())
+                    .addProperty("name", "bcc"))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
-                    .mailet(LocalDelivery.class)
-                    .build())
-                .build())
+                    .mailet(LocalDelivery.class)))
             .addProcessor(CommonProcessors.localAddressError())
             .addProcessor(CommonProcessors.relayDenied())
             .addProcessor(CommonProcessors.bounces())

http://git-wip-us.apache.org/repos/asf/james-project/blob/3e6b0574/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 5da56b6..c477575 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
@@ -80,9 +80,7 @@ public class SmtpSizeLimitationTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")
-                    .build())
-                .build())
+                    .addProperty("processor", "transport")))
             .addProcessor(CommonProcessors.error())
             .addProcessor(ProcessorConfiguration.builder()
                 .state("transport")
@@ -90,18 +88,14 @@ public class SmtpSizeLimitationTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc")
-                    .build())
+                    .addProperty("name", "bcc"))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
-                    .mailet(LocalDelivery.class)
-                    .build())
+                    .mailet(LocalDelivery.class))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "bounces")
-                    .build())
-                .build())
+                    .addProperty("processor", "bounces")))
             .addProcessor(CommonProcessors.localAddressError())
             .addProcessor(CommonProcessors.relayDenied())
             .addProcessor(CommonProcessors.bounces())

http://git-wip-us.apache.org/repos/asf/james-project/blob/3e6b0574/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 a91ee69..15d5daf 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
@@ -98,36 +98,29 @@ public class AmqpForwardAttachmentTest {
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(RemoveMimeHeader.class)
-                            .addProperty("name", "bcc")
-                            .build())
+                            .addProperty("name", "bcc"))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(StripAttachment.class)
                             .addProperty(StripAttachment.ATTRIBUTE_PARAMETER_NAME, MAIL_ATTRIBUTE)
-                            .addProperty(StripAttachment.PATTERN_PARAMETER_NAME, ".*\\.txt")
-                            .build())
+                            .addProperty(StripAttachment.PATTERN_PARAMETER_NAME, ".*\\.txt"))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(MimeDecodingMailet.class)
-                            .addProperty(MimeDecodingMailet.ATTRIBUTE_PARAMETER_NAME, MAIL_ATTRIBUTE)
-                            .build())
+                            .addProperty(MimeDecodingMailet.ATTRIBUTE_PARAMETER_NAME, MAIL_ATTRIBUTE))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(AmqpForwardAttribute.class)
                             .addProperty(AmqpForwardAttribute.URI_PARAMETER_NAME, amqpRule.getAmqpUri())
                             .addProperty(AmqpForwardAttribute.EXCHANGE_PARAMETER_NAME, EXCHANGE_NAME)
                             .addProperty(AmqpForwardAttribute.ATTRIBUTE_PARAMETER_NAME, MAIL_ATTRIBUTE)
-                            .addProperty(AmqpForwardAttribute.ROUTING_KEY_PARAMETER_NAME,
ROUTING_KEY)
-                            .build())
+                            .addProperty(AmqpForwardAttribute.ROUTING_KEY_PARAMETER_NAME,
ROUTING_KEY))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(RecipientIsLocal.class)
-                            .mailet(VacationMailet.class)
-                            .build())
+                            .mailet(VacationMailet.class))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(RecipientIsLocal.class)
-                            .mailet(LocalDelivery.class)
-                            .build())
-                    .build())
+                            .mailet(LocalDelivery.class)))
             .build();
 
         jamesServer = TemporaryJamesServer.builder().build(temporaryFolder, mailetContainer);

http://git-wip-us.apache.org/repos/asf/james-project/blob/3e6b0574/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 d258675..c348e06 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
@@ -89,29 +89,23 @@ public class ContactExtractorTest {
                     .addMailet(MailetConfiguration.builder()
                         .matcher(SMTPAuthSuccessful.class)
                         .mailet(ContactExtractor.class)
-                        .addProperty(ContactExtractor.Configuration.ATTRIBUTE, attribute)
-                        .build())
+                        .addProperty(ContactExtractor.Configuration.ATTRIBUTE, attribute))
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(AmqpForwardAttribute.class)
                         .addProperty(AmqpForwardAttribute.URI_PARAMETER_NAME, amqpRule.getAmqpUri())
                         .addProperty(AmqpForwardAttribute.EXCHANGE_PARAMETER_NAME, EXCHANGE)
-                        .addProperty(AmqpForwardAttribute.ATTRIBUTE_PARAMETER_NAME, attribute)
-                        .build())
+                        .addProperty(AmqpForwardAttribute.ATTRIBUTE_PARAMETER_NAME, attribute))
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(RemoveMimeHeader.class)
-                        .addProperty("name", "bcc")
-                        .build())
+                        .addProperty("name", "bcc"))
                     .addMailet(MailetConfiguration.builder()
                         .matcher(RecipientIsLocal.class)
-                        .mailet(VacationMailet.class)
-                        .build())
+                        .mailet(VacationMailet.class))
                     .addMailet(MailetConfiguration.builder()
                         .matcher(RecipientIsLocal.class)
-                        .mailet(LocalDelivery.class)
-                        .build())
-                    .build())
+                        .mailet(LocalDelivery.class)))
             .build();
         jamesServer = TemporaryJamesServer.builder().build(folder, mailets);
         DataProbeImpl probe = jamesServer.getProbe(DataProbeImpl.class);

http://git-wip-us.apache.org/repos/asf/james-project/blob/3e6b0574/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
----------------------------------------------------------------------
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 db5fe68..8f78d83 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
@@ -115,44 +115,35 @@ public class GroupMappingTest {
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
-                    .mailet(PostmasterAlias.class)
-                    .build())
+                    .mailet(PostmasterAlias.class))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RelayLimit.class)
                     .matcherCondition("30")
-                    .mailet(Null.class)
-                    .build())
+                    .mailet(Null.class))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(SMTPAuthSuccessful.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")
-                    .build())
+                    .addProperty("processor", "transport"))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")
-                    .build())
-                .build())
+                    .addProperty("processor", "transport")))
             .addProcessor(CommonProcessors.error())
             .addProcessor(ProcessorConfiguration.transport()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc")
-                    .build())
+                    .addProperty("name", "bcc"))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
-                    .mailet(RecipientRewriteTable.class)
-                    .build())
+                    .mailet(RecipientRewriteTable.class))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
-                    .mailet(VacationMailet.class)
-                    .build())
+                    .mailet(VacationMailet.class))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
-                    .mailet(LocalDelivery.class)
-                    .build())
+                    .mailet(LocalDelivery.class))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(RemoteDelivery.class)
@@ -162,9 +153,7 @@ public class GroupMappingTest {
                     .addProperty("maxDnsProblemRetries", "0")
                     .addProperty("deliveryThreads", "10")
                     .addProperty("sendpartial", "true")
-                    .addProperty("bounceProcessor", "bounces")
-                    .build())
-                .build())
+                    .addProperty("bounceProcessor", "bounces")))
             .build();
 
         jamesServer = TemporaryJamesServer.builder()

http://git-wip-us.apache.org/repos/asf/james-project/blob/3e6b0574/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
----------------------------------------------------------------------
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 217a721..00d7051 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
@@ -464,58 +464,47 @@ public class ICSAttachmentWorkflowTest {
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(RemoveMimeHeader.class)
-                            .addProperty("name", "bcc")
-                            .build())
+                            .addProperty("name", "bcc"))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(StripAttachment.class)
                             .addProperty("attribute", MAIL_ATTRIBUTE)
-                            .addProperty("pattern", ".*")
-                            .build())
+                            .addProperty("pattern", ".*"))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(MimeDecodingMailet.class)
-                            .addProperty("attribute", MAIL_ATTRIBUTE)
-                            .build())
+                            .addProperty("attribute", MAIL_ATTRIBUTE))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(ICalendarParser.class)
                             .addProperty("sourceAttribute", MAIL_ATTRIBUTE)
-                            .addProperty("destinationAttribute", PARSED_ICAL_MAIL_ATTRIBUTE)
-                            .build())
+                            .addProperty("destinationAttribute", PARSED_ICAL_MAIL_ATTRIBUTE))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(ICALToHeader.class)
-                            .addProperty("attribute", PARSED_ICAL_MAIL_ATTRIBUTE)
-                            .build())
+                            .addProperty("attribute", PARSED_ICAL_MAIL_ATTRIBUTE))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(ICALToJsonAttribute.class)
                             .addProperty("source", PARSED_ICAL_MAIL_ATTRIBUTE)
                             .addProperty("rawSource", MAIL_ATTRIBUTE)
-                            .addProperty("destination", JSON_MAIL_ATTRIBUTE)
-                            .build())
+                            .addProperty("destination", JSON_MAIL_ATTRIBUTE))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
-                            .mailet(TextCalendarBodyToAttachment.class)
-                            .build())
+                            .mailet(TextCalendarBodyToAttachment.class))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(AmqpForwardAttribute.class)
                             .addProperty("uri", amqpRule.getAmqpUri())
                             .addProperty("exchange", EXCHANGE_NAME)
                             .addProperty("attribute", JSON_MAIL_ATTRIBUTE)
-                            .addProperty("routing_key", ROUTING_KEY)
-                            .build())
+                            .addProperty("routing_key", ROUTING_KEY))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(RecipientIsLocal.class)
-                            .mailet(VacationMailet.class)
-                            .build())
+                            .mailet(VacationMailet.class))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(RecipientIsLocal.class)
-                            .mailet(LocalDelivery.class)
-                            .build())
-                    .build())
+                            .mailet(LocalDelivery.class)))
             .build();
 
         jamesServer = TemporaryJamesServer.builder().build(temporaryFolder, mailetContainer);

http://git-wip-us.apache.org/repos/asf/james-project/blob/3e6b0574/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
----------------------------------------------------------------------
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 8ad3299..76f2a0a 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
@@ -82,33 +82,26 @@ public class StripAttachmentTest {
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(RemoveMimeHeader.class)
-                            .addProperty("name", "bcc")
-                            .build())
+                            .addProperty("name", "bcc"))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(StripAttachment.class)
                             .addProperty("attribute", "my.attribute")
                             .addProperty("remove", "all")
-                            .addProperty("notpattern", ".*.tmp.*")
-                            .build())
+                            .addProperty("notpattern", ".*.tmp.*"))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
-                            .mailet(OnlyText.class)
-                            .build())
+                            .mailet(OnlyText.class))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(RecoverAttachment.class)
-                            .addProperty("attribute", "my.attribute")
-                            .build())
+                            .addProperty("attribute", "my.attribute"))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(RecipientIsLocal.class)
-                            .mailet(VacationMailet.class)
-                            .build())
+                            .mailet(VacationMailet.class))
                     .addMailet(MailetConfiguration.builder()
                             .matcher(RecipientIsLocal.class)
-                            .mailet(LocalDelivery.class)
-                            .build())
-                    .build())
+                            .mailet(LocalDelivery.class)))
             .build();
 
         jamesServer = TemporaryJamesServer.builder().build(temporaryFolder, mailetContainer);


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