james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [08/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami
Date Fri, 07 Jul 2017 08:24:22 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/suite/SelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
index 5cdc63a..d695788 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.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 SelectedInbox implements ImapTestConstants {
+public abstract class SelectedInbox 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 +46,6 @@ public class SelectedInbox implements ImapTestConstants {
         BasicImapCommands.selectInbox(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testValidNonAuthenticatedUS() 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/SelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
index bc30f44..64a1fcf 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.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 SelectedState implements ImapTestConstants {
+public abstract class SelectedState 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 SelectedState implements ImapTestConstants {
         BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testCheckUS() 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/UidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
index 5e1d5e1..e408248 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.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 UidSearch implements ImapTestConstants {
+public abstract class UidSearch 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
     public void testSearchAtomsUS() 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/UidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
index 1029027..231768d 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.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.Before;
 import org.junit.Test;
 
-public class UidSearchOnIndex implements ImapTestConstants {
-
-    @Inject
-    private static HostSystem system;
+public abstract class UidSearchOnIndex 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/UserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
index b0c832e..21b0465 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
@@ -26,22 +26,20 @@ 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;
 
-import com.google.inject.Inject;
+public abstract class UserFlagsSupport implements ImapTestConstants {
 
-public class UserFlagsSupport 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();
         simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
                 .withUser(USER, PASSWORD)
                 .withLocale(Locale.US);
@@ -49,11 +47,6 @@ public class UserFlagsSupport implements ImapTestConstants {
         BasicImapCommands.authenticate(simpleScriptedTestProtocol);
     }
     
-    @After
-    public void tearDown() throws Exception {
-        system.afterTest();
-    }
-
     @Test
     public void testUserFlagsSupport() throws Exception {
         Assume.assumeTrue(system.supports(ImapFeatures.Feature.USER_FLAGS_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/base/BasicImapCommands.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java
index 9d508b0..0c4b18d 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java
@@ -21,16 +21,17 @@ package org.apache.james.mpt.imapmailbox.suite.base;
 
 import org.apache.james.mpt.api.ProtocolInteractor;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.script.GenericSimpleScriptedTestProtocol;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
 
 
 public class BasicImapCommands implements ImapTestConstants {
     
-    public static void welcome(SimpleScriptedTestProtocol scriptedTestProtocol) {
+    public static void welcome(GenericSimpleScriptedTestProtocol<?, ?> scriptedTestProtocol) {
         scriptedTestProtocol.preElements().SL("\\* OK IMAP4rev1 Server ready", "BaseAuthenticatedState.java:32");
     }
     
-    public static void authenticate(SimpleScriptedTestProtocol scriptedTestProtocol) {
+    public static void authenticate(GenericSimpleScriptedTestProtocol<?, ?> scriptedTestProtocol) {
         addLogin(scriptedTestProtocol.preElements(), USER, PASSWORD);
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java
new file mode 100644
index 0000000..a392ec8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java
@@ -0,0 +1,41 @@
+package org.apache.james.mpt.imapmailbox.cyrus;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
+import org.apache.james.mpt.imapmailbox.suite.ACLCommands;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CyrusACLCommands extends ACLCommands {
+
+    private ImapHostSystem system;
+    private GrantRightsOnHost grantRightsOnHost;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new CyrusMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        grantRightsOnHost = injector.getInstance(GrantRightsOnHost.class);
+        system.beforeTest();
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+
+    @Override
+    protected GrantRightsOnHost createGrantRightsOnHost() {
+        return grantRightsOnHost;
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java
new file mode 100644
index 0000000..d0ca3c4
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java
@@ -0,0 +1,49 @@
+package org.apache.james.mpt.imapmailbox.cyrus;
+
+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.imapmailbox.suite.ACLIntegration;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CyrusACLIntegration extends ACLIntegration {
+
+    private ImapHostSystem system;
+    private GrantRightsOnHost grantRightsOnHost;
+    private MailboxMessageAppender mailboxMessageAppender;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new CyrusMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        grantRightsOnHost = injector.getInstance(GrantRightsOnHost.class);
+        mailboxMessageAppender = injector.getInstance(MailboxMessageAppender.class);
+        system.beforeTest();
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+
+    @Override
+    protected GrantRightsOnHost createGrantRightsOnHost() {
+        return grantRightsOnHost;
+    }
+
+    @Override
+    protected MailboxMessageAppender createMailboxMessageAppender() {
+        return mailboxMessageAppender;
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTest.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTest.java
deleted file mode 100644
index 5a2b6bc..0000000
--- a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTest.java
+++ /dev/null
@@ -1,54 +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.cyrus;
-
-import org.apache.james.mpt.imapmailbox.suite.ACLCommands;
-import org.apache.james.mpt.imapmailbox.suite.ACLIntegration;
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(OnamiSuite.class)
-@SuiteClasses({
-    ACLCommands.class,
-    ACLIntegration.class
-//    AuthenticatedState.class,
-//    ConcurrentSessions.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,
-//    SelectedInbox.class,
-//    SelectedState.class,
-//    UidSearch.class
-})
-@GuiceModules({CyrusMailboxTestModule.class})
-public class CyrusMailboxTest {
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTest.java b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTest.java
deleted file mode 100644
index 36fa2fd..0000000
--- a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.imapmailbox.elasticsearch;
-
-import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(OnamiSuite.class)
-@Suite.SuiteClasses({
-    UidSearchOnIndex.class
-})
-@GuiceModules({ElasticSearchMailboxTestModule.class})
-public class ElasticSearchMailboxTest {
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
new file mode 100644
index 0000000..e3fbde8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.elasticsearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class ElasticSearchUidSearchOnIndex extends UidSearchOnIndex {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new ElasticSearchMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        system.beforeTest();
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/ExternalJamesTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/ExternalJamesTest.java b/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/ExternalJamesTest.java
deleted file mode 100644
index 39e1966..0000000
--- a/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/ExternalJamesTest.java
+++ /dev/null
@@ -1,36 +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.external.james;
-
-import org.apache.james.mpt.imapmailbox.suite.DeploymentValidation;
-
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(OnamiSuite.class)
-@Suite.SuiteClasses({
-    DeploymentValidation.class
-})
-@GuiceModules({ExternalJamesModule.class})
-public class ExternalJamesTest {
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java b/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java
new file mode 100644
index 0000000..3ab0e9d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.external.james;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.DeploymentValidation;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JamesDeploymentValidation extends DeploymentValidation {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new ExternalJamesModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        system.beforeTest();
+        super.setUp();
+    }
+
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+    
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
new file mode 100644
index 0000000..9779470
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseAuthenticatePlain extends AuthenticatePlain {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
new file mode 100644
index 0000000..d0c087e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseAuthenticatedState extends AuthenticatedState {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
new file mode 100644
index 0000000..0c58987
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseConcurrentSessions extends ConcurrentSessions {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
new file mode 100644
index 0000000..3781b03
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Condstore;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why it was no enabled on cassandra ?")
+public class HBaseCondstore extends Condstore {
+
+    private JamesImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(JamesImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected JamesImapHostSystem createJamesImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
new file mode 100644
index 0000000..252c8e6
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Copy;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseCopy extends Copy {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
new file mode 100644
index 0000000..b25f337
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Events;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseEvents extends Events {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
new file mode 100644
index 0000000..5ed5396
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Expunge;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseExpunge extends Expunge {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
new file mode 100644
index 0000000..c985e1a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Fetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseFetch extends Fetch {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
new file mode 100644
index 0000000..7fa1f01
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseFetchBodySection extends FetchBodySection {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
new file mode 100644
index 0000000..9402b37
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseFetchBodyStructure extends FetchBodyStructure {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
new file mode 100644
index 0000000..3e82982
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseFetchHeaders extends FetchHeaders {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
new file mode 100644
index 0000000..d04fd85
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Listing;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseListing extends Listing {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
new file mode 100644
index 0000000..8e48c4c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseMailboxAnnotation extends MailboxAnnotation {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTest.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTest.java
deleted file mode 100644
index bbbe160..0000000
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTest.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.apache.james.mpt.imapmailbox.hbase;
-
-import org.apache.james.mpt.imapmailbox.AbstractMailboxTest;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-
-@GuiceModules({ HBaseMailboxTestModule.class })
-public class HBaseMailboxTest extends AbstractMailboxTest {
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
new file mode 100644
index 0000000..9e33c2c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseMailboxWithLongNameError extends MailboxWithLongNameError {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java
new file mode 100644
index 0000000..6c76d12
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("do we have a JIRA for that ?")
+public class HBaseMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
new file mode 100644
index 0000000..856b04c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Move;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseMove extends Move {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
new file mode 100644
index 0000000..0c959c8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseNonAuthenticatedState extends NonAuthenticatedState {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
new file mode 100644
index 0000000..4e12099
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBasePartialFetch extends PartialFetch {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
new file mode 100644
index 0000000..5334bfe
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseQuotaTest extends QuotaTest {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
new file mode 100644
index 0000000..8e2f8d8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Rename;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseRename extends Rename {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
new file mode 100644
index 0000000..7bfe052
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Search;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseSearch extends Search {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
new file mode 100644
index 0000000..f8fab11
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Security;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseSecurity extends Security {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
new file mode 100644
index 0000000..398db0e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Select;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseSelect extends Select {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
new file mode 100644
index 0000000..faddd49
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseSelectedInbox extends SelectedInbox {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
new file mode 100644
index 0000000..5041583
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseSelectedState extends SelectedState {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
new file mode 100644
index 0000000..763975f
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseUidSearch extends UidSearch {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
new file mode 100644
index 0000000..4272454
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseUidSearchOnIndex extends UidSearchOnIndex {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
new file mode 100644
index 0000000..d85e19a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseUserFlagsSupport extends UserFlagsSupport {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
new file mode 100644
index 0000000..9600232
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryAuthenticatePlain extends AuthenticatePlain {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
new file mode 100644
index 0000000..3564984
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryAuthenticatedState extends AuthenticatedState {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
new file mode 100644
index 0000000..3ce904a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryConcurrentSessions extends ConcurrentSessions {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
new file mode 100644
index 0000000..be72a68
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Condstore;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why it was no enabled on cassandra ?")
+public class InMemoryCondstore extends Condstore {
+
+    private JamesImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(JamesImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected JamesImapHostSystem createJamesImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
new file mode 100644
index 0000000..1d72ad9
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Copy;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryCopy extends Copy {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
new file mode 100644
index 0000000..d23db49
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Events;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryEvents extends Events {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
new file mode 100644
index 0000000..35bcce8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Expunge;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryExpunge extends Expunge {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
new file mode 100644
index 0000000..8313017
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Fetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryFetch extends Fetch {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
new file mode 100644
index 0000000..0a3150d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryFetchBodySection extends FetchBodySection {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
new file mode 100644
index 0000000..22a27a5
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryFetchBodyStructure extends FetchBodyStructure {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
new file mode 100644
index 0000000..94ed875
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryFetchHeaders extends FetchHeaders {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
new file mode 100644
index 0000000..b263205
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Listing;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryListing extends Listing {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
new file mode 100644
index 0000000..60be1fa
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryMailboxAnnotation extends MailboxAnnotation {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        super.setUp();
+    }
+    
+    @Override
+    protected ImapHostSystem createImapHostSystem() {
+        return system;
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        system.afterTest();
+    }
+    
+}


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