james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [3/4] james-project git commit: JAMES-1716 Saving to draft should not send message
Date Thu, 07 Jul 2016 11:47:46 GMT
http://git-wip-us.apache.org/repos/asf/james-project/blob/d5988181/server/protocols/jmap/src/test/java/org/apache/james/jmap/methods/SetMessagesCreationProcessorTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/test/java/org/apache/james/jmap/methods/SetMessagesCreationProcessorTest.java
b/server/protocols/jmap/src/test/java/org/apache/james/jmap/methods/SetMessagesCreationProcessorTest.java
index f28630b..7f32174 100644
--- a/server/protocols/jmap/src/test/java/org/apache/james/jmap/methods/SetMessagesCreationProcessorTest.java
+++ b/server/protocols/jmap/src/test/java/org/apache/james/jmap/methods/SetMessagesCreationProcessorTest.java
@@ -23,14 +23,17 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.time.ZonedDateTime;
 import java.util.Optional;
 import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Stream;
 
-import org.apache.james.jmap.exceptions.MailboxRoleNotFoundException;
+import org.apache.james.jmap.methods.ValueWithId.MessageWithId;
 import org.apache.james.jmap.model.CreationMessage;
 import org.apache.james.jmap.model.CreationMessage.DraftEmailer;
 import org.apache.james.jmap.model.CreationMessageId;
@@ -38,25 +41,34 @@ import org.apache.james.jmap.model.Message;
 import org.apache.james.jmap.model.MessageFactory;
 import org.apache.james.jmap.model.MessageId;
 import org.apache.james.jmap.model.MessagePreviewGenerator;
+import org.apache.james.jmap.model.MessageProperties.MessageProperty;
+import org.apache.james.jmap.model.SetError;
 import org.apache.james.jmap.model.SetMessagesRequest;
 import org.apache.james.jmap.model.SetMessagesResponse;
+import org.apache.james.jmap.model.mailbox.Role;
 import org.apache.james.jmap.send.MailFactory;
 import org.apache.james.jmap.send.MailMetadata;
 import org.apache.james.jmap.send.MailSpool;
 import org.apache.james.jmap.utils.HtmlTextExtractor;
 import org.apache.james.jmap.utils.MailboxBasedHtmlTextExtractor;
+import org.apache.james.jmap.utils.SystemMailboxesProvider;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.exception.MailboxException;
+import org.apache.james.mailbox.mock.MockMailboxSession;
+import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.store.MailboxSessionMapperFactory;
 import org.apache.james.mailbox.store.TestId;
 import org.apache.james.mailbox.store.extractor.DefaultTextExtractor;
 import org.apache.james.mailbox.store.mail.MessageMapper;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
 import org.apache.james.mailbox.store.mail.model.MailboxMessage;
+import org.apache.james.mailbox.store.mail.model.impl.SimpleMailbox;
 import org.apache.mailet.Mail;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
