{"action":"created","comment":{"url":"https://api.github.com/repos/k9mail/k-9/pulls/comments/56094327","id":56094327,"diff_hunk":"@@ -0,0 +1,56 @@\n+package com.fsck.k9.helper;\n+\n+import com.fsck.k9.mail.Address;\n+import com.fsck.k9.mail.Message;\n+\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.robolectric.RobolectricTestRunner;\n+import org.robolectric.annotation.Config;\n+\n+import static org.junit.Assert.assertSame;\n+import static org.mockito.Mockito.mock;\n+import static org.mockito.Mockito.when;\n+\n+@RunWith(RobolectricTestRunner.class)\n+@Config(manifest = Config.NONE, sdk = 21)\n+public class ReplyToParserTest {\n+    private Message message = mock(Message.class);\n+    private Address[] replyToAddresses = new Address[]{new Address(\"replyTo@example.com\")};\n+    private Address[] listPostAddresses = new Address[]{new Address(\"listPost@example.com\")};\n+    private Address[] fromAddresses = new Address[]{new Address(\"from@example.com\")};\n+\n+    @Before\n+    public void setUp() throws Exception {\n+        when(message.getReplyTo()).thenReturn(new Address[]{});\n+        when(message.getListPost()).thenReturn(new Address[]{});\n+        when(message.getFrom()).thenReturn(new Address[]{});\n+    }\n+\n+    @Test\n+    public void getRecipientsToReplyTo_should_prefer_replyTo_over_any_other_field() {","path":"k9mail/src/test/java/com/fsck/k9/helper/ReplyToParserTest.java","position":32,"original_position":32,"commit_id":"288d8e0e6f725bada0a633b826c2e9ad45f60e2d","original_commit_id":"288d8e0e6f725bada0a633b826c2e9ad45f60e2d","user":{"login":"cketti","id":218061,"avatar_url":"https://avatars.githubusercontent.com/u/218061?v=3","gravatar_id":"","url":"https://api.github.com/users/cketti","html_url":"https://github.com/cketti","followers_url":"https://api.github.com/users/cketti/followers","following_url":"https://api.github.com/users/cketti/following{/other_user}","gists_url":"https://api.github.com/users/cketti/gists{/gist_id}","starred_url":"https://api.github.com/users/cketti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cketti/subscriptions","organizations_url":"https://api.github.com/users/cketti/orgs","repos_url":"https://api.github.com/users/cketti/repos","events_url":"https://api.github.com/users/cketti/events{/privacy}","received_events_url":"https://api.github.com/users/cketti/received_events","type":"User","site_admin":false},"body":"Again, 'arrange, act, assert' separated by empty lines would be nice.","created_at":"2016-03-14T23:31:44Z","updated_at":"2016-03-14T23:31:44Z","html_url":"https://github.com/k9mail/k-9/pull/1149#discussion_r56094327","pull_request_url":"https://api.github.com/repos/k9mail/k-9/pulls/1149","_links":{"self":{"href":"https://api.github.com/repos/k9mail/k-9/pulls/comments/56094327"},"html":{"href":"https://github.com/k9mail/k-9/pull/1149#discussion_r56094327"},"pull_request":{"href":"https://api.github.com/repos/k9mail/k-9/pulls/1149"}}},"pull_request":{"url":"https://api.github.com/repos/k9mail/k-9/pulls/1149","id":61816079,"html_url":"https://github.com/k9mail/k-9/pull/1149","diff_url":"https://github.com/k9mail/k-9/pull/1149.diff","patch_url":"https://github.com/k9mail/k-9/pull/1149.patch","issue_url":"https://api.github.com/repos/k9mail/k-9/issues/1149","number":1149,"state":"open","locked":false,"title":"Allow List-Post to be interpreted as a 'Reply-To' header","user":{"login":"philipwhiuk","id":1316415,"avatar_url":"https://avatars.githubusercontent.com/u/1316415?v=3","gravatar_id":"","url":"https://api.github.com/users/philipwhiuk","html_url":"https://github.com/philipwhiuk","followers_url":"https://api.github.com/users/philipwhiuk/followers","following_url":"https://api.github.com/users/philipwhiuk/following{/other_user}","gists_url":"https://api.github.com/users/philipwhiuk/gists{/gist_id}","starred_url":"https://api.github.com/users/philipwhiuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipwhiuk/subscriptions","organizations_url":"https://api.github.com/users/philipwhiuk/orgs","repos_url":"https://api.github.com/users/philipwhiuk/repos","events_url":"https://api.github.com/users/philipwhiuk/events{/privacy}","received_events_url":"https://api.github.com/users/philipwhiuk/received_events","type":"User","site_admin":false},"body":"This solves the mailman list behaviour without adding tons of extra code in random places or the complexity of an extra class.\r\n\r\nUnless we want to treat lists as a separate Intent (which seems OTT) this seems to do what people want. It certainly does what I want.","created_at":"2016-03-05T16:11:56Z","updated_at":"2016-03-14T23:31:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6fb204733ebe246e37063d95ad02a91b02a4c530","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/k9mail/k-9/pulls/1149/commits","review_comments_url":"https://api.github.com/repos/k9mail/k-9/pulls/1149/comments","review_comment_url":"https://api.github.com/repos/k9mail/k-9/pulls/comments{/number}","comments_url":"https://api.github.com/repos/k9mail/k-9/issues/1149/comments","statuses_url":"https://api.github.com/repos/k9mail/k-9/statuses/288d8e0e6f725bada0a633b826c2e9ad45f60e2d","head":{"label":"philipwhiuk:listPostAsReplyTo","ref":"listPostAsReplyTo","sha":"288d8e0e6f725bada0a633b826c2e9ad45f60e2d","user":{"login":"philipwhiuk","id":1316415,"avatar_url":"https://avatars.githubusercontent.com/u/1316415?v=3","gravatar_id":"","url":"https://api.github.com/users/philipwhiuk","html_url":"https://github.com/philipwhiuk","followers_url":"https://api.github.com/users/philipwhiuk/followers","following_url":"https://api.github.com/users/philipwhiuk/following{/other_user}","gists_url":"https://api.github.com/users/philipwhiuk/gists{/gist_id}","starred_url":"https://api.github.com/users/philipwhiuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipwhiuk/subscriptions","organizations_url":"https://api.github.com/users/philipwhiuk/orgs","repos_url":"https://api.github.com/users/philipwhiuk/repos","events_url":"https://api.github.com/users/philipwhiuk/events{/privacy}","received_events_url":"https://api.github.com/users/philipwhiuk/received_events","type":"User","site_admin":false},"repo":{"id":53193707,"name":"k-9","full_name":"philipwhiuk/k-9","owner":{"login":"philipwhiuk","id":1316415,"avatar_url":"https://avatars.githubusercontent.com/u/1316415?v=3","gravatar_id":"","url":"https://api.github.com/users/philipwhiuk","html_url":"https://github.com/philipwhiuk","followers_url":"https://api.github.com/users/philipwhiuk/followers","following_url":"https://api.github.com/users/philipwhiuk/following{/other_user}","gists_url":"https://api.github.com/users/philipwhiuk/gists{/gist_id}","starred_url":"https://api.github.com/users/philipwhiuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipwhiuk/subscriptions","organizations_url":"https://api.github.com/users/philipwhiuk/orgs","repos_url":"https://api.github.com/users/philipwhiuk/repos","events_url":"https://api.github.com/users/philipwhiuk/events{/privacy}","received_events_url":"https://api.github.com/users/philipwhiuk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/philipwhiuk/k-9","description":"K-9 Mail – Advanced Email for Android","fork":true,"url":"https://api.github.com/repos/philipwhiuk/k-9","forks_url":"https://api.github.com/repos/philipwhiuk/k-9/forks","keys_url":"https://api.github.com/repos/philipwhiuk/k-9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/philipwhiuk/k-9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/philipwhiuk/k-9/teams","hooks_url":"https://api.github.com/repos/philipwhiuk/k-9/hooks","issue_events_url":"https://api.github.com/repos/philipwhiuk/k-9/issues/events{/number}","events_url":"https://api.github.com/repos/philipwhiuk/k-9/events","assignees_url":"https://api.github.com/repos/philipwhiuk/k-9/assignees{/user}","branches_url":"https://api.github.com/repos/philipwhiuk/k-9/branches{/branch}","tags_url":"https://api.github.com/repos/philipwhiuk/k-9/tags","blobs_url":"https://api.github.com/repos/philipwhiuk/k-9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/philipwhiuk/k-9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/philipwhiuk/k-9/git/refs{/sha}","trees_url":"https://api.github.com/repos/philipwhiuk/k-9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/philipwhiuk/k-9/statuses/{sha}","languages_url":"https://api.github.com/repos/philipwhiuk/k-9/languages","stargazers_url":"https://api.github.com/repos/philipwhiuk/k-9/stargazers","contributors_url":"https://api.github.com/repos/philipwhiuk/k-9/contributors","subscribers_url":"https://api.github.com/repos/philipwhiuk/k-9/subscribers","subscription_url":"https://api.github.com/repos/philipwhiuk/k-9/subscription","commits_url":"https://api.github.com/repos/philipwhiuk/k-9/commits{/sha}","git_commits_url":"https://api.github.com/repos/philipwhiuk/k-9/git/commits{/sha}","comments_url":"https://api.github.com/repos/philipwhiuk/k-9/comments{/number}","issue_comment_url":"https://api.github.com/repos/philipwhiuk/k-9/issues/comments{/number}","contents_url":"https://api.github.com/repos/philipwhiuk/k-9/contents/{+path}","compare_url":"https://api.github.com/repos/philipwhiuk/k-9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/philipwhiuk/k-9/merges","archive_url":"https://api.github.com/repos/philipwhiuk/k-9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/philipwhiuk/k-9/downloads","issues_url":"https://api.github.com/repos/philipwhiuk/k-9/issues{/number}","pulls_url":"https://api.github.com/repos/philipwhiuk/k-9/pulls{/number}","milestones_url":"https://api.github.com/repos/philipwhiuk/k-9/milestones{/number}","notifications_url":"https://api.github.com/repos/philipwhiuk/k-9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/philipwhiuk/k-9/labels{/name}","releases_url":"https://api.github.com/repos/philipwhiuk/k-9/releases{/id}","deployments_url":"https://api.github.com/repos/philipwhiuk/k-9/deployments","created_at":"2016-03-05T09:28:04Z","updated_at":"2016-03-05T09:28:11Z","pushed_at":"2016-03-14T21:16:05Z","git_url":"git://github.com/philipwhiuk/k-9.git","ssh_url":"git@github.com:philipwhiuk/k-9.git","clone_url":"https://github.com/philipwhiuk/k-9.git","svn_url":"https://github.com/philipwhiuk/k-9","homepage":"","size":37363,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"k9mail:master","ref":"master","sha":"af7e0a1b70e178c6f11e21f3be721b67472de9b2","user":{"login":"k9mail","id":567044,"avatar_url":"https://avatars.githubusercontent.com/u/567044?v=3","gravatar_id":"","url":"https://api.github.com/users/k9mail","html_url":"https://github.com/k9mail","followers_url":"https://api.github.com/users/k9mail/followers","following_url":"https://api.github.com/users/k9mail/following{/other_user}","gists_url":"https://api.github.com/users/k9mail/gists{/gist_id}","starred_url":"https://api.github.com/users/k9mail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k9mail/subscriptions","organizations_url":"https://api.github.com/users/k9mail/orgs","repos_url":"https://api.github.com/users/k9mail/repos","events_url":"https://api.github.com/users/k9mail/events{/privacy}","received_events_url":"https://api.github.com/users/k9mail/received_events","type":"Organization","site_admin":false},"repo":{"id":1326671,"name":"k-9","full_name":"k9mail/k-9","owner":{"login":"k9mail","id":567044,"avatar_url":"https://avatars.githubusercontent.com/u/567044?v=3","gravatar_id":"","url":"https://api.github.com/users/k9mail","html_url":"https://github.com/k9mail","followers_url":"https://api.github.com/users/k9mail/followers","following_url":"https://api.github.com/users/k9mail/following{/other_user}","gists_url":"https://api.github.com/users/k9mail/gists{/gist_id}","starred_url":"https://api.github.com/users/k9mail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k9mail/subscriptions","organizations_url":"https://api.github.com/users/k9mail/orgs","repos_url":"https://api.github.com/users/k9mail/repos","events_url":"https://api.github.com/users/k9mail/events{/privacy}","received_events_url":"https://api.github.com/users/k9mail/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/k9mail/k-9","description":"K-9 Mail – Advanced Email for Android","fork":false,"url":"https://api.github.com/repos/k9mail/k-9","forks_url":"https://api.github.com/repos/k9mail/k-9/forks","keys_url":"https://api.github.com/repos/k9mail/k-9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/k9mail/k-9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/k9mail/k-9/teams","hooks_url":"https://api.github.com/repos/k9mail/k-9/hooks","issue_events_url":"https://api.github.com/repos/k9mail/k-9/issues/events{/number}","events_url":"https://api.github.com/repos/k9mail/k-9/events","assignees_url":"https://api.github.com/repos/k9mail/k-9/assignees{/user}","branches_url":"https://api.github.com/repos/k9mail/k-9/branches{/branch}","tags_url":"https://api.github.com/repos/k9mail/k-9/tags","blobs_url":"https://api.github.com/repos/k9mail/k-9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/k9mail/k-9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/k9mail/k-9/git/refs{/sha}","trees_url":"https://api.github.com/repos/k9mail/k-9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/k9mail/k-9/statuses/{sha}","languages_url":"https://api.github.com/repos/k9mail/k-9/languages","stargazers_url":"https://api.github.com/repos/k9mail/k-9/stargazers","contributors_url":"https://api.github.com/repos/k9mail/k-9/contributors","subscribers_url":"https://api.github.com/repos/k9mail/k-9/subscribers","subscription_url":"https://api.github.com/repos/k9mail/k-9/subscription","commits_url":"https://api.github.com/repos/k9mail/k-9/commits{/sha}","git_commits_url":"https://api.github.com/repos/k9mail/k-9/git/commits{/sha}","comments_url":"https://api.github.com/repos/k9mail/k-9/comments{/number}","issue_comment_url":"https://api.github.com/repos/k9mail/k-9/issues/comments{/number}","contents_url":"https://api.github.com/repos/k9mail/k-9/contents/{+path}","compare_url":"https://api.github.com/repos/k9mail/k-9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/k9mail/k-9/merges","archive_url":"https://api.github.com/repos/k9mail/k-9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/k9mail/k-9/downloads","issues_url":"https://api.github.com/repos/k9mail/k-9/issues{/number}","pulls_url":"https://api.github.com/repos/k9mail/k-9/pulls{/number}","milestones_url":"https://api.github.com/repos/k9mail/k-9/milestones{/number}","notifications_url":"https://api.github.com/repos/k9mail/k-9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/k9mail/k-9/labels{/name}","releases_url":"https://api.github.com/repos/k9mail/k-9/releases{/id}","deployments_url":"https://api.github.com/repos/k9mail/k-9/deployments","created_at":"2011-02-04T02:40:00Z","updated_at":"2016-03-14T16:05:45Z","pushed_at":"2016-03-14T22:31:10Z","git_url":"git://github.com/k9mail/k-9.git","ssh_url":"git@github.com:k9mail/k-9.git","clone_url":"https://github.com/k9mail/k-9.git","svn_url":"https://github.com/k9mail/k-9","homepage":"","size":48126,"stargazers_count":2409,"watchers_count":2409,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1371,"mirror_url":null,"open_issues_count":214,"forks":1371,"open_issues":214,"watchers":2409,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/k9mail/k-9/pulls/1149"},"html":{"href":"https://github.com/k9mail/k-9/pull/1149"},"issue":{"href":"https://api.github.com/repos/k9mail/k-9/issues/1149"},"comments":{"href":"https://api.github.com/repos/k9mail/k-9/issues/1149/comments"},"review_comments":{"href":"https://api.github.com/repos/k9mail/k-9/pulls/1149/comments"},"review_comment":{"href":"https://api.github.com/repos/k9mail/k-9/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/k9mail/k-9/pulls/1149/commits"},"statuses":{"href":"https://api.github.com/repos/k9mail/k-9/statuses/288d8e0e6f725bada0a633b826c2e9ad45f60e2d"}}}}