james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [10/15] james-project git commit: PROTOCOLS-117 General fixes: Most MPT tests do not need Guice
Date Fri, 03 Nov 2017 12:27:33 GMT
PROTOCOLS-117 General fixes: Most MPT tests do not need Guice


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

Branch: refs/heads/master
Commit: deefc33a73056f434b132fedff670749ccc69b70
Parents: 4e74c7c
Author: benwa <btellier@linagora.com>
Authored: Thu Nov 2 17:40:59 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Fri Nov 3 15:48:40 2017 +0700

----------------------------------------------------------------------
 .../ElasticSearchMailboxTestModule.java         | 33 --------------
 .../ElasticSearchUidSearchOnIndex.java          |  7 +--
 .../hbase/HBaseAuthenticatePlain.java           |  7 +--
 .../hbase/HBaseAuthenticatedState.java          |  7 +--
 .../hbase/HBaseConcurrentSessions.java          |  7 +--
 .../mpt/imapmailbox/hbase/HBaseCondstore.java   |  7 +--
 .../james/mpt/imapmailbox/hbase/HBaseCopy.java  |  7 +--
 .../mpt/imapmailbox/hbase/HBaseEvents.java      |  7 +--
 .../mpt/imapmailbox/hbase/HBaseExpunge.java     |  7 +--
 .../james/mpt/imapmailbox/hbase/HBaseFetch.java |  7 +--
 .../hbase/HBaseFetchBodySection.java            |  7 +--
 .../hbase/HBaseFetchBodyStructure.java          |  7 +--
 .../imapmailbox/hbase/HBaseFetchHeaders.java    |  7 +--
 .../mpt/imapmailbox/hbase/HBaseListing.java     |  7 +--
 .../hbase/HBaseMailboxAnnotation.java           |  7 +--
 .../hbase/HBaseMailboxTestModule.java           | 45 --------------------
 .../hbase/HBaseMailboxWithLongNameError.java    |  7 +--
 .../james/mpt/imapmailbox/hbase/HBaseMove.java  |  7 +--
 .../hbase/HBaseNonAuthenticatedState.java       |  7 +--
 .../imapmailbox/hbase/HBasePartialFetch.java    |  7 +--
 .../mpt/imapmailbox/hbase/HBaseQuotaTest.java   |  7 +--
 .../mpt/imapmailbox/hbase/HBaseRename.java      |  7 +--
 .../mpt/imapmailbox/hbase/HBaseSearch.java      |  7 +--
 .../mpt/imapmailbox/hbase/HBaseSecurity.java    |  7 +--
 .../mpt/imapmailbox/hbase/HBaseSelect.java      |  7 +--
 .../imapmailbox/hbase/HBaseSelectedInbox.java   |  7 +--
 .../imapmailbox/hbase/HBaseSelectedState.java   |  7 +--
 .../mpt/imapmailbox/hbase/HBaseUidSearch.java   |  7 +--
 .../hbase/HBaseUidSearchOnIndex.java            |  7 +--
 .../hbase/HBaseUserFlagsSupport.java            |  7 +--
 .../inmemory/InMemoryAuthenticatePlain.java     |  7 +--
 .../inmemory/InMemoryAuthenticatedState.java    |  7 +--
 .../inmemory/InMemoryConcurrentSessions.java    |  7 +--
 .../imapmailbox/inmemory/InMemoryCondstore.java |  7 +--
 .../mpt/imapmailbox/inmemory/InMemoryCopy.java  |  7 +--
 .../imapmailbox/inmemory/InMemoryEvents.java    |  7 +--
 .../imapmailbox/inmemory/InMemoryExpunge.java   |  7 +--
 .../mpt/imapmailbox/inmemory/InMemoryFetch.java |  7 +--
 .../inmemory/InMemoryFetchBodySection.java      |  7 +--
 .../inmemory/InMemoryFetchBodyStructure.java    |  7 +--
 .../inmemory/InMemoryFetchHeaders.java          |  7 +--
 .../imapmailbox/inmemory/InMemoryListing.java   |  7 +--
 .../InMemoryListingWithSharingTest.java         |  7 +--
 .../inmemory/InMemoryMailboxAnnotation.java     |  7 +--
 .../inmemory/InMemoryMailboxTestModule.java     | 44 -------------------
 .../InMemoryMailboxWithLongNameSuccess.java     |  7 +--
 .../mpt/imapmailbox/inmemory/InMemoryMove.java  |  7 +--
 .../inmemory/InMemoryNonAuthenticatedState.java |  7 +--
 .../inmemory/InMemoryPartialFetch.java          |  7 +--
 .../imapmailbox/inmemory/InMemoryQuotaTest.java |  7 +--
 .../imapmailbox/inmemory/InMemoryRename.java    |  7 +--
 .../imapmailbox/inmemory/InMemorySearch.java    |  7 +--
 .../imapmailbox/inmemory/InMemorySecurity.java  |  7 +--
 .../imapmailbox/inmemory/InMemorySelect.java    |  7 +--
 .../inmemory/InMemorySelectedInbox.java         |  7 +--
 .../inmemory/InMemorySelectedState.java         |  7 +--
 .../imapmailbox/inmemory/InMemoryUidSearch.java |  7 +--
 .../inmemory/InMemoryUidSearchOnIndex.java      |  7 +--
 .../inmemory/InMemoryUserFlagsSupport.java      |  7 +--
 .../imapmailbox/jpa/JpaAuthenticatePlain.java   |  7 +--
 .../imapmailbox/jpa/JpaAuthenticatedState.java  |  7 +--
 .../imapmailbox/jpa/JpaConcurrentSessions.java  |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaCondstore.java |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaCopy.java      |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaEvents.java    |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaExpunge.java   |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaFetch.java     |  7 +--
 .../imapmailbox/jpa/JpaFetchBodySection.java    |  7 +--
 .../imapmailbox/jpa/JpaFetchBodyStructure.java  |  7 +--
 .../mpt/imapmailbox/jpa/JpaFetchHeaders.java    |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaListing.java   |  7 +--
 .../imapmailbox/jpa/JpaMailboxAnnotation.java   |  7 +--
 .../imapmailbox/jpa/JpaMailboxTestModule.java   | 44 -------------------
 .../jpa/JpaMailboxWithLongNameError.java        |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaMove.java      |  7 +--
 .../jpa/JpaNonAuthenticatedState.java           |  7 +--
 .../mpt/imapmailbox/jpa/JpaPartialFetch.java    |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaQuotaTest.java |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaRename.java    |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaSearch.java    |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaSecurity.java  |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaSelect.java    |  7 +--
 .../mpt/imapmailbox/jpa/JpaSelectedInbox.java   |  7 +--
 .../mpt/imapmailbox/jpa/JpaSelectedState.java   |  7 +--
 .../james/mpt/imapmailbox/jpa/JpaUidSearch.java |  7 +--
 .../imapmailbox/jpa/JpaUidSearchOnIndex.java    |  7 +--
 .../imapmailbox/jpa/JpaUserFlagsSupport.java    |  7 +--
 .../lucenesearch/LuceneAuthenticatePlain.java   |  7 +--
 .../lucenesearch/LuceneAuthenticatedState.java  |  7 +--
 .../lucenesearch/LuceneConcurrentSessions.java  |  7 +--
 .../lucenesearch/LuceneCondstore.java           |  7 +--
 .../imapmailbox/lucenesearch/LuceneCopy.java    |  7 +--
 .../imapmailbox/lucenesearch/LuceneEvents.java  |  7 +--
 .../imapmailbox/lucenesearch/LuceneExpunge.java |  7 +--
 .../imapmailbox/lucenesearch/LuceneFetch.java   |  7 +--
 .../lucenesearch/LuceneFetchBodySection.java    |  7 +--
 .../lucenesearch/LuceneFetchBodyStructure.java  |  7 +--
 .../lucenesearch/LuceneFetchHeaders.java        |  7 +--
 .../imapmailbox/lucenesearch/LuceneListing.java |  7 +--
 .../lucenesearch/LuceneMailboxAnnotation.java   |  7 +--
 .../LuceneMailboxWithLongNameError.java         |  7 +--
 .../imapmailbox/lucenesearch/LuceneMove.java    |  7 +--
 .../LuceneNonAuthenticatedState.java            |  7 +--
 .../lucenesearch/LucenePartialFetch.java        |  7 +--
 .../lucenesearch/LuceneQuotaTest.java           |  7 +--
 .../imapmailbox/lucenesearch/LuceneRename.java  |  7 +--
 .../imapmailbox/lucenesearch/LuceneSearch.java  |  7 +--
 .../LuceneSearchMailboxTestModule.java          | 44 -------------------
 .../lucenesearch/LuceneSecurity.java            |  7 +--
 .../imapmailbox/lucenesearch/LuceneSelect.java  |  7 +--
 .../lucenesearch/LuceneSelectedInbox.java       |  7 +--
 .../lucenesearch/LuceneSelectedState.java       |  7 +--
 .../lucenesearch/LuceneUidSearch.java           |  7 +--
 .../lucenesearch/LuceneUidSearchOnIndex.java    |  7 +--
 .../lucenesearch/LuceneUserFlagsSupport.java    |  7 +--
 .../maildir/MaildirAuthenticatePlain.java       |  7 +--
 .../maildir/MaildirAuthenticatedState.java      |  7 +--
 .../maildir/MaildirConcurrentSessions.java      |  7 +--
 .../imapmailbox/maildir/MaildirCondstore.java   |  7 +--
 .../mpt/imapmailbox/maildir/MaildirCopy.java    |  7 +--
 .../mpt/imapmailbox/maildir/MaildirEvents.java  |  7 +--
 .../mpt/imapmailbox/maildir/MaildirExpunge.java |  7 +--
 .../mpt/imapmailbox/maildir/MaildirFetch.java   |  7 +--
 .../maildir/MaildirFetchBodySection.java        |  7 +--
 .../maildir/MaildirFetchBodyStructure.java      |  7 +--
 .../maildir/MaildirFetchHeaders.java            |  7 +--
 .../mpt/imapmailbox/maildir/MaildirListing.java |  7 +--
 .../maildir/MaildirMailboxAnnotation.java       |  7 +--
 .../maildir/MaildirMailboxTestModule.java       | 44 -------------------
 .../MaildirMailboxWithLongNameError.java        |  7 +--
 .../mpt/imapmailbox/maildir/MaildirMove.java    |  7 +--
 .../maildir/MaildirNonAuthenticatedState.java   |  7 +--
 .../maildir/MaildirPartialFetch.java            |  7 +--
 .../imapmailbox/maildir/MaildirQuotaTest.java   |  7 +--
 .../mpt/imapmailbox/maildir/MaildirRename.java  |  7 +--
 .../mpt/imapmailbox/maildir/MaildirSearch.java  |  7 +--
 .../imapmailbox/maildir/MaildirSecurity.java    |  7 +--
 .../mpt/imapmailbox/maildir/MaildirSelect.java  |  7 +--
 .../maildir/MaildirSelectedInbox.java           |  7 +--
 .../maildir/MaildirSelectedState.java           |  7 +--
 .../imapmailbox/maildir/MaildirUidSearch.java   |  7 +--
 .../maildir/MaildirUidSearchOnIndex.java        |  7 +--
 .../maildir/MaildirUserFlagsSupport.java        |  7 +--
 143 files changed, 274 insertions(+), 939 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTestModule.java b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTestModule.java
