james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [09/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami
Date Fri, 07 Jul 2017 08:24:23 GMT
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java
deleted file mode 100644
index 96b65e6..0000000
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java
+++ /dev/null
@@ -1,76 +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.mpt.imapmailbox;
-
-import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
-import org.apache.james.mpt.imapmailbox.suite.Copy;
-import org.apache.james.mpt.imapmailbox.suite.Events;
-import org.apache.james.mpt.imapmailbox.suite.Expunge;
-import org.apache.james.mpt.imapmailbox.suite.Fetch;
-import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
-import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
-import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
-import org.apache.james.mpt.imapmailbox.suite.Listing;
-import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
-import org.apache.james.mpt.imapmailbox.suite.Move;
-import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
-import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
-import org.apache.james.mpt.imapmailbox.suite.Rename;
-import org.apache.james.mpt.imapmailbox.suite.Search;
-import org.apache.james.mpt.imapmailbox.suite.Security;
-import org.apache.james.mpt.imapmailbox.suite.Select;
-import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
-import org.apache.james.mpt.imapmailbox.suite.SelectedState;
-import org.apache.james.mpt.imapmailbox.suite.UidSearch;
-import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(OnamiSuite.class)
-@SuiteClasses({ 
-    AuthenticatedState.class,
-    ConcurrentSessions.class,
-    Copy.class,
-    Events.class,
-    Expunge.class,
-    Fetch.class,
-    FetchBodySection.class,
-    FetchBodyStructure.class,
-    FetchHeaders.class,
-    Listing.class,
-    NonAuthenticatedState.class,
-    PartialFetch.class,
-    Rename.class,
-    Search.class,
-    Security.class,
-    Select.class,
-    QuotaTest.class,
-    UserFlagsSupport.class,
-    Move.class,
-    SelectedInbox.class,
-    SelectedState.class,
-    UidSearch.class,
-    MailboxAnnotation.class
-})
-public abstract class AbstractMailboxTest {
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
index 2fd93d2..5768825 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
@@ -21,83 +21,85 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
 import org.apache.james.mailbox.model.MailboxACL;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.SimpleMailboxACL;
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.apache.james.mpt.imapmailbox.MailboxMessageAppender;
 import org.junit.Before;
 import org.junit.Test;
 
-public class ACLCommands implements ImapTestConstants {
+public abstract class ACLCommands implements ImapTestConstants {
+    
     public static final String OTHER_USER_NAME = "Boby";
     public static final String OTHER_USER_PASSWORD = "password";
     public static final MailboxPath OTHER_USER_MAILBOX = new MailboxPath("#private", OTHER_USER_NAME, "") ;
 
-    @Inject
-    private static HostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
+    protected abstract GrantRightsOnHost createGrantRightsOnHost();
     
-    @Inject
+    private ImapHostSystem system;
     private GrantRightsOnHost grantRightsOnHost;
 
     private MailboxACL.MailboxACLRights readWriteSeenRight;
-    private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+    private ACLScriptedTestProtocol scriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
-        simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
-                .withUser(TO_ADDRESS, PASSWORD)
+        system = createImapHostSystem();
+        grantRightsOnHost = createGrantRightsOnHost();
+        MailboxMessageAppender appender = null;
+        scriptedTestProtocol = new ACLScriptedTestProtocol(grantRightsOnHost, appender, "/org/apache/james/imap/scripts/", system)
+                .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
         readWriteSeenRight = new SimpleMailboxACL.Rfc4314Rights("rsw");
     }
 
     @Test
     public void testACLCommandsOwnerUS() throws Exception {
-        simpleScriptedTestProtocol.run("ACLCommandsOnOwner");
+        scriptedTestProtocol.run("ACLCommandsOnOwner");
     }
 
     @Test
     public void testACLCommandsOtherUserUS() throws Exception {
-        simpleScriptedTestProtocol
-            .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD);
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight);
-        simpleScriptedTestProtocol.run("ACLCommandsOnOtherUser");
+        scriptedTestProtocol
+            .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
+            .withGrantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight)
+            .run("ACLCommandsOnOtherUser");
     }
 
     @Test
     public void testACLCommandsOwnerKorea() throws Exception {
-        simpleScriptedTestProtocol.withLocale(Locale.KOREA);
-        simpleScriptedTestProtocol.run("ACLCommandsOnOwner");
+        scriptedTestProtocol.withLocale(Locale.KOREA)
+            .run("ACLCommandsOnOwner");
     }
 
     @Test
     public void testACLCommandsOtherUserKorea() throws Exception {
-        simpleScriptedTestProtocol
+        scriptedTestProtocol
             .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
-            .withLocale(Locale.KOREA);
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight);
-        simpleScriptedTestProtocol.run("ACLCommandsOnOtherUser");
+            .withLocale(Locale.KOREA)
+            .withGrantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight)
+            .run("ACLCommandsOnOtherUser");
     }
 
 
     @Test
     public void testACLCommandsOwnerItaly() throws Exception {
-        simpleScriptedTestProtocol
-            .withLocale(Locale.ITALY);
-        simpleScriptedTestProtocol.run("ACLCommandsOnOwner");
+        scriptedTestProtocol
+            .withLocale(Locale.ITALY)
+            .run("ACLCommandsOnOwner");
     }
 
     @Test
     public void testACLCommandsOtherUserItaly() throws Exception {
-        simpleScriptedTestProtocol
+        scriptedTestProtocol
             .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
-            .withLocale(Locale.ITALY);
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight);
-        simpleScriptedTestProtocol.run("ACLCommandsOnOtherUser");
+            .withLocale(Locale.ITALY)
+            .withGrantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight)
+            .run("ACLCommandsOnOtherUser");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
index c31a5fd..9a64f5f 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
@@ -21,246 +21,278 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.SimpleMailboxACL;
 import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.MailboxMessageAppender;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
 import org.junit.Before;
 import org.junit.Test;
 
