{"action":"created","comment":{"url":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/comments/45463424","id":45463424,"diff_hunk":"@@ -0,0 +1,33 @@\n+package alvioneurope.gsergeev.javagroup.clientlogimporter;\n+\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.junit.rules.ExpectedException;\n+\n+import static org.junit.Assert.*;\n+\n+/**\n+ * Created by kintaro18 on 19.11.2015.\n+ */\n+public class ExecutedCommandTest {\n+    private ExecutedCommand testExecutedCommand1;\n+    private ExecutedCommand testExecutedCommand2;\n+    private ExecutedCommand testExecutedCommand3;\n+    private ExecutedCommand testExecutedCommand4;\n+\n+    @Before\n+    public void setUp(){\n+        testExecutedCommand1 = new ExecutedCommand(\"2015-11-10 11:37:33.495 Debug: CommandRunner::runCommand start  RequestId  \\\"19216805118520151110083733000000\\\"  commandId  67  commandName  \\\"UserAuthorization\\\"  timeout  -1  requestLength  400\");\n+        testExecutedCommand2 = new ExecutedCommand(\"2015-11-10 11:37:41.044 Debug: CommandRunner::runCommand end  RequestId  \\\"19216805118520151110083740000004\\\"  commandId  560  commandName  \\\"OrgElementFlatGet\\\"  responseLength  359184  execTime  367 \");\n+        testExecutedCommand3 = new ExecutedCommand(\"2015-11-10 11:37:35.666 Debug: void UserCache::poolUser() ..\\\\mango_crm\\\\core\\\\usercache.cpp 12 Pool user list\");\n+        testExecutedCommand4 = new ExecutedCommand(\"\");\n+    }\n+","path":"src/test/java/alvioneurope/gsergeev/javagroup/clientlogimporter/ExecutedCommandTest.java","position":25,"original_position":25,"commit_id":"885def17d2864b0192c722545211ab3f90ecae85","original_commit_id":"885def17d2864b0192c722545211ab3f90ecae85","user":{"login":"GeorgeSergeev","id":1010508,"avatar_url":"https://avatars.githubusercontent.com/u/1010508?v=3","gravatar_id":"","url":"https://api.github.com/users/GeorgeSergeev","html_url":"https://github.com/GeorgeSergeev","followers_url":"https://api.github.com/users/GeorgeSergeev/followers","following_url":"https://api.github.com/users/GeorgeSergeev/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeSergeev/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeSergeev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeSergeev/subscriptions","organizations_url":"https://api.github.com/users/GeorgeSergeev/orgs","repos_url":"https://api.github.com/users/GeorgeSergeev/repos","events_url":"https://api.github.com/users/GeorgeSergeev/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeSergeev/received_events","type":"User","site_admin":false},"body":"I think we should to analyse several use cases:\r\n1. Correct input string without executed command\r\n2. Correct input string with executed command\r\n3. Arbitrary string\r\n4. Part of string with executed command. I mean the situation when log has been cut or broken due to various reasons.\r\nFor example:\r\n4.1 CommandRunner::runCommand end  RequestId  \\\"19216805118520151110083740000004\\\"  commandId\r\n4.2 CommandRunner::runCommand end  RequestId  \\\"19216805118520151110083740000004\\\"  commandId YYY\r\n4.3 CommandRunner::runCommand end  RequestId  \\\"19216805118520151110083740000004\\\"  commandId  560  commandName  \\\"OrgElementFlatGet\\\"  responseLength  3591gshs \r\netc.\r\n\r\nPlease write a separately unit test for this use cases\r\n ","created_at":"2015-11-20T12:22:44Z","updated_at":"2015-11-20T12:22:44Z","html_url":"https://github.com/GeorgeSergeev/logparser/pull/15#discussion_r45463424","pull_request_url":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/comments/45463424"},"html":{"href":"https://github.com/GeorgeSergeev/logparser/pull/15#discussion_r45463424"},"pull_request":{"href":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/15","id":51245055,"html_url":"https://github.com/GeorgeSergeev/logparser/pull/15","diff_url":"https://github.com/GeorgeSergeev/logparser/pull/15.diff","patch_url":"https://github.com/GeorgeSergeev/logparser/pull/15.patch","issue_url":"https://api.github.com/repos/GeorgeSergeev/logparser/issues/15","number":15,"state":"open","locked":false,"title":"issue 3","user":{"login":"kintaro18","id":7517069,"avatar_url":"https://avatars.githubusercontent.com/u/7517069?v=3","gravatar_id":"","url":"https://api.github.com/users/kintaro18","html_url":"https://github.com/kintaro18","followers_url":"https://api.github.com/users/kintaro18/followers","following_url":"https://api.github.com/users/kintaro18/following{/other_user}","gists_url":"https://api.github.com/users/kintaro18/gists{/gist_id}","starred_url":"https://api.github.com/users/kintaro18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kintaro18/subscriptions","organizations_url":"https://api.github.com/users/kintaro18/orgs","repos_url":"https://api.github.com/users/kintaro18/repos","events_url":"https://api.github.com/users/kintaro18/events{/privacy}","received_events_url":"https://api.github.com/users/kintaro18/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-19T16:24:53Z","updated_at":"2015-11-20T12:22:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5ec1df23e3902121dcc90ececcb2a1a1207250a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/15/commits","review_comments_url":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/15/comments","review_comment_url":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GeorgeSergeev/logparser/issues/15/comments","statuses_url":"https://api.github.com/repos/GeorgeSergeev/logparser/statuses/885def17d2864b0192c722545211ab3f90ecae85","head":{"label":"kintaro18:iss3","ref":"iss3","sha":"885def17d2864b0192c722545211ab3f90ecae85","user":{"login":"kintaro18","id":7517069,"avatar_url":"https://avatars.githubusercontent.com/u/7517069?v=3","gravatar_id":"","url":"https://api.github.com/users/kintaro18","html_url":"https://github.com/kintaro18","followers_url":"https://api.github.com/users/kintaro18/followers","following_url":"https://api.github.com/users/kintaro18/following{/other_user}","gists_url":"https://api.github.com/users/kintaro18/gists{/gist_id}","starred_url":"https://api.github.com/users/kintaro18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kintaro18/subscriptions","organizations_url":"https://api.github.com/users/kintaro18/orgs","repos_url":"https://api.github.com/users/kintaro18/repos","events_url":"https://api.github.com/users/kintaro18/events{/privacy}","received_events_url":"https://api.github.com/users/kintaro18/received_events","type":"User","site_admin":false},"repo":{"id":46436079,"name":"logparser","full_name":"kintaro18/logparser","owner":{"login":"kintaro18","id":7517069,"avatar_url":"https://avatars.githubusercontent.com/u/7517069?v=3","gravatar_id":"","url":"https://api.github.com/users/kintaro18","html_url":"https://github.com/kintaro18","followers_url":"https://api.github.com/users/kintaro18/followers","following_url":"https://api.github.com/users/kintaro18/following{/other_user}","gists_url":"https://api.github.com/users/kintaro18/gists{/gist_id}","starred_url":"https://api.github.com/users/kintaro18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kintaro18/subscriptions","organizations_url":"https://api.github.com/users/kintaro18/orgs","repos_url":"https://api.github.com/users/kintaro18/repos","events_url":"https://api.github.com/users/kintaro18/events{/privacy}","received_events_url":"https://api.github.com/users/kintaro18/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kintaro18/logparser","description":"","fork":true,"url":"https://api.github.com/repos/kintaro18/logparser","forks_url":"https://api.github.com/repos/kintaro18/logparser/forks","keys_url":"https://api.github.com/repos/kintaro18/logparser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kintaro18/logparser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kintaro18/logparser/teams","hooks_url":"https://api.github.com/repos/kintaro18/logparser/hooks","issue_events_url":"https://api.github.com/repos/kintaro18/logparser/issues/events{/number}","events_url":"https://api.github.com/repos/kintaro18/logparser/events","assignees_url":"https://api.github.com/repos/kintaro18/logparser/assignees{/user}","branches_url":"https://api.github.com/repos/kintaro18/logparser/branches{/branch}","tags_url":"https://api.github.com/repos/kintaro18/logparser/tags","blobs_url":"https://api.github.com/repos/kintaro18/logparser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kintaro18/logparser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kintaro18/logparser/git/refs{/sha}","trees_url":"https://api.github.com/repos/kintaro18/logparser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kintaro18/logparser/statuses/{sha}","languages_url":"https://api.github.com/repos/kintaro18/logparser/languages","stargazers_url":"https://api.github.com/repos/kintaro18/logparser/stargazers","contributors_url":"https://api.github.com/repos/kintaro18/logparser/contributors","subscribers_url":"https://api.github.com/repos/kintaro18/logparser/subscribers","subscription_url":"https://api.github.com/repos/kintaro18/logparser/subscription","commits_url":"https://api.github.com/repos/kintaro18/logparser/commits{/sha}","git_commits_url":"https://api.github.com/repos/kintaro18/logparser/git/commits{/sha}","comments_url":"https://api.github.com/repos/kintaro18/logparser/comments{/number}","issue_comment_url":"https://api.github.com/repos/kintaro18/logparser/issues/comments{/number}","contents_url":"https://api.github.com/repos/kintaro18/logparser/contents/{+path}","compare_url":"https://api.github.com/repos/kintaro18/logparser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kintaro18/logparser/merges","archive_url":"https://api.github.com/repos/kintaro18/logparser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kintaro18/logparser/downloads","issues_url":"https://api.github.com/repos/kintaro18/logparser/issues{/number}","pulls_url":"https://api.github.com/repos/kintaro18/logparser/pulls{/number}","milestones_url":"https://api.github.com/repos/kintaro18/logparser/milestones{/number}","notifications_url":"https://api.github.com/repos/kintaro18/logparser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kintaro18/logparser/labels{/name}","releases_url":"https://api.github.com/repos/kintaro18/logparser/releases{/id}","created_at":"2015-11-18T17:39:32Z","updated_at":"2015-11-18T17:39:33Z","pushed_at":"2015-11-19T17:15:07Z","git_url":"git://github.com/kintaro18/logparser.git","ssh_url":"git@github.com:kintaro18/logparser.git","clone_url":"https://github.com/kintaro18/logparser.git","svn_url":"https://github.com/kintaro18/logparser","homepage":null,"size":101,"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":"GeorgeSergeev:master","ref":"master","sha":"4a46190dd1f04d94f9dc1a1dddaffdd17dd76a0c","user":{"login":"GeorgeSergeev","id":1010508,"avatar_url":"https://avatars.githubusercontent.com/u/1010508?v=3","gravatar_id":"","url":"https://api.github.com/users/GeorgeSergeev","html_url":"https://github.com/GeorgeSergeev","followers_url":"https://api.github.com/users/GeorgeSergeev/followers","following_url":"https://api.github.com/users/GeorgeSergeev/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeSergeev/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeSergeev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeSergeev/subscriptions","organizations_url":"https://api.github.com/users/GeorgeSergeev/orgs","repos_url":"https://api.github.com/users/GeorgeSergeev/repos","events_url":"https://api.github.com/users/GeorgeSergeev/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeSergeev/received_events","type":"User","site_admin":false},"repo":{"id":46260417,"name":"logparser","full_name":"GeorgeSergeev/logparser","owner":{"login":"GeorgeSergeev","id":1010508,"avatar_url":"https://avatars.githubusercontent.com/u/1010508?v=3","gravatar_id":"","url":"https://api.github.com/users/GeorgeSergeev","html_url":"https://github.com/GeorgeSergeev","followers_url":"https://api.github.com/users/GeorgeSergeev/followers","following_url":"https://api.github.com/users/GeorgeSergeev/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeSergeev/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeSergeev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeSergeev/subscriptions","organizations_url":"https://api.github.com/users/GeorgeSergeev/orgs","repos_url":"https://api.github.com/users/GeorgeSergeev/repos","events_url":"https://api.github.com/users/GeorgeSergeev/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeSergeev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GeorgeSergeev/logparser","description":"","fork":false,"url":"https://api.github.com/repos/GeorgeSergeev/logparser","forks_url":"https://api.github.com/repos/GeorgeSergeev/logparser/forks","keys_url":"https://api.github.com/repos/GeorgeSergeev/logparser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GeorgeSergeev/logparser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GeorgeSergeev/logparser/teams","hooks_url":"https://api.github.com/repos/GeorgeSergeev/logparser/hooks","issue_events_url":"https://api.github.com/repos/GeorgeSergeev/logparser/issues/events{/number}","events_url":"https://api.github.com/repos/GeorgeSergeev/logparser/events","assignees_url":"https://api.github.com/repos/GeorgeSergeev/logparser/assignees{/user}","branches_url":"https://api.github.com/repos/GeorgeSergeev/logparser/branches{/branch}","tags_url":"https://api.github.com/repos/GeorgeSergeev/logparser/tags","blobs_url":"https://api.github.com/repos/GeorgeSergeev/logparser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GeorgeSergeev/logparser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GeorgeSergeev/logparser/git/refs{/sha}","trees_url":"https://api.github.com/repos/GeorgeSergeev/logparser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GeorgeSergeev/logparser/statuses/{sha}","languages_url":"https://api.github.com/repos/GeorgeSergeev/logparser/languages","stargazers_url":"https://api.github.com/repos/GeorgeSergeev/logparser/stargazers","contributors_url":"https://api.github.com/repos/GeorgeSergeev/logparser/contributors","subscribers_url":"https://api.github.com/repos/GeorgeSergeev/logparser/subscribers","subscription_url":"https://api.github.com/repos/GeorgeSergeev/logparser/subscription","commits_url":"https://api.github.com/repos/GeorgeSergeev/logparser/commits{/sha}","git_commits_url":"https://api.github.com/repos/GeorgeSergeev/logparser/git/commits{/sha}","comments_url":"https://api.github.com/repos/GeorgeSergeev/logparser/comments{/number}","issue_comment_url":"https://api.github.com/repos/GeorgeSergeev/logparser/issues/comments{/number}","contents_url":"https://api.github.com/repos/GeorgeSergeev/logparser/contents/{+path}","compare_url":"https://api.github.com/repos/GeorgeSergeev/logparser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GeorgeSergeev/logparser/merges","archive_url":"https://api.github.com/repos/GeorgeSergeev/logparser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GeorgeSergeev/logparser/downloads","issues_url":"https://api.github.com/repos/GeorgeSergeev/logparser/issues{/number}","pulls_url":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls{/number}","milestones_url":"https://api.github.com/repos/GeorgeSergeev/logparser/milestones{/number}","notifications_url":"https://api.github.com/repos/GeorgeSergeev/logparser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GeorgeSergeev/logparser/labels{/name}","releases_url":"https://api.github.com/repos/GeorgeSergeev/logparser/releases{/id}","created_at":"2015-11-16T08:02:45Z","updated_at":"2015-11-16T09:06:18Z","pushed_at":"2015-11-19T16:51:24Z","git_url":"git://github.com/GeorgeSergeev/logparser.git","ssh_url":"git@github.com:GeorgeSergeev/logparser.git","clone_url":"https://github.com/GeorgeSergeev/logparser.git","svn_url":"https://github.com/GeorgeSergeev/logparser","homepage":null,"size":113,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/15"},"html":{"href":"https://github.com/GeorgeSergeev/logparser/pull/15"},"issue":{"href":"https://api.github.com/repos/GeorgeSergeev/logparser/issues/15"},"comments":{"href":"https://api.github.com/repos/GeorgeSergeev/logparser/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GeorgeSergeev/logparser/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/GeorgeSergeev/logparser/statuses/885def17d2864b0192c722545211ab3f90ecae85"}}}}