deleted file mode 100644
index b501f95..0000000
--- a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTestModule.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.mpt.imapmailbox.elasticsearch;
-
-import com.google.inject.AbstractModule;
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.elasticsearch.host.ElasticSearchHostSystem;
-
-public class ElasticSearchMailboxTestModule extends AbstractModule {
-    @Override
-    protected void configure() {
-        bind(ImapHostSystem.class).to(ElasticSearchHostSystem.class);
-        bind(HostSystem.class).to(ElasticSearchHostSystem.class);
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
index caa354e..186ee31 100644
--- a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.elasticsearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.elasticsearch.host.ElasticSearchHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class ElasticSearchUidSearchOnIndex extends UidSearchOnIndex {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new ElasticSearchMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new ElasticSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
index c83847d..06e3114 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseAuthenticatePlain extends AuthenticatePlain {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
index f110e2d..7bbc41a 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseAuthenticatedState extends AuthenticatedState {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
index f518653..4d36596 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseConcurrentSessions extends ConcurrentSessions {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
index 779b414..afeb3cc 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 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 HBaseCondstore extends Condstore {
 
     private JamesImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(JamesImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
index 44235e8..4040237 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Copy;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseCopy extends Copy {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
index 2f86772..dadcd90 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Events;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseEvents extends Events {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
index 548aff5..c8389e5 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Expunge;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseExpunge extends Expunge {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
index 8b37745..d4a7734 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Fetch;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseFetch extends Fetch {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
index e36560c..2ff9068 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseFetchBodySection extends FetchBodySection {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
index a8b7a8f..f900066 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseFetchBodyStructure extends FetchBodyStructure {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
index 9887b71..edcb47b 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseFetchHeaders extends FetchHeaders {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
index a736e70..9b0b9fb 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Listing;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseListing extends Listing {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
index 3b4694b..cd97f66 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseMailboxAnnotation extends MailboxAnnotation {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

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

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
index d933565..18d28e1 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseMailboxWithLongNameError extends MailboxWithLongNameError {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
index 3a1dcbb..54fabed 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Move;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseMove extends Move {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         super.setUp();
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
index 2e065b4..b9f5275 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseNonAuthenticatedState extends NonAuthenticatedState {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
index 6221b57..d417e74 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBasePartialFetch extends PartialFetch {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
index a8a1b57..709e0d2 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseQuotaTest extends QuotaTest {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
index bf38dba..75b309d 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Rename;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseRename extends Rename {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
index 8ee268e..db894ca 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Search;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseSearch extends Search {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
index ba629e9..e5cdf32 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Security;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseSecurity extends Security {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
index e79181a..7de5ae5 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Select;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseSelect extends Select {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
index efbe37f..00e08ee 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseSelectedInbox extends SelectedInbox {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
index 760ce66..da758db 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.SelectedState;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseSelectedState extends SelectedState {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
index f04bdc3..1081dfe 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.UidSearch;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseUidSearch extends UidSearch {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
index c51ded0..98451c0 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseUidSearchOnIndex extends UidSearchOnIndex {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
index 0c7ef3e..349094e 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.hbase;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class HBaseUserFlagsSupport extends UserFlagsSupport {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = HBaseHostSystem.build();
         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/InMemoryAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
index 03d2f72..e05cbd5 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
@@ -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.AuthenticatePlain;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryAuthenticatePlain extends AuthenticatePlain {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
index b21a04a..c25efd8 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
@@ -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.AuthenticatedState;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryAuthenticatedState extends AuthenticatedState {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
index 2185441..5d8ac0f 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
@@ -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.ConcurrentSessions;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryConcurrentSessions extends ConcurrentSessions {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
index 3df824a..f86e1d2 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.inmemory;
 
 import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
 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 InMemoryCondstore extends Condstore {
 
     private JamesImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(JamesImapHostSystem.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/InMemoryCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
index 8113480..bd88aab 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
@@ -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.Copy;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryCopy extends Copy {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
index f1ddc35..ab9cfa6 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
@@ -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.Events;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryEvents extends Events {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
index 5834830..7498a11 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
@@ -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.Expunge;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryExpunge extends Expunge {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
index a71c163..6a01ca1 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
@@ -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.Fetch;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryFetch extends Fetch {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
index 0862752..293de39 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
@@ -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.FetchBodySection;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryFetchBodySection extends FetchBodySection {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
index 61051cc..11b89ab 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
@@ -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.FetchBodyStructure;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryFetchBodyStructure extends FetchBodyStructure {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
index c9209eb..4cd581a 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
@@ -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.FetchHeaders;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryFetchHeaders extends FetchHeaders {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
index b77315d..12b10c0 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
@@ -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.Listing;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryListing extends Listing {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryListingWithSharingTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListingWithSharingTest.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListingWithSharingTest.java
index b5a54ee..e816a45 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListingWithSharingTest.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListingWithSharingTest.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.ListingWithSharingTest;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryListingWithSharingTest extends ListingWithSharingTest {
 
     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/InMemoryMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
index 7235fb2..e19cca1 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
@@ -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.MailboxAnnotation;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 public class InMemoryMailboxAnnotation extends MailboxAnnotation {
 
     private ImapHostSystem system;
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        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/InMemoryMailboxTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTestModule.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTestModule.java
deleted file mode 100644
index 06d70f6..0000000
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTestModule.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.inmemory;
-
-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.inmemory.host.InMemoryHostSystem;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Provides;
-import com.google.inject.Singleton;
-
-public class InMemoryMailboxTestModule extends AbstractModule {
-
-    @Override
-    protected void configure() {
-        bind(HostSystem.class).to(JamesImapHostSystem.class);
-        bind(ImapHostSystem.class).to(JamesImapHostSystem.class);
-    }
-
-    @Provides
-    @Singleton
-    public JamesImapHostSystem provideHostSystem() throws Exception {
-        return InMemoryHostSystem.build();
-    }
-
-}

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/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
index 29dce81..79b1e11 100644
--- 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
@@ -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.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);
+        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/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
index aa834f4..369fc57 100644
--- 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
@@ -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.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);
+        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/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
index 3439a99..c2dbf3f 100644
--- 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
@@ -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.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);
+        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/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
index 339d404..ab8fb46 100644
--- 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
@@ -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.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);
+        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/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
index 1ee0a6d..9bcb076 100644
--- 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
@@ -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.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);
+        system = new InMemoryHostSystem();
         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