{"action":"created","comment":{"url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/comments/51543054","id":51543054,"diff_hunk":"@@ -0,0 +1,196 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  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+package org.apache.jclouds.profitbricks.rest.features;\n+\n+import com.squareup.okhttp.mockwebserver.MockResponse;\n+import java.util.List;\n+import org.apache.jclouds.profitbricks.rest.domain.Image;\n+import org.apache.jclouds.profitbricks.rest.domain.Server;\n+import org.apache.jclouds.profitbricks.rest.domain.Volume;\n+import org.apache.jclouds.profitbricks.rest.domain.options.DepthOptions;\n+import org.apache.jclouds.profitbricks.rest.internal.BaseProfitBricksApiMockTest;\n+import static org.testng.Assert.assertEquals;\n+import static org.testng.Assert.assertNotNull;\n+import static org.testng.Assert.assertTrue;\n+import org.testng.annotations.Test;\n+\n+@Test(groups = \"unit\", testName = \"ServerApiMockTest\", singleThreaded = true)\n+public class ServerApiMockTest extends BaseProfitBricksApiMockTest {\n+   \n+   @Test\n+   public void testGetList() throws InterruptedException {\n+      server.enqueue(\n+         new MockResponse().setBody(stringFromResource(\"/server/list.json\"))\n+      );\n+      \n+      List<Server> list = serverApi().getList(\"datacenter-id\");\n+      \n+      assertNotNull(list);\n+      assertEquals(list.size(), 5);\n+      assertEquals(list.get(0).properties().name(), \"docker001\");\n+      \n+      assertEquals(server.getRequestCount(), 1);\n+      assertSent(server, \"GET\", \"/datacenters/datacenter-id/servers\");\n+   }","path":"profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/features/ServerApiMockTest.java","position":48,"original_position":48,"commit_id":"6cb917b173888a51a08a2ba04db17f1c0331de7a","original_commit_id":"6cb917b173888a51a08a2ba04db17f1c0331de7a","user":{"login":"nacx","id":446705,"avatar_url":"https://avatars.githubusercontent.com/u/446705?v=3","gravatar_id":"","url":"https://api.github.com/users/nacx","html_url":"https://github.com/nacx","followers_url":"https://api.github.com/users/nacx/followers","following_url":"https://api.github.com/users/nacx/following{/other_user}","gists_url":"https://api.github.com/users/nacx/gists{/gist_id}","starred_url":"https://api.github.com/users/nacx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nacx/subscriptions","organizations_url":"https://api.github.com/users/nacx/orgs","repos_url":"https://api.github.com/users/nacx/repos","events_url":"https://api.github.com/users/nacx/events{/privacy}","received_events_url":"https://api.github.com/users/nacx/received_events","type":"User","site_admin":false},"body":"Add a test that exercises the method that gets the depth options.","created_at":"2016-02-02T09:30:02Z","updated_at":"2016-02-02T09:30:02Z","html_url":"https://github.com/jclouds/jclouds-labs/pull/227#discussion_r51543054","pull_request_url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/227","_links":{"self":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/comments/51543054"},"html":{"href":"https://github.com/jclouds/jclouds-labs/pull/227#discussion_r51543054"},"pull_request":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/227"}}},"pull_request":{"url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/227","id":54449636,"html_url":"https://github.com/jclouds/jclouds-labs/pull/227","diff_url":"https://github.com/jclouds/jclouds-labs/pull/227.diff","patch_url":"https://github.com/jclouds/jclouds-labs/pull/227.patch","issue_url":"https://api.github.com/repos/jclouds/jclouds-labs/issues/227","number":227,"state":"open","locked":false,"title":"Profitbricks server api","user":{"login":"jasminSPC","id":8327751,"avatar_url":"https://avatars.githubusercontent.com/u/8327751?v=3","gravatar_id":"","url":"https://api.github.com/users/jasminSPC","html_url":"https://github.com/jasminSPC","followers_url":"https://api.github.com/users/jasminSPC/followers","following_url":"https://api.github.com/users/jasminSPC/following{/other_user}","gists_url":"https://api.github.com/users/jasminSPC/gists{/gist_id}","starred_url":"https://api.github.com/users/jasminSPC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasminSPC/subscriptions","organizations_url":"https://api.github.com/users/jasminSPC/orgs","repos_url":"https://api.github.com/users/jasminSPC/repos","events_url":"https://api.github.com/users/jasminSPC/events{/privacy}","received_events_url":"https://api.github.com/users/jasminSPC/received_events","type":"User","site_admin":false},"body":"Thanks @mirza-spc","created_at":"2015-12-23T08:42:48Z","updated_at":"2016-02-02T09:30:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f13b53db6380a3bcab9d9951e52accd06979e066","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/227/commits","review_comments_url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/227/comments","review_comment_url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jclouds/jclouds-labs/issues/227/comments","statuses_url":"https://api.github.com/repos/jclouds/jclouds-labs/statuses/6cb917b173888a51a08a2ba04db17f1c0331de7a","head":{"label":"StackPointCloud:profitbricks-server-api","ref":"profitbricks-server-api","sha":"6cb917b173888a51a08a2ba04db17f1c0331de7a","user":{"login":"StackPointCloud","id":7716957,"avatar_url":"https://avatars.githubusercontent.com/u/7716957?v=3","gravatar_id":"","url":"https://api.github.com/users/StackPointCloud","html_url":"https://github.com/StackPointCloud","followers_url":"https://api.github.com/users/StackPointCloud/followers","following_url":"https://api.github.com/users/StackPointCloud/following{/other_user}","gists_url":"https://api.github.com/users/StackPointCloud/gists{/gist_id}","starred_url":"https://api.github.com/users/StackPointCloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StackPointCloud/subscriptions","organizations_url":"https://api.github.com/users/StackPointCloud/orgs","repos_url":"https://api.github.com/users/StackPointCloud/repos","events_url":"https://api.github.com/users/StackPointCloud/events{/privacy}","received_events_url":"https://api.github.com/users/StackPointCloud/received_events","type":"Organization","site_admin":false},"repo":{"id":30977988,"name":"jclouds-labs","full_name":"StackPointCloud/jclouds-labs","owner":{"login":"StackPointCloud","id":7716957,"avatar_url":"https://avatars.githubusercontent.com/u/7716957?v=3","gravatar_id":"","url":"https://api.github.com/users/StackPointCloud","html_url":"https://github.com/StackPointCloud","followers_url":"https://api.github.com/users/StackPointCloud/followers","following_url":"https://api.github.com/users/StackPointCloud/following{/other_user}","gists_url":"https://api.github.com/users/StackPointCloud/gists{/gist_id}","starred_url":"https://api.github.com/users/StackPointCloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StackPointCloud/subscriptions","organizations_url":"https://api.github.com/users/StackPointCloud/orgs","repos_url":"https://api.github.com/users/StackPointCloud/repos","events_url":"https://api.github.com/users/StackPointCloud/events{/privacy}","received_events_url":"https://api.github.com/users/StackPointCloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/StackPointCloud/jclouds-labs","description":"Read-only mirror of ASF Git Repo for jclouds labs","fork":true,"url":"https://api.github.com/repos/StackPointCloud/jclouds-labs","forks_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/forks","keys_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/teams","hooks_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/hooks","issue_events_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/issues/events{/number}","events_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/events","assignees_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/assignees{/user}","branches_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/branches{/branch}","tags_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/tags","blobs_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/git/refs{/sha}","trees_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/statuses/{sha}","languages_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/languages","stargazers_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/stargazers","contributors_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/contributors","subscribers_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/subscribers","subscription_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/subscription","commits_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/commits{/sha}","git_commits_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/git/commits{/sha}","comments_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/comments{/number}","issue_comment_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/issues/comments{/number}","contents_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/contents/{+path}","compare_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/merges","archive_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/downloads","issues_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/issues{/number}","pulls_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/pulls{/number}","milestones_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/milestones{/number}","notifications_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/labels{/name}","releases_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/releases{/id}","deployments_url":"https://api.github.com/repos/StackPointCloud/jclouds-labs/deployments","created_at":"2015-02-18T17:50:37Z","updated_at":"2016-01-11T22:09:32Z","pushed_at":"2016-01-29T07:33:01Z","git_url":"git://github.com/StackPointCloud/jclouds-labs.git","ssh_url":"git@github.com:StackPointCloud/jclouds-labs.git","clone_url":"https://github.com/StackPointCloud/jclouds-labs.git","svn_url":"https://github.com/StackPointCloud/jclouds-labs","homepage":null,"size":20594,"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":"jclouds:master","ref":"master","sha":"6d3363fdf04ea4256b772f17608fcd6a37bd4500","user":{"login":"jclouds","id":108982,"avatar_url":"https://avatars.githubusercontent.com/u/108982?v=3","gravatar_id":"","url":"https://api.github.com/users/jclouds","html_url":"https://github.com/jclouds","followers_url":"https://api.github.com/users/jclouds/followers","following_url":"https://api.github.com/users/jclouds/following{/other_user}","gists_url":"https://api.github.com/users/jclouds/gists{/gist_id}","starred_url":"https://api.github.com/users/jclouds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclouds/subscriptions","organizations_url":"https://api.github.com/users/jclouds/orgs","repos_url":"https://api.github.com/users/jclouds/repos","events_url":"https://api.github.com/users/jclouds/events{/privacy}","received_events_url":"https://api.github.com/users/jclouds/received_events","type":"Organization","site_admin":false},"repo":{"id":10040970,"name":"jclouds-labs","full_name":"jclouds/jclouds-labs","owner":{"login":"jclouds","id":108982,"avatar_url":"https://avatars.githubusercontent.com/u/108982?v=3","gravatar_id":"","url":"https://api.github.com/users/jclouds","html_url":"https://github.com/jclouds","followers_url":"https://api.github.com/users/jclouds/followers","following_url":"https://api.github.com/users/jclouds/following{/other_user}","gists_url":"https://api.github.com/users/jclouds/gists{/gist_id}","starred_url":"https://api.github.com/users/jclouds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclouds/subscriptions","organizations_url":"https://api.github.com/users/jclouds/orgs","repos_url":"https://api.github.com/users/jclouds/repos","events_url":"https://api.github.com/users/jclouds/events{/privacy}","received_events_url":"https://api.github.com/users/jclouds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jclouds/jclouds-labs","description":"Read-only mirror of ASF Git Repo for jclouds labs","fork":false,"url":"https://api.github.com/repos/jclouds/jclouds-labs","forks_url":"https://api.github.com/repos/jclouds/jclouds-labs/forks","keys_url":"https://api.github.com/repos/jclouds/jclouds-labs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jclouds/jclouds-labs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jclouds/jclouds-labs/teams","hooks_url":"https://api.github.com/repos/jclouds/jclouds-labs/hooks","issue_events_url":"https://api.github.com/repos/jclouds/jclouds-labs/issues/events{/number}","events_url":"https://api.github.com/repos/jclouds/jclouds-labs/events","assignees_url":"https://api.github.com/repos/jclouds/jclouds-labs/assignees{/user}","branches_url":"https://api.github.com/repos/jclouds/jclouds-labs/branches{/branch}","tags_url":"https://api.github.com/repos/jclouds/jclouds-labs/tags","blobs_url":"https://api.github.com/repos/jclouds/jclouds-labs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jclouds/jclouds-labs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jclouds/jclouds-labs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jclouds/jclouds-labs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jclouds/jclouds-labs/statuses/{sha}","languages_url":"https://api.github.com/repos/jclouds/jclouds-labs/languages","stargazers_url":"https://api.github.com/repos/jclouds/jclouds-labs/stargazers","contributors_url":"https://api.github.com/repos/jclouds/jclouds-labs/contributors","subscribers_url":"https://api.github.com/repos/jclouds/jclouds-labs/subscribers","subscription_url":"https://api.github.com/repos/jclouds/jclouds-labs/subscription","commits_url":"https://api.github.com/repos/jclouds/jclouds-labs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jclouds/jclouds-labs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jclouds/jclouds-labs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jclouds/jclouds-labs/issues/comments{/number}","contents_url":"https://api.github.com/repos/jclouds/jclouds-labs/contents/{+path}","compare_url":"https://api.github.com/repos/jclouds/jclouds-labs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jclouds/jclouds-labs/merges","archive_url":"https://api.github.com/repos/jclouds/jclouds-labs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jclouds/jclouds-labs/downloads","issues_url":"https://api.github.com/repos/jclouds/jclouds-labs/issues{/number}","pulls_url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls{/number}","milestones_url":"https://api.github.com/repos/jclouds/jclouds-labs/milestones{/number}","notifications_url":"https://api.github.com/repos/jclouds/jclouds-labs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jclouds/jclouds-labs/labels{/name}","releases_url":"https://api.github.com/repos/jclouds/jclouds-labs/releases{/id}","deployments_url":"https://api.github.com/repos/jclouds/jclouds-labs/deployments","created_at":"2013-05-13T20:47:47Z","updated_at":"2016-01-19T11:16:49Z","pushed_at":"2016-01-29T17:47:01Z","git_url":"git://github.com/jclouds/jclouds-labs.git","ssh_url":"git@github.com:jclouds/jclouds-labs.git","clone_url":"https://github.com/jclouds/jclouds-labs.git","svn_url":"https://github.com/jclouds/jclouds-labs","homepage":null,"size":23590,"stargazers_count":27,"watchers_count":27,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":5,"forks":79,"open_issues":5,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/227"},"html":{"href":"https://github.com/jclouds/jclouds-labs/pull/227"},"issue":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/issues/227"},"comments":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/issues/227/comments"},"review_comments":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/227/comments"},"review_comment":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/227/commits"},"statuses":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/statuses/6cb917b173888a51a08a2ba04db17f1c0331de7a"}}}}