{"action":"created","comment":{"url":"https://api.github.com/repos/wso2-dev/product-esb/pulls/comments/23373978","id":23373978,"diff_hunk":"@@ -0,0 +1,298 @@\n+/*\n+ * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+ *\n+ * WSO2 Inc. licenses this file to you under the Apache License,\n+ * Version 2.0 (the \"License\"); you may not use this file except\n+ * in compliance with the License.\n+ * 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.wso2.carbon.esb.mailto.transport.utils;\n+\n+\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+import org.wso2.carbon.automation.engine.context.AutomationContext;\n+import org.wso2.carbon.automation.test.utils.common.EmailSender;\n+import org.wso2.carbon.integration.common.admin.client.LogViewerClient;\n+import org.wso2.carbon.logging.view.stub.LogViewerLogViewerException;\n+import org.wso2.carbon.logging.view.stub.types.carbon.LogEvent;\n+\n+import javax.mail.Flags;\n+import javax.mail.Folder;\n+import javax.mail.Message;\n+import javax.mail.MessagingException;\n+import javax.mail.PasswordAuthentication;\n+import javax.mail.Session;\n+import javax.mail.Store;\n+import javax.mail.search.AndTerm;\n+import javax.mail.search.BodyTerm;\n+import javax.mail.search.FlagTerm;\n+import javax.mail.search.SearchTerm;\n+import javax.mail.search.SubjectTerm;\n+import javax.xml.stream.XMLStreamException;\n+import javax.xml.xpath.XPathExpressionException;\n+import java.io.IOException;\n+import java.rmi.RemoteException;\n+import java.util.Calendar;\n+import java.util.Properties;\n+\n+/**\n+ * This class is for sending emails, get email count, delete emails and search a string in log\n+ */\n+public class MailToTransportUtil {","path":"modules/integration/tests-integration/tests-transport/src/test/java/org/wso2/carbon/esb/mailto/transport/utils/MailToTransportUtil.java","position":52,"original_position":52,"commit_id":"c6669ef58a4cbc49e5db2a86938a4b99f7728c61","original_commit_id":"c6669ef58a4cbc49e5db2a86938a4b99f7728c61","user":{"login":"krishanthasamaraweera","id":6601948,"avatar_url":"https://avatars.githubusercontent.com/u/6601948?v=3","gravatar_id":"","url":"https://api.github.com/users/krishanthasamaraweera","html_url":"https://github.com/krishanthasamaraweera","followers_url":"https://api.github.com/users/krishanthasamaraweera/followers","following_url":"https://api.github.com/users/krishanthasamaraweera/following{/other_user}","gists_url":"https://api.github.com/users/krishanthasamaraweera/gists{/gist_id}","starred_url":"https://api.github.com/users/krishanthasamaraweera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishanthasamaraweera/subscriptions","organizations_url":"https://api.github.com/users/krishanthasamaraweera/orgs","repos_url":"https://api.github.com/users/krishanthasamaraweera/repos","events_url":"https://api.github.com/users/krishanthasamaraweera/events{/privacy}","received_events_url":"https://api.github.com/users/krishanthasamaraweera/received_events","type":"User","site_admin":false},"body":"Move this class to esb test utils, so other modules can also use the same class","created_at":"2015-01-22T13:15:28Z","updated_at":"2015-01-22T13:15:28Z","html_url":"https://github.com/wso2-dev/product-esb/pull/129#discussion_r23373978","pull_request_url":"https://api.github.com/repos/wso2-dev/product-esb/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/wso2-dev/product-esb/pulls/comments/23373978"},"html":{"href":"https://github.com/wso2-dev/product-esb/pull/129#discussion_r23373978"},"pull_request":{"href":"https://api.github.com/repos/wso2-dev/product-esb/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/wso2-dev/product-esb/pulls/129","id":26500900,"html_url":"https://github.com/wso2-dev/product-esb/pull/129","diff_url":"https://github.com/wso2-dev/product-esb/pull/129.diff","patch_url":"https://github.com/wso2-dev/product-esb/pull/129.patch","issue_url":"https://api.github.com/repos/wso2-dev/product-esb/issues/129","number":129,"state":"open","locked":false,"title":"MailTo Transport Test Cases","user":{"login":"irham0019","id":8790160,"avatar_url":"https://avatars.githubusercontent.com/u/8790160?v=3","gravatar_id":"","url":"https://api.github.com/users/irham0019","html_url":"https://github.com/irham0019","followers_url":"https://api.github.com/users/irham0019/followers","following_url":"https://api.github.com/users/irham0019/following{/other_user}","gists_url":"https://api.github.com/users/irham0019/gists{/gist_id}","starred_url":"https://api.github.com/users/irham0019/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irham0019/subscriptions","organizations_url":"https://api.github.com/users/irham0019/orgs","repos_url":"https://api.github.com/users/irham0019/repos","events_url":"https://api.github.com/users/irham0019/events{/privacy}","received_events_url":"https://api.github.com/users/irham0019/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-12-23T09:08:38Z","updated_at":"2015-01-22T13:15:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"667a4175268a50f7a1ba01af2616aa42baffee4c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2-dev/product-esb/pulls/129/commits","review_comments_url":"https://api.github.com/repos/wso2-dev/product-esb/pulls/129/comments","review_comment_url":"https://api.github.com/repos/wso2-dev/product-esb/pulls/comments/{number}","comments_url":"https://api.github.com/repos/wso2-dev/product-esb/issues/129/comments","statuses_url":"https://api.github.com/repos/wso2-dev/product-esb/statuses/c6669ef58a4cbc49e5db2a86938a4b99f7728c61","head":{"label":"irham0019:master","ref":"master","sha":"c6669ef58a4cbc49e5db2a86938a4b99f7728c61","user":{"login":"irham0019","id":8790160,"avatar_url":"https://avatars.githubusercontent.com/u/8790160?v=3","gravatar_id":"","url":"https://api.github.com/users/irham0019","html_url":"https://github.com/irham0019","followers_url":"https://api.github.com/users/irham0019/followers","following_url":"https://api.github.com/users/irham0019/following{/other_user}","gists_url":"https://api.github.com/users/irham0019/gists{/gist_id}","starred_url":"https://api.github.com/users/irham0019/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irham0019/subscriptions","organizations_url":"https://api.github.com/users/irham0019/orgs","repos_url":"https://api.github.com/users/irham0019/repos","events_url":"https://api.github.com/users/irham0019/events{/privacy}","received_events_url":"https://api.github.com/users/irham0019/received_events","type":"User","site_admin":false},"repo":{"id":28379061,"name":"product-esb","full_name":"irham0019/product-esb","owner":{"login":"irham0019","id":8790160,"avatar_url":"https://avatars.githubusercontent.com/u/8790160?v=3","gravatar_id":"","url":"https://api.github.com/users/irham0019","html_url":"https://github.com/irham0019","followers_url":"https://api.github.com/users/irham0019/followers","following_url":"https://api.github.com/users/irham0019/following{/other_user}","gists_url":"https://api.github.com/users/irham0019/gists{/gist_id}","starred_url":"https://api.github.com/users/irham0019/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irham0019/subscriptions","organizations_url":"https://api.github.com/users/irham0019/orgs","repos_url":"https://api.github.com/users/irham0019/repos","events_url":"https://api.github.com/users/irham0019/events{/privacy}","received_events_url":"https://api.github.com/users/irham0019/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/irham0019/product-esb","description":"","fork":true,"url":"https://api.github.com/repos/irham0019/product-esb","forks_url":"https://api.github.com/repos/irham0019/product-esb/forks","keys_url":"https://api.github.com/repos/irham0019/product-esb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/irham0019/product-esb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/irham0019/product-esb/teams","hooks_url":"https://api.github.com/repos/irham0019/product-esb/hooks","issue_events_url":"https://api.github.com/repos/irham0019/product-esb/issues/events{/number}","events_url":"https://api.github.com/repos/irham0019/product-esb/events","assignees_url":"https://api.github.com/repos/irham0019/product-esb/assignees{/user}","branches_url":"https://api.github.com/repos/irham0019/product-esb/branches{/branch}","tags_url":"https://api.github.com/repos/irham0019/product-esb/tags","blobs_url":"https://api.github.com/repos/irham0019/product-esb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/irham0019/product-esb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/irham0019/product-esb/git/refs{/sha}","trees_url":"https://api.github.com/repos/irham0019/product-esb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/irham0019/product-esb/statuses/{sha}","languages_url":"https://api.github.com/repos/irham0019/product-esb/languages","stargazers_url":"https://api.github.com/repos/irham0019/product-esb/stargazers","contributors_url":"https://api.github.com/repos/irham0019/product-esb/contributors","subscribers_url":"https://api.github.com/repos/irham0019/product-esb/subscribers","subscription_url":"https://api.github.com/repos/irham0019/product-esb/subscription","commits_url":"https://api.github.com/repos/irham0019/product-esb/commits{/sha}","git_commits_url":"https://api.github.com/repos/irham0019/product-esb/git/commits{/sha}","comments_url":"https://api.github.com/repos/irham0019/product-esb/comments{/number}","issue_comment_url":"https://api.github.com/repos/irham0019/product-esb/issues/comments/{number}","contents_url":"https://api.github.com/repos/irham0019/product-esb/contents/{+path}","compare_url":"https://api.github.com/repos/irham0019/product-esb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/irham0019/product-esb/merges","archive_url":"https://api.github.com/repos/irham0019/product-esb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/irham0019/product-esb/downloads","issues_url":"https://api.github.com/repos/irham0019/product-esb/issues{/number}","pulls_url":"https://api.github.com/repos/irham0019/product-esb/pulls{/number}","milestones_url":"https://api.github.com/repos/irham0019/product-esb/milestones{/number}","notifications_url":"https://api.github.com/repos/irham0019/product-esb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/irham0019/product-esb/labels{/name}","releases_url":"https://api.github.com/repos/irham0019/product-esb/releases{/id}","created_at":"2014-12-23T05:19:29Z","updated_at":"2015-01-07T04:20:50Z","pushed_at":"2015-01-07T04:20:50Z","git_url":"git://github.com/irham0019/product-esb.git","ssh_url":"git@github.com:irham0019/product-esb.git","clone_url":"https://github.com/irham0019/product-esb.git","svn_url":"https://github.com/irham0019/product-esb","homepage":null,"size":79989,"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":"wso2-dev:master","ref":"master","sha":"348e9a50cebe9c853b4b245f493c0e1ef3a39071","user":{"login":"wso2-dev","id":6744733,"avatar_url":"https://avatars.githubusercontent.com/u/6744733?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2-dev","html_url":"https://github.com/wso2-dev","followers_url":"https://api.github.com/users/wso2-dev/followers","following_url":"https://api.github.com/users/wso2-dev/following{/other_user}","gists_url":"https://api.github.com/users/wso2-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2-dev/subscriptions","organizations_url":"https://api.github.com/users/wso2-dev/orgs","repos_url":"https://api.github.com/users/wso2-dev/repos","events_url":"https://api.github.com/users/wso2-dev/events{/privacy}","received_events_url":"https://api.github.com/users/wso2-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":18096029,"name":"product-esb","full_name":"wso2-dev/product-esb","owner":{"login":"wso2-dev","id":6744733,"avatar_url":"https://avatars.githubusercontent.com/u/6744733?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2-dev","html_url":"https://github.com/wso2-dev","followers_url":"https://api.github.com/users/wso2-dev/followers","following_url":"https://api.github.com/users/wso2-dev/following{/other_user}","gists_url":"https://api.github.com/users/wso2-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2-dev/subscriptions","organizations_url":"https://api.github.com/users/wso2-dev/orgs","repos_url":"https://api.github.com/users/wso2-dev/repos","events_url":"https://api.github.com/users/wso2-dev/events{/privacy}","received_events_url":"https://api.github.com/users/wso2-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2-dev/product-esb","description":"","fork":true,"url":"https://api.github.com/repos/wso2-dev/product-esb","forks_url":"https://api.github.com/repos/wso2-dev/product-esb/forks","keys_url":"https://api.github.com/repos/wso2-dev/product-esb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2-dev/product-esb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2-dev/product-esb/teams","hooks_url":"https://api.github.com/repos/wso2-dev/product-esb/hooks","issue_events_url":"https://api.github.com/repos/wso2-dev/product-esb/issues/events{/number}","events_url":"https://api.github.com/repos/wso2-dev/product-esb/events","assignees_url":"https://api.github.com/repos/wso2-dev/product-esb/assignees{/user}","branches_url":"https://api.github.com/repos/wso2-dev/product-esb/branches{/branch}","tags_url":"https://api.github.com/repos/wso2-dev/product-esb/tags","blobs_url":"https://api.github.com/repos/wso2-dev/product-esb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2-dev/product-esb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2-dev/product-esb/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2-dev/product-esb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2-dev/product-esb/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2-dev/product-esb/languages","stargazers_url":"https://api.github.com/repos/wso2-dev/product-esb/stargazers","contributors_url":"https://api.github.com/repos/wso2-dev/product-esb/contributors","subscribers_url":"https://api.github.com/repos/wso2-dev/product-esb/subscribers","subscription_url":"https://api.github.com/repos/wso2-dev/product-esb/subscription","commits_url":"https://api.github.com/repos/wso2-dev/product-esb/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2-dev/product-esb/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2-dev/product-esb/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2-dev/product-esb/issues/comments/{number}","contents_url":"https://api.github.com/repos/wso2-dev/product-esb/contents/{+path}","compare_url":"https://api.github.com/repos/wso2-dev/product-esb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2-dev/product-esb/merges","archive_url":"https://api.github.com/repos/wso2-dev/product-esb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2-dev/product-esb/downloads","issues_url":"https://api.github.com/repos/wso2-dev/product-esb/issues{/number}","pulls_url":"https://api.github.com/repos/wso2-dev/product-esb/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2-dev/product-esb/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2-dev/product-esb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2-dev/product-esb/labels{/name}","releases_url":"https://api.github.com/repos/wso2-dev/product-esb/releases{/id}","created_at":"2014-03-25T10:09:32Z","updated_at":"2015-01-21T05:27:08Z","pushed_at":"2015-01-21T05:26:48Z","git_url":"git://github.com/wso2-dev/product-esb.git","ssh_url":"git@github.com:wso2-dev/product-esb.git","clone_url":"https://github.com/wso2-dev/product-esb.git","svn_url":"https://github.com/wso2-dev/product-esb","homepage":null,"size":90053,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":16,"forks":63,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2-dev/product-esb/pulls/129"},"html":{"href":"https://github.com/wso2-dev/product-esb/pull/129"},"issue":{"href":"https://api.github.com/repos/wso2-dev/product-esb/issues/129"},"comments":{"href":"https://api.github.com/repos/wso2-dev/product-esb/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2-dev/product-esb/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2-dev/product-esb/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/wso2-dev/product-esb/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/wso2-dev/product-esb/statuses/c6669ef58a4cbc49e5db2a86938a4b99f7728c61"}}}}