{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/comments/38661201","id":38661201,"diff_hunk":"@@ -0,0 +1,87 @@\n+package org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs1_9;\n+\n+import org.junit.Assert;\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.mockito.InjectMocks;\n+import org.openmrs.module.webservices.rest.web.RestTestConstants1_9;\n+import org.openmrs.module.webservices.rest.web.v1_0.controller.ClobDatatypeStorageController;\n+import org.openmrs.module.webservices.rest.web.v1_0.controller.MainResourceControllerTest;\n+import org.openmrs.util.DatabaseUpdater;\n+import org.openmrs.util.OpenmrsUtil;\n+import org.springframework.mock.web.MockHttpServletResponse;\n+import org.springframework.mock.web.MockMultipartFile;\n+import org.springframework.mock.web.MockMultipartHttpServletRequest;\n+import org.springframework.web.bind.annotation.RequestMethod;\n+\n+import java.io.File;\n+import java.sql.Connection;\n+import java.sql.ResultSet;\n+\n+public class ClobDatatypeStorageControllerTest extends MainResourceControllerTest {\n+\n+    @InjectMocks\n+    private ClobDatatypeStorageController clobController;\n+\n+    @Before\n+    public void before() throws Exception{\n+        executeDataSet(RestTestConstants1_9.FORM_RESOURCE_DATA_SET);\n+    }\n+\n+    @Test\n+    public void create_shouldAcceptAndStoreClobDataViaPost() throws Exception{\n+        long before = getAllCount();\n+        System.out.println(before);\n+\n+        File file = new File(\"omod-1.9/src/test/resources/formResourcefile.txt\");\n+        Assert.assertTrue(file.exists());\n+\n+        MockMultipartFile toUpload = new MockMultipartFile(\"value\", \"formresource.txt\", \"text/plain\",","path":"omod-1.9/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_9/ClobDatatypeStorageControllerTest.java","position":39,"original_position":39,"commit_id":"dcccda2aa5ab661085deefd33ace60685fe0980f","original_commit_id":"dcccda2aa5ab661085deefd33ace60685fe0980f","user":{"login":"mhawila","id":5951420,"avatar_url":"https://avatars.githubusercontent.com/u/5951420?v=3","gravatar_id":"","url":"https://api.github.com/users/mhawila","html_url":"https://github.com/mhawila","followers_url":"https://api.github.com/users/mhawila/followers","following_url":"https://api.github.com/users/mhawila/following{/other_user}","gists_url":"https://api.github.com/users/mhawila/gists{/gist_id}","starred_url":"https://api.github.com/users/mhawila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhawila/subscriptions","organizations_url":"https://api.github.com/users/mhawila/orgs","repos_url":"https://api.github.com/users/mhawila/repos","events_url":"https://api.github.com/users/mhawila/events{/privacy}","received_events_url":"https://api.github.com/users/mhawila/received_events","type":"User","site_admin":false},"body":"Yes if using @RequestParam but I was using @RequestBody so it didn't actually matter. I have replaced the later with the former and it works now. Thanks so much Rafal.","created_at":"2015-09-03T15:46:40Z","updated_at":"2015-09-03T15:46:40Z","html_url":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/151#discussion_r38661201","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/151","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/comments/38661201"},"html":{"href":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/151#discussion_r38661201"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/151"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/151","id":44107106,"html_url":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/151","diff_url":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/151.diff","patch_url":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/151.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/151","number":151,"state":"open","locked":false,"title":"RESTWS-523 Work in progress","user":{"login":"rkorytkowski","id":1163157,"avatar_url":"https://avatars.githubusercontent.com/u/1163157?v=3","gravatar_id":"","url":"https://api.github.com/users/rkorytkowski","html_url":"https://github.com/rkorytkowski","followers_url":"https://api.github.com/users/rkorytkowski/followers","following_url":"https://api.github.com/users/rkorytkowski/following{/other_user}","gists_url":"https://api.github.com/users/rkorytkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/rkorytkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkorytkowski/subscriptions","organizations_url":"https://api.github.com/users/rkorytkowski/orgs","repos_url":"https://api.github.com/users/rkorytkowski/repos","events_url":"https://api.github.com/users/rkorytkowski/events{/privacy}","received_events_url":"https://api.github.com/users/rkorytkowski/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-03T13:34:42Z","updated_at":"2015-09-03T15:46:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/151/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/151/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/151/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/statuses/dcccda2aa5ab661085deefd33ace60685fe0980f","head":{"label":"mhawila:try-clob","ref":"try-clob","sha":"dcccda2aa5ab661085deefd33ace60685fe0980f","user":{"login":"mhawila","id":5951420,"avatar_url":"https://avatars.githubusercontent.com/u/5951420?v=3","gravatar_id":"","url":"https://api.github.com/users/mhawila","html_url":"https://github.com/mhawila","followers_url":"https://api.github.com/users/mhawila/followers","following_url":"https://api.github.com/users/mhawila/following{/other_user}","gists_url":"https://api.github.com/users/mhawila/gists{/gist_id}","starred_url":"https://api.github.com/users/mhawila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhawila/subscriptions","organizations_url":"https://api.github.com/users/mhawila/orgs","repos_url":"https://api.github.com/users/mhawila/repos","events_url":"https://api.github.com/users/mhawila/events{/privacy}","received_events_url":"https://api.github.com/users/mhawila/received_events","type":"User","site_admin":false},"repo":{"id":24955581,"name":"openmrs-module-webservices.rest","full_name":"mhawila/openmrs-module-webservices.rest","owner":{"login":"mhawila","id":5951420,"avatar_url":"https://avatars.githubusercontent.com/u/5951420?v=3","gravatar_id":"","url":"https://api.github.com/users/mhawila","html_url":"https://github.com/mhawila","followers_url":"https://api.github.com/users/mhawila/followers","following_url":"https://api.github.com/users/mhawila/following{/other_user}","gists_url":"https://api.github.com/users/mhawila/gists{/gist_id}","starred_url":"https://api.github.com/users/mhawila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhawila/subscriptions","organizations_url":"https://api.github.com/users/mhawila/orgs","repos_url":"https://api.github.com/users/mhawila/repos","events_url":"https://api.github.com/users/mhawila/events{/privacy}","received_events_url":"https://api.github.com/users/mhawila/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhawila/openmrs-module-webservices.rest","description":"Provides RESTful web services for OpenMRS","fork":true,"url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest","forks_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/forks","keys_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/teams","hooks_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/hooks","issue_events_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/issues/events{/number}","events_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/events","assignees_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/assignees{/user}","branches_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/branches{/branch}","tags_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/tags","blobs_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/statuses/{sha}","languages_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/languages","stargazers_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/stargazers","contributors_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/contributors","subscribers_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/subscribers","subscription_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/subscription","commits_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/contents/{+path}","compare_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/merges","archive_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/downloads","issues_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/issues{/number}","pulls_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/pulls{/number}","milestones_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/milestones{/number}","notifications_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/labels{/name}","releases_url":"https://api.github.com/repos/mhawila/openmrs-module-webservices.rest/releases{/id}","created_at":"2014-10-08T18:53:58Z","updated_at":"2015-06-16T15:50:12Z","pushed_at":"2015-09-03T06:29:52Z","git_url":"git://github.com/mhawila/openmrs-module-webservices.rest.git","ssh_url":"git@github.com:mhawila/openmrs-module-webservices.rest.git","clone_url":"https://github.com/mhawila/openmrs-module-webservices.rest.git","svn_url":"https://github.com/mhawila/openmrs-module-webservices.rest","homepage":null,"size":4287,"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":"112602b63ddd46459b4df52d869cd1f4b917de90","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":6951233,"name":"openmrs-module-webservices.rest","full_name":"openmrs/openmrs-module-webservices.rest","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-module-webservices.rest","description":"Provides RESTful web services for OpenMRS","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest","forks_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/releases{/id}","created_at":"2012-12-01T06:50:25Z","updated_at":"2015-08-20T21:20:40Z","pushed_at":"2015-09-03T13:34:42Z","git_url":"git://github.com/openmrs/openmrs-module-webservices.rest.git","ssh_url":"git@github.com:openmrs/openmrs-module-webservices.rest.git","clone_url":"https://github.com/openmrs/openmrs-module-webservices.rest.git","svn_url":"https://github.com/openmrs/openmrs-module-webservices.rest","homepage":null,"size":8650,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":112,"mirror_url":null,"open_issues_count":2,"forks":112,"open_issues":2,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/151"},"html":{"href":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/151"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/151"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/151/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/151/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/151/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/statuses/dcccda2aa5ab661085deefd33ace60685fe0980f"}}}}