{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/verify-hub/pulls/comments/183095413","pull_request_review_id":114033146,"id":183095413,"diff_hunk":"@@ -0,0 +1,68 @@\n+package uk.gov.ida.saml.core.validators;\n+\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.mockito.runners.MockitoJUnitRunner;\n+import uk.gov.ida.saml.core.validation.SamlValidationSpecificationFailure;\n+import uk.gov.ida.saml.core.errors.SamlTransformationErrorFactory;\n+import java.net.URI;\n+import java.net.URISyntaxException;\n+\n+import static org.junit.Assert.fail;\n+import static uk.gov.ida.saml.core.errors.SamlTransformationErrorFactory.destinationEmpty;\n+import static uk.gov.ida.saml.core.errors.SamlTransformationErrorFactory.destinationMissing;\n+import static uk.gov.ida.saml.core.test.SamlTransformationErrorManagerTestHelper.*;\n+\n+@RunWith(MockitoJUnitRunner.class)\n+public class DestinationValidatorTest {\n+\n+    private static final String EXPECTED_DESTINATION = \"http://correct.destination.com\";\n+    private static final String EXPECTED_ENDPOINT = \"/foo/bar\";\n+\n+    private DestinationValidator validator;\n+\n+    @Before\n+    public void setup() throws URISyntaxException {\n+        validator = new DestinationValidator(URI.create(EXPECTED_DESTINATION), EXPECTED_ENDPOINT);\n+    }\n+\n+    @Test\n+    public void validate_shouldThrowExceptionIfDestinationIsAbsent() throws Exception {\n+        validateException(\n+            destinationMissing(URI.create(EXPECTED_DESTINATION + EXPECTED_ENDPOINT)),\n+            null\n+        );\n+    }\n+\n+    @Test\n+    public void validate_shouldNotThrowExceptionIfUriMatches() throws Exception {","path":"hub-saml/src/test/java/uk/gov/ida/saml/core/validators/DestinationValidatorTest.java","position":39,"original_position":39,"commit_id":"48f546b6a6d6c8fcf6240a998f8daf48bf43a517","original_commit_id":"48f546b6a6d6c8fcf6240a998f8daf48bf43a517","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [JUnit tests should include assert() or fail()](https://app.codacy.com/app/thomasalanlee/verify-hub/pullRequest?prid=1565087)","created_at":"2018-04-20T15:54:05Z","updated_at":"2018-04-20T15:54:05Z","html_url":"https://github.com/alphagov/verify-hub/pull/54#discussion_r183095413","pull_request_url":"https://api.github.com/repos/alphagov/verify-hub/pulls/54","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/alphagov/verify-hub/pulls/comments/183095413"},"html":{"href":"https://github.com/alphagov/verify-hub/pull/54#discussion_r183095413"},"pull_request":{"href":"https://api.github.com/repos/alphagov/verify-hub/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/verify-hub/pulls/54","id":183085430,"html_url":"https://github.com/alphagov/verify-hub/pull/54","diff_url":"https://github.com/alphagov/verify-hub/pull/54.diff","patch_url":"https://github.com/alphagov/verify-hub/pull/54.patch","issue_url":"https://api.github.com/repos/alphagov/verify-hub/issues/54","number":54,"state":"open","locked":false,"title":"BAU: Merge hub-saml repo","user":{"login":"vixus0","id":2650888,"avatar_url":"https://avatars1.githubusercontent.com/u/2650888?v=4","gravatar_id":"","url":"https://api.github.com/users/vixus0","html_url":"https://github.com/vixus0","followers_url":"https://api.github.com/users/vixus0/followers","following_url":"https://api.github.com/users/vixus0/following{/other_user}","gists_url":"https://api.github.com/users/vixus0/gists{/gist_id}","starred_url":"https://api.github.com/users/vixus0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vixus0/subscriptions","organizations_url":"https://api.github.com/users/vixus0/orgs","repos_url":"https://api.github.com/users/vixus0/repos","events_url":"https://api.github.com/users/vixus0/events{/privacy}","received_events_url":"https://api.github.com/users/vixus0/received_events","type":"User","site_admin":false},"body":"The main dependency on hub-saml is from the hub services meaning that \nevery time hub-saml is updated, the version in verify-hub needs to be changed.\nMaking hub-saml part of this repo ensures that any changes are automatically in sync. hub-saml will still be published as a separate library that can be consumed by other services. It will share the hub's build version.\n\nAuthor: @vixus0","created_at":"2018-04-20T14:49:24Z","updated_at":"2018-04-20T15:54:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1e7dc7eab87aba1f7ad26b89b9c6b2a4be496ca","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/verify-hub/pulls/54/commits","review_comments_url":"https://api.github.com/repos/alphagov/verify-hub/pulls/54/comments","review_comment_url":"https://api.github.com/repos/alphagov/verify-hub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/verify-hub/issues/54/comments","statuses_url":"https://api.github.com/repos/alphagov/verify-hub/statuses/48f546b6a6d6c8fcf6240a998f8daf48bf43a517","head":{"label":"alphagov:bau-merge-hub-saml","ref":"bau-merge-hub-saml","sha":"48f546b6a6d6c8fcf6240a998f8daf48bf43a517","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":113597154,"name":"verify-hub","full_name":"alphagov/verify-hub","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/verify-hub","description":"Verify Hub Microservices","fork":false,"url":"https://api.github.com/repos/alphagov/verify-hub","forks_url":"https://api.github.com/repos/alphagov/verify-hub/forks","keys_url":"https://api.github.com/repos/alphagov/verify-hub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/verify-hub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/verify-hub/teams","hooks_url":"https://api.github.com/repos/alphagov/verify-hub/hooks","issue_events_url":"https://api.github.com/repos/alphagov/verify-hub/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/verify-hub/events","assignees_url":"https://api.github.com/repos/alphagov/verify-hub/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/verify-hub/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/verify-hub/tags","blobs_url":"https://api.github.com/repos/alphagov/verify-hub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/verify-hub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/verify-hub/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/verify-hub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/verify-hub/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/verify-hub/languages","stargazers_url":"https://api.github.com/repos/alphagov/verify-hub/stargazers","contributors_url":"https://api.github.com/repos/alphagov/verify-hub/contributors","subscribers_url":"https://api.github.com/repos/alphagov/verify-hub/subscribers","subscription_url":"https://api.github.com/repos/alphagov/verify-hub/subscription","commits_url":"https://api.github.com/repos/alphagov/verify-hub/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/verify-hub/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/verify-hub/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/verify-hub/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/verify-hub/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/verify-hub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/verify-hub/merges","archive_url":"https://api.github.com/repos/alphagov/verify-hub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/verify-hub/downloads","issues_url":"https://api.github.com/repos/alphagov/verify-hub/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/verify-hub/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/verify-hub/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/verify-hub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/verify-hub/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/verify-hub/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/verify-hub/deployments","created_at":"2017-12-08T16:53:55Z","updated_at":"2018-04-19T16:16:42Z","pushed_at":"2018-04-20T15:51:32Z","git_url":"git://github.com/alphagov/verify-hub.git","ssh_url":"git@github.com:alphagov/verify-hub.git","clone_url":"https://github.com/alphagov/verify-hub.git","svn_url":"https://github.com/alphagov/verify-hub","homepage":null,"size":1589,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":6,"watchers":4,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"8a2da277bc6ba766961701f6206d7e6309c9745e","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":113597154,"name":"verify-hub","full_name":"alphagov/verify-hub","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/verify-hub","description":"Verify Hub Microservices","fork":false,"url":"https://api.github.com/repos/alphagov/verify-hub","forks_url":"https://api.github.com/repos/alphagov/verify-hub/forks","keys_url":"https://api.github.com/repos/alphagov/verify-hub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/verify-hub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/verify-hub/teams","hooks_url":"https://api.github.com/repos/alphagov/verify-hub/hooks","issue_events_url":"https://api.github.com/repos/alphagov/verify-hub/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/verify-hub/events","assignees_url":"https://api.github.com/repos/alphagov/verify-hub/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/verify-hub/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/verify-hub/tags","blobs_url":"https://api.github.com/repos/alphagov/verify-hub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/verify-hub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/verify-hub/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/verify-hub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/verify-hub/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/verify-hub/languages","stargazers_url":"https://api.github.com/repos/alphagov/verify-hub/stargazers","contributors_url":"https://api.github.com/repos/alphagov/verify-hub/contributors","subscribers_url":"https://api.github.com/repos/alphagov/verify-hub/subscribers","subscription_url":"https://api.github.com/repos/alphagov/verify-hub/subscription","commits_url":"https://api.github.com/repos/alphagov/verify-hub/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/verify-hub/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/verify-hub/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/verify-hub/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/verify-hub/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/verify-hub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/verify-hub/merges","archive_url":"https://api.github.com/repos/alphagov/verify-hub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/verify-hub/downloads","issues_url":"https://api.github.com/repos/alphagov/verify-hub/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/verify-hub/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/verify-hub/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/verify-hub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/verify-hub/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/verify-hub/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/verify-hub/deployments","created_at":"2017-12-08T16:53:55Z","updated_at":"2018-04-19T16:16:42Z","pushed_at":"2018-04-20T15:51:32Z","git_url":"git://github.com/alphagov/verify-hub.git","ssh_url":"git@github.com:alphagov/verify-hub.git","clone_url":"https://github.com/alphagov/verify-hub.git","svn_url":"https://github.com/alphagov/verify-hub","homepage":null,"size":1589,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":6,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/verify-hub/pulls/54"},"html":{"href":"https://github.com/alphagov/verify-hub/pull/54"},"issue":{"href":"https://api.github.com/repos/alphagov/verify-hub/issues/54"},"comments":{"href":"https://api.github.com/repos/alphagov/verify-hub/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/verify-hub/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/verify-hub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/verify-hub/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/verify-hub/statuses/48f546b6a6d6c8fcf6240a998f8daf48bf43a517"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}