-public class ACLIntegration implements ImapTestConstants {
+public abstract class ACLIntegration implements ImapTestConstants {
     public static final String OTHER_USER_NAME = "Boby";
     public static final String OTHER_USER_PASSWORD = "password";
     public static final MailboxPath OTHER_USER_MAILBOX = new MailboxPath("#private", OTHER_USER_NAME, "");
     public static final MailboxPath MY_INBOX = new MailboxPath("#private", USER, "");
 
-    @Inject
-    private static ImapHostSystem system;
-    @Inject
+    protected abstract ImapHostSystem createImapHostSystem();
+    protected abstract GrantRightsOnHost createGrantRightsOnHost();
+    protected abstract MailboxMessageAppender createMailboxMessageAppender();
+    
+    private ImapHostSystem system;
     private GrantRightsOnHost grantRightsOnHost;
-    @Inject
     private MailboxMessageAppender mailboxMessageAppender;
 
-    private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+    private ACLScriptedTestProtocol scriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
-        simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
-                .withUser(TO_ADDRESS, PASSWORD)
+        system = createImapHostSystem();
+        grantRightsOnHost = createGrantRightsOnHost();
+        mailboxMessageAppender = createMailboxMessageAppender();
+        scriptedTestProtocol = new ACLScriptedTestProtocol(grantRightsOnHost, mailboxMessageAppender, "/org/apache/james/imap/scripts/", system)
+                .withUser(USER, PASSWORD)
                 .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
                 .withLocale(Locale.US);
     }
     
     @Test
     public void rightRShouldBeSufficientToPerformStatusSelectCloseExamineUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("r"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightR");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("r"))
+            .run("aclIntegration/ACLIntegrationRightR");
     }
 
     @Test
     public void rightRShouldBeNeededToPerformStatusSelectCloseExamineUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("lswipkxtecda"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightR");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("lswipkxtecda"))
+            .run("aclIntegration/ACLIntegrationWithoutRightR");
     }
 
     @Test
     public void rightLShouldBeSufficientToPerformListUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("l"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightL");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("l"))
+            .run("aclIntegration/ACLIntegrationRightL");
     }
 
     @Test
     public void rightLShouldBeNeededToPerformListLsubSubscribeUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipkxtecda"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightL");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipkxtecda"))
