{"action":"created","comment":{"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments/30046030","id":30046030,"diff_hunk":"@@ -0,0 +1,33 @@\n+package io.sphere.sdk.reviews.commands;\n+\n+import io.sphere.sdk.reviews.Review;\n+import io.sphere.sdk.reviews.ReviewDraft;\n+import io.sphere.sdk.reviews.ReviewDraftBuilder;\n+import io.sphere.sdk.test.IntegrationTest;\n+import org.junit.Test;\n+\n+import static io.sphere.sdk.customers.CustomerFixtures.withCustomer;\n+import static io.sphere.sdk.products.ProductFixtures.withProduct;\n+import static org.assertj.core.api.Assertions.*;\n+\n+public class ReviewCreateCommandTest extends IntegrationTest {\n+\n+    @Test\n+    public void execution() throws Exception {\n+        withProduct(client(), product ->\n+            withCustomer(client(), customer -> {\n+                final ReviewDraft reviewDraft = ReviewDraftBuilder.of(product, customer)\n+                        .authorName(\"John Smith\")\n+                        .title(\"It is ok\")\n+                        .text(\"This product is ok.\")\n+                        .score(0.36)\n+                        .build();\n+                final Review review = execute(ReviewCreateCommand.of(reviewDraft));\n+                assertThat(review.getAuthorName()).contains(\"John Smith\");\n+                assertThat(review.getTitle()).contains(\"It is ok\");\n+                assertThat(review.getText()).contains(\"This product is ok.\");\n+                assertThat(review.getScore().get()).isEqualTo(0.36, within(0.1));","path":"sphere-models/src/it/java/io/sphere/sdk/reviews/commands/ReviewCreateCommandTest.java","position":29,"original_position":29,"commit_id":"a0c9c819c9aa5dbefb16514850bbc61a79708876","original_commit_id":"a0c9c819c9aa5dbefb16514850bbc61a79708876","user":{"login":"lauraluiz","id":1917621,"avatar_url":"https://avatars.githubusercontent.com/u/1917621?v=3","gravatar_id":"","url":"https://api.github.com/users/lauraluiz","html_url":"https://github.com/lauraluiz","followers_url":"https://api.github.com/users/lauraluiz/followers","following_url":"https://api.github.com/users/lauraluiz/following{/other_user}","gists_url":"https://api.github.com/users/lauraluiz/gists{/gist_id}","starred_url":"https://api.github.com/users/lauraluiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauraluiz/subscriptions","organizations_url":"https://api.github.com/users/lauraluiz/orgs","repos_url":"https://api.github.com/users/lauraluiz/repos","events_url":"https://api.github.com/users/lauraluiz/events{/privacy}","received_events_url":"https://api.github.com/users/lauraluiz/received_events","type":"User","site_admin":false},"body":"Why is it necessary the `within`? Is SPHERE rounding the score?","created_at":"2015-05-11T15:00:55Z","updated_at":"2015-05-11T15:00:55Z","html_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/402#discussion_r30046030","pull_request_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/402","_links":{"self":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments/30046030"},"html":{"href":"https://github.com/sphereio/sphere-jvm-sdk/pull/402#discussion_r30046030"},"pull_request":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/402"}}},"pull_request":{"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/402","id":34997194,"html_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/402","diff_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/402.diff","patch_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/402.patch","issue_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/402","number":402,"state":"open","locked":false,"title":"Implement the reviews endpoints and models. close #359","user":{"login":"schleichardt","id":1320833,"avatar_url":"https://avatars.githubusercontent.com/u/1320833?v=3","gravatar_id":"","url":"https://api.github.com/users/schleichardt","html_url":"https://github.com/schleichardt","followers_url":"https://api.github.com/users/schleichardt/followers","following_url":"https://api.github.com/users/schleichardt/following{/other_user}","gists_url":"https://api.github.com/users/schleichardt/gists{/gist_id}","starred_url":"https://api.github.com/users/schleichardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schleichardt/subscriptions","organizations_url":"https://api.github.com/users/schleichardt/orgs","repos_url":"https://api.github.com/users/schleichardt/repos","events_url":"https://api.github.com/users/schleichardt/events{/privacy}","received_events_url":"https://api.github.com/users/schleichardt/received_events","type":"User","site_admin":false},"body":"@lauraluiz please review, but don't merge, since I want to discuss sth. after your review which may requires additional changes.","created_at":"2015-05-08T10:28:58Z","updated_at":"2015-05-11T15:00:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8eb8830bba6fd7e384cfe656fae1d2773882d26","assignee":{"login":"lauraluiz","id":1917621,"avatar_url":"https://avatars.githubusercontent.com/u/1917621?v=3","gravatar_id":"","url":"https://api.github.com/users/lauraluiz","html_url":"https://github.com/lauraluiz","followers_url":"https://api.github.com/users/lauraluiz/followers","following_url":"https://api.github.com/users/lauraluiz/following{/other_user}","gists_url":"https://api.github.com/users/lauraluiz/gists{/gist_id}","starred_url":"https://api.github.com/users/lauraluiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauraluiz/subscriptions","organizations_url":"https://api.github.com/users/lauraluiz/orgs","repos_url":"https://api.github.com/users/lauraluiz/repos","events_url":"https://api.github.com/users/lauraluiz/events{/privacy}","received_events_url":"https://api.github.com/users/lauraluiz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/milestones/15","html_url":"https://github.com/sphereio/sphere-jvm-sdk/milestones/1.0.0-M14","labels_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/milestones/15/labels","id":946625,"number":15,"title":"1.0.0-M14","description":"","creator":{"login":"schleichardt","id":1320833,"avatar_url":"https://avatars.githubusercontent.com/u/1320833?v=3","gravatar_id":"","url":"https://api.github.com/users/schleichardt","html_url":"https://github.com/schleichardt","followers_url":"https://api.github.com/users/schleichardt/followers","following_url":"https://api.github.com/users/schleichardt/following{/other_user}","gists_url":"https://api.github.com/users/schleichardt/gists{/gist_id}","starred_url":"https://api.github.com/users/schleichardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schleichardt/subscriptions","organizations_url":"https://api.github.com/users/schleichardt/orgs","repos_url":"https://api.github.com/users/schleichardt/repos","events_url":"https://api.github.com/users/schleichardt/events{/privacy}","received_events_url":"https://api.github.com/users/schleichardt/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":25,"state":"open","created_at":"2015-01-22T09:06:56Z","updated_at":"2015-05-11T13:54:58Z","due_on":"2015-05-10T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/402/commits","review_comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/402/comments","review_comment_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/402/comments","statuses_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/a0c9c819c9aa5dbefb16514850bbc61a79708876","head":{"label":"sphereio:reviews","ref":"reviews","sha":"a0c9c819c9aa5dbefb16514850bbc61a79708876","user":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"repo":{"id":20855247,"name":"sphere-jvm-sdk","full_name":"sphereio/sphere-jvm-sdk","owner":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphereio/sphere-jvm-sdk","description":"The next generation SPHERE.IO client running on the Java virtual machine","fork":false,"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk","forks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/forks","keys_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/teams","hooks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/hooks","issue_events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/events","assignees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/tags","blobs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/languages","stargazers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/stargazers","contributors_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contributors","subscribers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscribers","subscription_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscription","commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/merges","archive_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/downloads","issues_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/labels{/name}","releases_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/releases{/id}","created_at":"2014-06-15T12:46:24Z","updated_at":"2015-05-08T16:34:37Z","pushed_at":"2015-05-11T13:54:59Z","git_url":"git://github.com/sphereio/sphere-jvm-sdk.git","ssh_url":"git@github.com:sphereio/sphere-jvm-sdk.git","clone_url":"https://github.com/sphereio/sphere-jvm-sdk.git","svn_url":"https://github.com/sphereio/sphere-jvm-sdk","homepage":"","size":27214,"stargazers_count":13,"watchers_count":13,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":111,"forks":7,"open_issues":111,"watchers":13,"default_branch":"master"}},"base":{"label":"sphereio:master","ref":"master","sha":"a5819a0c56fbb01e7259af567ff6fa39f896593f","user":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"repo":{"id":20855247,"name":"sphere-jvm-sdk","full_name":"sphereio/sphere-jvm-sdk","owner":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphereio/sphere-jvm-sdk","description":"The next generation SPHERE.IO client running on the Java virtual machine","fork":false,"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk","forks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/forks","keys_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/teams","hooks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/hooks","issue_events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/events","assignees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/tags","blobs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/languages","stargazers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/stargazers","contributors_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contributors","subscribers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscribers","subscription_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscription","commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/merges","archive_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/downloads","issues_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/labels{/name}","releases_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/releases{/id}","created_at":"2014-06-15T12:46:24Z","updated_at":"2015-05-08T16:34:37Z","pushed_at":"2015-05-11T13:54:59Z","git_url":"git://github.com/sphereio/sphere-jvm-sdk.git","ssh_url":"git@github.com:sphereio/sphere-jvm-sdk.git","clone_url":"https://github.com/sphereio/sphere-jvm-sdk.git","svn_url":"https://github.com/sphereio/sphere-jvm-sdk","homepage":"","size":27214,"stargazers_count":13,"watchers_count":13,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":111,"forks":7,"open_issues":111,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/402"},"html":{"href":"https://github.com/sphereio/sphere-jvm-sdk/pull/402"},"issue":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/402"},"comments":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/402/comments"},"review_comments":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/402/comments"},"review_comment":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/402/commits"},"statuses":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/a0c9c819c9aa5dbefb16514850bbc61a79708876"}}}}