james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [09/15] james-project git commit: PROTOCOLS-117 General fixes: Most MPT tests do not need Guice
Date Fri, 03 Nov 2017 12:27:32 GMT
http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index c07044b..f11d84b 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
 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);
+        system = new InMemoryHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index c11ef24..bb3bd73 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
 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);
+        system = new InMemoryHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index e251c0d..aba915e 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
 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);
+        system = new InMemoryHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index bd3eed2..c24d1b8 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
 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);
+        system = new InMemoryHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 652ac55..f010bee 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
 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);
+        system = new InMemoryHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 88d55cb..a4decb8 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
 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);
+        system = new InMemoryHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 1398151..4345668 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
 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);
+        system = new InMemoryHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 0b3647f..f8da995 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
 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);
+        system = new InMemoryHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 6382bc9..e0fdbaf 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
 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);
+        system = new InMemoryHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 27b7227..d6cd69b 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index b20e3db..ce1ecf9 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index f815ccc..85f502b 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index ea0af5d..594a801 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Condstore;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 2ee21ad..eaac933 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 9debc12..1c1d92d 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 6074709..d412103 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 16d2015..96d9235 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 80a2982..0573a74 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 467e6cb..f1b0e30 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index ce3d867..74e0673 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 23b20c2..2f3bf30 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index e638697..14cea52 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
deleted file mode 100644
index 3c2d0f4..0000000
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
+++ /dev/null
@@ -1,44 +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.api.HostSystem;
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.host.JamesImapHostSystem;
-import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Provides;
-import com.google.inject.Singleton;
-
-public class JpaMailboxTestModule extends AbstractModule {
-
-    @Override
-    protected void configure() {
-        bind(HostSystem.class).to(ImapHostSystem.class);
-        bind(ImapHostSystem.class).to(JamesImapHostSystem.class);
-    }
-
-    @Provides
-    @Singleton
-    public JamesImapHostSystem provideImapHostSystem() throws Exception {
-        return JPAHostSystem.build();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 9bf4ce9..b457193 100644
--- 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
@@ -20,14 +20,12 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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("MAILBOX-300 JPA should fail gracefully when too long mailbox name")
 public class JpaMailboxWithLongNameError extends MailboxWithLongNameError {
 
@@ -35,8 +33,7 @@ public class JpaMailboxWithLongNameError extends MailboxWithLongNameError {
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new JpaMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = JPAHostSystem.build();
         super.setUp();
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 044f70a..fef6ad7 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         super.setUp();
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index e02e440..49d613e 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 2e71729..0166c04 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index a942095..217baa9 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 4000b20..bb39b3a 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 11cc901..7fa3fdc 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 6a1c07a..0216bf8 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 9b01128..5cdb7a1 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 9766626..7cbc9c1 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 1613068..0875ba5 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 463ca8c..5625068 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 1a7ed96..7a8823d 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index d546b88..75ec5d4 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.jpa;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
 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);
+        system = JPAHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 08befdb..9140ec7 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
index 8c64be5..687d493 100644
--- 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
index 13d70af..ef106d6 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneConcurrentSessions extends ConcurrentSessions {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
index bbbb862..783a19d 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Condstore;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class LuceneCondstore extends Condstore {
 
     private JamesImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(JamesImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
index 824a507..c1afef3 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneCopy extends Copy {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
index 3acde0f..9f33405 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneEvents extends Events {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
index b775616..602e89a 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneExpunge extends Expunge {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
index 2e8f2af..d59ca48 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneFetch extends Fetch {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
index bc792ec..8ab91ab 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneFetchBodySection extends FetchBodySection {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
index ac1c0bb..3c4dea9 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneFetchBodyStructure extends FetchBodyStructure {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
index 29a6a63..73f647c 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneFetchHeaders extends FetchHeaders {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
index d551d5c..eaa265b 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneListing extends Listing {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
index 6417687..acf98ff 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneMailboxAnnotation extends MailboxAnnotation {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
index 01d4816..d4bab5d 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
@@ -20,14 +20,12 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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("MAILBOX-300 JPA should fail gracefully when too long mailbox name")
 public class LuceneMailboxWithLongNameError extends MailboxWithLongNameError {
 
@@ -35,8 +33,7 @@ public class LuceneMailboxWithLongNameError extends MailboxWithLongNameError {
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
index 37172ba..0ee9ed6 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneMove extends Move {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
index c5ea83a..8844b43 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneNonAuthenticatedState extends NonAuthenticatedState {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
index c669794..fc1fc52 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LucenePartialFetch extends PartialFetch {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
index 393e73d..7539692 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneQuotaTest extends QuotaTest {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
index d19e85c..fd99bfb 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneRename extends Rename {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
index ea12d30..5ba61db 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 LuceneSearch extends Search {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }


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