+            .run("aclIntegration/ACLIntegrationWithoutRightL");
     }
 
     @Test
     public void rightAShouldBeSufficientToManageACLUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("a"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightA");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("a"))
+            .run("aclIntegration/ACLIntegrationRightA");
     }
 
     @Test
     public void rightAShouldBeNeededToManageACLUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipkxtecdl"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightA");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipkxtecdl"))
+            .run("aclIntegration/ACLIntegrationWithoutRightA");
     }
 
     @Test
     public void rightXOnOriginShouldBeSufficientToRenameAMailboxUS() throws Exception {
-        system.createMailbox(new MailboxPath("#private","Boby","test"));
-        grantRightsOnHost.grantRights(new MailboxPath("#private", OTHER_USER_NAME, "test"), USER, new SimpleMailboxACL.Rfc4314Rights("x"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightX");
+        scriptedTestProtocol
+            .withMailbox(new MailboxPath("#private","Boby","test"))
+            .withGrantRights(new MailboxPath("#private", OTHER_USER_NAME, "test"), USER, new SimpleMailboxACL.Rfc4314Rights("x"))
+            .run("aclIntegration/ACLIntegrationRightX");
     }
 
     @Test
     public void rightXOnOriginShouldBeNeededToRenameAMailboxUS() throws Exception {
-        system.createMailbox(new MailboxPath("#private","Boby","test"));
-        grantRightsOnHost.grantRights(new MailboxPath("#private", OTHER_USER_NAME, "test"), USER, new SimpleMailboxACL.Rfc4314Rights("rswipktela"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightX");
+        scriptedTestProtocol
+            .withMailbox(new MailboxPath("#private","Boby","test"))
+            .withGrantRights(new MailboxPath("#private", OTHER_USER_NAME, "test"), USER, new SimpleMailboxACL.Rfc4314Rights("rswipktela"))
+            .run("aclIntegration/ACLIntegrationWithoutRightX");
     }
 
     @Test
     public void rightKOnDestinationShouldBeSufficientToRenameAMailboxUS() throws Exception {
         MailboxPath newMailbox = new MailboxPath("#private", USER, "test");
-        system.createMailbox(newMailbox);
-        grantRightsOnHost.grantRights(newMailbox, USER, new SimpleMailboxACL.Rfc4314Rights("x"));
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("k"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightK");
+        scriptedTestProtocol
+            .withMailbox(newMailbox)
+            .withGrantRights(newMailbox, USER, new SimpleMailboxACL.Rfc4314Rights("x"))
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("k"))
+            .run("aclIntegration/ACLIntegrationRightK");
     }
 
     @Test
     public void rightKOnDestinationShouldBeNeededToRenameAMailboxUS() throws Exception {
         MailboxPath newMailbox = new MailboxPath("#private", USER, "test");
-        system.createMailbox(newMailbox);
-        grantRightsOnHost.grantRights(newMailbox, USER, new SimpleMailboxACL.Rfc4314Rights("x"));
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipxtela"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightK");
+        scriptedTestProtocol
+            .withMailbox(newMailbox)
+            .withGrantRights(newMailbox, USER, new SimpleMailboxACL.Rfc4314Rights("x"))
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipxtela"))
+            .run("aclIntegration/ACLIntegrationWithoutRightK");
     }
 
     @Test
     public void rightREShouldBeSufficientToPerformExpungeUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("re"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRE");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("re"))
+            .run("aclIntegration/ACLIntegrationRightRE");
     }
 
     @Test
     public void rightEShouldBeNeededToPerformExpungeUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipxtclak"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightE");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipxtclak"))
+            .run("aclIntegration/ACLIntegrationWithoutRightE");
     }
 
     @Test
     public void rightIShouldBeSufficientToPerformAppendUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ri"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightI");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ri"))
+            .run("aclIntegration/ACLIntegrationRightI");
     }
 
     @Test
     public void rightIShouldBeNeededToPerformAppendUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswepxtcdlak"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightI");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswepxtcdlak"))
