{"action":"created","comment":{"url":"https://api.github.com/repos/yegor256/takes/pulls/comments/35114781","id":35114781,"diff_hunk":"@@ -0,0 +1,122 @@\n+/**\n+ * The MIT License (MIT)\n+ *\n+ * Copyright (c) 2015 Yegor Bugayenko\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included\n+ * in all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+ * SOFTWARE.\n+ */\n+package org.takes.facets.auth;\n+\n+import java.util.Arrays;\n+import java.util.List;\n+import org.hamcrest.MatcherAssert;\n+import org.hamcrest.Matchers;\n+import org.junit.Before;\n+import org.junit.Test;\n+\n+/**\n+ * Unit tests for {@link org.takes.facets.auth.PsBasic.Default}.\n+ * @author Georgy Vlasov (wlasowegor@gmail.com)\n+ * @version $Id$\n+ * @since 0.22\n+ */\n+public final class PsBasicDefaultTest {\n+    /**\n+     * URN of one of users.\n+     */\n+    private static final String URN = \"urn:foo:robert\";\n+    /**\n+     * Login of one of users.\n+     */\n+    private static final String BOB_LOGIN = \"bob\";\n+\n+    /**\n+     * Password of one of users.\n+     */\n+    private static final String BOB_PASSWORD = \"qwerty\";\n+\n+    /**\n+     * Existing users.\n+     */\n+    private transient List<User.Default> users;\n+\n+    /**\n+     * Sets up a list of users used in each test.\n+     */\n+    @Before\n+    public void setUpUsersList() {\n+        this.users = Arrays.asList(\n+            new User.Default(\n+                PsBasicDefaultTest.BOB_LOGIN,\n+                PsBasicDefaultTest.BOB_PASSWORD,\n+                new Identity.Simple(URN)\n+            ),\n+            new User.Default(\n+                \"alice\",\n+                \"123\",\n+                new Identity.Simple(\"urn:foo:alice\")\n+            )\n+        );\n+    }\n+    /**\n+     * {@link org.takes.facets.auth.PsBasic.Default} accepts correct\n+     * login/password pair.\n+     */\n+    @Test\n+    public void defaultPassCanAcceptCorrectLoginPasswordPair() {","path":"src/test/java/org/takes/facets/auth/PsBasicDefaultTest.java","position":82,"original_position":82,"commit_id":"c1d8b528302bad84d186f3951872d0c99737adbc","original_commit_id":"c1d8b528302bad84d186f3951872d0c99737adbc","user":{"login":"ggajos","id":988790,"avatar_url":"https://avatars.githubusercontent.com/u/988790?v=3","gravatar_id":"","url":"https://api.github.com/users/ggajos","html_url":"https://github.com/ggajos","followers_url":"https://api.github.com/users/ggajos/followers","following_url":"https://api.github.com/users/ggajos/following{/other_user}","gists_url":"https://api.github.com/users/ggajos/gists{/gist_id}","starred_url":"https://api.github.com/users/ggajos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggajos/subscriptions","organizations_url":"https://api.github.com/users/ggajos/orgs","repos_url":"https://api.github.com/users/ggajos/repos","events_url":"https://api.github.com/users/ggajos/events{/privacy}","received_events_url":"https://api.github.com/users/ggajos/received_events","type":"User","site_admin":false},"body":"@Suseika please see http://www.yegor256.com/2014/04/27/typical-mistakes-in-java-code.html#test-method-names","created_at":"2015-07-21T15:21:37Z","updated_at":"2015-07-21T15:21:37Z","html_url":"https://github.com/yegor256/takes/pull/365#discussion_r35114781","pull_request_url":"https://api.github.com/repos/yegor256/takes/pulls/365","_links":{"self":{"href":"https://api.github.com/repos/yegor256/takes/pulls/comments/35114781"},"html":{"href":"https://github.com/yegor256/takes/pull/365#discussion_r35114781"},"pull_request":{"href":"https://api.github.com/repos/yegor256/takes/pulls/365"}}},"pull_request":{"url":"https://api.github.com/repos/yegor256/takes/pulls/365","id":40342517,"html_url":"https://github.com/yegor256/takes/pull/365","diff_url":"https://github.com/yegor256/takes/pull/365.diff","patch_url":"https://github.com/yegor256/takes/pull/365.patch","issue_url":"https://api.github.com/repos/yegor256/takes/issues/365","number":365,"state":"open","locked":false,"title":"Implement PsBasic.Default","user":{"login":"Suseika","id":4467948,"avatar_url":"https://avatars.githubusercontent.com/u/4467948?v=3","gravatar_id":"","url":"https://api.github.com/users/Suseika","html_url":"https://github.com/Suseika","followers_url":"https://api.github.com/users/Suseika/followers","following_url":"https://api.github.com/users/Suseika/following{/other_user}","gists_url":"https://api.github.com/users/Suseika/gists{/gist_id}","starred_url":"https://api.github.com/users/Suseika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Suseika/subscriptions","organizations_url":"https://api.github.com/users/Suseika/orgs","repos_url":"https://api.github.com/users/Suseika/repos","events_url":"https://api.github.com/users/Suseika/events{/privacy}","received_events_url":"https://api.github.com/users/Suseika/received_events","type":"User","site_admin":false},"body":"Implement `PsBasic.Default`. This class is a Pass that maintains a collection of login/password pairs and checks a login attempt for correctness.\r\n\r\nFixes #349","created_at":"2015-07-20T11:22:48Z","updated_at":"2015-07-21T15:21:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86d633b5d7f103da7acaeea33c2a878501ef89e9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yegor256/takes/pulls/365/commits","review_comments_url":"https://api.github.com/repos/yegor256/takes/pulls/365/comments","review_comment_url":"https://api.github.com/repos/yegor256/takes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yegor256/takes/issues/365/comments","statuses_url":"https://api.github.com/repos/yegor256/takes/statuses/c1d8b528302bad84d186f3951872d0c99737adbc","head":{"label":"Suseika:349","ref":"349","sha":"c1d8b528302bad84d186f3951872d0c99737adbc","user":{"login":"Suseika","id":4467948,"avatar_url":"https://avatars.githubusercontent.com/u/4467948?v=3","gravatar_id":"","url":"https://api.github.com/users/Suseika","html_url":"https://github.com/Suseika","followers_url":"https://api.github.com/users/Suseika/followers","following_url":"https://api.github.com/users/Suseika/following{/other_user}","gists_url":"https://api.github.com/users/Suseika/gists{/gist_id}","starred_url":"https://api.github.com/users/Suseika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Suseika/subscriptions","organizations_url":"https://api.github.com/users/Suseika/orgs","repos_url":"https://api.github.com/users/Suseika/repos","events_url":"https://api.github.com/users/Suseika/events{/privacy}","received_events_url":"https://api.github.com/users/Suseika/received_events","type":"User","site_admin":false},"repo":{"id":39031231,"name":"takes","full_name":"Suseika/takes","owner":{"login":"Suseika","id":4467948,"avatar_url":"https://avatars.githubusercontent.com/u/4467948?v=3","gravatar_id":"","url":"https://api.github.com/users/Suseika","html_url":"https://github.com/Suseika","followers_url":"https://api.github.com/users/Suseika/followers","following_url":"https://api.github.com/users/Suseika/following{/other_user}","gists_url":"https://api.github.com/users/Suseika/gists{/gist_id}","starred_url":"https://api.github.com/users/Suseika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Suseika/subscriptions","organizations_url":"https://api.github.com/users/Suseika/orgs","repos_url":"https://api.github.com/users/Suseika/repos","events_url":"https://api.github.com/users/Suseika/events{/privacy}","received_events_url":"https://api.github.com/users/Suseika/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Suseika/takes","description":"True Object-Oriented and Immutable Java Web Framework","fork":true,"url":"https://api.github.com/repos/Suseika/takes","forks_url":"https://api.github.com/repos/Suseika/takes/forks","keys_url":"https://api.github.com/repos/Suseika/takes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Suseika/takes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Suseika/takes/teams","hooks_url":"https://api.github.com/repos/Suseika/takes/hooks","issue_events_url":"https://api.github.com/repos/Suseika/takes/issues/events{/number}","events_url":"https://api.github.com/repos/Suseika/takes/events","assignees_url":"https://api.github.com/repos/Suseika/takes/assignees{/user}","branches_url":"https://api.github.com/repos/Suseika/takes/branches{/branch}","tags_url":"https://api.github.com/repos/Suseika/takes/tags","blobs_url":"https://api.github.com/repos/Suseika/takes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Suseika/takes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Suseika/takes/git/refs{/sha}","trees_url":"https://api.github.com/repos/Suseika/takes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Suseika/takes/statuses/{sha}","languages_url":"https://api.github.com/repos/Suseika/takes/languages","stargazers_url":"https://api.github.com/repos/Suseika/takes/stargazers","contributors_url":"https://api.github.com/repos/Suseika/takes/contributors","subscribers_url":"https://api.github.com/repos/Suseika/takes/subscribers","subscription_url":"https://api.github.com/repos/Suseika/takes/subscription","commits_url":"https://api.github.com/repos/Suseika/takes/commits{/sha}","git_commits_url":"https://api.github.com/repos/Suseika/takes/git/commits{/sha}","comments_url":"https://api.github.com/repos/Suseika/takes/comments{/number}","issue_comment_url":"https://api.github.com/repos/Suseika/takes/issues/comments{/number}","contents_url":"https://api.github.com/repos/Suseika/takes/contents/{+path}","compare_url":"https://api.github.com/repos/Suseika/takes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Suseika/takes/merges","archive_url":"https://api.github.com/repos/Suseika/takes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Suseika/takes/downloads","issues_url":"https://api.github.com/repos/Suseika/takes/issues{/number}","pulls_url":"https://api.github.com/repos/Suseika/takes/pulls{/number}","milestones_url":"https://api.github.com/repos/Suseika/takes/milestones{/number}","notifications_url":"https://api.github.com/repos/Suseika/takes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Suseika/takes/labels{/name}","releases_url":"https://api.github.com/repos/Suseika/takes/releases{/id}","created_at":"2015-07-13T18:56:40Z","updated_at":"2015-07-13T18:56:41Z","pushed_at":"2015-07-21T13:25:19Z","git_url":"git://github.com/Suseika/takes.git","ssh_url":"git@github.com:Suseika/takes.git","clone_url":"https://github.com/Suseika/takes.git","svn_url":"https://github.com/Suseika/takes","homepage":"http://www.takes.org","size":31865,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yegor256:master","ref":"master","sha":"d33e87b36b813963a49388f1a8f3f74a7316c15a","user":{"login":"yegor256","id":526301,"avatar_url":"https://avatars.githubusercontent.com/u/526301?v=3","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"repo":{"id":28924109,"name":"takes","full_name":"yegor256/takes","owner":{"login":"yegor256","id":526301,"avatar_url":"https://avatars.githubusercontent.com/u/526301?v=3","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yegor256/takes","description":"True Object-Oriented and Immutable Java Web Framework","fork":false,"url":"https://api.github.com/repos/yegor256/takes","forks_url":"https://api.github.com/repos/yegor256/takes/forks","keys_url":"https://api.github.com/repos/yegor256/takes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yegor256/takes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yegor256/takes/teams","hooks_url":"https://api.github.com/repos/yegor256/takes/hooks","issue_events_url":"https://api.github.com/repos/yegor256/takes/issues/events{/number}","events_url":"https://api.github.com/repos/yegor256/takes/events","assignees_url":"https://api.github.com/repos/yegor256/takes/assignees{/user}","branches_url":"https://api.github.com/repos/yegor256/takes/branches{/branch}","tags_url":"https://api.github.com/repos/yegor256/takes/tags","blobs_url":"https://api.github.com/repos/yegor256/takes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yegor256/takes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yegor256/takes/git/refs{/sha}","trees_url":"https://api.github.com/repos/yegor256/takes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yegor256/takes/statuses/{sha}","languages_url":"https://api.github.com/repos/yegor256/takes/languages","stargazers_url":"https://api.github.com/repos/yegor256/takes/stargazers","contributors_url":"https://api.github.com/repos/yegor256/takes/contributors","subscribers_url":"https://api.github.com/repos/yegor256/takes/subscribers","subscription_url":"https://api.github.com/repos/yegor256/takes/subscription","commits_url":"https://api.github.com/repos/yegor256/takes/commits{/sha}","git_commits_url":"https://api.github.com/repos/yegor256/takes/git/commits{/sha}","comments_url":"https://api.github.com/repos/yegor256/takes/comments{/number}","issue_comment_url":"https://api.github.com/repos/yegor256/takes/issues/comments{/number}","contents_url":"https://api.github.com/repos/yegor256/takes/contents/{+path}","compare_url":"https://api.github.com/repos/yegor256/takes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yegor256/takes/merges","archive_url":"https://api.github.com/repos/yegor256/takes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yegor256/takes/downloads","issues_url":"https://api.github.com/repos/yegor256/takes/issues{/number}","pulls_url":"https://api.github.com/repos/yegor256/takes/pulls{/number}","milestones_url":"https://api.github.com/repos/yegor256/takes/milestones{/number}","notifications_url":"https://api.github.com/repos/yegor256/takes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yegor256/takes/labels{/name}","releases_url":"https://api.github.com/repos/yegor256/takes/releases{/id}","created_at":"2015-01-07T16:57:47Z","updated_at":"2015-07-19T22:37:17Z","pushed_at":"2015-07-21T13:25:20Z","git_url":"git://github.com/yegor256/takes.git","ssh_url":"git@github.com:yegor256/takes.git","clone_url":"https://github.com/yegor256/takes.git","svn_url":"https://github.com/yegor256/takes","homepage":"http://www.takes.org","size":32128,"stargazers_count":82,"watchers_count":82,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":42,"mirror_url":null,"open_issues_count":34,"forks":42,"open_issues":34,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yegor256/takes/pulls/365"},"html":{"href":"https://github.com/yegor256/takes/pull/365"},"issue":{"href":"https://api.github.com/repos/yegor256/takes/issues/365"},"comments":{"href":"https://api.github.com/repos/yegor256/takes/issues/365/comments"},"review_comments":{"href":"https://api.github.com/repos/yegor256/takes/pulls/365/comments"},"review_comment":{"href":"https://api.github.com/repos/yegor256/takes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yegor256/takes/pulls/365/commits"},"statuses":{"href":"https://api.github.com/repos/yegor256/takes/statuses/c1d8b528302bad84d186f3951872d0c99737adbc"}}}}