{"action":"created","comment":{"url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/comments/222282779","pull_request_review_id":161129277,"id":222282779,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjI4Mjc3OQ==","diff_hunk":"@@ -38,23 +43,39 @@\n         .caseTypeId(CASE_TYPE_ID)\n         .build();\n \n-    public static String envelopeJson() throws Exception {\n-        return new JSONObject()\n-            .put(\"id\", \"eb9c3598-35fc-424e-b05a-902ee9f11d56\")\n-            .put(\"case_ref\", CASE_REF)\n-            .put(\"jurisdiction\", JURSIDICTION)\n-            .put(\"zip_file_name\", \"zip-file-test.zip\")\n-            .put(\"classification\", Classification.NEW_APPLICATION)\n-            .put(\"documents\", new JSONArray()\n-                .put(new JSONObject()\n-                    .put(\"file_name\", \"hello.pdf\")\n-                    .put(\"control_number\", \"control_number\")\n-                    .put(\"type\", \"doc_type\")\n-                    .put(\"scanned_at\", toIso8601(Instant.EPOCH))\n-                    .put(\"url\", \"https://example.gov.uk/123\")\n+    public static String exampleJson = fromFile(\"envelopes/example.json\");\n+\n+    public static String envelopeJson() {\n+        try {\n+            return new JSONObject()\n+                .put(\"id\", \"eb9c3598-35fc-424e-b05a-902ee9f11d56\")\n+                .put(\"case_ref\", CASE_REF)\n+                .put(\"jurisdiction\", JURSIDICTION)\n+                .put(\"zip_file_name\", \"zip-file-test.zip\")\n+                .put(\"classification\", Classification.NEW_APPLICATION)\n+                .put(\"documents\", new JSONArray()\n+                    .put(new JSONObject()\n+                        .put(\"file_name\", \"hello.pdf\")\n+                        .put(\"control_number\", \"control_number\")\n+                        .put(\"type\", \"doc_type\")\n+                        .put(\"scanned_at\", toIso8601(Instant.EPOCH))\n+                        .put(\"url\", \"https://example.gov.uk/123\")\n+                    )\n                 )\n-            )\n-            .toString();\n+                .toString();\n+        } catch (Exception e) {\n+            throw new RuntimeException(\"Could not make envelopeJson\", e);","path":"src/test/java/uk/gov/hmcts/reform/bulkscan/orchestrator/SampleData.java","position":55,"original_position":55,"commit_id":"6d70d5131cf2d4a32f59c0110efbfb2b0899bfef","original_commit_id":"6d70d5131cf2d4a32f59c0110efbfb2b0899bfef","user":{"login":"KevinJCross","id":7290403,"node_id":"MDQ6VXNlcjcyOTA0MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/7290403?v=4","gravatar_id":"","url":"https://api.github.com/users/KevinJCross","html_url":"https://github.com/KevinJCross","followers_url":"https://api.github.com/users/KevinJCross/followers","following_url":"https://api.github.com/users/KevinJCross/following{/other_user}","gists_url":"https://api.github.com/users/KevinJCross/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinJCross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinJCross/subscriptions","organizations_url":"https://api.github.com/users/KevinJCross/orgs","repos_url":"https://api.github.com/users/KevinJCross/repos","events_url":"https://api.github.com/users/KevinJCross/events{/privacy}","received_events_url":"https://api.github.com/users/KevinJCross/received_events","type":"User","site_admin":false},"body":"added this so that we don't have to keep puting Exception on the test methods.","created_at":"2018-10-03T12:06:14Z","updated_at":"2018-10-03T12:06:58Z","html_url":"https://github.com/hmcts/bulk-scan-orchestrator/pull/60#discussion_r222282779","pull_request_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/60","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/comments/222282779"},"html":{"href":"https://github.com/hmcts/bulk-scan-orchestrator/pull/60#discussion_r222282779"},"pull_request":{"href":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/60","id":220011946,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMDExOTQ2","html_url":"https://github.com/hmcts/bulk-scan-orchestrator/pull/60","diff_url":"https://github.com/hmcts/bulk-scan-orchestrator/pull/60.diff","patch_url":"https://github.com/hmcts/bulk-scan-orchestrator/pull/60.patch","issue_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/issues/60","number":60,"state":"open","locked":false,"title":"feature/add_example_message_file_for_IT_test","user":{"login":"KevinJCross","id":7290403,"node_id":"MDQ6VXNlcjcyOTA0MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/7290403?v=4","gravatar_id":"","url":"https://api.github.com/users/KevinJCross","html_url":"https://github.com/KevinJCross","followers_url":"https://api.github.com/users/KevinJCross/followers","following_url":"https://api.github.com/users/KevinJCross/following{/other_user}","gists_url":"https://api.github.com/users/KevinJCross/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinJCross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinJCross/subscriptions","organizations_url":"https://api.github.com/users/KevinJCross/orgs","repos_url":"https://api.github.com/users/KevinJCross/repos","events_url":"https://api.github.com/users/KevinJCross/events{/privacy}","received_events_url":"https://api.github.com/users/KevinJCross/received_events","type":"User","site_admin":false},"body":"\r\n### Change description ###\r\nAdding a message in a .json file (easier to read and manually modify)\r\nAlso adding tests so that they are always parseable. \r\nAdded a String interface to make it easier for testing.","created_at":"2018-10-03T12:05:09Z","updated_at":"2018-10-03T12:06:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a940ac136de94c63d8dc224707bb520c69bf5c67","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/60/commits","review_comments_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/60/comments","review_comment_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/issues/60/comments","statuses_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/statuses/6d70d5131cf2d4a32f59c0110efbfb2b0899bfef","head":{"label":"hmcts:feature/add_example_json","ref":"feature/add_example_json","sha":"6d70d5131cf2d4a32f59c0110efbfb2b0899bfef","user":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":145695191,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU2OTUxOTE=","name":"bulk-scan-orchestrator","full_name":"hmcts/bulk-scan-orchestrator","private":false,"owner":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/hmcts/bulk-scan-orchestrator","description":null,"fork":false,"url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator","forks_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/forks","keys_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/teams","hooks_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/hooks","issue_events_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/events","assignees_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/tags","blobs_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/languages","stargazers_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/stargazers","contributors_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/contributors","subscribers_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/subscribers","subscription_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/subscription","commits_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/merges","archive_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/downloads","issues_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/deployments","created_at":"2018-08-22T10:43:53Z","updated_at":"2018-10-03T10:38:45Z","pushed_at":"2018-10-03T12:05:09Z","git_url":"git://github.com/hmcts/bulk-scan-orchestrator.git","ssh_url":"git@github.com:hmcts/bulk-scan-orchestrator.git","clone_url":"https://github.com/hmcts/bulk-scan-orchestrator.git","svn_url":"https://github.com/hmcts/bulk-scan-orchestrator","homepage":null,"size":1103,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"hmcts:master","ref":"master","sha":"c4b16c274f2755238e0ebeadd6b3a9c7b94ff58e","user":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":145695191,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU2OTUxOTE=","name":"bulk-scan-orchestrator","full_name":"hmcts/bulk-scan-orchestrator","private":false,"owner":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/hmcts/bulk-scan-orchestrator","description":null,"fork":false,"url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator","forks_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/forks","keys_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/teams","hooks_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/hooks","issue_events_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/events","assignees_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/tags","blobs_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/languages","stargazers_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/stargazers","contributors_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/contributors","subscribers_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/subscribers","subscription_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/subscription","commits_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/merges","archive_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/downloads","issues_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/deployments","created_at":"2018-08-22T10:43:53Z","updated_at":"2018-10-03T10:38:45Z","pushed_at":"2018-10-03T12:05:09Z","git_url":"git://github.com/hmcts/bulk-scan-orchestrator.git","ssh_url":"git@github.com:hmcts/bulk-scan-orchestrator.git","clone_url":"https://github.com/hmcts/bulk-scan-orchestrator.git","svn_url":"https://github.com/hmcts/bulk-scan-orchestrator","homepage":null,"size":1103,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/60"},"html":{"href":"https://github.com/hmcts/bulk-scan-orchestrator/pull/60"},"issue":{"href":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/issues/60"},"comments":{"href":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/hmcts/bulk-scan-orchestrator/statuses/6d70d5131cf2d4a32f59c0110efbfb2b0899bfef"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"KevinJCross"}}