{"action":"created","comment":{"url":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/comments/30964151","id":30964151,"diff_hunk":"@@ -0,0 +1,430 @@\n+/*\n+ * Copyright (C) 2013 tarent AG\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining\n+ * a copy of this software and associated documentation files (the\n+ * \"Software\"), to deal in the Software without restriction, including\n+ * without limitation the rights to use, copy, modify, merge, publish,\n+ * distribute, sublicense, and/or sell copies of the Software, and to\n+ * permit persons to whom the Software is furnished to do so, subject to\n+ * the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be\n+ * included in all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n+ */\n+\n+package org.osiam.client;\n+\n+import static org.hamcrest.Matchers.*;\n+import static org.junit.Assert.assertThat;\n+import static org.junit.Assert.fail;\n+\n+import java.io.IOException;\n+import java.util.Collections;\n+\n+import javax.ws.rs.client.Client;\n+import javax.ws.rs.client.ClientBuilder;\n+import javax.ws.rs.client.Entity;\n+import javax.ws.rs.core.MediaType;\n+import javax.ws.rs.core.Response;\n+\n+import org.json.JSONException;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.osiam.client.exception.ForbiddenException;\n+import org.osiam.client.exception.UnauthorizedException;\n+import org.osiam.client.oauth.AccessToken;\n+import org.osiam.client.oauth.Scope;\n+import org.osiam.client.query.Query;\n+import org.osiam.client.query.QueryBuilder;\n+import org.osiam.client.user.BasicUser;\n+import org.osiam.resources.scim.*;\n+import org.skyscreamer.jsonassert.JSONAssert;\n+import org.springframework.test.context.ContextConfiguration;\n+import org.springframework.test.context.TestExecutionListeners;\n+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;\n+import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;\n+\n+import com.github.springtestdbunit.DbUnitTestExecutionListener;\n+import com.github.springtestdbunit.annotation.DatabaseOperation;\n+import com.github.springtestdbunit.annotation.DatabaseSetup;\n+import com.github.springtestdbunit.annotation.DatabaseTearDown;\n+\n+@RunWith(SpringJUnit4ClassRunner.class)\n+@ContextConfiguration(\"/context.xml\")\n+@TestExecutionListeners({ DependencyInjectionTestExecutionListener.class,\n+        DbUnitTestExecutionListener.class })\n+@DatabaseSetup(\"/database_seed_me_scope.xml\")\n+@DatabaseTearDown(value = \"/database_tear_down.xml\", type = DatabaseOperation.DELETE_ALL)\n+public class MeScopeIT {\n+\n+    private static final String OWN_USER_ID = \"cef9452e-00a9-4cec-a086-d171374ffbef\";\n+    private static final String OTHER_USER_ID = \"834b410a-943b-4c80-817a-4465aed037bc\";\n+    private static final String GROUP_ID = \"69e1a5dc-89be-4343-976c-b5541af249f4\";\n+\n+    private final OsiamConnector oConnector = new OsiamConnector.Builder()","path":"src/test/java/org/osiam/client/MeScopeIT.java","position":73,"original_position":73,"commit_id":"ab16b1f508ea3f34b2985c28aeac19f8c3b36aba","original_commit_id":"ab16b1f508ea3f34b2985c28aeac19f8c3b36aba","user":{"login":"dacrome","id":1593279,"avatar_url":"https://avatars.githubusercontent.com/u/1593279?v=3","gravatar_id":"","url":"https://api.github.com/users/dacrome","html_url":"https://github.com/dacrome","followers_url":"https://api.github.com/users/dacrome/followers","following_url":"https://api.github.com/users/dacrome/following{/other_user}","gists_url":"https://api.github.com/users/dacrome/gists{/gist_id}","starred_url":"https://api.github.com/users/dacrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dacrome/subscriptions","organizations_url":"https://api.github.com/users/dacrome/orgs","repos_url":"https://api.github.com/users/dacrome/repos","events_url":"https://api.github.com/users/dacrome/events{/privacy}","received_events_url":"https://api.github.com/users/dacrome/received_events","type":"User","site_admin":false},"body":"Ah I see it's because the client is setup in the database seed with only the ME scope.. but for every test [a new connector will be created](https://github.com/osiam/connector4java-integration-tests/blob/master/src/test/java/org/osiam/client/AbstractIntegrationTestBase.java#L54) in the the superclass (if `MeScopeIT`would extends `AbstractIntegrationTestBase`)","created_at":"2015-05-25T06:27:16Z","updated_at":"2015-05-25T06:27:16Z","html_url":"https://github.com/osiam/connector4java-integration-tests/pull/229#discussion_r30964151","pull_request_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/229","_links":{"self":{"href":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/comments/30964151"},"html":{"href":"https://github.com/osiam/connector4java-integration-tests/pull/229#discussion_r30964151"},"pull_request":{"href":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/229"}}},"pull_request":{"url":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/229","id":36036842,"html_url":"https://github.com/osiam/connector4java-integration-tests/pull/229","diff_url":"https://github.com/osiam/connector4java-integration-tests/pull/229.diff","patch_url":"https://github.com/osiam/connector4java-integration-tests/pull/229.patch","issue_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/issues/229","number":229,"state":"open","locked":false,"title":"Add tests for scope ME","user":{"login":"tkrille","id":5213491,"avatar_url":"https://avatars.githubusercontent.com/u/5213491?v=3","gravatar_id":"","url":"https://api.github.com/users/tkrille","html_url":"https://github.com/tkrille","followers_url":"https://api.github.com/users/tkrille/followers","following_url":"https://api.github.com/users/tkrille/following{/other_user}","gists_url":"https://api.github.com/users/tkrille/gists{/gist_id}","starred_url":"https://api.github.com/users/tkrille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkrille/subscriptions","organizations_url":"https://api.github.com/users/tkrille/orgs","repos_url":"https://api.github.com/users/tkrille/repos","events_url":"https://api.github.com/users/tkrille/events{/privacy}","received_events_url":"https://api.github.com/users/tkrille/received_events","type":"User","site_admin":false},"body":"See also osiam/resource-server#17.","created_at":"2015-05-22T14:37:45Z","updated_at":"2015-05-25T06:27:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f67a10efeeb304e85f0b159b623d7e7a9bc18c31","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/229/commits","review_comments_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/229/comments","review_comment_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/issues/229/comments","statuses_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/statuses/ab16b1f508ea3f34b2985c28aeac19f8c3b36aba","head":{"label":"tkrille:OSNG-563","ref":"OSNG-563","sha":"ab16b1f508ea3f34b2985c28aeac19f8c3b36aba","user":{"login":"tkrille","id":5213491,"avatar_url":"https://avatars.githubusercontent.com/u/5213491?v=3","gravatar_id":"","url":"https://api.github.com/users/tkrille","html_url":"https://github.com/tkrille","followers_url":"https://api.github.com/users/tkrille/followers","following_url":"https://api.github.com/users/tkrille/following{/other_user}","gists_url":"https://api.github.com/users/tkrille/gists{/gist_id}","starred_url":"https://api.github.com/users/tkrille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkrille/subscriptions","organizations_url":"https://api.github.com/users/tkrille/orgs","repos_url":"https://api.github.com/users/tkrille/repos","events_url":"https://api.github.com/users/tkrille/events{/privacy}","received_events_url":"https://api.github.com/users/tkrille/received_events","type":"User","site_admin":false},"repo":{"id":12107267,"name":"osiam-connector4java-integration-tests","full_name":"tkrille/osiam-connector4java-integration-tests","owner":{"login":"tkrille","id":5213491,"avatar_url":"https://avatars.githubusercontent.com/u/5213491?v=3","gravatar_id":"","url":"https://api.github.com/users/tkrille","html_url":"https://github.com/tkrille","followers_url":"https://api.github.com/users/tkrille/followers","following_url":"https://api.github.com/users/tkrille/following{/other_user}","gists_url":"https://api.github.com/users/tkrille/gists{/gist_id}","starred_url":"https://api.github.com/users/tkrille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkrille/subscriptions","organizations_url":"https://api.github.com/users/tkrille/orgs","repos_url":"https://api.github.com/users/tkrille/repos","events_url":"https://api.github.com/users/tkrille/events{/privacy}","received_events_url":"https://api.github.com/users/tkrille/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tkrille/osiam-connector4java-integration-tests","description":"The integration tests for the OSIAM connector4java","fork":true,"url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests","forks_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/forks","keys_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/teams","hooks_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/hooks","issue_events_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/issues/events{/number}","events_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/events","assignees_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/assignees{/user}","branches_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/branches{/branch}","tags_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/tags","blobs_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/languages","stargazers_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/stargazers","contributors_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/contributors","subscribers_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/subscribers","subscription_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/subscription","commits_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/contents/{+path}","compare_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/merges","archive_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/downloads","issues_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/issues{/number}","pulls_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/labels{/name}","releases_url":"https://api.github.com/repos/tkrille/osiam-connector4java-integration-tests/releases{/id}","created_at":"2013-08-14T11:30:14Z","updated_at":"2014-05-14T17:15:18Z","pushed_at":"2015-05-22T16:02:41Z","git_url":"git://github.com/tkrille/osiam-connector4java-integration-tests.git","ssh_url":"git@github.com:tkrille/osiam-connector4java-integration-tests.git","clone_url":"https://github.com/tkrille/osiam-connector4java-integration-tests.git","svn_url":"https://github.com/tkrille/osiam-connector4java-integration-tests","homepage":null,"size":1861,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"osiam:master","ref":"master","sha":"33e556030032c5b3106b238ec7e91691f807f89f","user":{"login":"osiam","id":1918807,"avatar_url":"https://avatars.githubusercontent.com/u/1918807?v=3","gravatar_id":"","url":"https://api.github.com/users/osiam","html_url":"https://github.com/osiam","followers_url":"https://api.github.com/users/osiam/followers","following_url":"https://api.github.com/users/osiam/following{/other_user}","gists_url":"https://api.github.com/users/osiam/gists{/gist_id}","starred_url":"https://api.github.com/users/osiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osiam/subscriptions","organizations_url":"https://api.github.com/users/osiam/orgs","repos_url":"https://api.github.com/users/osiam/repos","events_url":"https://api.github.com/users/osiam/events{/privacy}","received_events_url":"https://api.github.com/users/osiam/received_events","type":"Organization","site_admin":false},"repo":{"id":11688522,"name":"connector4java-integration-tests","full_name":"osiam/connector4java-integration-tests","owner":{"login":"osiam","id":1918807,"avatar_url":"https://avatars.githubusercontent.com/u/1918807?v=3","gravatar_id":"","url":"https://api.github.com/users/osiam","html_url":"https://github.com/osiam","followers_url":"https://api.github.com/users/osiam/followers","following_url":"https://api.github.com/users/osiam/following{/other_user}","gists_url":"https://api.github.com/users/osiam/gists{/gist_id}","starred_url":"https://api.github.com/users/osiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osiam/subscriptions","organizations_url":"https://api.github.com/users/osiam/orgs","repos_url":"https://api.github.com/users/osiam/repos","events_url":"https://api.github.com/users/osiam/events{/privacy}","received_events_url":"https://api.github.com/users/osiam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/osiam/connector4java-integration-tests","description":"The integration tests for the OSIAM connector4java","fork":false,"url":"https://api.github.com/repos/osiam/connector4java-integration-tests","forks_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/forks","keys_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/teams","hooks_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/hooks","issue_events_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/issues/events{/number}","events_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/events","assignees_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/assignees{/user}","branches_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/branches{/branch}","tags_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/tags","blobs_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/languages","stargazers_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/stargazers","contributors_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/contributors","subscribers_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/subscribers","subscription_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/subscription","commits_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/contents/{+path}","compare_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/merges","archive_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/downloads","issues_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/issues{/number}","pulls_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/labels{/name}","releases_url":"https://api.github.com/repos/osiam/connector4java-integration-tests/releases{/id}","created_at":"2013-07-26T15:16:30Z","updated_at":"2015-05-08T14:45:21Z","pushed_at":"2015-05-24T23:50:59Z","git_url":"git://github.com/osiam/connector4java-integration-tests.git","ssh_url":"git@github.com:osiam/connector4java-integration-tests.git","clone_url":"https://github.com/osiam/connector4java-integration-tests.git","svn_url":"https://github.com/osiam/connector4java-integration-tests","homepage":null,"size":3250,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":5,"forks":11,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/229"},"html":{"href":"https://github.com/osiam/connector4java-integration-tests/pull/229"},"issue":{"href":"https://api.github.com/repos/osiam/connector4java-integration-tests/issues/229"},"comments":{"href":"https://api.github.com/repos/osiam/connector4java-integration-tests/issues/229/comments"},"review_comments":{"href":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/229/comments"},"review_comment":{"href":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/osiam/connector4java-integration-tests/pulls/229/commits"},"statuses":{"href":"https://api.github.com/repos/osiam/connector4java-integration-tests/statuses/ab16b1f508ea3f34b2985c28aeac19f8c3b36aba"}}}}