{"action":"created","comment":{"url":"https://api.github.com/repos/motech-implementations/mim/pulls/comments/31983304","id":31983304,"diff_hunk":"@@ -453,50 +346,28 @@ private void createFlwWithLanguageLocationCodeNotInWhitelist() {\n \n     private void createCircleWithLanguage() {\n \n-        Language papiamento = new Language(\"99\", \"Papiamento\");\n-        languageDataService.create(papiamento);\n+        // Let's create a pretend circle with two states\n \n-        District district = new District();\n-        district.setName(\"District 1\");\n-        district.setRegionalName(\"District 1\");\n-        district.setLanguage(papiamento);\n-        district.setCode(1L);\n-\n-        State state = new State();\n-        state.setName(\"State 1\");\n-        state.setCode(1L);\n-        state.getDistricts().add(district);\n-\n-        stateDataService.create(state);\n-\n-        deployedServiceDataService.create(new DeployedService(state, Service.MOBILE_ACADEMY));\n-        deployedServiceDataService.create(new DeployedService(state, Service.MOBILE_KUNJI));\n-\n-        Circle circle = new Circle(\"AA\");\n-        circle.setDefaultLanguage(papiamento);\n+        final Circle circle = new Circle(\"AA\");\n+        circle.setDefaultLanguage(rh.hindiLanguage());\n         circleDataService.create(circle);\n \n-        Language hi = languageDataService.create(new Language(\"88\", \"hindi\"));\n-\n-        District district2 = new District();\n-        district2.setName(\"District 2\");\n-        district2.setRegionalName(\"District 2\");\n-        district2.setLanguage(hi);\n-        district2.setCode(2L);\n-\n-        State state2 = new State();\n-        state2.setName(\"State 2\");\n-        state2.setCode(2L);\n-        state2.getDistricts().add(district2);\n+        // Calling these will make sure the districts exist and will map the districts' language to their state\n+        rh.newDelhiDistrict();\n+        rh.mysuruDistrict();\n \n-        stateDataService.create(state2);\n+        circleDataService.doInTransaction(new TransactionCallbackWithoutResult() {","path":"testing/src/test/java/org/motechproject/nms/testing/it/api/UserControllerBundleIT.java","position":281,"original_position":281,"commit_id":"72328a7c7b9df90188f24022943524241a8ab1ae","original_commit_id":"b8affe5d1bb577c7a8134506fcf6a7e6454c03fe","user":{"login":"frankhuster","id":5107550,"avatar_url":"https://avatars.githubusercontent.com/u/5107550?v=3","gravatar_id":"","url":"https://api.github.com/users/frankhuster","html_url":"https://github.com/frankhuster","followers_url":"https://api.github.com/users/frankhuster/followers","following_url":"https://api.github.com/users/frankhuster/following{/other_user}","gists_url":"https://api.github.com/users/frankhuster/gists{/gist_id}","starred_url":"https://api.github.com/users/frankhuster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankhuster/subscriptions","organizations_url":"https://api.github.com/users/frankhuster/orgs","repos_url":"https://api.github.com/users/frankhuster/repos","events_url":"https://api.github.com/users/frankhuster/events{/privacy}","received_events_url":"https://api.github.com/users/frankhuster/received_events","type":"User","site_admin":false},"body":"Yeah, and now the CircleServiceBundleIT seems to break when [testing a state with multiple circles](http://ci.motechproject.org/job/NMS/334/testReport/junit/org.motechproject.nms.testing.it.region/CircleServiceBundleIT/testMultipleCirclesSingleState/) grrr... We need to have that fixed at the platform level.","created_at":"2015-06-09T05:16:04Z","updated_at":"2015-06-09T05:16:04Z","html_url":"https://github.com/motech-implementations/mim/pull/333#discussion_r31983304","pull_request_url":"https://api.github.com/repos/motech-implementations/mim/pulls/333","_links":{"self":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/comments/31983304"},"html":{"href":"https://github.com/motech-implementations/mim/pull/333#discussion_r31983304"},"pull_request":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/333"}}},"pull_request":{"url":"https://api.github.com/repos/motech-implementations/mim/pulls/333","id":37219020,"html_url":"https://github.com/motech-implementations/mim/pull/333","diff_url":"https://github.com/motech-implementations/mim/pull/333.diff","patch_url":"https://github.com/motech-implementations/mim/pull/333.patch","issue_url":"https://api.github.com/repos/motech-implementations/mim/issues/333","number":333,"state":"open","locked":false,"title":"UserControllerBundleIT work","user":{"login":"frankhuster","id":5107550,"avatar_url":"https://avatars.githubusercontent.com/u/5107550?v=3","gravatar_id":"","url":"https://api.github.com/users/frankhuster","html_url":"https://github.com/frankhuster","followers_url":"https://api.github.com/users/frankhuster/followers","following_url":"https://api.github.com/users/frankhuster/following{/other_user}","gists_url":"https://api.github.com/users/frankhuster/gists{/gist_id}","starred_url":"https://api.github.com/users/frankhuster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankhuster/subscriptions","organizations_url":"https://api.github.com/users/frankhuster/orgs","repos_url":"https://api.github.com/users/frankhuster/repos","events_url":"https://api.github.com/users/frankhuster/events{/privacy}","received_events_url":"https://api.github.com/users/frankhuster/received_events","type":"User","site_admin":false},"body":"All ITs now pass.\r\nStill some work to be done to use Region & Subscription helpers.","created_at":"2015-06-09T04:40:53Z","updated_at":"2015-06-09T05:16:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99f7c5ebfa0f43cd47d72e7461fd8702969b8ece","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/motech-implementations/mim/pulls/333/commits","review_comments_url":"https://api.github.com/repos/motech-implementations/mim/pulls/333/comments","review_comment_url":"https://api.github.com/repos/motech-implementations/mim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/motech-implementations/mim/issues/333/comments","statuses_url":"https://api.github.com/repos/motech-implementations/mim/statuses/72328a7c7b9df90188f24022943524241a8ab1ae","head":{"label":"motech-implementations:testGetUserDetailsUnknownUser","ref":"testGetUserDetailsUnknownUser","sha":"72328a7c7b9df90188f24022943524241a8ab1ae","user":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"repo":{"id":33508795,"name":"mim","full_name":"motech-implementations/mim","owner":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/motech-implementations/mim","description":"mim","fork":false,"url":"https://api.github.com/repos/motech-implementations/mim","forks_url":"https://api.github.com/repos/motech-implementations/mim/forks","keys_url":"https://api.github.com/repos/motech-implementations/mim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/motech-implementations/mim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/motech-implementations/mim/teams","hooks_url":"https://api.github.com/repos/motech-implementations/mim/hooks","issue_events_url":"https://api.github.com/repos/motech-implementations/mim/issues/events{/number}","events_url":"https://api.github.com/repos/motech-implementations/mim/events","assignees_url":"https://api.github.com/repos/motech-implementations/mim/assignees{/user}","branches_url":"https://api.github.com/repos/motech-implementations/mim/branches{/branch}","tags_url":"https://api.github.com/repos/motech-implementations/mim/tags","blobs_url":"https://api.github.com/repos/motech-implementations/mim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/motech-implementations/mim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/motech-implementations/mim/git/refs{/sha}","trees_url":"https://api.github.com/repos/motech-implementations/mim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/motech-implementations/mim/statuses/{sha}","languages_url":"https://api.github.com/repos/motech-implementations/mim/languages","stargazers_url":"https://api.github.com/repos/motech-implementations/mim/stargazers","contributors_url":"https://api.github.com/repos/motech-implementations/mim/contributors","subscribers_url":"https://api.github.com/repos/motech-implementations/mim/subscribers","subscription_url":"https://api.github.com/repos/motech-implementations/mim/subscription","commits_url":"https://api.github.com/repos/motech-implementations/mim/commits{/sha}","git_commits_url":"https://api.github.com/repos/motech-implementations/mim/git/commits{/sha}","comments_url":"https://api.github.com/repos/motech-implementations/mim/comments{/number}","issue_comment_url":"https://api.github.com/repos/motech-implementations/mim/issues/comments{/number}","contents_url":"https://api.github.com/repos/motech-implementations/mim/contents/{+path}","compare_url":"https://api.github.com/repos/motech-implementations/mim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/motech-implementations/mim/merges","archive_url":"https://api.github.com/repos/motech-implementations/mim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/motech-implementations/mim/downloads","issues_url":"https://api.github.com/repos/motech-implementations/mim/issues{/number}","pulls_url":"https://api.github.com/repos/motech-implementations/mim/pulls{/number}","milestones_url":"https://api.github.com/repos/motech-implementations/mim/milestones{/number}","notifications_url":"https://api.github.com/repos/motech-implementations/mim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/motech-implementations/mim/labels{/name}","releases_url":"https://api.github.com/repos/motech-implementations/mim/releases{/id}","created_at":"2015-04-06T22:18:18Z","updated_at":"2015-05-09T02:09:40Z","pushed_at":"2015-06-09T04:57:30Z","git_url":"git://github.com/motech-implementations/mim.git","ssh_url":"git@github.com:motech-implementations/mim.git","clone_url":"https://github.com/motech-implementations/mim.git","svn_url":"https://github.com/motech-implementations/mim","homepage":null,"size":16661,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":84,"forks":3,"open_issues":84,"watchers":1,"default_branch":"master"}},"base":{"label":"motech-implementations:master","ref":"master","sha":"66f19c6efc5c88ba6f151cbd5b8b8fc4a3265841","user":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"repo":{"id":33508795,"name":"mim","full_name":"motech-implementations/mim","owner":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/motech-implementations/mim","description":"mim","fork":false,"url":"https://api.github.com/repos/motech-implementations/mim","forks_url":"https://api.github.com/repos/motech-implementations/mim/forks","keys_url":"https://api.github.com/repos/motech-implementations/mim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/motech-implementations/mim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/motech-implementations/mim/teams","hooks_url":"https://api.github.com/repos/motech-implementations/mim/hooks","issue_events_url":"https://api.github.com/repos/motech-implementations/mim/issues/events{/number}","events_url":"https://api.github.com/repos/motech-implementations/mim/events","assignees_url":"https://api.github.com/repos/motech-implementations/mim/assignees{/user}","branches_url":"https://api.github.com/repos/motech-implementations/mim/branches{/branch}","tags_url":"https://api.github.com/repos/motech-implementations/mim/tags","blobs_url":"https://api.github.com/repos/motech-implementations/mim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/motech-implementations/mim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/motech-implementations/mim/git/refs{/sha}","trees_url":"https://api.github.com/repos/motech-implementations/mim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/motech-implementations/mim/statuses/{sha}","languages_url":"https://api.github.com/repos/motech-implementations/mim/languages","stargazers_url":"https://api.github.com/repos/motech-implementations/mim/stargazers","contributors_url":"https://api.github.com/repos/motech-implementations/mim/contributors","subscribers_url":"https://api.github.com/repos/motech-implementations/mim/subscribers","subscription_url":"https://api.github.com/repos/motech-implementations/mim/subscription","commits_url":"https://api.github.com/repos/motech-implementations/mim/commits{/sha}","git_commits_url":"https://api.github.com/repos/motech-implementations/mim/git/commits{/sha}","comments_url":"https://api.github.com/repos/motech-implementations/mim/comments{/number}","issue_comment_url":"https://api.github.com/repos/motech-implementations/mim/issues/comments{/number}","contents_url":"https://api.github.com/repos/motech-implementations/mim/contents/{+path}","compare_url":"https://api.github.com/repos/motech-implementations/mim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/motech-implementations/mim/merges","archive_url":"https://api.github.com/repos/motech-implementations/mim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/motech-implementations/mim/downloads","issues_url":"https://api.github.com/repos/motech-implementations/mim/issues{/number}","pulls_url":"https://api.github.com/repos/motech-implementations/mim/pulls{/number}","milestones_url":"https://api.github.com/repos/motech-implementations/mim/milestones{/number}","notifications_url":"https://api.github.com/repos/motech-implementations/mim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/motech-implementations/mim/labels{/name}","releases_url":"https://api.github.com/repos/motech-implementations/mim/releases{/id}","created_at":"2015-04-06T22:18:18Z","updated_at":"2015-05-09T02:09:40Z","pushed_at":"2015-06-09T04:57:30Z","git_url":"git://github.com/motech-implementations/mim.git","ssh_url":"git@github.com:motech-implementations/mim.git","clone_url":"https://github.com/motech-implementations/mim.git","svn_url":"https://github.com/motech-implementations/mim","homepage":null,"size":16661,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":84,"forks":3,"open_issues":84,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/333"},"html":{"href":"https://github.com/motech-implementations/mim/pull/333"},"issue":{"href":"https://api.github.com/repos/motech-implementations/mim/issues/333"},"comments":{"href":"https://api.github.com/repos/motech-implementations/mim/issues/333/comments"},"review_comments":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/333/comments"},"review_comment":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/333/commits"},"statuses":{"href":"https://api.github.com/repos/motech-implementations/mim/statuses/72328a7c7b9df90188f24022943524241a8ab1ae"}}}}