Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,53 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.junit.Test;
+
+public class Expunge extends BaseSelectedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public Expunge() throws Exception {
+        super(system);
+    }
+    
+    @Test
+    public void testBasicExpungeUS() throws Exception {
+        scriptTest("ExpungeBasics", Locale.US);
+    }
+    
+    @Test
+    public void testBasicExpungeIT() throws Exception {
+        scriptTest("ExpungeBasics", Locale.ITALY);
+    }
+    
+    @Test
+    public void testBasicExpungeKO() throws Exception {
+        scriptTest("ExpungeBasics", Locale.KOREA);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,158 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.junit.Test;
+
+public class Fetch extends BaseSelectedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public Fetch() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testFetchEnvelopeUS() throws Exception {
+        scriptTest("FetchEnvelope", Locale.US);
+    }
+
+    @Test
+    public void testFetchEnvelopeIT() throws Exception {
+        scriptTest("FetchEnvelope", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchEnvelopeKOREA() throws Exception {
+        scriptTest("FetchEnvelope", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchTextUS() throws Exception {
+        scriptTest("FetchText", Locale.US);
+    }
+
+    @Test
+    public void testFetchBodyNoSectionUS() throws Exception {
+        scriptTest("FetchBodyNoSection", Locale.US);
+    }
+
+    @Test
+    public void testFetchTextIT() throws Exception {
+        scriptTest("FetchText", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchBodyNoSectionIT() throws Exception {
+        scriptTest("FetchBodyNoSection", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchTextKOREA() throws Exception {
+        scriptTest("FetchText", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchBodyNoSectionKOREA() throws Exception {
+        scriptTest("FetchBodyNoSection", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchRFC822US() throws Exception {
+        scriptTest("FetchRFC822", Locale.US);
+    }
+
+    @Test
+    public void testFetchRFC822TextUS() throws Exception {
+        scriptTest("FetchRFC822Text", Locale.US);
+    }
+
+    @Test
+    public void testFetchRFC822HeaderUS() throws Exception {
+        scriptTest("FetchRFC822Header", Locale.US);
+    }
+
+    @Test
+    public void testFetchRFC822KOREA() throws Exception {
+        scriptTest("FetchRFC822", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchRFC822TextKOREA() throws Exception {
+        scriptTest("FetchRFC822Text", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchRFC822HeaderKOREA() throws Exception {
+        scriptTest("FetchRFC822Header", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchRFC822ITALY() throws Exception {
+        scriptTest("FetchRFC822", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchRFC822TextITALY() throws Exception {
+        scriptTest("FetchRFC822Text", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchRFC822HeaderITALY() throws Exception {
+        scriptTest("FetchRFC822Header", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchInternalDateUS() throws Exception {
+        scriptTest("FetchInternalDate", Locale.US);
+    }
+
+    @Test
+    public void testFetchInternalDateITALY() throws Exception {
+        scriptTest("FetchInternalDate", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchInternalDateKOREA() throws Exception {
+        scriptTest("FetchInternalDate", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchFetchRfcMixedUS() throws Exception {
+        scriptTest("FetchRFC822Mixed", Locale.US);
+    }
+
+    @Test
+    public void testFetchFetchRfcMixedKOREA() throws Exception {
+        scriptTest("FetchRFC822Mixed", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchFetchRfcMixedITALY() throws Exception {
+        scriptTest("FetchRFC822Mixed", Locale.ITALY);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,83 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.junit.Test;
+
+public class FetchBodySection extends BaseSelectedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public FetchBodySection() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testFetchMultipartAlternativeUS() throws Exception {
+        scriptTest("FetchMultipartAlternative", Locale.US);
+    }
+
+    @Test
+    public void testFetchMultipartAlternativeITALY() throws Exception {
+        scriptTest("FetchMultipartAlternative", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchMultipartAlternativeKOREA() throws Exception {
+        scriptTest("FetchMultipartAlternative", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchMultipartMixedUS() throws Exception {
+        scriptTest("FetchMultipartMixed", Locale.US);
+    }
+
+    @Test
+    public void testFetchMultipartMixedITALY() throws Exception {
+        scriptTest("FetchMultipartMixed", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchMultipartMixedKOREA() throws Exception {
+        scriptTest("FetchMultipartMixed", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchMultipartMixedComplexUS() throws Exception {
+        scriptTest("FetchMultipartMixedComplex", Locale.US);
+    }
+
+    @Test
+    public void testFetchMultipartMixedComplexITALY() throws Exception {
+        scriptTest("FetchMultipartMixedComplex", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchMultipartMixedComplexKOREA() throws Exception {
+        scriptTest("FetchMultipartMixedComplex", Locale.KOREA);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,98 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.junit.Test;
+
+public class FetchBodyStructure extends BaseSelectedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public FetchBodyStructure() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testFetchFetchSimpleBodyStructureUS() throws Exception {
+        scriptTest("FetchSimpleBodyStructure", Locale.US);
+    }
+
+    @Test
+    public void testFetchFetchSimpleBodyStructureKOREA() throws Exception {
+        scriptTest("FetchSimpleBodyStructure", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchFetchSimpleBodyStructureITALY() throws Exception {
+        scriptTest("FetchSimpleBodyStructure", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchFetchMultipartBodyStructureUS() throws Exception {
+        scriptTest("FetchMultipartBodyStructure", Locale.US);
+    }
+
+    @Test
+    public void testFetchFetchMultipartBodyStructureKOREA() throws Exception {
+        scriptTest("FetchMultipartBodyStructure", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchFetchMultipartBodyStructureITALY() throws Exception {
+        scriptTest("FetchMultipartBodyStructure", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchStructureEmbeddedUS() throws Exception {
+        scriptTest("FetchStructureEmbedded", Locale.US);
+    }
+
+    @Test
+    public void testFetchStructureEmbeddedITALY() throws Exception {
+        scriptTest("FetchStructureEmbedded", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchStructureEmbeddedKOREA() throws Exception {
+        scriptTest("FetchStructureEmbedded", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchStructureComplexUS() throws Exception {
+        scriptTest("FetchStructureComplex", Locale.US);
+    }
+
+    @Test
+    public void testFetchStructureComplexITALY() throws Exception {
+        scriptTest("FetchStructureComplex", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchStructureComplexKOREA() throws Exception {
+        scriptTest("FetchStructureComplex", Locale.KOREA);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,68 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.junit.Test;
+
+public class FetchHeaders extends BaseSelectedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public FetchHeaders() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testFetchHeaderFieldsUS() throws Exception {
+        scriptTest("FetchHeaderFields", Locale.US);
+    }
+
+    @Test
+    public void testFetchHeaderFieldsITALY() throws Exception {
+        scriptTest("FetchHeaderFields", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchHeaderFieldsKOREA() throws Exception {
+        scriptTest("FetchHeaderFields", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchHeaderFieldsNotUS() throws Exception {
+        scriptTest("FetchHeaderFieldsNot", Locale.US);
+    }
+
+    @Test
+    public void testFetchHeaderFieldsNotITALY() throws Exception {
+        scriptTest("FetchHeaderFieldsNot", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchHeaderFieldsNotKOREA() throws Exception {
+        scriptTest("FetchHeaderFieldsNot", Locale.KOREA);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,68 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.junit.Test;
+
+public class Listing extends BaseAuthenticatedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public Listing() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testListPlusUS() throws Exception {
+        scriptTest("ListPlus", Locale.US);
+    }
+    
+    @Test
+    public void testListPercentWildcardUS() throws Exception {
+        scriptTest("ListPercentWildcard", Locale.US);
+    }
+
+    @Test
+    public void testListPlusKOREA() throws Exception {
+        scriptTest("ListPlus", Locale.KOREA);
+    }
+    
+    @Test
+    public void testListPercentWildcardKOREA() throws Exception {
+        scriptTest("ListPercentWildcard", Locale.KOREA);
+    }
+    
+    @Test
+    public void testListPlusITALY() throws Exception {
+        scriptTest("ListPlus", Locale.ITALY);
+    }
+    
+    @Test
+    public void testListPercentWildcardITALY() throws Exception {
+        scriptTest("ListPercentWildcard", Locale.ITALY);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,143 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseNonAuthenticatedState;
+import org.junit.Test;
+
+public class NonAuthenticatedState extends BaseNonAuthenticatedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public NonAuthenticatedState() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testNoopUS() throws Exception {
+        scriptTest("Noop", Locale.US);
+    }
+
+    @Test
+    public void testLogoutUS() throws Exception {
+        scriptTest("Logout", Locale.US);
+    }
+
+    @Test
+    public void testCapabilityUS() throws Exception {
+        scriptTest("Capability", Locale.US);
+    }
+
+    @Test
+    public void testLoginUS() throws Exception {
+        scriptTest("Login", Locale.US);
+    }
+
+    @Test
+    public void testValidAuthenticatedUS() throws Exception {
+        scriptTest("ValidAuthenticated", Locale.US);
+    }
+
+    @Test
+    public void testValidSelectedUS() throws Exception {
+        scriptTest("ValidSelected", Locale.US);
+    }
+
+    @Test
+    public void testAuthenticateUS() throws Exception {
+        scriptTest("Authenticate", Locale.US);
+    }
+
+    @Test
+    public void testNoopITALY() throws Exception {
+        scriptTest("Noop", Locale.ITALY);
+    }
+
+    @Test
+    public void testLogoutITALY() throws Exception {
+        scriptTest("Logout", Locale.ITALY);
+    }
+
+    @Test
+    public void testCapabilityITALY() throws Exception {
+        scriptTest("Capability", Locale.ITALY);
+    }
+
+    @Test
+    public void testLoginITALY() throws Exception {
+        scriptTest("Login", Locale.ITALY);
+    }
+
+    @Test
+    public void testValidAuthenticatedITALY() throws Exception {
+        scriptTest("ValidAuthenticated", Locale.ITALY);
+    }
+
+    @Test
+    public void testValidSelectedITALY() throws Exception {
+        scriptTest("ValidSelected", Locale.ITALY);
+    }
+
+    @Test
+    public void testAuthenticateITALY() throws Exception {
+        scriptTest("Authenticate", Locale.ITALY);
+    }
+
+    @Test
+    public void testNoopKOREA() throws Exception {
+        scriptTest("Noop", Locale.KOREA);
+    }
+
+    @Test
+    public void testLogoutKOREA() throws Exception {
+        scriptTest("Logout", Locale.KOREA);
+    }
+
+    @Test
+    public void testCapabilityKOREA() throws Exception {
+        scriptTest("Capability", Locale.KOREA);
+    }
+
+    @Test
+    public void testLoginKOREA() throws Exception {
+        scriptTest("Login", Locale.KOREA);
+    }
+
+    @Test
+    public void testValidAuthenticatedKOREA() throws Exception {
+        scriptTest("ValidAuthenticated", Locale.KOREA);
+    }
+
+    @Test
+    public void testValidSelectedKOREA() throws Exception {
+        scriptTest("ValidSelected", Locale.KOREA);
+    }
+
+    @Test
+    public void testAuthenticateKOREA() throws Exception {
+        scriptTest("Authenticate", Locale.KOREA);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,98 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.junit.Test;
+
+public class PartialFetch extends BaseSelectedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public PartialFetch() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testBodyPartialFetchUS() throws Exception {
+        scriptTest("BodyPartialFetch", Locale.US);
+    }
+
+    @Test
+    public void testBodyPartialFetchIT() throws Exception {
+        scriptTest("BodyPartialFetch", Locale.ITALY);
+    }
+
+    @Test
+    public void testBodyPartialFetchKO() throws Exception {
+        scriptTest("BodyPartialFetch", Locale.KOREA);
+    }
+
+    @Test
+    public void testTextPartialFetchUS() throws Exception {
+        scriptTest("TextPartialFetch", Locale.US);
+    }
+
+    @Test
+    public void testTextPartialFetchKO() throws Exception {
+        scriptTest("TextPartialFetch", Locale.US);
+    }
+
+    @Test
+    public void testTextPartialFetchIT() throws Exception {
+        scriptTest("TextPartialFetch", Locale.US);
+    }
+
+    @Test
+    public void testMimePartialFetchUS() throws Exception {
+        scriptTest("MimePartialFetch", Locale.US);
+    }
+
+    @Test
+    public void testMimePartialFetchIT() throws Exception {
+        scriptTest("MimePartialFetch", Locale.ITALY);
+    }
+
+    @Test
+    public void testMimePartialFetchKO() throws Exception {
+        scriptTest("MimePartialFetch", Locale.KOREA);
+    }
+
+    @Test
+    public void testHeaderPartialFetchUS() throws Exception {
+        scriptTest("HeaderPartialFetch", Locale.US);
+    }
+
+    @Test
+    public void testHeaderPartialFetchIT() throws Exception {
+        scriptTest("HeaderPartialFetch", Locale.ITALY);
+    }
+
+    @Test
+    public void testHeaderPartialFetchKO() throws Exception {
+        scriptTest("HeaderPartialFetch", Locale.KOREA);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,83 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.junit.Test;
+
+public class Rename extends BaseSelectedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public Rename() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testRenameUS() throws Exception {
+        scriptTest("Rename", Locale.US);
+    }
+    
+    @Test
+    public void testRenameKOREA() throws Exception {
+        scriptTest("Rename", Locale.KOREA);
+    }
+
+    @Test
+    public void testRenameITALY() throws Exception {
+        scriptTest("Rename", Locale.ITALY);
+    }
+
+    @Test
+    public void testRenameHierarchyUS() throws Exception {
+        scriptTest("RenameHierarchy", Locale.US);
+    }
+
+    @Test
+    public void testRenameHierarchyKO() throws Exception {
+        scriptTest("RenameHierarchy", Locale.KOREA);
+    }
+
+    @Test
+    public void testRenameHierarchyIT() throws Exception {
+        scriptTest("RenameHierarchy", Locale.ITALY);
+    }
+
+    @Test
+    public void testRenameSelectedUS() throws Exception {
+        scriptTest("RenameSelected", Locale.US);
+    }
+
+    @Test
+    public void testRenameSelectedIT() throws Exception {
+        scriptTest("RenameSelected", Locale.ITALY);
+    }
+
+    @Test
+    public void testRenameSelectedKO() throws Exception {
+        scriptTest("RenameSelected", Locale.KOREA);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,68 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.junit.Test;
+
+public class Search extends BaseAuthenticatedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public Search() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testSearchAtomsUS() throws Exception {
+        scriptTest("SearchAtoms", Locale.US);
+    }
+
+    @Test
+    public void testSearchAtomsITALY() throws Exception {
+        scriptTest("SearchAtoms", Locale.ITALY);
+    }
+
+    @Test
+    public void testSearchAtomsKOREA() throws Exception {
+        scriptTest("SearchAtoms", Locale.KOREA);
+    }
+
+    @Test
+    public void testSearchCombinationsUS() throws Exception {
+        scriptTest("SearchCombinations", Locale.US);
+    }
+
+    @Test
+    public void testSearchCombinationsITALY() throws Exception {
+        scriptTest("SearchCombinations", Locale.ITALY);
+    }
+
+    @Test
+    public void testSearchCombinationsKOREA() throws Exception {
+        scriptTest("SearchCombinations", Locale.KOREA);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,143 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseImapProtocol;
+import org.junit.Test;
+
+public class Security extends BaseImapProtocol {
+
+    @Inject
+    private static HostSystem system;
+    
+    public Security() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testLoginThreeStrikesUS() throws Exception {
+        scriptTest("LoginThreeStrikes", Locale.US);
+    }
+
+    @Test
+    public void testLoginThreeStrikesKOREA() throws Exception {
+        scriptTest("LoginThreeStrikes", Locale.KOREA);
+    }
+
+    @Test
+    public void testLoginThreeStrikesITALY() throws Exception {
+        scriptTest("LoginThreeStrikes", Locale.ITALY);
+    }
+
+    @Test
+    public void testBadTagUS() throws Exception {
+        scriptTest("BadTag", Locale.US);
+    }
+
+    @Test
+    public void testBadTagKOREA() throws Exception {
+        scriptTest("BadTag", Locale.KOREA);
+    }
+
+    @Test
+    public void testBadTagITALY() throws Exception {
+        scriptTest("BadTag", Locale.ITALY);
+    }
+
+    @Test
+    public void testNoTagUS() throws Exception {
+        scriptTest("NoTag", Locale.US);
+    }
+
+    @Test
+    public void testNoTagKOREA() throws Exception {
+        scriptTest("NoTag", Locale.KOREA);
+    }
+
+    @Test
+    public void testNoTagITALY() throws Exception {
+        scriptTest("NoTag", Locale.ITALY);
+    }
+
+    @Test
+    public void testIllegalTagUS() throws Exception {
+        scriptTest("IllegalTag", Locale.US);
+    }
+
+    @Test
+    public void testIllegalTagKOREA() throws Exception {
+        scriptTest("IllegalTag", Locale.KOREA);
+    }
+
+    @Test
+    public void testIllegalTagITALY() throws Exception {
+        scriptTest("IllegalTag", Locale.ITALY);
+    }
+
+    @Test
+    public void testJustTagUS() throws Exception {
+        scriptTest("JustTag", Locale.US);
+    }
+
+    @Test
+    public void testJustTagKOREA() throws Exception {
+        scriptTest("JustTag", Locale.KOREA);
+    }
+
+    @Test
+    public void testJustTagITALY() throws Exception {
+        scriptTest("JustTag", Locale.ITALY);
+    }
+
+    @Test
+    public void testNoCommandUS() throws Exception {
+        scriptTest("NoCommand", Locale.US);
+    }
+
+    @Test
+    public void testNoCommandKOREA() throws Exception {
+        scriptTest("NoCommand", Locale.KOREA);
+    }
+
+    @Test
+    public void testNoCommandITALY() throws Exception {
+        scriptTest("NoCommand", Locale.ITALY);
+    }
+
+    @Test
+    public void testBogusCommandUS() throws Exception {
+        scriptTest("BogusCommand", Locale.US);
+    }
+
+    @Test
+    public void testBogusCommandKOREA() throws Exception {
+        scriptTest("BogusCommand", Locale.KOREA);
+    }
+
+    @Test
+    public void testNoBogusITALY() throws Exception {
+        scriptTest("BogusCommand", Locale.ITALY);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,53 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.junit.Test;
+
+public class Select extends BaseAuthenticatedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public Select() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testSelectUnseenUS() throws Exception {
+        scriptTest("SelectUnseen", Locale.US);
+    }
+
+    @Test
+    public void testSelectUnseenKOREA() throws Exception {
+        scriptTest("SelectUnseen", Locale.KOREA);
+    }
+
+    @Test
+    public void testSelectUnseenITALY() throws Exception {
+        scriptTest("SelectUnseen", Locale.ITALY);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,253 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedInbox;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class SelectedInbox extends BaseSelectedInbox {
+
+    @Inject
+    private static HostSystem system;
+    
+    public SelectedInbox() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testValidNonAuthenticatedUS() throws Exception {
+        scriptTest("ValidNonAuthenticated", Locale.US);
+    }
+
+    @Test
+    public void testCapabilityUS() throws Exception {
+        scriptTest("Capability", Locale.US);
+    }
+
+    @Test
+    public void testNoopUS() throws Exception {
+        scriptTest("Noop", Locale.US);
+    }
+
+    @Test
+    public void testLogoutUS() throws Exception {
+        scriptTest("Logout", Locale.US);
+    }
+
+    @Test
+    public void testCreateUS() throws Exception {
+        scriptTest("Create", Locale.US);
+    }
+
+    @Test
+    public void testExamineEmptyUS() throws Exception {
+        scriptTest("ExamineEmpty", Locale.US);
+    }
+
+    @Test
+    public void testSelectEmptyUS() throws Exception {
+        scriptTest("SelectEmpty", Locale.US);
+    }
+
+    @Test
+    public void testListNamespaceUS() throws Exception {
+        scriptTest("ListNamespace", Locale.US);
+    }
+
+    @Test
+    public void testListMailboxesUS() throws Exception {
+        scriptTest("ListMailboxes", Locale.US);
+    }
+
+    @Test
+    public void testStatusUS() throws Exception {
+        scriptTest("Status", Locale.US);
+    }
+
+    @Test
+    public void testStringArgsUS() throws Exception {
+        scriptTest("StringArgs", Locale.US);
+    }
+
+    @Ignore("JWC-132 : MPT subscription related test do not pass")
+    @Test
+    public void testSubscribeUS() throws Exception {
+        scriptTest("Subscribe", Locale.US);
+    }
+
+    @Test
+    public void testAppendUS() throws Exception {
+        scriptTest("Append", Locale.US);
+    }
+
+    @Test
+    public void testDeleteUS() throws Exception {
+        scriptTest("Delete", Locale.US);
+    }
+
+    @Test
+    public void testValidNonAuthenticatedITALY() throws Exception {
+        scriptTest("ValidNonAuthenticated", Locale.ITALY);
+    }
+
+    @Test
+    public void testCapabilityITALY() throws Exception {
+        scriptTest("Capability", Locale.ITALY);
+    }
+
+    @Test
+    public void testNoopITALY() throws Exception {
+        scriptTest("Noop", Locale.ITALY);
+    }
+
+    @Test
+    public void testLogoutITALY() throws Exception {
+        scriptTest("Logout", Locale.ITALY);
+    }
+
+    @Test
+    public void testCreateITALY() throws Exception {
+        scriptTest("Create", Locale.ITALY);
+    }
+    
+    @Test
+    public void testExamineEmptyITALY() throws Exception {
+        scriptTest("ExamineEmpty", Locale.ITALY);
+    }
+
+    @Test
+    public void testSelectEmptyITALY() throws Exception {
+        scriptTest("SelectEmpty", Locale.ITALY);
+    }
+
+    @Test
+    public void testListNamespaceITALY() throws Exception {
+        scriptTest("ListNamespace", Locale.ITALY);
+    }
+
+    @Test
+    public void testListMailboxesITALY() throws Exception {
+        scriptTest("ListMailboxes", Locale.ITALY);
+    }
+
+    @Test
+    public void testStatusITALY() throws Exception {
+        scriptTest("Status", Locale.ITALY);
+    }
+
+    @Test
+    public void testStringArgsITALY() throws Exception {
+        scriptTest("StringArgs", Locale.ITALY);
+    }
+
+    @Ignore("JWC-132 : MPT subscription related test do not pass")
+    @Test
+    public void testSubscribeITALY() throws Exception {
+        scriptTest("Subscribe", Locale.ITALY);
+    }
+
+    @Test
+    public void testAppendITALY() throws Exception {
+        scriptTest("Append", Locale.ITALY);
+    }
+
+    @Test
+    public void testDeleteITALY() throws Exception {
+        scriptTest("Delete", Locale.ITALY);
+    }
+
+    @Test
+    public void testValidNonAuthenticatedKOREA() throws Exception {
+        scriptTest("ValidNonAuthenticated", Locale.KOREA);
+    }
+
+    @Test
+    public void testCapabilityKOREA() throws Exception {
+        scriptTest("Capability", Locale.KOREA);
+    }
+
+    @Test
+    public void testNoopKOREA() throws Exception {
+        scriptTest("Noop", Locale.KOREA);
+    }
+
+    @Test
+    public void testLogoutKOREA() throws Exception {
+        scriptTest("Logout", Locale.KOREA);
+    }
+
+    @Test
+    public void testCreateKOREA() throws Exception {
+        scriptTest("Create", Locale.KOREA);
+    }
+
+    @Test
+    public void testExamineEmptyKOREA() throws Exception {
+        scriptTest("ExamineEmpty", Locale.KOREA);
+    }
+
+    @Test
+    public void testSelectEmptyKOREA() throws Exception {
+        scriptTest("SelectEmpty", Locale.KOREA);
+    }
+
+    @Test
+    public void testListNamespaceKOREA() throws Exception {
+        scriptTest("ListNamespace", Locale.KOREA);
+    }
+
+    @Test
+    public void testListMailboxesKOREA() throws Exception {
+        scriptTest("ListMailboxes", Locale.KOREA);
+    }
+
+    @Test
+    public void testStatusKOREA() throws Exception {
+        scriptTest("Status", Locale.KOREA);
+    }
+
+    @Test
+    public void testStringArgsKOREA() throws Exception {
+        scriptTest("StringArgs", Locale.KOREA);
+    }
+
+    @Ignore("JWC-132 : MPT subscription related test do not pass")
+    @Test
+    public void testSubscribeKOREA() throws Exception {
+        scriptTest("Subscribe", Locale.KOREA);
+    }
+
+    @Test
+    public void testAppendKOREA() throws Exception {
+        scriptTest("Append", Locale.KOREA);
+    }
+
+    @Test
+    public void testDeleteKOREA() throws Exception {
+        scriptTest("Delete", Locale.KOREA);
+    }
+
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,188 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.junit.Test;
+
+public class SelectedState extends BaseSelectedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public SelectedState() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testCheckUS() throws Exception {
+        scriptTest("Check", Locale.US);
+    }
+
+    @Test
+    public void testExpungeUS() throws Exception {
+        scriptTest("Expunge", Locale.US);
+    }
+
+    @Test
+    public void testSearchUS() throws Exception {
+        scriptTest("Search", Locale.US);
+    }
+
+    @Test
+    public void testFetchSingleMessageUS() throws Exception {
+        scriptTest("FetchSingleMessage", Locale.US);
+    }
+
+    @Test
+    public void testFetchMultipleMessagesUS() throws Exception {
+        scriptTest("FetchMultipleMessages", Locale.US);
+    }
+
+    @Test
+    public void testFetchPeekUS() throws Exception {
+        scriptTest("FetchPeek", Locale.US);
+    }
+
+    @Test
+    public void testStoreUS() throws Exception {
+        scriptTest("Store", Locale.US);
+    }
+
+    @Test
+    public void testCopyUS() throws Exception {
+        scriptTest("Copy", Locale.US);
+    }
+
+    @Test
+    public void testUidUS() throws Exception {
+        scriptTest("Uid", Locale.US);
+    }
+
+    @Test
+    public void testCheckITALY() throws Exception {
+        scriptTest("Check", Locale.ITALY);
+    }
+
+    @Test
+    public void testExpungeITALY() throws Exception {
+        scriptTest("Expunge", Locale.ITALY);
+    }
+
+    @Test
+    public void testSearchITALY() throws Exception {
+        scriptTest("Search", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchSingleMessageITALY() throws Exception {
+        scriptTest("FetchSingleMessage", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchMultipleMessagesITALY() throws Exception {
+        scriptTest("FetchMultipleMessages", Locale.ITALY);
+    }
+
+    @Test
+    public void testFetchPeekITALY() throws Exception {
+        scriptTest("FetchPeek", Locale.ITALY);
+    }
+
+    @Test
+    public void testStoreITALY() throws Exception {
+        scriptTest("Store", Locale.ITALY);
+    }
+
+    @Test
+    public void testCopyITALY() throws Exception {
+        scriptTest("Copy", Locale.ITALY);
+    }
+
+    @Test
+    public void testUidITALY() throws Exception {
+        scriptTest("Uid", Locale.ITALY);
+    }
+
+    @Test
+    public void testCheckKOREA() throws Exception {
+        scriptTest("Check", Locale.KOREA);
+    }
+
+    @Test
+    public void testExpungeKOREA() throws Exception {
+        scriptTest("Expunge", Locale.KOREA);
+    }
+
+    @Test
+    public void testSearchKOREA() throws Exception {
+        scriptTest("Search", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchSingleMessageKOREA() throws Exception {
+        scriptTest("FetchSingleMessage", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchMultipleMessagesKOREA() throws Exception {
+        scriptTest("FetchMultipleMessages", Locale.KOREA);
+    }
+
+    @Test
+    public void testFetchPeekKOREA() throws Exception {
+        scriptTest("FetchPeek", Locale.KOREA);
+    }
+
+    @Test
+    public void testStoreKOREA() throws Exception {
+        scriptTest("Store", Locale.KOREA);
+    }
+
+    @Test
+    public void testCopyKOREA() throws Exception {
+        scriptTest("Copy", Locale.KOREA);
+    }
+
+    @Test
+    public void testUidKOREA() throws Exception {
+        scriptTest("Uid", Locale.KOREA);
+    }
+    
+    @Test
+    public void testNamespaceUS() throws Exception {
+        scriptTest("Namespace", Locale.US);
+    }
+
+    @Test
+    public void testNamespaceITALY() throws Exception {
+        scriptTest("Namespace", Locale.ITALY);
+    }
+    
+    @Test
+    public void testNamespaceKOREA() throws Exception {
+        scriptTest("Namespace", Locale.KOREA);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,69 @@
+/****************************************************************
+ * 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.suite;
+
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.junit.Test;
+
+public class UidSearch extends BaseAuthenticatedState {
+
+    @Inject
+    private static HostSystem system;
+    
+    public UidSearch() throws Exception {
+        super(system);
+    }
+
+    @Test
+    public void testSearchAtomsUS() throws Exception {
+        scriptTest("UidSearchAtoms", Locale.US);
+    }
+
+    @Test
+    public void testSearchAtomsITALY() throws Exception {
+        scriptTest("UidSearchAtoms", Locale.ITALY);
+    }
+
+    @Test
+    public void testSearchAtomsKOREA() throws Exception {
+        scriptTest("UidSearchAtoms", Locale.KOREA);
+    }
+
+    @Test
+    public void testSearchCombinationsUS() throws Exception {
+        scriptTest("UidSearchCombinations", Locale.US);
+    }
+
+    @Test
+    public void testSearchCombinationsITALY() throws Exception {
+        scriptTest("UidSearchCombinations", Locale.ITALY);
+    }
+
+    @Test
+    public void testSearchCombinationsKOREA() throws Exception {
+        scriptTest("UidSearchCombinations", Locale.KOREA);
+    }
+}
+

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseAuthenticatedState.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseAuthenticatedState.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseAuthenticatedState.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseAuthenticatedState.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,85 @@
+/****************************************************************
+ * 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.suite.base;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.junit.Before;
+
+/**
+ * <p>
+ * Runs tests for commands valid in the AUTHENTICATED state. A login session
+ * precedes the execution of the test elements.
+ * </p>
+ * <p>
+ * Suggested tests:
+ * </p>
+ * <ul>
+ * <li>ValidSelected</li>
+ * <li>ValidNonAuthenticated</li>
+ * <li>Capability</li>
+ * <li>Noop</li>
+ * <li>Logout</li>
+ * <li>AppendExamineInbox</li>
+ * <li>AppendSelectInbox</li>
+ * <li>Create</li>
+ * <li>ExamineEmpty</li>
+ * <li>SelectEmpty</li>
+ * <li>ListNamespace</li>
+ * <li>ListMailboxes</li>
+ * <li>Status</li>
+ * <li>Subscribe</li>
+ * <li>Delete</li>
+ * <li>Append</li>
+ * <li>Compound:
+ * <ul>
+ * <li>AppendExpunge</li>
+ * <li>SelectAppend</li>
+ * <li>StringArgs</li>
+ * </ul>
+ * </li>
+ * </ul>
+ * </p>
+ */
+public class BaseAuthenticatedState extends
+        BaseImapProtocol implements ImapTestConstants {
+    public BaseAuthenticatedState(HostSystem hostSystem) throws Exception {
+        super(hostSystem);
+    }
+
+    /**
+     * Sets up {@link #preElements} with a welcome message and login
+     * request/response.
+     * 
+     * @throws Exception
+     */
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+        addTestFile("Welcome.test", preElements);
+        addLogin(USER, PASSWORD);
+    }
+
+    protected void addLogin(String username, String password) {
+        preElements.CL("a001 LOGIN " + username + " " + password);
+        preElements.SL("a001 OK LOGIN completed.",
+                "AbstractTestForAuthenticatedState.java:53");
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseImapProtocol.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseImapProtocol.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseImapProtocol.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseImapProtocol.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,34 @@
+/****************************************************************
+ * 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.suite.base;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.script.AbstractSimpleScriptedTestProtocol;
+
+/**
+ * Specialise the protocol test framework for IMAP.
+ */
+public class BaseImapProtocol extends AbstractSimpleScriptedTestProtocol 
implements ImapTestConstants {
+
+    public BaseImapProtocol(final HostSystem hostSystem) throws Exception {
+        super(hostSystem, USER, PASSWORD, "/org/apache/james/imap/scripts/");
+    }
+
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseNonAuthenticatedState.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseNonAuthenticatedState.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseNonAuthenticatedState.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseNonAuthenticatedState.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,59 @@
+/****************************************************************
+ * 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.suite.base;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.junit.Before;
+
+/**
+ * <p>
+ * Runs tests for commands valid in the NON_AUTHENTICATED state. A welcome
+ * message precedes the execution of the test elements.
+ * </p>
+ * <p>
+ * Recommended test scripts:
+ * </p>
+ * <ul>
+ * <li>ValidAuthenticated</li>
+ * <li>ValidSelected</li>
+ * <li>Capability</li>
+ * <li>Noop</li>
+ * <li>Logout</li>
+ * <li>Authenticate</li>
+ * <li>Login</li>
+ * </ul>
+ */
+public class BaseNonAuthenticatedState extends BaseImapProtocol {
+    public BaseNonAuthenticatedState(HostSystem system) throws Exception {
+        super(system);
+    }
+
+    /**
+     * Adds a welcome message to the {@link #preElements}.
+     * 
+     * @throws Exception
+     */
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+
+        addTestFile("Welcome.test", preElements);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedInbox.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedInbox.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedInbox.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedInbox.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,75 @@
+/****************************************************************
+ * 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.suite.base;
+
+import org.apache.james.mpt.api.HostSystem;
+
+/**
+ * <p>
+ * Tests commands which are valid in AUTHENTICATED and NONAUTHENTICATED by
+ * running them in the SELECTED state. Many commands function identically, 
while
+ * others are invalid in this state.
+ * </p>
+ * <p>
+ * Recommended scripts:
+ * </p>
+ * <ul>
+ * <li>ValidNonAuthenticated</li>
+ * <li>Capability</li>
+ * <li>Noop</li>
+ * <li>Logout</li>
+ * <li>Create</li>
+ * <li>ExamineEmpty</li>
+ * <li>SelectEmpty</li>
+ * <li>ListNamespace</li>
+ * <li>ListMailboxes</li>
+ * <li>Status</li>
+ * <li>StringArgs</li>
+ * <li>Subscribe</li>
+ * <li>Append</li>
+ * <li>Delete</li>
+ * </ul>
+ * 
+ * @author Darrell DeBoer <darr...@apache.org>
+ * 
+ * @version $Revision: 560719 $
+ */
+public class BaseSelectedInbox extends BaseAuthenticatedState {
+    public BaseSelectedInbox(HostSystem system) throws Exception {
+        super(system);
+    }
+
+    /**
+     * Superclass sets up welcome message and login session in
+     * {@link #preElements}. A "SELECT INBOX" session is then added to these
+     * elements.
+     * 
+     * @throws Exception
+     */
+    public void setUp() throws Exception {
+        super.setUp();
+        addTestFile("SelectInbox.test", preElements);
+    }
+
+    protected void addCloseInbox() {
+        postElements.CL("a CLOSE");
+        postElements.SL(".*", "AbstractBaseTestSelectedInbox.java:76");
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedState.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedState.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedState.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedState.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,64 @@
+/****************************************************************
+ * 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.suite.base;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.junit.Before;
+
+/**
+ * <p>
+ * Runs tests for commands valid only in the SELECTED state. A login session 
and
+ * setup of a "seleted" mailbox precedes the execution of the test elements.
+ * </p>
+ * <p>
+ * Recommended scripts:
+ * </p>
+ * <ul>
+ * <li>Check"</li>
+ * <li>Expunge"</li>
+ * <li>Search"</li>
+ * <li>FetchSingleMessage"</li>
+ * <li>FetchMultipleMessages"</li>
+ * <li>FetchPeek"</li>
+ * <li>Store"</li>
+ * <li>Copy"</li>
+ * <li>Uid"</li>
+ * </ul>
+ */
+public class BaseSelectedState extends BaseAuthenticatedState {
+    
+    public BaseSelectedState(HostSystem system) throws Exception {
+        super(system);
+    }
+
+    /**
+     * Superclass sets up welcome message and login session in
+     * {@link #preElements}. A "SELECT INBOX" session is then added to these
+     * elements.
+     * 
+     * @throws Exception
+     */
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+        addTestFile("SelectedStateSetup.test", preElements);
+        addTestFile("SelectedStateCleanup.test", postElements);
+    }
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/session/ImapSessionImpl.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/session/ImapSessionImpl.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/session/ImapSessionImpl.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/session/ImapSessionImpl.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,140 @@
+/****************************************************************
+ * 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.session;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.james.imap.api.ImapSessionState;
+import org.apache.james.imap.api.process.ImapLineHandler;
+import org.apache.james.imap.api.process.ImapSession;
+import org.apache.james.imap.api.process.SelectedMailbox;
+import org.slf4j.Logger;
+
+public class ImapSessionImpl implements ImapSession {
+
+    private ImapSessionState state = ImapSessionState.NON_AUTHENTICATED;
+
+    private SelectedMailbox selectedMailbox = null;
+
+    private final Map<String, Object> attributesByKey;
+
+    private Logger log;
+
+    public ImapSessionImpl(Logger log) {
+        this.attributesByKey = new ConcurrentHashMap<String, Object>();
+        this.log = log;
+    }
+
+    public void logout() {
+        closeMailbox();
+        state = ImapSessionState.LOGOUT;
+    }
+
+    public void authenticated() {
+        this.state = ImapSessionState.AUTHENTICATED;
+    }
+
+    public void deselect() {
+        this.state = ImapSessionState.AUTHENTICATED;
+        closeMailbox();
+    }
+
+    public void selected(SelectedMailbox mailbox) {
+        this.state = ImapSessionState.SELECTED;
+        closeMailbox();
+        this.selectedMailbox = mailbox;
+    }
+
+    public SelectedMailbox getSelected() {
+        return this.selectedMailbox;
+    }
+
+    public ImapSessionState getState() {
+        return this.state;
+    }
+
+    public void closeMailbox() {
+        if (selectedMailbox != null) {
+            selectedMailbox.deselect();
+            selectedMailbox = null;
+        }
+    }
+
+    public Object getAttribute(String key) {
+        final Object result = attributesByKey.get(key);
+        return result;
+    }
+
+    public void setAttribute(String key, Object value) {
+        if (value == null) {
+            attributesByKey.remove(key);
+        }
+        else {
+            attributesByKey.put(key, value);
+        }
+    }
+
+    public Logger getLog() {
+        return log;
+    }
+
+    public boolean startTLS() {
+        return false;
+    }
+
+    public boolean supportStartTLS() {
+        return false;
+    }
+
+    public boolean isCompressionSupported() {
+        return false;
+    }
+
+    public boolean startCompression() {
+        return false;
+    }
+
+    public void pushLineHandler(ImapLineHandler lineHandler) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void popLineHandler() {
+        // TODO Auto-generated method stub
+
+    }
+
+    public boolean isPlainAuthDisallowed() {
+        return false;
+    }
+
+    public boolean isTLSActive() {
+        return false;
+    }
+
+    public boolean supportMultipleNamespaces() {
+        return false;
+    }
+
+    public boolean isCompressionActive() {
+        return false;
+    }
+
+}

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/user/InMemoryMailboxUserManager.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/user/InMemoryMailboxUserManager.java?rev=1682367&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/user/InMemoryMailboxUserManager.java
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/user/InMemoryMailboxUserManager.java
 Fri May 29 05:16:50 2015
@@ -0,0 +1,103 @@
+/****************************************************************
+ * 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.user;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.james.mailbox.MailboxSession;
+import org.apache.james.mailbox.SubscriptionManager;
+import org.apache.james.mailbox.exception.SubscriptionException;
+
+/**
+ * Stores users in memory.
+ */
+public class InMemoryMailboxUserManager implements SubscriptionManager {
+
+    private final Map<String, MailboxUser> users;
+
+    public InMemoryMailboxUserManager() {
+        this.users = new HashMap<String, MailboxUser>();
+    }
+
+    public boolean isAuthentic(String userid, CharSequence password) {
+        MailboxUser user = (MailboxUser) users.get(userid);
+        final boolean result;
+        if (user == null) {
+            result = false;
+        } else {
+            result = user.isPassword(password);
+        }
+        return result;
+    }
+
+    public void subscribe(MailboxSession session, String mailbox)
+            throws SubscriptionException {
+        MailboxSession.User u = session.getUser();
+        MailboxUser user = (MailboxUser) users.get(u.getUserName());
+        if (user == null) {
+            user = new MailboxUser(u.getUserName());
+            users.put(u.getUserName(), user);
+        }
+        user.addSubscription(mailbox);
+    }
+
+    public Collection<String> 
subscriptions(org.apache.james.mailbox.MailboxSession session) throws 
SubscriptionException {
+        MailboxSession.User u = session.getUser();
+        MailboxUser user = (MailboxUser) users.get(u.getUserName());
+        if (user == null) {
+            user = new MailboxUser(u.getUserName());
+            users.put(u.getUserName(), user);
+        }
+        return user.getSubscriptions();
+    }
+
+    public void unsubscribe(org.apache.james.mailbox.MailboxSession session, 
String mailbox)
+            throws SubscriptionException {
+        MailboxSession.User u = session.getUser();
+        MailboxUser user = (MailboxUser) users.get(u.getUserName());
+        if (user == null) {
+            user = new MailboxUser(u.getUserName());
+            users.put(u.getUserName(), user);
+        }
+        user.removeSubscription(mailbox);
+    }
+
+    public void addUser(String userid, CharSequence password) {
+        MailboxUser user = (MailboxUser) users.get(userid);
+        if (user == null) {
+            user = new MailboxUser(userid);
+            users.put(userid, user);
+        }
+        user.setPassword(password);
+    }
+
+    public void endProcessingRequest(MailboxSession session) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void startProcessingRequest(MailboxSession session) {
+        // TODO Auto-generated method stub
+        
+    }
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to