+import com.google.common.base.Joiner;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 
@@ -64,11 +76,22 @@ public class SetMessagesCreationProcessorTest {
     
     private MessageFactory messageFactory;
 
-    private static final Message FAKE_MESSAGE = Message.builder()
-            .id(MessageId.of("user|outbox|1"))
+    private static final String USER = "user@example.com";
+    private static final String OUTBOX = "outbox";
+    private static final TestId OUTBOX_ID = TestId.of(12345);
+    private static final String DRAFTS = "drafts";
+    private static final TestId DRAFTS_ID = TestId.of(12);
+    private static final String OUTBOX_MESSAGE_ID = Joiner.on('|').join(USER, OUTBOX, "12345");
+    private static final String NAMESPACE = "#private";
+    private static final long UID_VALIDITY = 0l;
+    private final Mailbox outbox = new SimpleMailbox(new MailboxPath(NAMESPACE, USER, OUTBOX),
UID_VALIDITY, OUTBOX_ID);
+    private final Mailbox drafts = new SimpleMailbox(new MailboxPath(NAMESPACE, USER, DRAFTS),
UID_VALIDITY, DRAFTS_ID);
+
+    private static final Message FAKE_OUTBOX_MESSAGE = Message.builder()
+            .id(MessageId.of(OUTBOX_MESSAGE_ID))
             .blobId("anything")
             .threadId("anything")
-            .mailboxIds(ImmutableList.of("mailboxId"))
+            .mailboxId(OUTBOX_ID.serialize())
             .headers(ImmutableMap.of())
             .subject("anything")
             .size(0)
@@ -83,34 +106,60 @@ public class SetMessagesCreationProcessorTest {
         messageFactory = new MessageFactory(messagePreview);
     }
 
+    private final CreationMessage.Builder creationMessageBuilder = CreationMessage.builder()
+            .from(DraftEmailer.builder().name("alice").email("alice@example.com").build())
+            .to(ImmutableList.of(DraftEmailer.builder().name("bob").email("bob@example.com").build()))
+            .subject("Hey! ");
+
+    private final CreationMessageId creationMessageId = CreationMessageId.of("dlkja");
+    
+    private final SetMessagesRequest createMessageInOutbox = SetMessagesRequest.builder()
+            .create(
+                    creationMessageId, 
+                    creationMessageBuilder
+                        .mailboxId(OUTBOX_ID.serialize())
+                        .from(DraftEmailer.builder().name("user").email("user@example.com").build())
+                        .build())
+            .build();
+
+    private final Optional<Mailbox> optionalOutbox = Optional.of(outbox);
+    private final Optional<Mailbox> optionalDrafts = Optional.of(drafts);
+
+    private MessageMapper mockMapper;
+    private MailboxSessionMapperFactory stubSessionMapperFactory;
+    private MailSpool mockedMailSpool;
+    private MailFactory mockedMailFactory;
+    private SystemMailboxesProvider fakeSystemMailboxesProvider;
+    private MockMailboxSession session;
+    private MIMEMessageConverter mimeMessageConverter;
+
+    @Before
+    public void setUp() throws MailboxException {
+        mockMapper = mock(MessageMapper.class);
+        stubSessionMapperFactory = mock(MailboxSessionMapperFactory.class);
+        when(stubSessionMapperFactory.createMessageMapper(any(MailboxSession.class)))
+                .thenReturn(mockMapper);
+        mockedMailSpool = mock(MailSpool.class);
+        mockedMailFactory = mock(MailFactory.class);
+
+        fakeSystemMailboxesProvider = new TestSystemMailboxesProvider(() -> optionalOutbox,
() -> optionalDrafts);
+        session = new MockMailboxSession(USER);
+        mimeMessageConverter = new MIMEMessageConverter();
+    }
+
     @Test
     public void processShouldReturnEmptyCreatedWhenRequestHasEmptyCreate() {
-        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(null, null, null,
null, null, null, messageFactory) {
-            @Override
-            protected Optional<Mailbox> getOutbox(MailboxSession session) throws MailboxException
{
-				Mailbox fakeOutbox = (Mailbox) mock(Mailbox.class);
-                when(fakeOutbox.getName()).thenReturn("outbox");
-                return Optional.of(fakeOutbox);
-            }
-        };
+        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(
+                stubSessionMapperFactory, mimeMessageConverter, mockedMailSpool, mockedMailFactory,
messageFactory, fakeSystemMailboxesProvider);
+
         SetMessagesRequest requestWithEmptyCreate = SetMessagesRequest.builder().build();
 
-        SetMessagesResponse result = sut.process(requestWithEmptyCreate, buildStubbedSession());
+        SetMessagesResponse result = sut.process(requestWithEmptyCreate, session);
 
         assertThat(result.getCreated()).isEmpty();
         assertThat(result.getNotCreated()).isEmpty();
     }
 
-    private MailboxSession buildStubbedSession() {
-        MailboxSession.User stubUser = mock(MailboxSession.User.class);
-        when(stubUser.getUserName()).thenReturn("alice@example.com");
-        MailboxSession stubSession = mock(MailboxSession.class);
-        when(stubSession.getPathDelimiter()).thenReturn('.');
-        when(stubSession.getUser()).thenReturn(stubUser);
-        when(stubSession.getPersonalSpace()).thenReturn("#private");
-        return stubSession;
-    }
-
     @Test
     public void processShouldReturnNonEmptyCreatedWhenRequestHasNonEmptyCreate() throws MailboxException
{
         // Given
@@ -119,106 +168,139 @@ public class SetMessagesCreationProcessorTest {
         when(mockSessionMapperFactory.createMessageMapper(any(MailboxSession.class)))
                 .thenReturn(stubMapper);
 
-        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(null, null, mockSessionMapperFactory,
null, null, null, messageFactory) {
+        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(
+                mockSessionMapperFactory, mimeMessageConverter, mockedMailSpool, mockedMailFactory,
messageFactory, fakeSystemMailboxesProvider) {
             @Override
-            protected MessageWithId<Message> createMessageInOutboxAndSend(MessageWithId.CreationMessageEntry
createdEntry, MailboxSession session, Mailbox outbox, Function<Long, MessageId> buildMessageIdFromUid)
{
-                return new MessageWithId<>(createdEntry.getCreationId(), FAKE_MESSAGE);
-            }
-            @Override
-            protected Optional<Mailbox> getOutbox(MailboxSession session) throws MailboxException
{
-                Mailbox fakeOutbox = mock(Mailbox.class);
-                when(fakeOutbox.getName()).thenReturn("outbox");
-                return Optional.of(fakeOutbox);
+            protected MessageWithId createMessageInOutboxAndSend(ValueWithId.CreationMessageEntry
createdEntry, MailboxSession session, Mailbox outbox, Function<Long, MessageId> buildMessageIdFromUid)
{
+                return new MessageWithId(createdEntry.getCreationId(), FAKE_OUTBOX_MESSAGE);
             }
         };
         // When
-        SetMessagesResponse result = sut.process(buildFakeCreationRequest(), buildStubbedSession());
+        SetMessagesResponse result = sut.process(createMessageInOutbox, session);
 
         // Then
         assertThat(result.getCreated()).isNotEmpty();
         assertThat(result.getNotCreated()).isEmpty();
     }
 
-    @Test(expected = MailboxRoleNotFoundException.class)
-    public void processShouldThrowWhenOutboxNotFound() {
+    @Ignore("JAMES-1716 : should report an error")
+    @Test
+    public void processShouldReturnErrorWhenOutboxNotFound() {
         // Given
-        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(null, null, null,
null, null, null, messageFactory) {
-            @Override
-            protected Optional<Mailbox> getOutbox(MailboxSession session) throws MailboxException
{
-                return Optional.empty();
-            }
-        };
+        TestSystemMailboxesProvider doNotProvideOutbox = new TestSystemMailboxesProvider(Optional::empty,
() -> optionalDrafts);
+        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(
+                stubSessionMapperFactory, mimeMessageConverter, mockedMailSpool, mockedMailFactory,
messageFactory, doNotProvideOutbox);
         // When
-        sut.process(buildFakeCreationRequest(), null);
+        SetMessagesResponse actual = sut.process(createMessageInOutbox, session);
+        
+        assertThat(actual.getNotCreated()).hasSize(1).containsKey(creationMessageId);
+        assertThat(actual.getNotCreated().get(creationMessageId).getType()).isEqualTo("invalidProperties");
+        assertThat(actual.getNotCreated().get(creationMessageId).getDescription()).contains("target
mailbox does not exists");
     }
 
     @Test
     public void processShouldCallMessageMapperWhenRequestHasNonEmptyCreate() throws MailboxException
{
         // Given
-        Mailbox fakeOutbox = mock(Mailbox.class);
-        MessageMapper mockMapper = mock(MessageMapper.class);
-        MailboxSessionMapperFactory stubSessionMapperFactory = mock(MailboxSessionMapperFactory.class);
-        when(stubSessionMapperFactory.createMessageMapper(any(MailboxSession.class)))
-                .thenReturn(mockMapper);
-        MailSpool mockedMailSpool = mock(MailSpool.class);
-        MailFactory mockedMailFactory = mock(MailFactory.class);
-
-        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(null, null,
-                stubSessionMapperFactory, new MIMEMessageConverter(), mockedMailSpool, mockedMailFactory,
messageFactory) {
-            @Override
-            protected Optional<Mailbox> getOutbox(MailboxSession session) throws MailboxException
{
-                TestId stubMailboxId = mock(TestId.class);
-                when(stubMailboxId.serialize()).thenReturn("user|outbox|12345");
-                when(fakeOutbox.getMailboxId()).thenReturn(stubMailboxId);
-                when(fakeOutbox.getName()).thenReturn("outbox");
-                return Optional.of(fakeOutbox);
-            }
-        };
+        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(
+                stubSessionMapperFactory, mimeMessageConverter, mockedMailSpool, mockedMailFactory,
messageFactory, fakeSystemMailboxesProvider);
         // When
-        sut.process(buildFakeCreationRequest(), buildStubbedSession());
+        sut.process(createMessageInOutbox, session);
 
         // Then
-        verify(mockMapper).add(eq(fakeOutbox), any(MailboxMessage.class));
+        verify(mockMapper).add(eq(outbox), any(MailboxMessage.class));
     }
 
     @Test
     public void processShouldSendMailWhenRequestHasNonEmptyCreate() throws Exception {
         // Given
-        Mailbox fakeOutbox = mock(Mailbox.class);
-        MessageMapper mockMapper = mock(MessageMapper.class);
-        MailboxSessionMapperFactory stubSessionMapperFactory = mock(MailboxSessionMapperFactory.class);
-        when(stubSessionMapperFactory.createMessageMapper(any(MailboxSession.class)))
-                .thenReturn(mockMapper);
-        MailSpool mockedMailSpool = mock(MailSpool.class);
-        MailFactory mockedMailFactory = mock(MailFactory.class);
-
-        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(null, null,
-                stubSessionMapperFactory, new MIMEMessageConverter(), mockedMailSpool, mockedMailFactory,
messageFactory) {
-            @Override
-            protected Optional<Mailbox> getOutbox(MailboxSession session) throws MailboxException
{
-                TestId stubMailboxId = mock(TestId.class);
-                when(stubMailboxId.serialize()).thenReturn("user|outbox|12345");
-                when(fakeOutbox.getMailboxId()).thenReturn(stubMailboxId);
-                when(fakeOutbox.getName()).thenReturn("outbox");
-                return Optional.of(fakeOutbox);
-            }
-        };
+        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(
+                stubSessionMapperFactory, mimeMessageConverter, mockedMailSpool, mockedMailFactory,
messageFactory, fakeSystemMailboxesProvider);
         // When
-        sut.process(buildFakeCreationRequest(), buildStubbedSession());
+        sut.process(createMessageInOutbox, session);
 
         // Then
         verify(mockedMailSpool).send(any(Mail.class), any(MailMetadata.class));
     }
 
-    private SetMessagesRequest buildFakeCreationRequest() {
-        return SetMessagesRequest.builder()
-                .create(ImmutableMap.of(CreationMessageId.of("anything-really"), CreationMessage.builder()
-                    .from(DraftEmailer.builder().name("alice").email("alice@example.com").build())
-                    .to(ImmutableList.of(DraftEmailer.builder().name("bob").email("bob@example.com").build()))
-                    .subject("Hey! ")
-                    .mailboxIds(ImmutableList.of("mailboxId"))
-                    .build()
-                ))
+    @Test
+    public void processShouldNotSpoolMailWhenNotSavingToOutbox() throws Exception {
+        // Given
+        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(
+                stubSessionMapperFactory, mimeMessageConverter, mockedMailSpool, mockedMailFactory,
messageFactory, fakeSystemMailboxesProvider);
+        // When
+        SetMessagesRequest notInOutboxCreationRequest =
+                SetMessagesRequest.builder()
+                    .create(CreationMessageId.of("anything-really"),
+                            creationMessageBuilder.mailboxId("any-id-but-outbox-id")
+                        .build())
+                    .build();
+
+        sut.process(notInOutboxCreationRequest, session);
+
+        // Then
+        verify(mockedMailSpool, never()).send(any(Mail.class), any(MailMetadata.class));
+    }
+
+    @Test
+    public void processShouldReturnNotImplementedErrorWhenSavingToDrafts() {
+        // Given
+        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(
+                stubSessionMapperFactory, mimeMessageConverter, mockedMailSpool, mockedMailFactory,
messageFactory, fakeSystemMailboxesProvider);
+
+        CreationMessageId creationMessageId = CreationMessageId.of("anything-really");
+        SetMessagesRequest createMessageInDrafts = SetMessagesRequest.builder()
+                .create(
+                        creationMessageId, creationMessageBuilder.mailboxId(DRAFTS_ID.serialize()).build())
+                .build();
+
+        // When
+        SetMessagesResponse actual = sut.process(createMessageInDrafts, session);
+
+        // Then
+        assertThat(actual.getNotCreated()).hasSize(1).containsEntry(creationMessageId, SetError.builder()
+                .type("invalidProperties")
+                .properties(MessageProperty.mailboxIds)
+                .description("Not yet implemented")
+                .build());
+    }
+
+    @Test
+    public void processShouldNotSendWhenSavingToDrafts() throws Exception {
+        // Given
+        SetMessagesCreationProcessor sut = new SetMessagesCreationProcessor(
+                stubSessionMapperFactory, mimeMessageConverter, mockedMailSpool, mockedMailFactory,
messageFactory, fakeSystemMailboxesProvider);
+        // When
+        CreationMessageId creationMessageId = CreationMessageId.of("anything-really");
+        SetMessagesRequest createMessageInDrafts = SetMessagesRequest.builder()
+                .create(
+                        creationMessageId, creationMessageBuilder.mailboxId(DRAFTS_ID.serialize()).build())
                 .build();
+        sut.process(createMessageInDrafts, session);
+
+        // Then
+        verify(mockedMailSpool, never()).send(any(Mail.class), any(MailMetadata.class));
     }
-}
\ No newline at end of file
+
+
+    public static class TestSystemMailboxesProvider implements SystemMailboxesProvider {
+
+        private final Supplier<Optional<Mailbox>> outboxSupplier;
+        private final Supplier<Optional<Mailbox>> draftsSupplier;
+
+        private TestSystemMailboxesProvider(Supplier<Optional<Mailbox>> outboxSupplier,
+                                            Supplier<Optional<Mailbox>> draftsSupplier)
{
+            this.outboxSupplier = outboxSupplier;
+            this.draftsSupplier = draftsSupplier;
+        }
+
+        public Stream<Mailbox> listMailboxes(Role aRole, MailboxSession session) {
+            if (aRole.equals(Role.OUTBOX)) {
+                return outboxSupplier.get().map(o -> Stream.of(o)).orElse(Stream.empty());
+            } else if (aRole.equals(Role.DRAFTS)) {
+                return draftsSupplier.get().map(d -> Stream.of(d)).orElse(Stream.empty());
+            }
+            return Stream.empty();
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/d5988181/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/SetErrorTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/SetErrorTest.java
b/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/SetErrorTest.java
index db11c27..24e873f 100644
--- a/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/SetErrorTest.java
+++ b/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/SetErrorTest.java
@@ -24,6 +24,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.apache.james.jmap.model.MessageProperties.MessageProperty;
 
 import java.util.Optional;
+import java.util.Set;
 
 import org.junit.Test;
 import com.google.common.collect.ImmutableSet;
@@ -85,7 +86,7 @@ public class SetErrorTest {
     @Test
     public void buildShouldDefaultToEmptyWhenPropertiesNull() {
         SetError result = SetError.builder()
-                .type("a type").description("a description").properties(null)
+                .type("a type").description("a description").properties((Set<MessageProperty>)null)
                 .build();
 
         assertThat(result.getProperties()).isPresent();
@@ -98,10 +99,33 @@ public class SetErrorTest {
         SetError result = SetError.builder()
                 .type("a type").description("a description")
                 .properties(nonNullProperty)
-                .properties(null)
+                .properties((Set<MessageProperty>)null)
                 .build();
 
         assertThat(result.getProperties()).isPresent();
         assertThat(result.getProperties().get()).isEqualTo(nonNullProperty);
     }
+
+    public void buildShouldDefaultToEmptyWhenPropertiesWithNoArgument() {
+        SetError result = SetError.builder()
+                .type("a type").description("a description").properties()
+                .build();
+
+        assertThat(result.getProperties()).isPresent();
+        assertThat(result.getProperties().get()).isEmpty();
+    }
+
+    @Test
+    public void buildShouldBeIdempotentWhenPropertiesWithNoArgument() {
+        ImmutableSet<MessageProperty> nonNullProperty = ImmutableSet.of(MessageProperty.from);
+        SetError result = SetError.builder()
+                .type("a type").description("a description")
+                .properties(nonNullProperty)
+                .properties()
+                .build();
+
+        assertThat(result.getProperties()).isPresent();
+        assertThat(result.getProperties().get()).isEqualTo(nonNullProperty);
+    }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/d5988181/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/SetMessagesRequestTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/SetMessagesRequestTest.java
b/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/SetMessagesRequestTest.java
index 7be03e1..907b76f 100644
--- a/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/SetMessagesRequestTest.java
+++ b/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/SetMessagesRequestTest.java
@@ -48,7 +48,7 @@ public class SetMessagesRequestTest {
     public void builderShouldWork() {
         ImmutableList<MessageId> destroy = ImmutableList.of(MessageId.of("user|destroy|1"));
 
-        SetMessagesRequest expected = new SetMessagesRequest(Optional.empty(), Optional.empty(),
ImmutableMap.of(), ImmutableMap.of(), destroy);
+        SetMessagesRequest expected = new SetMessagesRequest(Optional.empty(), Optional.empty(),
ImmutableList.of(), ImmutableMap.of(), destroy);
 
         SetMessagesRequest setMessagesRequest = SetMessagesRequest.builder()
             .accountId(null)

http://git-wip-us.apache.org/repos/asf/james-project/blob/d5988181/server/protocols/jmap/src/test/java/org/apache/james/jmap/send/PostDequeueDecoratorTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/test/java/org/apache/james/jmap/send/PostDequeueDecoratorTest.java
b/server/protocols/jmap/src/test/java/org/apache/james/jmap/send/PostDequeueDecoratorTest.java
index 7e72b64..223e426 100644
--- a/server/protocols/jmap/src/test/java/org/apache/james/jmap/send/PostDequeueDecoratorTest.java
+++ b/server/protocols/jmap/src/test/java/org/apache/james/jmap/send/PostDequeueDecoratorTest.java
@@ -29,9 +29,9 @@ import java.util.Iterator;
 
 import javax.mail.Flags;
 
+import org.apache.james.jmap.exceptions.MailboxRoleNotFoundException;
 import org.apache.james.jmap.model.MessageId;
 import org.apache.james.jmap.send.exception.MailShouldBeInOutboxException;
-import org.apache.james.jmap.send.exception.MailboxRoleNotFoundException;
 import org.apache.james.jmap.send.exception.MessageIdNotFoundException;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageManager;

http://git-wip-us.apache.org/repos/asf/james-project/blob/d5988181/server/protocols/jmap/src/test/java/org/apache/james/jmap/utils/SystemMailboxesProviderImplTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/test/java/org/apache/james/jmap/utils/SystemMailboxesProviderImplTest.java
b/server/protocols/jmap/src/test/java/org/apache/james/jmap/utils/SystemMailboxesProviderImplTest.java
new file mode 100644
index 0000000..3ee868d
--- /dev/null
+++ b/server/protocols/jmap/src/test/java/org/apache/james/jmap/utils/SystemMailboxesProviderImplTest.java
@@ -0,0 +1,33 @@
+/****************************************************************
+ * 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.jmap.utils;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class SystemMailboxesProviderImplTest {
+
+    @Ignore("1716 this class needs a test suite")
+    @Test
+    public void missingTestSuite() {
+        //TODO this class needs a test suite
+    }
+    
+}


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