{"action":"created","comment":{"url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/comments/204790001","pull_request_review_id":139932325,"id":204790001,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDc5MDAwMQ==","diff_hunk":"@@ -0,0 +1,58 @@\n+/*\n+ * Copyright 2018 HM Revenue & Customs\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except 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, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package uk.gov.hmrc.sdes.bulkdownload.config\n+\n+import org.mockito.Matchers.any\n+import org.mockito.Mockito.{reset, verify, verifyZeroInteractions}\n+import org.scalatest.mockito.MockitoSugar\n+import play.api.Application\n+import play.api.inject.bind\n+import play.api.inject.guice.GuiceApplicationBuilder\n+import play.api.test.Helpers.running\n+import uk.gov.hmrc.http.HeaderCarrier\n+import uk.gov.hmrc.play.test.UnitSpec\n+import uk.gov.hmrc.sdes.bulkdownload.connectors.ServiceLocatorConnector\n+\n+class AppStartupSpec extends UnitSpec with MockitoSugar {\n+\n+  val mockServiceLocatorConnector: ServiceLocatorConnector = mock[ServiceLocatorConnector]\n+\n+  def app(registrationEnabled: Option[Boolean]): Application = {\n+    reset(mockServiceLocatorConnector)\n+    val config = for (flag <- registrationEnabled) yield \"microservice.services.service-locator.enabled\" -> flag\n+    GuiceApplicationBuilder()\n+      .configure(config.toSeq :_*)\n+      .bindings(bind[ServiceLocatorConnector].to(mockServiceLocatorConnector))\n+      .build()\n+  }\n+\n+  \"Application startup\" when {\n+\n+    \"registration is enabled\" should {\n+      \"register the microservice in service locator\" in running(app(registrationEnabled = Some(true))){\n+        verify(mockServiceLocatorConnector).register(any[HeaderCarrier])\n+      }\n+    }\n+\n+    \"registration is disabled\" should {\n+      \"not register with service locator\" in running(app(registrationEnabled = Some(false))){\n+        verifyZeroInteractions(mockServiceLocatorConnector)\n+      }","path":"test/uk/gov/hmrc/sdes/bulkdownload/config/AppStartupSpec.scala","position":61,"original_position":54,"commit_id":"14cf03f7d520dd47971030b0852aff75ac649666","original_commit_id":"c25f18ca9102c0602f72e329068057bd88cc0bf7","user":{"login":"MihailsC-hmrc","id":32365147,"node_id":"MDQ6VXNlcjMyMzY1MTQ3","avatar_url":"https://avatars2.githubusercontent.com/u/32365147?v=4","gravatar_id":"","url":"https://api.github.com/users/MihailsC-hmrc","html_url":"https://github.com/MihailsC-hmrc","followers_url":"https://api.github.com/users/MihailsC-hmrc/followers","following_url":"https://api.github.com/users/MihailsC-hmrc/following{/other_user}","gists_url":"https://api.github.com/users/MihailsC-hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/MihailsC-hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MihailsC-hmrc/subscriptions","organizations_url":"https://api.github.com/users/MihailsC-hmrc/orgs","repos_url":"https://api.github.com/users/MihailsC-hmrc/repos","events_url":"https://api.github.com/users/MihailsC-hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/MihailsC-hmrc/received_events","type":"User","site_admin":false},"body":"Added the test.","created_at":"2018-07-24T14:56:26Z","updated_at":"2018-07-24T14:56:27Z","html_url":"https://github.com/hmrc/secure-data-exchange-bulk-download/pull/1#discussion_r204790001","pull_request_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/comments/204790001"},"html":{"href":"https://github.com/hmrc/secure-data-exchange-bulk-download/pull/1#discussion_r204790001"},"pull_request":{"href":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/1"}},"in_reply_to_id":204713647},"pull_request":{"url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/1","id":203480166,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNDgwMTY2","html_url":"https://github.com/hmrc/secure-data-exchange-bulk-download/pull/1","diff_url":"https://github.com/hmrc/secure-data-exchange-bulk-download/pull/1.diff","patch_url":"https://github.com/hmrc/secure-data-exchange-bulk-download/pull/1.patch","issue_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/issues/1","number":1,"state":"open","locked":false,"title":"SDES-1042: Service skeleton","user":{"login":"MihailsC-hmrc","id":32365147,"node_id":"MDQ6VXNlcjMyMzY1MTQ3","avatar_url":"https://avatars2.githubusercontent.com/u/32365147?v=4","gravatar_id":"","url":"https://api.github.com/users/MihailsC-hmrc","html_url":"https://github.com/MihailsC-hmrc","followers_url":"https://api.github.com/users/MihailsC-hmrc/followers","following_url":"https://api.github.com/users/MihailsC-hmrc/following{/other_user}","gists_url":"https://api.github.com/users/MihailsC-hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/MihailsC-hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MihailsC-hmrc/subscriptions","organizations_url":"https://api.github.com/users/MihailsC-hmrc/orgs","repos_url":"https://api.github.com/users/MihailsC-hmrc/repos","events_url":"https://api.github.com/users/MihailsC-hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/MihailsC-hmrc/received_events","type":"User","site_admin":false},"body":"- registration with `service-locator` on startup\r\n- `definition.json` and `application.raml` files for a public service\r\n- template for endpoint","created_at":"2018-07-24T10:27:47Z","updated_at":"2018-07-24T14:56:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0dcaf4b6447a0e6351a958f7191a484fa6afee72","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/1/commits","review_comments_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/1/comments","review_comment_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/issues/1/comments","statuses_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/statuses/14cf03f7d520dd47971030b0852aff75ac649666","head":{"label":"hmrc:SDES-1042","ref":"SDES-1042","sha":"14cf03f7d520dd47971030b0852aff75ac649666","user":{"login":"hmrc","id":5755339,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NTUzMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":141998262,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE5OTgyNjI=","name":"secure-data-exchange-bulk-download","full_name":"hmrc/secure-data-exchange-bulk-download","owner":{"login":"hmrc","id":5755339,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NTUzMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/secure-data-exchange-bulk-download","description":null,"fork":false,"url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download","forks_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/forks","keys_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/teams","hooks_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/hooks","issue_events_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/events","assignees_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/tags","blobs_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/languages","stargazers_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/stargazers","contributors_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/contributors","subscribers_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/subscribers","subscription_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/subscription","commits_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/merges","archive_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/downloads","issues_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/deployments","created_at":"2018-07-23T10:19:00Z","updated_at":"2018-07-23T10:19:21Z","pushed_at":"2018-07-24T14:56:01Z","git_url":"git://github.com/hmrc/secure-data-exchange-bulk-download.git","ssh_url":"git@github.com:hmrc/secure-data-exchange-bulk-download.git","clone_url":"https://github.com/hmrc/secure-data-exchange-bulk-download.git","svn_url":"https://github.com/hmrc/secure-data-exchange-bulk-download","homepage":"","size":21,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"hmrc:master","ref":"master","sha":"545db7ff99a19afe6ceec744e0c6463bbdbfe30b","user":{"login":"hmrc","id":5755339,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NTUzMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":141998262,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE5OTgyNjI=","name":"secure-data-exchange-bulk-download","full_name":"hmrc/secure-data-exchange-bulk-download","owner":{"login":"hmrc","id":5755339,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NTUzMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/secure-data-exchange-bulk-download","description":null,"fork":false,"url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download","forks_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/forks","keys_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/teams","hooks_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/hooks","issue_events_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/events","assignees_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/tags","blobs_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/languages","stargazers_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/stargazers","contributors_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/contributors","subscribers_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/subscribers","subscription_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/subscription","commits_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/merges","archive_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/downloads","issues_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/deployments","created_at":"2018-07-23T10:19:00Z","updated_at":"2018-07-23T10:19:21Z","pushed_at":"2018-07-24T14:56:01Z","git_url":"git://github.com/hmrc/secure-data-exchange-bulk-download.git","ssh_url":"git@github.com:hmrc/secure-data-exchange-bulk-download.git","clone_url":"https://github.com/hmrc/secure-data-exchange-bulk-download.git","svn_url":"https://github.com/hmrc/secure-data-exchange-bulk-download","homepage":"","size":21,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/1"},"html":{"href":"https://github.com/hmrc/secure-data-exchange-bulk-download/pull/1"},"issue":{"href":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/issues/1"},"comments":{"href":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/hmrc/secure-data-exchange-bulk-download/statuses/14cf03f7d520dd47971030b0852aff75ac649666"}},"author_association":"NONE"}}
{"actor":{"display_login":"MihailsC-hmrc"}}