{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/58984110","id":58984110,"diff_hunk":"@@ -0,0 +1,76 @@\n+/**\n+ * This Source Code Form is subject to the terms of the Mozilla Public License,\n+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can\n+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under\n+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.\n+ *\n+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS\n+ * graphic logo is a trademark of OpenMRS Inc.\n+ */\n+package org.openmrs.notification;\n+\n+import java.util.List;\n+\n+import org.junit.Assert;\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.openmrs.User;\n+import org.openmrs.api.context.Context;\n+import org.openmrs.test.BaseContextSensitiveTest;\n+\n+public class SentMessageServiceTest extends BaseContextSensitiveTest {\n+\n+\tprivate SentMessageService sentMessageService;\n+\tprivate final String SENT_MESSAGES_IN_DB = \"org/openmrs/notification/include/SentMessageServiceTest.xml\";\n+\t\n+\t@Before\n+\tpublic void setup() throws Exception {\n+\t\texecuteDataSet(SENT_MESSAGES_IN_DB);\n+\t\tsentMessageService = Context.getSentMessageService();\n+\t}\n+\t\n+\t@Test\n+\tpublic void saveSentMessage_shouldReturnTheSavedMessage() {\n+\t\tMessage m = new Message();\n+\t\tm.setId(17);\n+\t\tm.setSubject(\"for test\");\n+\t\tm.setContent(\"content for testing\");\n+\t\tUser sender = new User();\n+\t\tsender.setId(27);\n+\t\t\n+\t\tSentMessage sm = sentMessageService.saveSentMessage(new SentMessage(m, sender.getUserId(), null));\n+\t\t\n+\t\tAssert.assertNotNull(sm);\n+\t\tAssert.assertEquals(m.getId(), sm.getMessageId());\n+\t\tAssert.assertEquals(sender.getUserId(), sm.getSenderId());\n+\t}\n+\t\n+\t@Test\n+\tpublic void getSentMessage_shouldGetMessageById() {","path":"api/src/test/java/org/openmrs/notification/SentMessageServiceTest.java","position":49,"original_position":49,"commit_id":"5158a8c8f69aa133ef90fd893bb4d5bb16bbe1fa","original_commit_id":"5158a8c8f69aa133ef90fd893bb4d5bb16bbe1fa","user":{"login":"openmrs-bot","id":7291161,"avatar_url":"https://avatars.githubusercontent.com/u/7291161?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs-bot","html_url":"https://github.com/openmrs-bot","followers_url":"https://api.github.com/users/openmrs-bot/followers","following_url":"https://api.github.com/users/openmrs-bot/following{/other_user}","gists_url":"https://api.github.com/users/openmrs-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs-bot/subscriptions","organizations_url":"https://api.github.com/users/openmrs-bot/orgs","repos_url":"https://api.github.com/users/openmrs-bot/repos","events_url":"https://api.github.com/users/openmrs-bot/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Method names should not contain underscores](https://www.codacy.com/app/infrastructure/openmrs-core/file/2376712032/issues/source?bid=3224683&fileBranchId=3224712#l49)","created_at":"2016-04-08T06:18:30Z","updated_at":"2016-04-08T06:18:30Z","html_url":"https://github.com/openmrs/openmrs-core/pull/1737#discussion_r58984110","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1737","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/58984110"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/1737#discussion_r58984110"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1737"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1737","id":62068834,"html_url":"https://github.com/openmrs/openmrs-core/pull/1737","diff_url":"https://github.com/openmrs/openmrs-core/pull/1737.diff","patch_url":"https://github.com/openmrs/openmrs-core/pull/1737.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/1737","number":1737,"state":"open","locked":false,"title":"TRUNK-2497: Store outgoing MessageService emails in a table","user":{"login":"ivange94","id":11330494,"avatar_url":"https://avatars.githubusercontent.com/u/11330494?v=3","gravatar_id":"","url":"https://api.github.com/users/ivange94","html_url":"https://github.com/ivange94","followers_url":"https://api.github.com/users/ivange94/followers","following_url":"https://api.github.com/users/ivange94/following{/other_user}","gists_url":"https://api.github.com/users/ivange94/gists{/gist_id}","starred_url":"https://api.github.com/users/ivange94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivange94/subscriptions","organizations_url":"https://api.github.com/users/ivange94/orgs","repos_url":"https://api.github.com/users/ivange94/repos","events_url":"https://api.github.com/users/ivange94/events{/privacy}","received_events_url":"https://api.github.com/users/ivange94/received_events","type":"User","site_admin":false},"body":"https://issues.openmrs.org/browse/TRUNK-2497","created_at":"2016-03-08T13:12:11Z","updated_at":"2016-04-08T06:18:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afafb59387111771f491b1be53e4679751e382c8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1737/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1737/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/1737/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-core/statuses/5158a8c8f69aa133ef90fd893bb4d5bb16bbe1fa","head":{"label":"ivange94:TRUNK-2497","ref":"TRUNK-2497","sha":"5158a8c8f69aa133ef90fd893bb4d5bb16bbe1fa","user":{"login":"ivange94","id":11330494,"avatar_url":"https://avatars.githubusercontent.com/u/11330494?v=3","gravatar_id":"","url":"https://api.github.com/users/ivange94","html_url":"https://github.com/ivange94","followers_url":"https://api.github.com/users/ivange94/followers","following_url":"https://api.github.com/users/ivange94/following{/other_user}","gists_url":"https://api.github.com/users/ivange94/gists{/gist_id}","starred_url":"https://api.github.com/users/ivange94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivange94/subscriptions","organizations_url":"https://api.github.com/users/ivange94/orgs","repos_url":"https://api.github.com/users/ivange94/repos","events_url":"https://api.github.com/users/ivange94/events{/privacy}","received_events_url":"https://api.github.com/users/ivange94/received_events","type":"User","site_admin":false},"repo":{"id":40260671,"name":"openmrs-core","full_name":"ivange94/openmrs-core","owner":{"login":"ivange94","id":11330494,"avatar_url":"https://avatars.githubusercontent.com/u/11330494?v=3","gravatar_id":"","url":"https://api.github.com/users/ivange94","html_url":"https://github.com/ivange94","followers_url":"https://api.github.com/users/ivange94/followers","following_url":"https://api.github.com/users/ivange94/following{/other_user}","gists_url":"https://api.github.com/users/ivange94/gists{/gist_id}","starred_url":"https://api.github.com/users/ivange94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivange94/subscriptions","organizations_url":"https://api.github.com/users/ivange94/orgs","repos_url":"https://api.github.com/users/ivange94/repos","events_url":"https://api.github.com/users/ivange94/events{/privacy}","received_events_url":"https://api.github.com/users/ivange94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ivange94/openmrs-core","description":"OpenMRS API and web application code","fork":true,"url":"https://api.github.com/repos/ivange94/openmrs-core","forks_url":"https://api.github.com/repos/ivange94/openmrs-core/forks","keys_url":"https://api.github.com/repos/ivange94/openmrs-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ivange94/openmrs-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ivange94/openmrs-core/teams","hooks_url":"https://api.github.com/repos/ivange94/openmrs-core/hooks","issue_events_url":"https://api.github.com/repos/ivange94/openmrs-core/issues/events{/number}","events_url":"https://api.github.com/repos/ivange94/openmrs-core/events","assignees_url":"https://api.github.com/repos/ivange94/openmrs-core/assignees{/user}","branches_url":"https://api.github.com/repos/ivange94/openmrs-core/branches{/branch}","tags_url":"https://api.github.com/repos/ivange94/openmrs-core/tags","blobs_url":"https://api.github.com/repos/ivange94/openmrs-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ivange94/openmrs-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ivange94/openmrs-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ivange94/openmrs-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ivange94/openmrs-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ivange94/openmrs-core/languages","stargazers_url":"https://api.github.com/repos/ivange94/openmrs-core/stargazers","contributors_url":"https://api.github.com/repos/ivange94/openmrs-core/contributors","subscribers_url":"https://api.github.com/repos/ivange94/openmrs-core/subscribers","subscription_url":"https://api.github.com/repos/ivange94/openmrs-core/subscription","commits_url":"https://api.github.com/repos/ivange94/openmrs-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ivange94/openmrs-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ivange94/openmrs-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ivange94/openmrs-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ivange94/openmrs-core/contents/{+path}","compare_url":"https://api.github.com/repos/ivange94/openmrs-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ivange94/openmrs-core/merges","archive_url":"https://api.github.com/repos/ivange94/openmrs-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ivange94/openmrs-core/downloads","issues_url":"https://api.github.com/repos/ivange94/openmrs-core/issues{/number}","pulls_url":"https://api.github.com/repos/ivange94/openmrs-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ivange94/openmrs-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ivange94/openmrs-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ivange94/openmrs-core/labels{/name}","releases_url":"https://api.github.com/repos/ivange94/openmrs-core/releases{/id}","deployments_url":"https://api.github.com/repos/ivange94/openmrs-core/deployments","created_at":"2015-08-05T17:58:52Z","updated_at":"2016-01-14T14:52:58Z","pushed_at":"2016-03-30T20:36:08Z","git_url":"git://github.com/ivange94/openmrs-core.git","ssh_url":"git@github.com:ivange94/openmrs-core.git","clone_url":"https://github.com/ivange94/openmrs-core.git","svn_url":"https://github.com/ivange94/openmrs-core","homepage":"http://openmrs.org","size":223198,"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":"openmrs:master","ref":"master","sha":"a392359e0f01f6c3e6e78c4143463fdd94d3fd7e","user":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"repo":{"id":5187976,"name":"openmrs-core","full_name":"openmrs/openmrs-core","owner":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmrs/openmrs-core","description":"OpenMRS API and web application code","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-core","forks_url":"https://api.github.com/repos/openmrs/openmrs-core/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-core/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-core/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-core/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-core/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-core/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-core/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-core/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-core/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-core/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-core/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-core/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-core/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-core/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-core/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-core/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-core/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-core/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-core/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-core/releases{/id}","deployments_url":"https://api.github.com/repos/openmrs/openmrs-core/deployments","created_at":"2012-07-26T04:54:29Z","updated_at":"2016-04-07T06:12:11Z","pushed_at":"2016-04-07T19:40:24Z","git_url":"git://github.com/openmrs/openmrs-core.git","ssh_url":"git@github.com:openmrs/openmrs-core.git","clone_url":"https://github.com/openmrs/openmrs-core.git","svn_url":"https://github.com/openmrs/openmrs-core","homepage":"http://openmrs.org","size":236474,"stargazers_count":320,"watchers_count":320,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1444,"mirror_url":null,"open_issues_count":4,"forks":1444,"open_issues":4,"watchers":320,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1737"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/1737"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/1737"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/1737/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1737/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1737/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-core/statuses/5158a8c8f69aa133ef90fd893bb4d5bb16bbe1fa"}}}}