{"action":"created","comment":{"url":"https://api.github.com/repos/linagora/james-project/pulls/comments/68201089","id":68201089,"diff_hunk":"@@ -0,0 +1,183 @@\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.imap.processor;\n+\n+import static org.assertj.core.api.Assertions.assertThat;\n+import static org.mockito.Matchers.any;\n+import static org.mockito.Matchers.eq;\n+import static org.mockito.Mockito.doThrow;\n+import static org.mockito.Mockito.mock;\n+import static org.mockito.Mockito.never;\n+import static org.mockito.Mockito.times;\n+import static org.mockito.Mockito.verify;\n+import static org.mockito.Mockito.when;\n+\n+import java.util.List;\n+\n+import org.apache.james.imap.api.ImapCommand;\n+import org.apache.james.imap.api.ImapConstants;\n+import org.apache.james.imap.api.ImapSessionState;\n+import org.apache.james.imap.api.ImapSessionUtils;\n+import org.apache.james.imap.api.display.HumanReadableText;\n+import org.apache.james.imap.api.message.response.StatusResponse;\n+import org.apache.james.imap.api.message.response.StatusResponseFactory;\n+import org.apache.james.imap.api.process.ImapProcessor;\n+import org.apache.james.imap.api.process.ImapSession;\n+import org.apache.james.imap.message.request.SetAnnotationRequest;\n+import org.apache.james.mailbox.MailboxManager;\n+import org.apache.james.mailbox.MailboxManager.MailboxCapabilities;\n+import org.apache.james.mailbox.MailboxSession;\n+import org.apache.james.mailbox.exception.MailboxException;\n+import org.apache.james.mailbox.model.MailboxAnnotation;\n+import org.apache.james.mailbox.model.MailboxPath;\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.mockito.ArgumentCaptor;\n+import org.slf4j.Logger;\n+\n+import com.google.common.collect.Lists;\n+\n+public class SetAnnotationProcessorTest {\n+\n+    private static final String TAG = \"TAG\";\n+    \n+    private SetAnnotationProcessor processor;\n+\n+    private ImapProcessor mockNextProcessor;\n+    private MailboxManager mockMailboxManager;\n+    private StatusResponseFactory mockStatusResponseFactory;\n+    private ImapProcessor.Responder mockResponder;\n+    private ImapSession mockImapSession;\n+    private MailboxSession mockMailboxSession;\n+    \n+    private final List<MailboxAnnotation> MAILBOX_ANNOTATIONS = Lists.newArrayList(MailboxAnnotation.newInstance(\"/private/key\", \"anyValue\"));","path":"protocols/imap/src/test/java/org/apache/james/imap/processor/SetAnnotationProcessorTest.java","position":70,"original_position":70,"commit_id":"2b7dccd1db9a6caf9099222d52cf7a2c474196ad","original_commit_id":"9be6871e73d67494fefcd7fc18a49337afe1c39d","user":{"login":"mbaechler","id":708318,"avatar_url":"https://avatars.githubusercontent.com/u/708318?v=3","gravatar_id":"","url":"https://api.github.com/users/mbaechler","html_url":"https://github.com/mbaechler","followers_url":"https://api.github.com/users/mbaechler/followers","following_url":"https://api.github.com/users/mbaechler/following{/other_user}","gists_url":"https://api.github.com/users/mbaechler/gists{/gist_id}","starred_url":"https://api.github.com/users/mbaechler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbaechler/subscriptions","organizations_url":"https://api.github.com/users/mbaechler/orgs","repos_url":"https://api.github.com/users/mbaechler/repos","events_url":"https://api.github.com/users/mbaechler/events{/privacy}","received_events_url":"https://api.github.com/users/mbaechler/received_events","type":"User","site_admin":false},"body":"field init is usually done in setup","created_at":"2016-06-23T09:15:17Z","updated_at":"2016-06-23T09:15:17Z","html_url":"https://github.com/linagora/james-project/pull/291#discussion_r68201089","pull_request_url":"https://api.github.com/repos/linagora/james-project/pulls/291","_links":{"self":{"href":"https://api.github.com/repos/linagora/james-project/pulls/comments/68201089"},"html":{"href":"https://github.com/linagora/james-project/pull/291#discussion_r68201089"},"pull_request":{"href":"https://api.github.com/repos/linagora/james-project/pulls/291"}}},"pull_request":{"url":"https://api.github.com/repos/linagora/james-project/pulls/291","id":74915276,"html_url":"https://github.com/linagora/james-project/pull/291","diff_url":"https://github.com/linagora/james-project/pull/291.diff","patch_url":"https://github.com/linagora/james-project/pull/291.patch","issue_url":"https://api.github.com/repos/linagora/james-project/issues/291","number":291,"state":"open","locked":false,"title":"Mailbox 270: setMetadata command with multiple entries and multiple lines","user":{"login":"quynhn","id":296170,"avatar_url":"https://avatars.githubusercontent.com/u/296170?v=3","gravatar_id":"","url":"https://api.github.com/users/quynhn","html_url":"https://github.com/quynhn","followers_url":"https://api.github.com/users/quynhn/followers","following_url":"https://api.github.com/users/quynhn/following{/other_user}","gists_url":"https://api.github.com/users/quynhn/gists{/gist_id}","starred_url":"https://api.github.com/users/quynhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quynhn/subscriptions","organizations_url":"https://api.github.com/users/quynhn/orgs","repos_url":"https://api.github.com/users/quynhn/repos","events_url":"https://api.github.com/users/quynhn/events{/privacy}","received_events_url":"https://api.github.com/users/quynhn/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-23T08:35:45Z","updated_at":"2016-06-23T09:15:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"02d96fd8557a435ec16c3f57d0009683a5e34c74","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/linagora/james-project/pulls/291/commits","review_comments_url":"https://api.github.com/repos/linagora/james-project/pulls/291/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/291/comments","statuses_url":"https://api.github.com/repos/linagora/james-project/statuses/2b7dccd1db9a6caf9099222d52cf7a2c474196ad","head":{"label":"quynhn:MAILBOX-270","ref":"MAILBOX-270","sha":"2b7dccd1db9a6caf9099222d52cf7a2c474196ad","user":{"login":"quynhn","id":296170,"avatar_url":"https://avatars.githubusercontent.com/u/296170?v=3","gravatar_id":"","url":"https://api.github.com/users/quynhn","html_url":"https://github.com/quynhn","followers_url":"https://api.github.com/users/quynhn/followers","following_url":"https://api.github.com/users/quynhn/following{/other_user}","gists_url":"https://api.github.com/users/quynhn/gists{/gist_id}","starred_url":"https://api.github.com/users/quynhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quynhn/subscriptions","organizations_url":"https://api.github.com/users/quynhn/orgs","repos_url":"https://api.github.com/users/quynhn/repos","events_url":"https://api.github.com/users/quynhn/events{/privacy}","received_events_url":"https://api.github.com/users/quynhn/received_events","type":"User","site_admin":false},"repo":{"id":58912828,"name":"james-project","full_name":"quynhn/james-project","owner":{"login":"quynhn","id":296170,"avatar_url":"https://avatars.githubusercontent.com/u/296170?v=3","gravatar_id":"","url":"https://api.github.com/users/quynhn","html_url":"https://github.com/quynhn","followers_url":"https://api.github.com/users/quynhn/followers","following_url":"https://api.github.com/users/quynhn/following{/other_user}","gists_url":"https://api.github.com/users/quynhn/gists{/gist_id}","starred_url":"https://api.github.com/users/quynhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quynhn/subscriptions","organizations_url":"https://api.github.com/users/quynhn/orgs","repos_url":"https://api.github.com/users/quynhn/repos","events_url":"https://api.github.com/users/quynhn/events{/privacy}","received_events_url":"https://api.github.com/users/quynhn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quynhn/james-project","description":"Mirror of Apache James Project","fork":true,"url":"https://api.github.com/repos/quynhn/james-project","forks_url":"https://api.github.com/repos/quynhn/james-project/forks","keys_url":"https://api.github.com/repos/quynhn/james-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quynhn/james-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quynhn/james-project/teams","hooks_url":"https://api.github.com/repos/quynhn/james-project/hooks","issue_events_url":"https://api.github.com/repos/quynhn/james-project/issues/events{/number}","events_url":"https://api.github.com/repos/quynhn/james-project/events","assignees_url":"https://api.github.com/repos/quynhn/james-project/assignees{/user}","branches_url":"https://api.github.com/repos/quynhn/james-project/branches{/branch}","tags_url":"https://api.github.com/repos/quynhn/james-project/tags","blobs_url":"https://api.github.com/repos/quynhn/james-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quynhn/james-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quynhn/james-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/quynhn/james-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quynhn/james-project/statuses/{sha}","languages_url":"https://api.github.com/repos/quynhn/james-project/languages","stargazers_url":"https://api.github.com/repos/quynhn/james-project/stargazers","contributors_url":"https://api.github.com/repos/quynhn/james-project/contributors","subscribers_url":"https://api.github.com/repos/quynhn/james-project/subscribers","subscription_url":"https://api.github.com/repos/quynhn/james-project/subscription","commits_url":"https://api.github.com/repos/quynhn/james-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/quynhn/james-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/quynhn/james-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/quynhn/james-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/quynhn/james-project/contents/{+path}","compare_url":"https://api.github.com/repos/quynhn/james-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quynhn/james-project/merges","archive_url":"https://api.github.com/repos/quynhn/james-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quynhn/james-project/downloads","issues_url":"https://api.github.com/repos/quynhn/james-project/issues{/number}","pulls_url":"https://api.github.com/repos/quynhn/james-project/pulls{/number}","milestones_url":"https://api.github.com/repos/quynhn/james-project/milestones{/number}","notifications_url":"https://api.github.com/repos/quynhn/james-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quynhn/james-project/labels{/name}","releases_url":"https://api.github.com/repos/quynhn/james-project/releases{/id}","deployments_url":"https://api.github.com/repos/quynhn/james-project/deployments","created_at":"2016-05-16T07:35:33Z","updated_at":"2016-05-16T07:35:44Z","pushed_at":"2016-06-23T07:52:43Z","git_url":"git://github.com/quynhn/james-project.git","ssh_url":"git@github.com:quynhn/james-project.git","clone_url":"https://github.com/quynhn/james-project.git","svn_url":"https://github.com/quynhn/james-project","homepage":null,"size":11887,"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":"master"}},"base":{"label":"linagora:master","ref":"master","sha":"89ca3b8b4e6754a5eb5b5ba4be3bc8c987904023","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-06-23T08:08:51Z","pushed_at":"2016-06-23T08:35: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":14362,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":10,"forks":8,"open_issues":10,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linagora/james-project/pulls/291"},"html":{"href":"https://github.com/linagora/james-project/pull/291"},"issue":{"href":"https://api.github.com/repos/linagora/james-project/issues/291"},"comments":{"href":"https://api.github.com/repos/linagora/james-project/issues/291/comments"},"review_comments":{"href":"https://api.github.com/repos/linagora/james-project/pulls/291/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/291/commits"},"statuses":{"href":"https://api.github.com/repos/linagora/james-project/statuses/2b7dccd1db9a6caf9099222d52cf7a2c474196ad"}}}}
{"actor":{"display_login":"mbaechler"}}