+            .run("aclIntegration/ACLIntegrationWithoutRightI");
     }
 
     @Test
     public void rightISShouldBeSufficientToPerformAppendOfSeenMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ris"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightIS");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ris"))
+            .run("aclIntegration/ACLIntegrationRightIS");
     }
 
     @Test
     public void rightITShouldBeSufficientToPerformAppendOfDeletedMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rit"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightIT");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rit"))
+            .run("aclIntegration/ACLIntegrationRightIT");
     }
 
     @Test
     public void rightIWShouldBeSufficientToPerformAppendOfDeletedMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riw"));
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightIW");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riw"))
+            .run("aclIntegration/ACLIntegrationRightIW");
     }
 
     @Test
     public void rightRSShouldBeSufficientToPerformStoreAndFetchOnSeenMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rs"));
-        mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRS");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rs"))
+            .withFilledMailbox(OTHER_USER_MAILBOX)
+            .run("aclIntegration/ACLIntegrationRightRS");
     }
 
     @Test
     public void rightSShouldBeNeededToPerformStoreAndFetchOnSeenMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rwipxtcdlake"));
-        mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightS");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rwipxtcdlake"))
+            .withFilledMailbox(OTHER_USER_MAILBOX)
+            .run("aclIntegration/ACLIntegrationWithoutRightS");
     }
 
     @Test
     public void rightRWShouldBeSufficientToPerformStoreOnFlaggedMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rw"));
-        mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRW");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rw"))
+            .withFilledMailbox(OTHER_USER_MAILBOX)
+            .run("aclIntegration/ACLIntegrationRightRW");
     }
 
     @Test
     public void rightWShouldBeNeededToPerformStoreOnFlaggedMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rsipxtcdlake"));
-        mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightW");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rsipxtcdlake"))
+            .withFilledMailbox(OTHER_USER_MAILBOX)
+            .run("aclIntegration/ACLIntegrationWithoutRightW");
     }
 
     @Test
     public void rightRTShouldBeSufficientToPerformStoreOnDeletedMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rt"));
-        mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRT");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rt"))
+            .withFilledMailbox(OTHER_USER_MAILBOX)
+            .run("aclIntegration/ACLIntegrationRightRT");
     }
 
     @Test
     public void rightTShouldBeNeededToPerformStoreOnFlaggedMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rwipxslake"));
-        mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightT");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rwipxslake"))
+            .withFilledMailbox(OTHER_USER_MAILBOX)
+            .run("aclIntegration/ACLIntegrationWithoutRightT");
     }
 
     @Test
     public void rightIShouldBeSufficientToPerformCopyUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("i"));
-        mailboxMessageAppender.fillMailbox(MY_INBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyI");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("i"))
+            .withFilledMailbox(MY_INBOX)
+            .run("aclIntegration/ACLIntegrationCopyI");
     }
 
     @Test
     public void rightIShouldBeNeededToPerformCopyUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswpxtcdlake"));
-        mailboxMessageAppender.fillMailbox(MY_INBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutI");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswpxtcdlake"))
+            .withFilledMailbox(MY_INBOX)
+            .run("aclIntegration/ACLIntegrationCopyWithoutI");
     }
 
     @Test
     public void rightIShouldBeSufficientToPerformOfSeenMessagesCopyUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ris"));
-        mailboxMessageAppender.fillMailbox(MY_INBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyIS");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ris"))
+            .withFilledMailbox(MY_INBOX)
+            .run("aclIntegration/ACLIntegrationCopyIS");
     }
 
     @Test
     public void rightSShouldBeNeededToPerformCopyOfSeenMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riwpxtcdlake"));
-        mailboxMessageAppender.fillMailbox(MY_INBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutS");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riwpxtcdlake"))
+            .withFilledMailbox(MY_INBOX)
+            .run("aclIntegration/ACLIntegrationCopyWithoutS");
     }
 
     @Test
     public void rightIWShouldBeSufficientToPerformOfFlaggedMessagesCopyUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riw"));
