{"action":"created","comment":{"url":"https://api.github.com/repos/ArcBees/GWTP/pulls/comments/23872503","id":23872503,"diff_hunk":"@@ -0,0 +1,74 @@\n+/**\n+ * Copyright 2015 ArcBees Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n+ * use this file except in compliance with the License. You may obtain a copy of\n+ * 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, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+\n+package com.gwtplatform.dispatch.rest.rebind.parameter;\n+\n+import javax.ws.rs.CookieParam;\n+\n+import org.junit.Test;\n+\n+import com.google.gwt.core.ext.typeinfo.HasAnnotations;\n+\n+import static org.assertj.core.api.Assertions.assertThat;\n+import static org.mockito.BDDMockito.given;\n+import static org.mockito.Mockito.mock;\n+\n+public class CookieParamValueResolverTest {\n+    private static final String SOME_VALUE = \"llamas\";\n+\n+    private CookieParamValueResolver resolver = new CookieParamValueResolver();\n+\n+    @Test\n+    public void resolve_cookieParam() {\n+        // given\n+        CookieParam param = mock(CookieParam.class);\n+        given(param.value()).willReturn(SOME_VALUE);\n+\n+        // when\n+        String value = resolver.resolve(param);\n+\n+        // then\n+        assertThat(value).isEqualTo(SOME_VALUE);\n+    }\n+\n+    @Test\n+    public void resolve_hasAnnotations_hasCookieParam() {\n+        // given\n+        CookieParam param = mock(CookieParam.class);\n+        given(param.value()).willReturn(SOME_VALUE);\n+\n+        HasAnnotations hasAnnotations = mock(HasAnnotations.class);\n+        given(hasAnnotations.getAnnotation(CookieParam.class)).willReturn(param);\n+\n+        // when\n+        String value = resolver.resolve(hasAnnotations);\n+\n+        // then\n+        assertThat(value).isEqualTo(SOME_VALUE);\n+    }\n+\n+    @Test(expected = NullPointerException.class)\n+    public void resolve_hasAnnotations_hasNoCookieParams() {\n+        // given\n+        HasAnnotations hasAnnotations = mock(HasAnnotations.class);\n+\n+        // when\n+        String value = resolver.resolve(hasAnnotations);\n+\n+        // then\n+        assertThat(value).isEqualTo(SOME_VALUE);","path":"gwtp-core/gwtp-dispatch-rest/src/test/java/com/gwtplatform/dispatch/rest/rebind/parameter/CookieParamValueResolverTest.java","position":72,"original_position":72,"commit_id":"efd448bd3fff7599f5ed1b97a6844f6f04af90bd","original_commit_id":"efd448bd3fff7599f5ed1b97a6844f6f04af90bd","user":{"login":"Chris-V","id":1116964,"avatar_url":"https://avatars.githubusercontent.com/u/1116964?v=3","gravatar_id":"","url":"https://api.github.com/users/Chris-V","html_url":"https://github.com/Chris-V","followers_url":"https://api.github.com/users/Chris-V/followers","following_url":"https://api.github.com/users/Chris-V/following{/other_user}","gists_url":"https://api.github.com/users/Chris-V/gists{/gist_id}","starred_url":"https://api.github.com/users/Chris-V/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chris-V/subscriptions","organizations_url":"https://api.github.com/users/Chris-V/orgs","repos_url":"https://api.github.com/users/Chris-V/repos","events_url":"https://api.github.com/users/Chris-V/events{/privacy}","received_events_url":"https://api.github.com/users/Chris-V/received_events","type":"User","site_admin":false},"body":"mmh, The assert is probably never reached. The NPE should be thrown from resolve()","created_at":"2015-01-30T21:08:03Z","updated_at":"2015-01-30T21:08:03Z","html_url":"https://github.com/ArcBees/GWTP/pull/673#discussion_r23872503","pull_request_url":"https://api.github.com/repos/ArcBees/GWTP/pulls/673","_links":{"self":{"href":"https://api.github.com/repos/ArcBees/GWTP/pulls/comments/23872503"},"html":{"href":"https://github.com/ArcBees/GWTP/pull/673#discussion_r23872503"},"pull_request":{"href":"https://api.github.com/repos/ArcBees/GWTP/pulls/673"}}},"pull_request":{"url":"https://api.github.com/repos/ArcBees/GWTP/pulls/673","id":28135912,"html_url":"https://github.com/ArcBees/GWTP/pull/673","diff_url":"https://github.com/ArcBees/GWTP/pull/673.diff","patch_url":"https://github.com/ArcBees/GWTP/pull/673.patch","issue_url":"https://api.github.com/repos/ArcBees/GWTP/issues/673","number":673,"state":"open","locked":false,"title":"Support for @CookieParam and ground work for client code cleanup","user":{"login":"Chris-V","id":1116964,"avatar_url":"https://avatars.githubusercontent.com/u/1116964?v=3","gravatar_id":"","url":"https://api.github.com/users/Chris-V","html_url":"https://github.com/Chris-V","followers_url":"https://api.github.com/users/Chris-V/followers","following_url":"https://api.github.com/users/Chris-V/following{/other_user}","gists_url":"https://api.github.com/users/Chris-V/gists{/gist_id}","starred_url":"https://api.github.com/users/Chris-V/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chris-V/subscriptions","organizations_url":"https://api.github.com/users/Chris-V/orgs","repos_url":"https://api.github.com/users/Chris-V/repos","events_url":"https://api.github.com/users/Chris-V/events{/privacy}","received_events_url":"https://api.github.com/users/Chris-V/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-27T19:15:20Z","updated_at":"2015-01-30T21:08:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ba5a594b4397fd2d9d3848fc9f3b89a92df5bdd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ArcBees/GWTP/pulls/673/commits","review_comments_url":"https://api.github.com/repos/ArcBees/GWTP/pulls/673/comments","review_comment_url":"https://api.github.com/repos/ArcBees/GWTP/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ArcBees/GWTP/issues/673/comments","statuses_url":"https://api.github.com/repos/ArcBees/GWTP/statuses/efd448bd3fff7599f5ed1b97a6844f6f04af90bd","head":{"label":"ArcBees:cv_cookie_param","ref":"cv_cookie_param","sha":"efd448bd3fff7599f5ed1b97a6844f6f04af90bd","user":{"login":"ArcBees","id":853947,"avatar_url":"https://avatars.githubusercontent.com/u/853947?v=3","gravatar_id":"","url":"https://api.github.com/users/ArcBees","html_url":"https://github.com/ArcBees","followers_url":"https://api.github.com/users/ArcBees/followers","following_url":"https://api.github.com/users/ArcBees/following{/other_user}","gists_url":"https://api.github.com/users/ArcBees/gists{/gist_id}","starred_url":"https://api.github.com/users/ArcBees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArcBees/subscriptions","organizations_url":"https://api.github.com/users/ArcBees/orgs","repos_url":"https://api.github.com/users/ArcBees/repos","events_url":"https://api.github.com/users/ArcBees/events{/privacy}","received_events_url":"https://api.github.com/users/ArcBees/received_events","type":"Organization","site_admin":false},"repo":{"id":5675901,"name":"GWTP","full_name":"ArcBees/GWTP","owner":{"login":"ArcBees","id":853947,"avatar_url":"https://avatars.githubusercontent.com/u/853947?v=3","gravatar_id":"","url":"https://api.github.com/users/ArcBees","html_url":"https://github.com/ArcBees","followers_url":"https://api.github.com/users/ArcBees/followers","following_url":"https://api.github.com/users/ArcBees/following{/other_user}","gists_url":"https://api.github.com/users/ArcBees/gists{/gist_id}","starred_url":"https://api.github.com/users/ArcBees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArcBees/subscriptions","organizations_url":"https://api.github.com/users/ArcBees/orgs","repos_url":"https://api.github.com/users/ArcBees/repos","events_url":"https://api.github.com/users/ArcBees/events{/privacy}","received_events_url":"https://api.github.com/users/ArcBees/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ArcBees/GWTP","description":"A complete model-view-presenter framework to simplify your next GWT project.","fork":false,"url":"https://api.github.com/repos/ArcBees/GWTP","forks_url":"https://api.github.com/repos/ArcBees/GWTP/forks","keys_url":"https://api.github.com/repos/ArcBees/GWTP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArcBees/GWTP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArcBees/GWTP/teams","hooks_url":"https://api.github.com/repos/ArcBees/GWTP/hooks","issue_events_url":"https://api.github.com/repos/ArcBees/GWTP/issues/events{/number}","events_url":"https://api.github.com/repos/ArcBees/GWTP/events","assignees_url":"https://api.github.com/repos/ArcBees/GWTP/assignees{/user}","branches_url":"https://api.github.com/repos/ArcBees/GWTP/branches{/branch}","tags_url":"https://api.github.com/repos/ArcBees/GWTP/tags","blobs_url":"https://api.github.com/repos/ArcBees/GWTP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArcBees/GWTP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArcBees/GWTP/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArcBees/GWTP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArcBees/GWTP/statuses/{sha}","languages_url":"https://api.github.com/repos/ArcBees/GWTP/languages","stargazers_url":"https://api.github.com/repos/ArcBees/GWTP/stargazers","contributors_url":"https://api.github.com/repos/ArcBees/GWTP/contributors","subscribers_url":"https://api.github.com/repos/ArcBees/GWTP/subscribers","subscription_url":"https://api.github.com/repos/ArcBees/GWTP/subscription","commits_url":"https://api.github.com/repos/ArcBees/GWTP/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArcBees/GWTP/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArcBees/GWTP/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArcBees/GWTP/issues/comments/{number}","contents_url":"https://api.github.com/repos/ArcBees/GWTP/contents/{+path}","compare_url":"https://api.github.com/repos/ArcBees/GWTP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArcBees/GWTP/merges","archive_url":"https://api.github.com/repos/ArcBees/GWTP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArcBees/GWTP/downloads","issues_url":"https://api.github.com/repos/ArcBees/GWTP/issues{/number}","pulls_url":"https://api.github.com/repos/ArcBees/GWTP/pulls{/number}","milestones_url":"https://api.github.com/repos/ArcBees/GWTP/milestones{/number}","notifications_url":"https://api.github.com/repos/ArcBees/GWTP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArcBees/GWTP/labels{/name}","releases_url":"https://api.github.com/repos/ArcBees/GWTP/releases{/id}","created_at":"2012-09-04T17:19:59Z","updated_at":"2015-01-27T14:34:24Z","pushed_at":"2015-01-30T19:41:29Z","git_url":"git://github.com/ArcBees/GWTP.git","ssh_url":"git@github.com:ArcBees/GWTP.git","clone_url":"https://github.com/ArcBees/GWTP.git","svn_url":"https://github.com/ArcBees/GWTP","homepage":"","size":414181,"stargazers_count":246,"watchers_count":246,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":92,"mirror_url":null,"open_issues_count":42,"forks":92,"open_issues":42,"watchers":246,"default_branch":"master"}},"base":{"label":"ArcBees:master","ref":"master","sha":"7994d5b36b78be3763e63ade8910b063f7df8110","user":{"login":"ArcBees","id":853947,"avatar_url":"https://avatars.githubusercontent.com/u/853947?v=3","gravatar_id":"","url":"https://api.github.com/users/ArcBees","html_url":"https://github.com/ArcBees","followers_url":"https://api.github.com/users/ArcBees/followers","following_url":"https://api.github.com/users/ArcBees/following{/other_user}","gists_url":"https://api.github.com/users/ArcBees/gists{/gist_id}","starred_url":"https://api.github.com/users/ArcBees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArcBees/subscriptions","organizations_url":"https://api.github.com/users/ArcBees/orgs","repos_url":"https://api.github.com/users/ArcBees/repos","events_url":"https://api.github.com/users/ArcBees/events{/privacy}","received_events_url":"https://api.github.com/users/ArcBees/received_events","type":"Organization","site_admin":false},"repo":{"id":5675901,"name":"GWTP","full_name":"ArcBees/GWTP","owner":{"login":"ArcBees","id":853947,"avatar_url":"https://avatars.githubusercontent.com/u/853947?v=3","gravatar_id":"","url":"https://api.github.com/users/ArcBees","html_url":"https://github.com/ArcBees","followers_url":"https://api.github.com/users/ArcBees/followers","following_url":"https://api.github.com/users/ArcBees/following{/other_user}","gists_url":"https://api.github.com/users/ArcBees/gists{/gist_id}","starred_url":"https://api.github.com/users/ArcBees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArcBees/subscriptions","organizations_url":"https://api.github.com/users/ArcBees/orgs","repos_url":"https://api.github.com/users/ArcBees/repos","events_url":"https://api.github.com/users/ArcBees/events{/privacy}","received_events_url":"https://api.github.com/users/ArcBees/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ArcBees/GWTP","description":"A complete model-view-presenter framework to simplify your next GWT project.","fork":false,"url":"https://api.github.com/repos/ArcBees/GWTP","forks_url":"https://api.github.com/repos/ArcBees/GWTP/forks","keys_url":"https://api.github.com/repos/ArcBees/GWTP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArcBees/GWTP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArcBees/GWTP/teams","hooks_url":"https://api.github.com/repos/ArcBees/GWTP/hooks","issue_events_url":"https://api.github.com/repos/ArcBees/GWTP/issues/events{/number}","events_url":"https://api.github.com/repos/ArcBees/GWTP/events","assignees_url":"https://api.github.com/repos/ArcBees/GWTP/assignees{/user}","branches_url":"https://api.github.com/repos/ArcBees/GWTP/branches{/branch}","tags_url":"https://api.github.com/repos/ArcBees/GWTP/tags","blobs_url":"https://api.github.com/repos/ArcBees/GWTP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArcBees/GWTP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArcBees/GWTP/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArcBees/GWTP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArcBees/GWTP/statuses/{sha}","languages_url":"https://api.github.com/repos/ArcBees/GWTP/languages","stargazers_url":"https://api.github.com/repos/ArcBees/GWTP/stargazers","contributors_url":"https://api.github.com/repos/ArcBees/GWTP/contributors","subscribers_url":"https://api.github.com/repos/ArcBees/GWTP/subscribers","subscription_url":"https://api.github.com/repos/ArcBees/GWTP/subscription","commits_url":"https://api.github.com/repos/ArcBees/GWTP/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArcBees/GWTP/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArcBees/GWTP/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArcBees/GWTP/issues/comments/{number}","contents_url":"https://api.github.com/repos/ArcBees/GWTP/contents/{+path}","compare_url":"https://api.github.com/repos/ArcBees/GWTP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArcBees/GWTP/merges","archive_url":"https://api.github.com/repos/ArcBees/GWTP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArcBees/GWTP/downloads","issues_url":"https://api.github.com/repos/ArcBees/GWTP/issues{/number}","pulls_url":"https://api.github.com/repos/ArcBees/GWTP/pulls{/number}","milestones_url":"https://api.github.com/repos/ArcBees/GWTP/milestones{/number}","notifications_url":"https://api.github.com/repos/ArcBees/GWTP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArcBees/GWTP/labels{/name}","releases_url":"https://api.github.com/repos/ArcBees/GWTP/releases{/id}","created_at":"2012-09-04T17:19:59Z","updated_at":"2015-01-27T14:34:24Z","pushed_at":"2015-01-30T19:41:29Z","git_url":"git://github.com/ArcBees/GWTP.git","ssh_url":"git@github.com:ArcBees/GWTP.git","clone_url":"https://github.com/ArcBees/GWTP.git","svn_url":"https://github.com/ArcBees/GWTP","homepage":"","size":414181,"stargazers_count":246,"watchers_count":246,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":92,"mirror_url":null,"open_issues_count":42,"forks":92,"open_issues":42,"watchers":246,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArcBees/GWTP/pulls/673"},"html":{"href":"https://github.com/ArcBees/GWTP/pull/673"},"issue":{"href":"https://api.github.com/repos/ArcBees/GWTP/issues/673"},"comments":{"href":"https://api.github.com/repos/ArcBees/GWTP/issues/673/comments"},"review_comments":{"href":"https://api.github.com/repos/ArcBees/GWTP/pulls/673/comments"},"review_comment":{"href":"https://api.github.com/repos/ArcBees/GWTP/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ArcBees/GWTP/pulls/673/commits"},"statuses":{"href":"https://api.github.com/repos/ArcBees/GWTP/statuses/efd448bd3fff7599f5ed1b97a6844f6f04af90bd"}}}}