james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [07/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami
Date Fri, 07 Jul 2017 08:24:21 GMT
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/InMemoryMailboxEventAsynchronousTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java
deleted file mode 100644
index a15614b..0000000
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java
+++ /dev/null
@@ -1,70 +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.inmemory;
-
-import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
-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.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.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({
-    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,
-    QuotaTest.class
-})
-@GuiceModules({ InMemoryMailboxTestModule.class })
-public class InMemoryMailboxEventAsynchronousTest {
-
-}

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/InMemoryMailboxEventAsynchronousTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java
deleted file mode 100644
index ea55f7d..0000000
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java
+++ /dev/null
@@ -1,42 +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.inmemory;
-
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryEventAsynchronousHostSystem;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Provides;
-import com.google.inject.Singleton;
-
-public class InMemoryMailboxEventAsynchronousTestModule extends AbstractModule {
-
-    @Override
-    protected void configure() {
-        bind(HostSystem.class).to(ImapHostSystem.class);
-    }
-
-    @Provides
-    @Singleton
-    public ImapHostSystem provideHostSystem() throws Exception {
-        return InMemoryEventAsynchronousHostSystem.build();
-    }
-
-}

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/InMemoryMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTest.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTest.java
deleted file mode 100644
index 57f71dc..0000000
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTest.java
+++ /dev/null
@@ -1,80 +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.inmemory;
-
-import org.apache.james.mpt.imapmailbox.AbstractMailboxTest;
-import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
-import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
-import org.apache.james.mpt.imapmailbox.suite.Condstore;
-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.MailboxWithLongNameSuccess;
-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.annotation.GuiceModules;
-import org.junit.runners.Suite.SuiteClasses;
-
-@GuiceModules({ InMemoryMailboxTestModule.class })
-@SuiteClasses({
-    AuthenticatedState.class,
-    AuthenticatePlain.class,
-    ConcurrentSessions.class,
-    Condstore.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,
-    MailboxWithLongNameSuccess.class
-})
-public class InMemoryMailboxTest extends AbstractMailboxTest {
-
-}

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/InMemoryMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java
new file mode 100644
index 0000000..7971a6e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why ?")
+public class InMemoryMailboxWithLongNameError extends MailboxWithLongNameError {
+
+    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/InMemoryMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java
new file mode 100644
index 0000000..79ae25b
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.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.MailboxWithLongNameSuccess;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
+
+    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/InMemoryMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java
new file mode 100644
index 0000000..bf23e03
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.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.Move;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryMove extends Move {
+
+    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/InMemoryNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java
new file mode 100644
index 0000000..686ffb7
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.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.NonAuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryNonAuthenticatedState extends NonAuthenticatedState {
+
+    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/InMemoryPartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java
new file mode 100644
index 0000000..f1f97ec
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.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.PartialFetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryPartialFetch extends PartialFetch {
+
+    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/InMemoryQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
new file mode 100644
index 0000000..16f0945
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.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.QuotaTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryQuotaTest extends QuotaTest {
+
+    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/InMemoryRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
new file mode 100644
index 0000000..dff16d6
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.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.Rename;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryRename extends Rename {
+
+    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/InMemorySearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
new file mode 100644
index 0000000..ca51c25
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.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.Search;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemorySearch extends Search {
+
+    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/InMemorySecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java
new file mode 100644
index 0000000..da81eca
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.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.Security;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemorySecurity extends Security {
+
+    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/InMemorySelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java
new file mode 100644
index 0000000..9be071e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.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.Select;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemorySelect extends Select {
+
+    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/InMemorySelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java
new file mode 100644
index 0000000..d423951
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.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.SelectedInbox;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemorySelectedInbox extends SelectedInbox {
+
+    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/InMemorySelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java
new file mode 100644
index 0000000..b444d5f
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.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.SelectedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemorySelectedState extends SelectedState {
+
+    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/InMemoryUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java
new file mode 100644
index 0000000..f45cf0a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.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.UidSearch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryUidSearch extends UidSearch {
+
+    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/InMemoryUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java
new file mode 100644
index 0000000..29b871d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.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.UidSearchOnIndex;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryUidSearchOnIndex extends UidSearchOnIndex {
+
+    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/InMemoryUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java
new file mode 100644
index 0000000..191f8eb
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.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.UserFlagsSupport;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryUserFlagsSupport extends UserFlagsSupport {
+
+    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/host/InMemoryEventAsynchronousHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryEventAsynchronousHostSystem.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryEventAsynchronousHostSystem.java
deleted file mode 100644
index 6393d50..0000000
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryEventAsynchronousHostSystem.java
+++ /dev/null
@@ -1,132 +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.inmemory.host;
-
-import org.apache.james.imap.api.process.ImapProcessor;
-import org.apache.james.imap.encode.main.DefaultImapEncoderFactory;
-import org.apache.james.imap.main.DefaultImapDecoderFactory;
-import org.apache.james.imap.processor.main.DefaultImapProcessorFactory;
-import org.apache.james.mailbox.acl.GroupMembershipResolver;
-import org.apache.james.mailbox.acl.MailboxACLResolver;
-import org.apache.james.mailbox.acl.SimpleGroupMembershipResolver;
-import org.apache.james.mailbox.acl.UnionMailboxACLResolver;
-import org.apache.james.mailbox.exception.MailboxException;
-import org.apache.james.mailbox.inmemory.InMemoryMailboxSessionMapperFactory;
-import org.apache.james.mailbox.inmemory.InMemoryMessageId;
-import org.apache.james.mailbox.inmemory.quota.InMemoryCurrentQuotaManager;
-import org.apache.james.mailbox.inmemory.quota.InMemoryPerUserMaxQuotaManager;
-import org.apache.james.mailbox.model.MailboxConstants;
-import org.apache.james.mailbox.model.MailboxPath;
-import org.apache.james.mailbox.quota.QuotaRootResolver;
-import org.apache.james.mailbox.store.StoreMailboxManager;
-import org.apache.james.mailbox.store.StoreSubscriptionManager;
-import org.apache.james.mailbox.store.event.AsynchronousEventDelivery;
-import org.apache.james.mailbox.store.event.DefaultDelegatingMailboxListener;
-import org.apache.james.mailbox.store.mail.model.impl.MessageParser;
-import org.apache.james.mailbox.store.quota.CurrentQuotaCalculator;
-import org.apache.james.mailbox.store.quota.DefaultQuotaRootResolver;
-import org.apache.james.mailbox.store.quota.ListeningCurrentQuotaUpdater;
-import org.apache.james.mailbox.store.quota.StoreQuotaManager;
-import org.apache.james.metrics.logger.DefaultMetricFactory;
-import org.apache.james.mpt.api.ImapFeatures;
-import org.apache.james.mpt.api.ImapFeatures.Feature;
-import org.apache.james.mpt.host.JamesImapHostSystem;
-import org.apache.james.mpt.imapmailbox.MailboxCreationDelegate;
-
-public class InMemoryEventAsynchronousHostSystem extends JamesImapHostSystem {
-
-    private static final ImapFeatures SUPPORTED_FEATURES = ImapFeatures.of(Feature.NAMESPACE_SUPPORT);
-
-    private StoreMailboxManager mailboxManager;
-    private InMemoryPerUserMaxQuotaManager perUserMaxQuotaManager;
-
-    public static JamesImapHostSystem build() throws Exception {
-        return new InMemoryEventAsynchronousHostSystem();
-    }
-
-    private InMemoryEventAsynchronousHostSystem() throws MailboxException {
-        initFields();
-    }
-
-    @Override
-    protected void resetData() throws Exception {
-        initFields();
-    }
-    
-    private void initFields() throws MailboxException {
-        InMemoryMailboxSessionMapperFactory factory = new InMemoryMailboxSessionMapperFactory();
-        MailboxACLResolver aclResolver = new UnionMailboxACLResolver();
-        GroupMembershipResolver groupMembershipResolver = new SimpleGroupMembershipResolver();
-        MessageParser messageParser = new MessageParser();
-
-        mailboxManager = new StoreMailboxManager(factory, authenticator, authorizator, aclResolver, groupMembershipResolver, messageParser,
-                new InMemoryMessageId.Factory(), MailboxConstants.DEFAULT_LIMIT_ANNOTATIONS_ON_MAILBOX, MailboxConstants.DEFAULT_LIMIT_ANNOTATION_SIZE);
-        QuotaRootResolver quotaRootResolver = new DefaultQuotaRootResolver(factory);
-
-        perUserMaxQuotaManager = new InMemoryPerUserMaxQuotaManager();
-
-        InMemoryCurrentQuotaManager currentQuotaManager = new InMemoryCurrentQuotaManager(
-            new CurrentQuotaCalculator(factory, quotaRootResolver),
-            mailboxManager);
-
-        StoreQuotaManager quotaManager = new StoreQuotaManager();
-        quotaManager.setMaxQuotaManager(perUserMaxQuotaManager);
-        quotaManager.setCurrentQuotaManager(currentQuotaManager);
-
-        ListeningCurrentQuotaUpdater quotaUpdater = new ListeningCurrentQuotaUpdater();
-        quotaUpdater.setCurrentQuotaManager(currentQuotaManager);
-        quotaUpdater.setQuotaRootResolver(quotaRootResolver);
-
-        mailboxManager.setQuotaRootResolver(quotaRootResolver);
-        mailboxManager.setQuotaManager(quotaManager);
-        mailboxManager.setQuotaUpdater(quotaUpdater);
-
-        mailboxManager.setDelegatingMailboxListener(new DefaultDelegatingMailboxListener(new AsynchronousEventDelivery(10)));
-
-        mailboxManager.init();
-
-        final ImapProcessor defaultImapProcessorFactory = DefaultImapProcessorFactory.createDefaultProcessor(
-                mailboxManager, 
-                new StoreSubscriptionManager(factory), 
-                quotaManager, 
-                quotaRootResolver, 
-                new DefaultMetricFactory());
-        configure(new DefaultImapDecoderFactory().buildImapDecoder(),
-                new DefaultImapEncoderFactory().buildImapEncoder(),
-                defaultImapProcessorFactory);
-    }
-
-    @Override
-    public void createMailbox(MailboxPath mailboxPath) throws Exception{
-        new MailboxCreationDelegate(mailboxManager).createMailbox(mailboxPath);
-    }
-    
-    @Override
-    public boolean supports(Feature... features) {
-        return SUPPORTED_FEATURES.supports(features);
-    }
-
-    @Override
-    public void setQuotaLimits(long maxMessageQuota, long maxStorageQuota) throws MailboxException {
-        perUserMaxQuotaManager.setDefaultMaxMessage(maxMessageQuota);
-        perUserMaxQuotaManager.setDefaultMaxStorage(maxStorageQuota);
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
index fcc3621..23f474d 100644
--- a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
+++ b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
@@ -18,12 +18,9 @@
  ****************************************************************/
 package org.apache.james.mpt.imapmailbox.jcr;
 
-import org.apache.james.mpt.imapmailbox.AbstractMailboxTest;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
 import org.junit.Ignore;
 
 @Ignore("JWC-130 : JCR mailbox does not correctly release resources + append problems")
-@GuiceModules({ JcrMailboxTestModule.class })
-public class JcrMailboxTest extends AbstractMailboxTest {
+public class JcrMailboxTest {
 
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java
new file mode 100644
index 0000000..3adbede
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaAuthenticatePlain extends AuthenticatePlain {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java
new file mode 100644
index 0000000..2589588
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaAuthenticatedState extends AuthenticatedState {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java
new file mode 100644
index 0000000..83fb9e0
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaConcurrentSessions extends ConcurrentSessions {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
new file mode 100644
index 0000000..6ccec80
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 ?")
+public class JpaCondstore extends Condstore {
+
+    private JamesImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java
new file mode 100644
index 0000000..26c2bbe
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaCopy extends Copy {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java
new file mode 100644
index 0000000..90fc55b
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaEvents extends Events {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java
new file mode 100644
index 0000000..c3d492c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaExpunge extends Expunge {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java
new file mode 100644
index 0000000..07cbb01
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaFetch extends Fetch {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java
new file mode 100644
index 0000000..6c25062
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaFetchBodySection extends FetchBodySection {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java
new file mode 100644
index 0000000..ef0b382
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaFetchBodyStructure extends FetchBodyStructure {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java
new file mode 100644
index 0000000..2747f69
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaFetchHeaders extends FetchHeaders {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java
new file mode 100644
index 0000000..521831d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaListing extends Listing {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java
new file mode 100644
index 0000000..8449ea1
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaMailboxAnnotation extends MailboxAnnotation {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTest.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTest.java
deleted file mode 100644
index f808afd..0000000
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTest.java
+++ /dev/null
@@ -1,27 +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.jpa;
-
-import org.apache.james.mpt.imapmailbox.AbstractMailboxTest;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-
-@GuiceModules({ JpaMailboxTestModule.class })
-public class JpaMailboxTest extends AbstractMailboxTest {
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
new file mode 100644
index 0000000..bfea2cb
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why ?")
+public class JpaMailboxWithLongNameError extends MailboxWithLongNameError {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java
new file mode 100644
index 0000000..7ad407f
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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("why")
+public class JpaMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java
new file mode 100644
index 0000000..306f155
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaMove extends Move {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java
new file mode 100644
index 0000000..1187e05
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaNonAuthenticatedState extends NonAuthenticatedState {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java
new file mode 100644
index 0000000..33b92cb
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaPartialFetch extends PartialFetch {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java
new file mode 100644
index 0000000..a208585
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaQuotaTest extends QuotaTest {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java
new file mode 100644
index 0000000..da70220
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaRename extends Rename {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java
new file mode 100644
index 0000000..da0223a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaSearch extends Search {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java
new file mode 100644
index 0000000..23a3001
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaSecurity extends Security {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java
new file mode 100644
index 0000000..800fa11
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaSelect extends Select {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java
new file mode 100644
index 0000000..c7e4697
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaSelectedInbox extends SelectedInbox {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java
new file mode 100644
index 0000000..7118f81
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaSelectedState extends SelectedState {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java
new file mode 100644
index 0000000..2bd7873
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaUidSearch extends UidSearch {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java
new file mode 100644
index 0000000..def6b63
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaUidSearchOnIndex extends UidSearchOnIndex {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java
new file mode 100644
index 0000000..35bdaca
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+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 JpaUserFlagsSupport extends UserFlagsSupport {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+        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/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java
new file mode 100644
index 0000000..9b3bd9b
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+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 LuceneAuthenticatePlain extends AuthenticatePlain {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+        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/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java
new file mode 100644
index 0000000..0a83883
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+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 LuceneAuthenticatedState extends AuthenticatedState {
+
+    private ImapHostSystem system;
+
+    @Before
+    public void setUp() throws Exception {
+        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+        system = injector.getInstance(ImapHostSystem.class);
+        system.beforeTest();
+        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