-        mailboxMessageAppender.fillMailbox(MY_INBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyIW");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riw"))
+            .withFilledMailbox(MY_INBOX)
+            .run("aclIntegration/ACLIntegrationCopyIW");
     }
 
     @Test
     public void rightWShouldBeNeededToPerformCopyOfFlaggedMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rispxtcdlake"));
-        mailboxMessageAppender.fillMailbox(MY_INBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutW");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rispxtcdlake"))
+            .withFilledMailbox(MY_INBOX)
+            .run("aclIntegration/ACLIntegrationCopyWithoutW");
     }
 
     @Test
     public void rightITShouldBeSufficientToPerformOfDeletedMessagesCopyUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rit"));
-        mailboxMessageAppender.fillMailbox(MY_INBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyIT");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rit"))
+            .withFilledMailbox(MY_INBOX)
+            .run("aclIntegration/ACLIntegrationCopyIT");
     }
 
     @Test
     public void rightTShouldBeNeededToPerformCopyOfDeletedMessageUS() throws Exception {
-        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rispxwlake"));
-        mailboxMessageAppender.fillMailbox(MY_INBOX);
-        simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutT");
+        scriptedTestProtocol
+            .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rispxwlake"))
+            .withFilledMailbox(MY_INBOX)
+            .run("aclIntegration/ACLIntegrationCopyWithoutT");
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLScriptedTestProtocol.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLScriptedTestProtocol.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLScriptedTestProtocol.java
new file mode 100644
index 0000000..0f4bd13
--- /dev/null
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLScriptedTestProtocol.java
@@ -0,0 +1,82 @@
+package org.apache.james.mpt.imapmailbox.suite;
+
+import java.util.Locale;
+
+import org.apache.james.mailbox.model.MailboxACL;
+import org.apache.james.mailbox.model.MailboxACL.MailboxACLRights;
+import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
+import org.apache.james.mpt.imapmailbox.MailboxMessageAppender;
+import org.apache.james.mpt.script.ImapScriptedTestProtocol;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+
+public class ACLScriptedTestProtocol extends ImapScriptedTestProtocol {
+
+    private static class GrantRightsCommand implements SimpleScriptedTestProtocol.PrepareCommand<HostSystem> {
+        GrantRightsOnHost grantRightsOnHost;
+        MailboxPath mailboxPath;
+        String userName;
+        MailboxACL.MailboxACLRights rights;
+
+        GrantRightsCommand(GrantRightsOnHost grantRightsOnHost, MailboxPath mailboxPath, String userName, MailboxACLRights rights) {
+            this.grantRightsOnHost = grantRightsOnHost;
+            this.mailboxPath = mailboxPath;
+            this.userName = userName;
+            this.rights = rights;
+        }
+
+        @Override
+        public void prepare(HostSystem system) throws Exception {
+            grantRightsOnHost.grantRights(mailboxPath, userName, rights);
+        }
+    }
+    
+    private static class FillMailboxCommand implements SimpleScriptedTestProtocol.PrepareCommand<HostSystem> {
+        MailboxMessageAppender mailboxMessageAppender;
+        MailboxPath mailboxPath;
+
+        FillMailboxCommand(MailboxMessageAppender mailboxMessageAppender, MailboxPath mailboxPath) {
+            this.mailboxMessageAppender = mailboxMessageAppender;
+            this.mailboxPath = mailboxPath;
+        }
+
+        @Override
+        public void prepare(HostSystem system) throws Exception {
+            mailboxMessageAppender.fillMailbox(mailboxPath);
+        }
+    }
+    
+    private final GrantRightsOnHost grantRightsOnHost;
+    private final MailboxMessageAppender mailboxMessageAppender;
+
+    public ACLScriptedTestProtocol(GrantRightsOnHost grantRightsOnHost, MailboxMessageAppender mailboxMessageAppender, String scriptDirectory, ImapHostSystem hostSystem) throws Exception {
+        super(scriptDirectory, hostSystem);
+        this.grantRightsOnHost = grantRightsOnHost;
+        this.mailboxMessageAppender = mailboxMessageAppender;
+    }
+
+    public ACLScriptedTestProtocol withGrantRights(MailboxPath mailboxPath, String userName, MailboxACL.MailboxACLRights rights) {
+        return (ACLScriptedTestProtocol) withPreparedCommand(new GrantRightsCommand(grantRightsOnHost, mailboxPath, userName, rights));
+    }
+    
+    public ACLScriptedTestProtocol withFilledMailbox(MailboxPath otherUserMailbox) {
+        return (ACLScriptedTestProtocol) withPreparedCommand(new FillMailboxCommand(mailboxMessageAppender, otherUserMailbox));
+    }
+    
+    @Override
+    public ACLScriptedTestProtocol withUser(String user, String password) {
+        return (ACLScriptedTestProtocol) super.withUser(user, password);
+    }
+    
+    @Override
+    public ACLScriptedTestProtocol withLocale(Locale locale) {
+        return (ACLScriptedTestProtocol) super.withLocale(locale);
+    }
+    
+    @Override
+    public ACLScriptedTestProtocol withMailbox(MailboxPath mailboxPath) {
+        return (ACLScriptedTestProtocol) super.withMailbox(mailboxPath);
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
index b11eca8..84d068d 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
@@ -21,51 +21,42 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
+import org.apache.james.mpt.script.ImapScriptedTestProtocol;
 import org.junit.Before;
 import org.junit.Test;
 
-public class AuthenticatePlain implements ImapTestConstants {
+public abstract class AuthenticatePlain implements ImapTestConstants {
     
-    @Inject
-    private static ImapHostSystem system;
-
-    private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+    protected abstract ImapHostSystem createImapHostSystem();
+    
+    private ImapHostSystem system;
+    private ImapScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
-        simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+        system = createImapHostSystem();
+        simpleScriptedTestProtocol = new ImapScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
-                .withLocale(Locale.US);
+                .withUser("delegate", "123456")
+                .withMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"))
+                .withMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
         BasicImapCommands.welcome(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testAuthenticatePlainUS() throws Exception {
-        system.addUser("delegate", "123456");
-        system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"));
-        system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
-        simpleScriptedTestProtocol.run("AuthenticatePlain");
+        simpleScriptedTestProtocol
+            .withLocale(Locale.US)
+            .run("AuthenticatePlain");
     }
 
     @Test
     public void testAuthenticatePlainITALY() throws Exception {
-        system.addUser("delegate", "123456");
-        system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"));
-        system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
         simpleScriptedTestProtocol
             .withLocale(Locale.ITALY)
             .run("AuthenticatePlain");
@@ -73,9 +64,6 @@ public class AuthenticatePlain implements ImapTestConstants {
 
     @Test
     public void testAuthenticatePlainKOREA() throws Exception {
-        system.addUser("delegate", "123456");
-        system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"));
-        system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
         simpleScriptedTestProtocol
             .withLocale(Locale.KOREA)
             .run("AuthenticatePlain");

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
index 45bafa6..3df2651 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
@@ -21,28 +21,25 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mpt.api.ImapFeatures.Feature;
 import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
 
-public class AuthenticatedState extends BasicImapCommands {
+public abstract class AuthenticatedState extends BasicImapCommands {
     
-    @Inject
-    private static ImapHostSystem system;
-
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -50,11 +47,6 @@ public class AuthenticatedState extends BasicImapCommands {
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testNoopUS() throws Exception {
         simpleScriptedTestProtocol.run("Noop");

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
index 6945e94..bd0d3ae 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
@@ -21,35 +21,28 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class ConcurrentSessions implements ImapTestConstants {
+public abstract class ConcurrentSessions implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD);
         BasicImapCommands.welcome(simpleScriptedTestProtocol);
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
     }
-    
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
 
     @Test
     public void testConcurrentExpungeResponseUS() throws Exception {

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
index 0336638..8ae9864 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
@@ -21,8 +21,6 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
 import org.apache.james.imap.api.ImapConfiguration;
 import org.apache.james.mpt.host.JamesImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
@@ -31,15 +29,16 @@ import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Condstore implements ImapTestConstants {
-
-    @Inject
-    private static JamesImapHostSystem system;
+public abstract class Condstore implements ImapTestConstants {
 
+    protected abstract JamesImapHostSystem createJamesImapHostSystem();
+    
+    private JamesImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createJamesImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(TO_ADDRESS, PASSWORD)
                 .withLocale(Locale.US);

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
index 81f62f9..bc80f53 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
@@ -21,29 +21,29 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Copy implements ImapTestConstants {
+public abstract class Copy implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
         BasicImapCommands.welcome(simpleScriptedTestProtocol);
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+        BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
index b92ac5f..376a754 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
@@ -21,33 +21,28 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.ImapTestConstants;
-import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
 import org.junit.Before;
 import org.junit.Test;
 
-public class DeploymentValidation implements ImapTestConstants {
+public abstract class DeploymentValidation {
 
     public static final String DOMAIN = "domain";
-
-    @Inject
-    private static HostSystem system;
     public static final String USER = "imapuser";
     public static final String PASSWORD = "password";
 
+    protected abstract ImapHostSystem createImapHostSystem();
+    
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER + "@" + DOMAIN, PASSWORD)
                 .withLocale(Locale.US);
-        BasicImapCommands.welcome(simpleScriptedTestProtocol);
-        BasicImapCommands.authenticate(simpleScriptedTestProtocol);
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
index e0470b9..34c03ef 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
@@ -21,25 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Events implements ImapTestConstants {
+public abstract class Events implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -47,11 +45,6 @@ public class Events implements ImapTestConstants {
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
-    
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
 
     @Test
     public void testAppendToSelectedUS() throws Exception {

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
index 87787f6..0750814 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Expunge implements ImapTestConstants {
+public abstract class Expunge implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
-    
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -48,11 +45,6 @@ public class Expunge implements ImapTestConstants {
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
-    
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
 
     @Test
     public void testBasicExpungeUS() throws Exception {

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
index 988fe8e..aa30ba6 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Fetch implements ImapTestConstants {
+public abstract class Fetch implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
-    
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -49,11 +46,6 @@ public class Fetch implements ImapTestConstants {
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testFetchEnvelopeUS() throws Exception {
         simpleScriptedTestProtocol

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
index 1e5a355..e96f98a 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
@@ -21,25 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class FetchBodySection implements ImapTestConstants {
+public abstract class FetchBodySection implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -47,11 +45,6 @@ public class FetchBodySection implements ImapTestConstants {
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
-    
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
 
     @Test
     public void testFetchMultipartAlternativeUS() throws Exception {

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
index 19596a6..8ff3280 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class FetchBodyStructure implements ImapTestConstants {
+public abstract class FetchBodyStructure implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
-    
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -48,11 +45,6 @@ public class FetchBodyStructure implements ImapTestConstants {
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
-    
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
 
     @Test
     public void testFetchFetchSimpleBodyStructureUS() throws Exception {

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
index c434359..fb34e02 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class FetchHeaders implements ImapTestConstants {
+public abstract class FetchHeaders implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
-    
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -48,11 +45,6 @@ public class FetchHeaders implements ImapTestConstants {
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
-    
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
 
     @Test
     public void testFetchHeaderFieldsUS() throws Exception {

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
index 847974b..568c830 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
@@ -21,35 +21,28 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Listing implements ImapTestConstants {
+public abstract class Listing implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD);
         BasicImapCommands.welcome(simpleScriptedTestProtocol);
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
     }
-    
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
 
     @Test
     public void testListPlusUS() throws Exception {

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
index 3798cbe..0cde7ec 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
@@ -22,27 +22,25 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
 import org.apache.james.mpt.api.ImapFeatures;
 import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
 
-public class MailboxAnnotation implements ImapTestConstants {
+public abstract class MailboxAnnotation implements ImapTestConstants {
 
-    @Inject
-    private static ImapHostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         Assume.assumeTrue(system.supports(ImapFeatures.Feature.ANNOTATION_SUPPORT));
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
@@ -52,11 +50,6 @@ public class MailboxAnnotation implements ImapTestConstants {
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testAnnotationUS() throws Exception {
         simpleScriptedTestProtocol

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
index b0fda10..4d0d154 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
@@ -21,24 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class MailboxWithLongNameError implements ImapTestConstants {
-    @Inject
-    private static HostSystem system;
+public abstract class MailboxWithLongNameError implements ImapTestConstants {
+
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -46,11 +45,6 @@ public class MailboxWithLongNameError implements ImapTestConstants {
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
-    
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
 
     @Test
     public void testWithLongMailboxNameUS() throws Exception {

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
index ad040d0..92c4e53 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
@@ -21,24 +21,25 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
-public class MailboxWithLongNameSuccess implements ImapTestConstants {
-    @Inject
-    private static HostSystem system;
+@Ignore("why ?")
+public abstract class MailboxWithLongNameSuccess implements ImapTestConstants {
 
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
index 7d1208c..613ef90 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
@@ -21,28 +21,25 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
 import org.apache.james.mpt.api.ImapFeatures;
 import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Move implements ImapTestConstants {
-
-    @Inject
-    private static ImapHostSystem system;
+public abstract class Move implements ImapTestConstants {
 
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -51,11 +48,6 @@ public class Move implements ImapTestConstants {
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void moveShouldWork() throws Exception {
         Assume.assumeTrue(system.supports(ImapFeatures.Feature.MOVE_SUPPORT));

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
index 306c448..4b2b8f6 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
@@ -21,36 +21,29 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class NonAuthenticatedState implements ImapTestConstants {
+public abstract class NonAuthenticatedState implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
         BasicImapCommands.welcome(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testNoopUS() throws Exception {
         simpleScriptedTestProtocol

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
index 02b0456..361aa76 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class PartialFetch implements ImapTestConstants {
+public abstract class PartialFetch implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
-    
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -49,11 +46,6 @@ public class PartialFetch implements ImapTestConstants {
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testBodyPartialFetchUS() throws Exception {
         simpleScriptedTestProtocol

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
index 34b35c2..cec3719 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
@@ -21,8 +21,6 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
 import org.apache.james.mpt.api.ImapFeatures;
 import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
@@ -33,19 +31,19 @@ import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
 
-public class QuotaTest implements ImapTestConstants {
+public abstract class QuotaTest implements ImapTestConstants {
 
     private static final int MAX_MESSAGE_QUOTA = 4096;
     private static final long MAX_STORAGE_QUOTA = 5 * 1024L * 1024L * 1024L;
 
-    @Inject
-    private static ImapHostSystem system;
-
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         Assume.assumeTrue(system.supports(ImapFeatures.Feature.QUOTA_SUPPORT));
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
index 517c3e9..c77b2ad 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Rename implements ImapTestConstants {
+public abstract class Rename implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
-    
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -49,11 +46,6 @@ public class Rename implements ImapTestConstants {
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testRenameUS() throws Exception {
         simpleScriptedTestProtocol

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
index 22cb785..f613d49 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
@@ -21,25 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Search implements ImapTestConstants {
+public abstract class Search implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -47,11 +45,6 @@ public class Search implements ImapTestConstants {
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testSearchAtomsUS() throws Exception {
         simpleScriptedTestProtocol

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
index 0628c11..29ec0ac 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
@@ -21,35 +21,25 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
-import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Security implements ImapTestConstants {
+public abstract class Security implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
-        BasicImapCommands.welcome(simpleScriptedTestProtocol);
-        BasicImapCommands.authenticate(simpleScriptedTestProtocol);
-    }
-    
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
index 411ef76..af6f85a 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
@@ -21,25 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class Select implements ImapTestConstants {
+public abstract class Select implements ImapTestConstants {
 
-    @Inject
-    private static HostSystem system;
+    protected abstract ImapHostSystem createImapHostSystem();
     
+    private ImapHostSystem system;
     private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
     @Before
     public void setUp() throws Exception {
+        system = createImapHostSystem();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -47,11 +45,6 @@ public class Select implements ImapTestConstants {
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testSelectUnseenUS() throws Exception {
         simpleScriptedTestProtocol


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