{"action":"created","comment":{"url":"https://api.github.com/repos/linagora/james-project/pulls/comments/92311985","pull_request_review_id":12824525,"id":92311985,"diff_hunk":"@@ -0,0 +1,509 @@\n+/****************************************************************\n+ * Licensed to the Apache Software Foundation (ASF) under one   *\n+ * or more contributor license agreements.  See the NOTICE file *\n+ * distributed with this work for additional information        *\n+ * regarding copyright ownership.  The ASF licenses this file   *\n+ * to you under the Apache License, Version 2.0 (the            *\n+ * \"License\"); you may not use this file except in compliance   *\n+ * with the License.  You may obtain a copy of the License at   *\n+ *                                                              *\n+ *   http://www.apache.org/licenses/LICENSE-2.0                 *\n+ *                                                              *\n+ * Unless required by applicable law or agreed to in writing,   *\n+ * software distributed under the License is distributed on an  *\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *\n+ * KIND, either express or implied.  See the License for the    *\n+ * specific language governing permissions and limitations      *\n+ * under the License.                                           *\n+ ****************************************************************/\n+\n+package org.apache.james.mailbox.store.mail.model;\n+\n+import static org.assertj.core.api.Assertions.assertThat;\n+\n+import java.util.Date;\n+import java.util.List;\n+import java.util.Map;\n+\n+import javax.mail.Flags;\n+import javax.mail.Flags.Flag;\n+import javax.mail.util.SharedByteArrayInputStream;\n+\n+import org.apache.james.mailbox.FlagsBuilder;\n+import org.apache.james.mailbox.MessageManager;\n+import org.apache.james.mailbox.exception.MailboxException;\n+import org.apache.james.mailbox.exception.MailboxNotFoundException;\n+import org.apache.james.mailbox.model.MailboxId;\n+import org.apache.james.mailbox.model.MailboxPath;\n+import org.apache.james.mailbox.model.MessageId;\n+import org.apache.james.mailbox.model.UpdatedFlags;\n+import org.apache.james.mailbox.store.mail.MailboxMapper;\n+import org.apache.james.mailbox.store.mail.MessageIdMapper;\n+import org.apache.james.mailbox.store.mail.MessageMapper;\n+import org.apache.james.mailbox.store.mail.MessageMapper.FetchType;\n+import org.apache.james.mailbox.store.mail.model.impl.PropertyBuilder;\n+import org.apache.james.mailbox.store.mail.model.impl.SimpleMailbox;\n+import org.apache.james.mailbox.store.mail.model.impl.SimpleMailboxMessage;\n+import org.assertj.core.data.MapEntry;\n+import org.junit.After;\n+import org.junit.Assume;\n+import org.junit.Rule;\n+import org.junit.rules.ExpectedException;\n+import org.xenei.junit.contract.Contract;\n+import org.xenei.junit.contract.ContractTest;\n+import org.xenei.junit.contract.IProducer;\n+\n+import com.google.common.collect.ImmutableList;\n+\n+@Contract(MapperProvider.class)\n+public class MessageIdMapperTest<T extends MapperProvider> {\n+\n+    @Rule\n+    public ExpectedException expectedException = ExpectedException.none();\n+\n+    private final static char DELIMITER = '.';\n+    private static final int BODY_START = 16;\n+    private final static long UID_VALIDITY = 42;\n+\n+    private IProducer<T> producer;\n+    private MessageMapper messageMapper;\n+    private MailboxMapper mailboxMapper;\n+    private MessageIdMapper sut;\n+\n+    private SimpleMailbox benwaInboxMailbox;\n+    private SimpleMailbox benwaWorkMailbox;\n+    \n+    private SimpleMailboxMessage message1;\n+    private SimpleMailboxMessage message2;\n+    private SimpleMailboxMessage message3;\n+    private SimpleMailboxMessage message4;\n+\n+    @Rule\n+    public ExpectedException expected = ExpectedException.none();\n+    private T mapperProvider;\n+\n+    @Contract.Inject\n+    public final void setProducer(IProducer<T> producer) throws MailboxException {\n+        this.producer = producer;\n+        this.mapperProvider = producer.newInstance();\n+        Assume.assumeFalse(mapperProvider.getNotImplemented().contains(MapperProvider.Capabilities.UNIQUE_MESSAGE_ID));\n+\n+        this.mapperProvider.ensureMapperPrepared();\n+        this.sut = mapperProvider.createMessageIdMapper();\n+        this.messageMapper = mapperProvider.createMessageMapper();\n+        this.mailboxMapper = mapperProvider.createMailboxMapper();\n+\n+        benwaInboxMailbox = createMailbox(new MailboxPath(\"#private\", \"benwa\", \"INBOX\"));\n+        benwaWorkMailbox = createMailbox( new MailboxPath(\"#private\", \"benwa\", \"INBOX\"+DELIMITER+\"work\"));\n+\n+        message1 = createMessage(benwaInboxMailbox, \"Subject: Test1 \\n\\nBody1\\n.\\n\", BODY_START, new PropertyBuilder());\n+        message2 = createMessage(benwaInboxMailbox, \"Subject: Test2 \\n\\nBody2\\n.\\n\", BODY_START, new PropertyBuilder());\n+        message3 = createMessage(benwaInboxMailbox, \"Subject: Test3 \\n\\nBody3\\n.\\n\", BODY_START, new PropertyBuilder());\n+        message4 = createMessage(benwaWorkMailbox, \"Subject: Test4 \\n\\nBody4\\n.\\n\", BODY_START, new PropertyBuilder());\n+    }\n+\n+    @After\n+    public void tearDown() throws MailboxException {\n+        producer.cleanUp();\n+    }\n+\n+    @ContractTest\n+    public void findShouldReturnEmptyWhenIdListIsEmpty() throws MailboxException {\n+        assertThat(sut.find(ImmutableList.<MessageId> of(), FetchType.Full)).isEmpty();\n+    }\n+\n+    @ContractTest\n+    public void findShouldReturnOneMessageWhenIdListContainsOne() throws MailboxException {\n+        saveMessages();\n+        List<MailboxMessage> messages = sut.find(ImmutableList.of(message1.getMessageId()), FetchType.Full);\n+        assertThat(messages).containsOnly(message1);\n+    }\n+\n+    @ContractTest\n+    public void findShouldReturnMultipleMessagesWhenIdContainsMultiple() throws MailboxException {\n+        saveMessages();\n+        List<MailboxMessage> messages = sut.find(ImmutableList.of(message1.getMessageId(), message2.getMessageId(), message3.getMessageId()), FetchType.Full);\n+        assertThat(messages).containsOnly(message1, message2, message3);\n+    }\n+\n+    @ContractTest\n+    public void findShouldReturnMultipleMessagesWhenIdContainsMultipleInDifferentMailboxes() throws MailboxException {\n+        saveMessages();\n+        List<MailboxMessage> messages = sut.find(ImmutableList.of(message1.getMessageId(), message4.getMessageId(), message3.getMessageId()), FetchType.Full);\n+        assertThat(messages).containsOnly(message1, message4, message3);\n+    }\n+\n+    @ContractTest\n+    public void findMailboxesShouldReturnEmptyWhenMessageDoesntExist() throws MailboxException {\n+        assertThat(sut.findMailboxes(mapperProvider.generateMessageId())).isEmpty();\n+    }\n+\n+    @ContractTest\n+    public void findMailboxesShouldReturnOneMailboxWhenMessageExistsInOneMailbox() throws MailboxException {\n+        saveMessages();\n+        List<MailboxId> mailboxes = sut.findMailboxes(message1.getMessageId());\n+        assertThat(mailboxes).containsOnly(benwaInboxMailbox.getMailboxId());\n+    }\n+\n+    @ContractTest\n+    public void findMailboxesShouldReturnTwoMailboxesWhenMessageExistsInTwoMailboxes() throws MailboxException {\n+        saveMessages();\n+\n+        SimpleMailboxMessage message1InOtherMailbox = SimpleMailboxMessage.copy(benwaWorkMailbox.getMailboxId(), message1);\n+        message1InOtherMailbox.setUid(mapperProvider.generateMessageUid());\n+        message1InOtherMailbox.setModSeq(mapperProvider.generateModSeq(benwaWorkMailbox));\n+        sut.save(message1InOtherMailbox);\n+\n+        List<MailboxId> mailboxes = sut.findMailboxes(message1.getMessageId());\n+        assertThat(mailboxes).containsOnly(benwaInboxMailbox.getMailboxId(), benwaWorkMailbox.getMailboxId());\n+    }\n+\n+    @ContractTest\n+    public void saveShouldSaveAMessage() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+        List<MailboxMessage> messages = sut.find(ImmutableList.of(message1.getMessageId()), FetchType.Full);\n+        assertThat(messages).containsOnly(message1);\n+    }\n+\n+    @ContractTest\n+    public void saveShouldThrowWhenMailboxDoesntExist() throws Exception {\n+        SimpleMailbox notPersistedMailbox = new SimpleMailbox(new MailboxPath(\"#private\", \"benwa\", \"mybox\"), UID_VALIDITY);\n+        notPersistedMailbox.setMailboxId(mapperProvider.generateId());\n+        SimpleMailboxMessage message = createMessage(notPersistedMailbox, \"Subject: Test \\n\\nBody\\n.\\n\", BODY_START, new PropertyBuilder());\n+        message.setUid(mapperProvider.generateMessageUid());\n+        message.setModSeq(mapperProvider.generateModSeq(notPersistedMailbox));\n+\n+        expectedException.expect(MailboxNotFoundException.class);\n+        sut.save(message);\n+    }\n+\n+    @ContractTest\n+    public void saveShouldSaveMessageInAnotherMailboxWhenMessageAlreadyInOneMailbox() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        SimpleMailboxMessage message1InOtherMailbox = SimpleMailboxMessage.copy(benwaWorkMailbox.getMailboxId(), message1);\n+        message1InOtherMailbox.setUid(mapperProvider.generateMessageUid());\n+        message1InOtherMailbox.setModSeq(mapperProvider.generateModSeq(benwaWorkMailbox));\n+        sut.save(message1InOtherMailbox);\n+\n+        List<MailboxId> mailboxes = sut.findMailboxes(message1.getMessageId());\n+        assertThat(mailboxes).containsOnly(benwaInboxMailbox.getMailboxId(), benwaWorkMailbox.getMailboxId());\n+    }\n+\n+    @ContractTest\n+    public void saveShouldWorkWhenSavingTwoTimesWithSameMessageIdAndSameMailboxId() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+        SimpleMailboxMessage copiedMessage = SimpleMailboxMessage.copy(message1.getMailboxId(), message1);\n+        copiedMessage.setUid(mapperProvider.generateMessageUid());\n+        copiedMessage.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(copiedMessage);\n+\n+        List<MailboxId> mailboxes = sut.findMailboxes(message1.getMessageId());\n+        assertThat(mailboxes).containsOnly(benwaInboxMailbox.getMailboxId(), benwaInboxMailbox.getMailboxId());\n+    }\n+\n+    @ContractTest\n+    public void deleteShouldNotThrowWhenUnknownMessage() {\n+        sut.delete(message1.getMessageId());\n+    }\n+\n+    @ContractTest\n+    public void deleteShouldDeleteAMessage() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        MessageId messageId = message1.getMessageId();\n+        sut.delete(messageId);\n+\n+        List<MailboxMessage> messages = sut.find(ImmutableList.of(messageId), FetchType.Full);\n+        assertThat(messages).isEmpty();\n+    }\n+\n+    @ContractTest\n+    public void deleteShouldDeleteMessageIndicesWhenStoredInTwoMailboxes() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        SimpleMailboxMessage message1InOtherMailbox = SimpleMailboxMessage.copy(benwaWorkMailbox.getMailboxId(), message1);\n+        message1InOtherMailbox.setUid(mapperProvider.generateMessageUid());\n+        message1InOtherMailbox.setModSeq(mapperProvider.generateModSeq(benwaWorkMailbox));\n+        sut.save(message1InOtherMailbox);\n+\n+        MessageId messageId = message1.getMessageId();\n+        sut.delete(messageId);\n+\n+        List<MailboxId> mailboxes = sut.findMailboxes(messageId);\n+        assertThat(mailboxes).isEmpty();\n+    }\n+\n+    @ContractTest\n+    public void deleteShouldDeleteMessageIndicesWhenStoredTwoTimesInTheSameMailbox() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+        SimpleMailboxMessage copiedMessage = SimpleMailboxMessage.copy(message1.getMailboxId(), message1);\n+        copiedMessage.setUid(mapperProvider.generateMessageUid());\n+        copiedMessage.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(copiedMessage);\n+\n+        MessageId messageId = message1.getMessageId();\n+        sut.delete(messageId);\n+\n+        List<MailboxId> mailboxes = sut.findMailboxes(messageId);\n+        assertThat(mailboxes).isEmpty();\n+    }\n+\n+    @ContractTest\n+    public void deleteWithMailboxIdsShouldNotDeleteIndicesWhenMailboxIdsIsEmpty() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        SimpleMailboxMessage message1InOtherMailbox = SimpleMailboxMessage.copy(benwaWorkMailbox.getMailboxId(), message1);\n+        message1InOtherMailbox.setUid(mapperProvider.generateMessageUid());\n+        message1InOtherMailbox.setModSeq(mapperProvider.generateModSeq(benwaWorkMailbox));\n+        sut.save(message1InOtherMailbox);\n+\n+        MessageId messageId = message1.getMessageId();\n+        sut.delete(messageId, ImmutableList.<MailboxId> of());\n+\n+        List<MailboxId> mailboxes = sut.findMailboxes(messageId);\n+        assertThat(mailboxes).containsOnly(benwaInboxMailbox.getMailboxId(), benwaWorkMailbox.getMailboxId());\n+    }\n+\n+    @ContractTest\n+    public void deleteWithMailboxIdsShouldDeleteOneIndexWhenMailboxIdsContainsOneElement() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        SimpleMailboxMessage message1InOtherMailbox = SimpleMailboxMessage.copy(benwaWorkMailbox.getMailboxId(), message1);\n+        message1InOtherMailbox.setUid(mapperProvider.generateMessageUid());\n+        message1InOtherMailbox.setModSeq(mapperProvider.generateModSeq(benwaWorkMailbox));\n+        sut.save(message1InOtherMailbox);\n+\n+        MessageId messageId = message1.getMessageId();\n+        sut.delete(messageId, ImmutableList.of(benwaInboxMailbox.getMailboxId()));\n+\n+        List<MailboxId> mailboxes = sut.findMailboxes(messageId);\n+        assertThat(mailboxes).containsOnly(benwaWorkMailbox.getMailboxId());\n+    }\n+\n+    @ContractTest\n+    public void deleteWithMailboxIdsShouldDeleteIndicesWhenMailboxIdsContainsMultipleElements() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        SimpleMailboxMessage message1InOtherMailbox = SimpleMailboxMessage.copy(benwaWorkMailbox.getMailboxId(), message1);\n+        message1InOtherMailbox.setUid(mapperProvider.generateMessageUid());\n+        message1InOtherMailbox.setModSeq(mapperProvider.generateModSeq(benwaWorkMailbox));\n+        sut.save(message1InOtherMailbox);\n+\n+        MessageId messageId = message1.getMessageId();\n+        sut.delete(messageId, ImmutableList.of(benwaInboxMailbox.getMailboxId(), benwaWorkMailbox.getMailboxId()));\n+\n+        List<MailboxId> mailboxes = sut.findMailboxes(messageId);\n+        assertThat(mailboxes).isEmpty();\n+    }\n+\n+    @ContractTest\n+    public void setFlagsShouldReturnUpdatedFlagsWhenMessageIsInOneMailbox() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        MessageId messageId = message1.getMessageId();\n+        Flags newFlags = new Flags(Flag.ANSWERED);\n+        Map<MailboxId, UpdatedFlags> flags = sut.setFlags(messageId, ImmutableList.of(message1.getMailboxId()), newFlags, MessageManager.FlagsUpdateMode.REMOVE);\n+\n+        int modSeq = 1;\n+        UpdatedFlags expectedUpdatedFlags = new UpdatedFlags(message1.getUid(), modSeq, new Flags(), newFlags);\n+        assertThat(flags).containsOnly(MapEntry.entry(benwaInboxMailbox.getMailboxId(), expectedUpdatedFlags));\n+    }\n+\n+    @ContractTest\n+    public void setFlagsShouldReturnEmptyWhenMailboxIdsIsEmpty() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        MessageId messageId = message1.getMessageId();\n+        Flags newFlags = new Flags(Flag.ANSWERED);\n+        Map<MailboxId, UpdatedFlags> flags = sut.setFlags(messageId, ImmutableList.<MailboxId> of(), newFlags, MessageManager.FlagsUpdateMode.REMOVE);\n+\n+        assertThat(flags).isEmpty();\n+    }\n+\n+    @ContractTest\n+    public void setFlagsShouldReturnEmptyWhenMessageIdDoesntExist() throws Exception {\n+        MessageId unknownMessageId = mapperProvider.generateMessageId();\n+        Map<MailboxId, UpdatedFlags> flags = sut.setFlags(unknownMessageId, ImmutableList.of(message1.getMailboxId()), new Flags(Flag.RECENT), MessageManager.FlagsUpdateMode.REMOVE);\n+\n+        assertThat(flags).isEmpty();\n+    }\n+\n+    @ContractTest\n+    public void setFlagsShouldAddFlagsWhenAddUpdateMode() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        MessageId messageId = message1.getMessageId();\n+        Flags initialFlags = new Flags(Flag.RECENT);\n+        sut.setFlags(messageId, ImmutableList.of(message1.getMailboxId()), initialFlags, MessageManager.FlagsUpdateMode.REMOVE);\n+\n+        Map<MailboxId, UpdatedFlags> flags = sut.setFlags(messageId, ImmutableList.of(message1.getMailboxId()), new Flags(Flag.ANSWERED), MessageManager.FlagsUpdateMode.ADD);\n+\n+        Flags newFlags = new FlagsBuilder()\n+            .add(Flag.RECENT)\n+            .add(Flag.ANSWERED)\n+            .build();\n+        int modSeq = 2;\n+        UpdatedFlags expectedUpdatedFlags = new UpdatedFlags(message1.getUid(), modSeq, initialFlags, newFlags);\n+        assertThat(flags).containsOnly(MapEntry.entry(benwaInboxMailbox.getMailboxId(), expectedUpdatedFlags));\n+    }\n+\n+    @ContractTest\n+    public void setFlagsShouldReturnUpdatedFlagsWhenMessageIsInTwoMailboxes() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        SimpleMailboxMessage message1InOtherMailbox = SimpleMailboxMessage.copy(benwaWorkMailbox.getMailboxId(), message1);\n+        message1InOtherMailbox.setUid(mapperProvider.generateMessageUid());\n+        message1InOtherMailbox.setModSeq(mapperProvider.generateModSeq(benwaWorkMailbox));\n+        sut.save(message1InOtherMailbox);\n+\n+        MessageId messageId = message1.getMessageId();\n+        Flags newFlags = new Flags(Flag.ANSWERED);\n+        Map<MailboxId, UpdatedFlags> flags = sut.setFlags(messageId, ImmutableList.of(message1.getMailboxId()), newFlags, MessageManager.FlagsUpdateMode.REMOVE);\n+\n+        int modSeq = 1;\n+        UpdatedFlags expectedUpdatedFlags = new UpdatedFlags(message1.getUid(), modSeq, new Flags(), newFlags);\n+        UpdatedFlags expectedUpdatedFlags2 = new UpdatedFlags(message1InOtherMailbox.getUid(), modSeq, new Flags(), newFlags);\n+        assertThat(flags).containsOnly(MapEntry.entry(benwaInboxMailbox.getMailboxId(), expectedUpdatedFlags),\n+                MapEntry.entry(benwaWorkMailbox.getMailboxId(), expectedUpdatedFlags2));\n+    }\n+\n+    @ContractTest\n+    public void setFlagsShouldUpdateFlagsWhenMessageIsInOneMailbox() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));\n+        sut.save(message1);\n+\n+        MessageId messageId = message1.getMessageId();\n+        sut.setFlags(messageId, ImmutableList.of(message1.getMailboxId()), new Flags(Flag.ANSWERED), MessageManager.FlagsUpdateMode.REMOVE);\n+\n+        List<MailboxMessage> messages = sut.find(ImmutableList.of(messageId), MessageMapper.FetchType.Body);\n+        assertThat(messages).hasSize(1);\n+        assertThat(messages.get(0).isAnswered()).isTrue();\n+    }\n+\n+    @ContractTest\n+    public void setFlagsShouldNotModifyModSeqWhenMailboxIdsIsEmpty() throws Exception {\n+        message1.setUid(mapperProvider.generateMessageUid());\n+        long modSeq = mapperProvider.generateModSeq(benwaInboxMailbox);\n+        message1.setModSeq(modSeq);\n+        sut.save(message1);\n+\n+        MessageId messageId = message1.getMessageId();\n+        Flags newFlags = new Flags(Flag.ANSWERED);\n+        sut.setFlags(messageId, ImmutableList.<MailboxId> of(), newFlags, MessageManager.FlagsUpdateMode.REMOVE);\n+\n+        List<MailboxMessage> messages = sut.find(ImmutableList.of(messageId), MessageMapper.FetchType.Body);\n+        assertThat(messages).hasSize(1);\n+        assertThat(messages.get(0).getModSeq()).isGreaterThan(modSeq);","path":"mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageIdMapperTest.java","position":424,"original_position":424,"commit_id":"7eae6964d57c17b3831b8fc63502ba34fd84a993","original_commit_id":"7eae6964d57c17b3831b8fc63502ba34fd84a993","user":{"login":"chibenwa","id":6928740,"avatar_url":"https://avatars.githubusercontent.com/u/6928740?v=3","gravatar_id":"","url":"https://api.github.com/users/chibenwa","html_url":"https://github.com/chibenwa","followers_url":"https://api.github.com/users/chibenwa/followers","following_url":"https://api.github.com/users/chibenwa/following{/other_user}","gists_url":"https://api.github.com/users/chibenwa/gists{/gist_id}","starred_url":"https://api.github.com/users/chibenwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chibenwa/subscriptions","organizations_url":"https://api.github.com/users/chibenwa/orgs","repos_url":"https://api.github.com/users/chibenwa/repos","events_url":"https://api.github.com/users/chibenwa/events{/privacy}","received_events_url":"https://api.github.com/users/chibenwa/received_events","type":"User","site_admin":false},"body":"Name of the test is setFlagsShouldNotModifyModSeqWhenMailboxIdsIsEmpty\r\n\r\nShouldn't it be isEqualTo ?","created_at":"2016-12-14T02:30:19Z","updated_at":"2016-12-14T02:30:19Z","html_url":"https://github.com/linagora/james-project/pull/506#discussion_r92311985","pull_request_url":"https://api.github.com/repos/linagora/james-project/pulls/506","_links":{"self":{"href":"https://api.github.com/repos/linagora/james-project/pulls/comments/92311985"},"html":{"href":"https://github.com/linagora/james-project/pull/506#discussion_r92311985"},"pull_request":{"href":"https://api.github.com/repos/linagora/james-project/pulls/506"}}},"pull_request":{"url":"https://api.github.com/repos/linagora/james-project/pulls/506","id":97330135,"html_url":"https://github.com/linagora/james-project/pull/506","diff_url":"https://github.com/linagora/james-project/pull/506.diff","patch_url":"https://github.com/linagora/james-project/pull/506.patch","issue_url":"https://api.github.com/repos/linagora/james-project/issues/506","number":506,"state":"open","locked":false,"title":"Unique message id mapper contract tests","user":{"login":"aduprat","id":2900528,"avatar_url":"https://avatars.githubusercontent.com/u/2900528?v=3","gravatar_id":"","url":"https://api.github.com/users/aduprat","html_url":"https://github.com/aduprat","followers_url":"https://api.github.com/users/aduprat/followers","following_url":"https://api.github.com/users/aduprat/following{/other_user}","gists_url":"https://api.github.com/users/aduprat/gists{/gist_id}","starred_url":"https://api.github.com/users/aduprat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduprat/subscriptions","organizations_url":"https://api.github.com/users/aduprat/orgs","repos_url":"https://api.github.com/users/aduprat/repos","events_url":"https://api.github.com/users/aduprat/events{/privacy}","received_events_url":"https://api.github.com/users/aduprat/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-09T15:41:03Z","updated_at":"2016-12-14T02:30:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e8ff1ec82bda853c2ec33642f868102669a8c94","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/linagora/james-project/pulls/506/commits","review_comments_url":"https://api.github.com/repos/linagora/james-project/pulls/506/comments","review_comment_url":"https://api.github.com/repos/linagora/james-project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linagora/james-project/issues/506/comments","statuses_url":"https://api.github.com/repos/linagora/james-project/statuses/7eae6964d57c17b3831b8fc63502ba34fd84a993","head":{"label":"aduprat:unique-message-id-mapper-contract-tests","ref":"unique-message-id-mapper-contract-tests","sha":"7eae6964d57c17b3831b8fc63502ba34fd84a993","user":{"login":"aduprat","id":2900528,"avatar_url":"https://avatars.githubusercontent.com/u/2900528?v=3","gravatar_id":"","url":"https://api.github.com/users/aduprat","html_url":"https://github.com/aduprat","followers_url":"https://api.github.com/users/aduprat/followers","following_url":"https://api.github.com/users/aduprat/following{/other_user}","gists_url":"https://api.github.com/users/aduprat/gists{/gist_id}","starred_url":"https://api.github.com/users/aduprat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduprat/subscriptions","organizations_url":"https://api.github.com/users/aduprat/orgs","repos_url":"https://api.github.com/users/aduprat/repos","events_url":"https://api.github.com/users/aduprat/events{/privacy}","received_events_url":"https://api.github.com/users/aduprat/received_events","type":"User","site_admin":false},"repo":{"id":39448317,"name":"james-project","full_name":"aduprat/james-project","owner":{"login":"aduprat","id":2900528,"avatar_url":"https://avatars.githubusercontent.com/u/2900528?v=3","gravatar_id":"","url":"https://api.github.com/users/aduprat","html_url":"https://github.com/aduprat","followers_url":"https://api.github.com/users/aduprat/followers","following_url":"https://api.github.com/users/aduprat/following{/other_user}","gists_url":"https://api.github.com/users/aduprat/gists{/gist_id}","starred_url":"https://api.github.com/users/aduprat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduprat/subscriptions","organizations_url":"https://api.github.com/users/aduprat/orgs","repos_url":"https://api.github.com/users/aduprat/repos","events_url":"https://api.github.com/users/aduprat/events{/privacy}","received_events_url":"https://api.github.com/users/aduprat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aduprat/james-project","description":"Mirror of Apache James Project","fork":true,"url":"https://api.github.com/repos/aduprat/james-project","forks_url":"https://api.github.com/repos/aduprat/james-project/forks","keys_url":"https://api.github.com/repos/aduprat/james-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aduprat/james-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aduprat/james-project/teams","hooks_url":"https://api.github.com/repos/aduprat/james-project/hooks","issue_events_url":"https://api.github.com/repos/aduprat/james-project/issues/events{/number}","events_url":"https://api.github.com/repos/aduprat/james-project/events","assignees_url":"https://api.github.com/repos/aduprat/james-project/assignees{/user}","branches_url":"https://api.github.com/repos/aduprat/james-project/branches{/branch}","tags_url":"https://api.github.com/repos/aduprat/james-project/tags","blobs_url":"https://api.github.com/repos/aduprat/james-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aduprat/james-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aduprat/james-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/aduprat/james-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aduprat/james-project/statuses/{sha}","languages_url":"https://api.github.com/repos/aduprat/james-project/languages","stargazers_url":"https://api.github.com/repos/aduprat/james-project/stargazers","contributors_url":"https://api.github.com/repos/aduprat/james-project/contributors","subscribers_url":"https://api.github.com/repos/aduprat/james-project/subscribers","subscription_url":"https://api.github.com/repos/aduprat/james-project/subscription","commits_url":"https://api.github.com/repos/aduprat/james-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/aduprat/james-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/aduprat/james-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/aduprat/james-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/aduprat/james-project/contents/{+path}","compare_url":"https://api.github.com/repos/aduprat/james-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aduprat/james-project/merges","archive_url":"https://api.github.com/repos/aduprat/james-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aduprat/james-project/downloads","issues_url":"https://api.github.com/repos/aduprat/james-project/issues{/number}","pulls_url":"https://api.github.com/repos/aduprat/james-project/pulls{/number}","milestones_url":"https://api.github.com/repos/aduprat/james-project/milestones{/number}","notifications_url":"https://api.github.com/repos/aduprat/james-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aduprat/james-project/labels{/name}","releases_url":"https://api.github.com/repos/aduprat/james-project/releases{/id}","deployments_url":"https://api.github.com/repos/aduprat/james-project/deployments","created_at":"2015-07-21T13:55:14Z","updated_at":"2016-01-13T10:07:40Z","pushed_at":"2016-12-13T15:51:33Z","git_url":"git://github.com/aduprat/james-project.git","ssh_url":"git@github.com:aduprat/james-project.git","clone_url":"https://github.com/aduprat/james-project.git","svn_url":"https://github.com/aduprat/james-project","homepage":null,"size":17480,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"linagora:master","ref":"master","sha":"9a3800acac1249daa97b115c53ff803ca5a78573","user":{"login":"linagora","id":1230365,"avatar_url":"https://avatars.githubusercontent.com/u/1230365?v=3","gravatar_id":"","url":"https://api.github.com/users/linagora","html_url":"https://github.com/linagora","followers_url":"https://api.github.com/users/linagora/followers","following_url":"https://api.github.com/users/linagora/following{/other_user}","gists_url":"https://api.github.com/users/linagora/gists{/gist_id}","starred_url":"https://api.github.com/users/linagora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linagora/subscriptions","organizations_url":"https://api.github.com/users/linagora/orgs","repos_url":"https://api.github.com/users/linagora/repos","events_url":"https://api.github.com/users/linagora/events{/privacy}","received_events_url":"https://api.github.com/users/linagora/received_events","type":"Organization","site_admin":false},"repo":{"id":39182136,"name":"james-project","full_name":"linagora/james-project","owner":{"login":"linagora","id":1230365,"avatar_url":"https://avatars.githubusercontent.com/u/1230365?v=3","gravatar_id":"","url":"https://api.github.com/users/linagora","html_url":"https://github.com/linagora","followers_url":"https://api.github.com/users/linagora/followers","following_url":"https://api.github.com/users/linagora/following{/other_user}","gists_url":"https://api.github.com/users/linagora/gists{/gist_id}","starred_url":"https://api.github.com/users/linagora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linagora/subscriptions","organizations_url":"https://api.github.com/users/linagora/orgs","repos_url":"https://api.github.com/users/linagora/repos","events_url":"https://api.github.com/users/linagora/events{/privacy}","received_events_url":"https://api.github.com/users/linagora/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linagora/james-project","description":"Mirror of Apache James Project","fork":true,"url":"https://api.github.com/repos/linagora/james-project","forks_url":"https://api.github.com/repos/linagora/james-project/forks","keys_url":"https://api.github.com/repos/linagora/james-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linagora/james-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linagora/james-project/teams","hooks_url":"https://api.github.com/repos/linagora/james-project/hooks","issue_events_url":"https://api.github.com/repos/linagora/james-project/issues/events{/number}","events_url":"https://api.github.com/repos/linagora/james-project/events","assignees_url":"https://api.github.com/repos/linagora/james-project/assignees{/user}","branches_url":"https://api.github.com/repos/linagora/james-project/branches{/branch}","tags_url":"https://api.github.com/repos/linagora/james-project/tags","blobs_url":"https://api.github.com/repos/linagora/james-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linagora/james-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linagora/james-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/linagora/james-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linagora/james-project/statuses/{sha}","languages_url":"https://api.github.com/repos/linagora/james-project/languages","stargazers_url":"https://api.github.com/repos/linagora/james-project/stargazers","contributors_url":"https://api.github.com/repos/linagora/james-project/contributors","subscribers_url":"https://api.github.com/repos/linagora/james-project/subscribers","subscription_url":"https://api.github.com/repos/linagora/james-project/subscription","commits_url":"https://api.github.com/repos/linagora/james-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/linagora/james-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/linagora/james-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/linagora/james-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/linagora/james-project/contents/{+path}","compare_url":"https://api.github.com/repos/linagora/james-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linagora/james-project/merges","archive_url":"https://api.github.com/repos/linagora/james-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linagora/james-project/downloads","issues_url":"https://api.github.com/repos/linagora/james-project/issues{/number}","pulls_url":"https://api.github.com/repos/linagora/james-project/pulls{/number}","milestones_url":"https://api.github.com/repos/linagora/james-project/milestones{/number}","notifications_url":"https://api.github.com/repos/linagora/james-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linagora/james-project/labels{/name}","releases_url":"https://api.github.com/repos/linagora/james-project/releases{/id}","deployments_url":"https://api.github.com/repos/linagora/james-project/deployments","created_at":"2015-07-16T07:04:59Z","updated_at":"2016-12-12T10:41:27Z","pushed_at":"2016-12-13T15:25:45Z","git_url":"git://github.com/linagora/james-project.git","ssh_url":"git@github.com:linagora/james-project.git","clone_url":"https://github.com/linagora/james-project.git","svn_url":"https://github.com/linagora/james-project","homepage":null,"size":20150,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":23,"forks":9,"open_issues":23,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linagora/james-project/pulls/506"},"html":{"href":"https://github.com/linagora/james-project/pull/506"},"issue":{"href":"https://api.github.com/repos/linagora/james-project/issues/506"},"comments":{"href":"https://api.github.com/repos/linagora/james-project/issues/506/comments"},"review_comments":{"href":"https://api.github.com/repos/linagora/james-project/pulls/506/comments"},"review_comment":{"href":"https://api.github.com/repos/linagora/james-project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linagora/james-project/pulls/506/commits"},"statuses":{"href":"https://api.github.com/repos/linagora/james-project/statuses/7eae6964d57c17b3831b8fc63502ba34fd84a993"}}}}
{"actor":{"display_login":"chibenwa"}}