{"action":"created","comment":{"url":"https://api.github.com/repos/jcabi/jcabi-log/pulls/comments/53831936","id":53831936,"diff_hunk":"@@ -0,0 +1,106 @@\n+/**\n+ * Copyright (c) 2012-2015, jcabi.com\n+ * All rights reserved.\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions\n+ * are met: 1) Redistributions of source code must retain the above\n+ * copyright notice, this list of conditions and the following\n+ * disclaimer. 2) Redistributions in binary form must reproduce the above\n+ * copyright notice, this list of conditions and the following\n+ * disclaimer in the documentation and/or other materials provided\n+ * with the distribution. 3) Neither the name of the jcabi.com nor\n+ * the names of its contributors may be used to endorse or promote\n+ * products derived from this software without specific prior written\n+ * permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\n+ * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL\n+ * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n+ * OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+package com.jcabi.log;\n+\n+import java.util.concurrent.ConcurrentHashMap;\n+import org.apache.commons.lang3.StringUtils;\n+import org.hamcrest.Matchers;\n+import org.junit.Assert;\n+import org.junit.Test;\n+\n+/**\n+ * Test case for {@link ParseLevelInformation}.\n+ * @author Jose V. Dal Pra Junior (jrdalpra@gmail.com)\n+ * @version $Id$\n+ * @checkstyle MultipleStringLiteralsCheck (80 lines)\n+ */\n+public class ParseLevelInformationTest {\n+\n+    /**\n+     * Test the default path.\n+     */\n+    @Test\n+    public final void mustParseCorrectInformation() {\n+        final ConcurrentHashMap<String, String> parsed =\n+            new ParseLevelInformation(\"INFO:2;10,WARN:2;32\").parse();\n+        Assert.assertThat(parsed, Matchers.hasEntry(\"INFO\", \"2;10\"));\n+        Assert.assertThat(parsed, Matchers.hasEntry(\"WARN\", \"2;32\"));\n+    }\n+\n+    /**\n+     * Test the wrong pattern path.\n+     */\n+    @Test\n+    public final void mustNotParseIncorrectInformation() {\n+        try {\n+            final ConcurrentHashMap<String, String> parsed =\n+                new ParseLevelInformation(\"INFO;10,WARN;32\").parse();\n+            Assert.assertThat(\n+                \"Never should enter this assert!\",\n+                parsed,\n+                Matchers.nullValue()\n+            );\n+        } catch (final IllegalStateException ex) {\n+            Assert.assertThat(\n+                ex.getMessage(), Matchers.equalToIgnoringCase(\n+                    String.format(\n+                        StringUtils.join(\n+                            \"Information is not using the pattern \",\n+                            \"KEY1:VALUE,KEY2:VALUE %1s\"\n+                            ),\n+                        \"INFO;10,WARN;32\"\n+                    )\n+                )\n+            );\n+        }\n+    }\n+\n+    /**\n+     * Test the wrong {@link org.apache.log4j.Level} type path.\n+     */\n+    @Test\n+    public final void mustNotParseInformationWithWrongLevelType() {\n+        try {\n+            final ConcurrentHashMap<String, String> parsed =","path":"src/test/java/com/jcabi/log/ParseLevelInformationTest.java","position":91,"original_position":91,"commit_id":"21c863825c608a49035387c05d6f391986e63ac2","original_commit_id":"21c863825c608a49035387c05d6f391986e63ac2","user":{"login":"mkordas","id":5467276,"avatar_url":"https://avatars.githubusercontent.com/u/5467276?v=3","gravatar_id":"","url":"https://api.github.com/users/mkordas","html_url":"https://github.com/mkordas","followers_url":"https://api.github.com/users/mkordas/followers","following_url":"https://api.github.com/users/mkordas/following{/other_user}","gists_url":"https://api.github.com/users/mkordas/gists{/gist_id}","starred_url":"https://api.github.com/users/mkordas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkordas/subscriptions","organizations_url":"https://api.github.com/users/mkordas/orgs","repos_url":"https://api.github.com/users/mkordas/repos","events_url":"https://api.github.com/users/mkordas/events{/privacy}","received_events_url":"https://api.github.com/users/mkordas/received_events","type":"User","site_admin":false},"body":"@jrdalpra can we inline this variable?","created_at":"2016-02-23T19:09:41Z","updated_at":"2016-02-23T19:09:41Z","html_url":"https://github.com/jcabi/jcabi-log/pull/76#discussion_r53831936","pull_request_url":"https://api.github.com/repos/jcabi/jcabi-log/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/jcabi/jcabi-log/pulls/comments/53831936"},"html":{"href":"https://github.com/jcabi/jcabi-log/pull/76#discussion_r53831936"},"pull_request":{"href":"https://api.github.com/repos/jcabi/jcabi-log/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/jcabi/jcabi-log/pulls/76","id":59881840,"html_url":"https://github.com/jcabi/jcabi-log/pull/76","diff_url":"https://github.com/jcabi/jcabi-log/pull/76.diff","patch_url":"https://github.com/jcabi/jcabi-log/pull/76.patch","issue_url":"https://api.github.com/repos/jcabi/jcabi-log/issues/76","number":76,"state":"open","locked":false,"title":"Separating MulticolorLayout into several classes with less responsability each.","user":{"login":"jrdalpra","id":221431,"avatar_url":"https://avatars.githubusercontent.com/u/221431?v=3","gravatar_id":"","url":"https://api.github.com/users/jrdalpra","html_url":"https://github.com/jrdalpra","followers_url":"https://api.github.com/users/jrdalpra/followers","following_url":"https://api.github.com/users/jrdalpra/following{/other_user}","gists_url":"https://api.github.com/users/jrdalpra/gists{/gist_id}","starred_url":"https://api.github.com/users/jrdalpra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrdalpra/subscriptions","organizations_url":"https://api.github.com/users/jrdalpra/orgs","repos_url":"https://api.github.com/users/jrdalpra/repos","events_url":"https://api.github.com/users/jrdalpra/events{/privacy}","received_events_url":"https://api.github.com/users/jrdalpra/received_events","type":"User","site_admin":false},"body":"This solves issue #75 \r\n\r\n- Split MulticolorLayout into several others, each one with it's specific responsability.\r\n- Creating some test cases for new classes\r\n","created_at":"2016-02-18T23:34:54Z","updated_at":"2016-02-23T19:09:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84387c19e0136eb9e758a1bdac8661ac7cf8e28d","assignee":{"login":"mkordas","id":5467276,"avatar_url":"https://avatars.githubusercontent.com/u/5467276?v=3","gravatar_id":"","url":"https://api.github.com/users/mkordas","html_url":"https://github.com/mkordas","followers_url":"https://api.github.com/users/mkordas/followers","following_url":"https://api.github.com/users/mkordas/following{/other_user}","gists_url":"https://api.github.com/users/mkordas/gists{/gist_id}","starred_url":"https://api.github.com/users/mkordas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkordas/subscriptions","organizations_url":"https://api.github.com/users/mkordas/orgs","repos_url":"https://api.github.com/users/mkordas/repos","events_url":"https://api.github.com/users/mkordas/events{/privacy}","received_events_url":"https://api.github.com/users/mkordas/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/jcabi/jcabi-log/pulls/76/commits","review_comments_url":"https://api.github.com/repos/jcabi/jcabi-log/pulls/76/comments","review_comment_url":"https://api.github.com/repos/jcabi/jcabi-log/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jcabi/jcabi-log/issues/76/comments","statuses_url":"https://api.github.com/repos/jcabi/jcabi-log/statuses/21c863825c608a49035387c05d6f391986e63ac2","head":{"label":"jrdalpra:master","ref":"master","sha":"21c863825c608a49035387c05d6f391986e63ac2","user":{"login":"jrdalpra","id":221431,"avatar_url":"https://avatars.githubusercontent.com/u/221431?v=3","gravatar_id":"","url":"https://api.github.com/users/jrdalpra","html_url":"https://github.com/jrdalpra","followers_url":"https://api.github.com/users/jrdalpra/followers","following_url":"https://api.github.com/users/jrdalpra/following{/other_user}","gists_url":"https://api.github.com/users/jrdalpra/gists{/gist_id}","starred_url":"https://api.github.com/users/jrdalpra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrdalpra/subscriptions","organizations_url":"https://api.github.com/users/jrdalpra/orgs","repos_url":"https://api.github.com/users/jrdalpra/repos","events_url":"https://api.github.com/users/jrdalpra/events{/privacy}","received_events_url":"https://api.github.com/users/jrdalpra/received_events","type":"User","site_admin":false},"repo":{"id":51877996,"name":"jcabi-log","full_name":"jrdalpra/jcabi-log","owner":{"login":"jrdalpra","id":221431,"avatar_url":"https://avatars.githubusercontent.com/u/221431?v=3","gravatar_id":"","url":"https://api.github.com/users/jrdalpra","html_url":"https://github.com/jrdalpra","followers_url":"https://api.github.com/users/jrdalpra/followers","following_url":"https://api.github.com/users/jrdalpra/following{/other_user}","gists_url":"https://api.github.com/users/jrdalpra/gists{/gist_id}","starred_url":"https://api.github.com/users/jrdalpra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrdalpra/subscriptions","organizations_url":"https://api.github.com/users/jrdalpra/orgs","repos_url":"https://api.github.com/users/jrdalpra/repos","events_url":"https://api.github.com/users/jrdalpra/events{/privacy}","received_events_url":"https://api.github.com/users/jrdalpra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrdalpra/jcabi-log","description":"Static Wrapper of SLF4J","fork":true,"url":"https://api.github.com/repos/jrdalpra/jcabi-log","forks_url":"https://api.github.com/repos/jrdalpra/jcabi-log/forks","keys_url":"https://api.github.com/repos/jrdalpra/jcabi-log/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrdalpra/jcabi-log/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrdalpra/jcabi-log/teams","hooks_url":"https://api.github.com/repos/jrdalpra/jcabi-log/hooks","issue_events_url":"https://api.github.com/repos/jrdalpra/jcabi-log/issues/events{/number}","events_url":"https://api.github.com/repos/jrdalpra/jcabi-log/events","assignees_url":"https://api.github.com/repos/jrdalpra/jcabi-log/assignees{/user}","branches_url":"https://api.github.com/repos/jrdalpra/jcabi-log/branches{/branch}","tags_url":"https://api.github.com/repos/jrdalpra/jcabi-log/tags","blobs_url":"https://api.github.com/repos/jrdalpra/jcabi-log/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrdalpra/jcabi-log/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrdalpra/jcabi-log/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrdalpra/jcabi-log/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrdalpra/jcabi-log/statuses/{sha}","languages_url":"https://api.github.com/repos/jrdalpra/jcabi-log/languages","stargazers_url":"https://api.github.com/repos/jrdalpra/jcabi-log/stargazers","contributors_url":"https://api.github.com/repos/jrdalpra/jcabi-log/contributors","subscribers_url":"https://api.github.com/repos/jrdalpra/jcabi-log/subscribers","subscription_url":"https://api.github.com/repos/jrdalpra/jcabi-log/subscription","commits_url":"https://api.github.com/repos/jrdalpra/jcabi-log/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrdalpra/jcabi-log/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrdalpra/jcabi-log/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrdalpra/jcabi-log/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrdalpra/jcabi-log/contents/{+path}","compare_url":"https://api.github.com/repos/jrdalpra/jcabi-log/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrdalpra/jcabi-log/merges","archive_url":"https://api.github.com/repos/jrdalpra/jcabi-log/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrdalpra/jcabi-log/downloads","issues_url":"https://api.github.com/repos/jrdalpra/jcabi-log/issues{/number}","pulls_url":"https://api.github.com/repos/jrdalpra/jcabi-log/pulls{/number}","milestones_url":"https://api.github.com/repos/jrdalpra/jcabi-log/milestones{/number}","notifications_url":"https://api.github.com/repos/jrdalpra/jcabi-log/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrdalpra/jcabi-log/labels{/name}","releases_url":"https://api.github.com/repos/jrdalpra/jcabi-log/releases{/id}","deployments_url":"https://api.github.com/repos/jrdalpra/jcabi-log/deployments","created_at":"2016-02-16T23:22:58Z","updated_at":"2016-02-16T23:22:59Z","pushed_at":"2016-02-22T23:51:10Z","git_url":"git://github.com/jrdalpra/jcabi-log.git","ssh_url":"git@github.com:jrdalpra/jcabi-log.git","clone_url":"https://github.com/jrdalpra/jcabi-log.git","svn_url":"https://github.com/jrdalpra/jcabi-log","homepage":"log.jcabi.com","size":3110,"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":"jcabi:master","ref":"master","sha":"be08bd607eb02f6b8efa38fe197fa497b7b431ba","user":{"login":"jcabi","id":5272640,"avatar_url":"https://avatars.githubusercontent.com/u/5272640?v=3","gravatar_id":"","url":"https://api.github.com/users/jcabi","html_url":"https://github.com/jcabi","followers_url":"https://api.github.com/users/jcabi/followers","following_url":"https://api.github.com/users/jcabi/following{/other_user}","gists_url":"https://api.github.com/users/jcabi/gists{/gist_id}","starred_url":"https://api.github.com/users/jcabi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcabi/subscriptions","organizations_url":"https://api.github.com/users/jcabi/orgs","repos_url":"https://api.github.com/users/jcabi/repos","events_url":"https://api.github.com/users/jcabi/events{/privacy}","received_events_url":"https://api.github.com/users/jcabi/received_events","type":"Organization","site_admin":false},"repo":{"id":12262782,"name":"jcabi-log","full_name":"jcabi/jcabi-log","owner":{"login":"jcabi","id":5272640,"avatar_url":"https://avatars.githubusercontent.com/u/5272640?v=3","gravatar_id":"","url":"https://api.github.com/users/jcabi","html_url":"https://github.com/jcabi","followers_url":"https://api.github.com/users/jcabi/followers","following_url":"https://api.github.com/users/jcabi/following{/other_user}","gists_url":"https://api.github.com/users/jcabi/gists{/gist_id}","starred_url":"https://api.github.com/users/jcabi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcabi/subscriptions","organizations_url":"https://api.github.com/users/jcabi/orgs","repos_url":"https://api.github.com/users/jcabi/repos","events_url":"https://api.github.com/users/jcabi/events{/privacy}","received_events_url":"https://api.github.com/users/jcabi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jcabi/jcabi-log","description":"Static Wrapper of SLF4J","fork":false,"url":"https://api.github.com/repos/jcabi/jcabi-log","forks_url":"https://api.github.com/repos/jcabi/jcabi-log/forks","keys_url":"https://api.github.com/repos/jcabi/jcabi-log/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcabi/jcabi-log/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcabi/jcabi-log/teams","hooks_url":"https://api.github.com/repos/jcabi/jcabi-log/hooks","issue_events_url":"https://api.github.com/repos/jcabi/jcabi-log/issues/events{/number}","events_url":"https://api.github.com/repos/jcabi/jcabi-log/events","assignees_url":"https://api.github.com/repos/jcabi/jcabi-log/assignees{/user}","branches_url":"https://api.github.com/repos/jcabi/jcabi-log/branches{/branch}","tags_url":"https://api.github.com/repos/jcabi/jcabi-log/tags","blobs_url":"https://api.github.com/repos/jcabi/jcabi-log/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcabi/jcabi-log/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcabi/jcabi-log/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcabi/jcabi-log/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcabi/jcabi-log/statuses/{sha}","languages_url":"https://api.github.com/repos/jcabi/jcabi-log/languages","stargazers_url":"https://api.github.com/repos/jcabi/jcabi-log/stargazers","contributors_url":"https://api.github.com/repos/jcabi/jcabi-log/contributors","subscribers_url":"https://api.github.com/repos/jcabi/jcabi-log/subscribers","subscription_url":"https://api.github.com/repos/jcabi/jcabi-log/subscription","commits_url":"https://api.github.com/repos/jcabi/jcabi-log/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcabi/jcabi-log/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcabi/jcabi-log/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcabi/jcabi-log/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcabi/jcabi-log/contents/{+path}","compare_url":"https://api.github.com/repos/jcabi/jcabi-log/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcabi/jcabi-log/merges","archive_url":"https://api.github.com/repos/jcabi/jcabi-log/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcabi/jcabi-log/downloads","issues_url":"https://api.github.com/repos/jcabi/jcabi-log/issues{/number}","pulls_url":"https://api.github.com/repos/jcabi/jcabi-log/pulls{/number}","milestones_url":"https://api.github.com/repos/jcabi/jcabi-log/milestones{/number}","notifications_url":"https://api.github.com/repos/jcabi/jcabi-log/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcabi/jcabi-log/labels{/name}","releases_url":"https://api.github.com/repos/jcabi/jcabi-log/releases{/id}","deployments_url":"https://api.github.com/repos/jcabi/jcabi-log/deployments","created_at":"2013-08-21T06:17:47Z","updated_at":"2016-02-09T09:36:15Z","pushed_at":"2016-02-22T23:51:10Z","git_url":"git://github.com/jcabi/jcabi-log.git","ssh_url":"git@github.com:jcabi/jcabi-log.git","clone_url":"https://github.com/jcabi/jcabi-log.git","svn_url":"https://github.com/jcabi/jcabi-log","homepage":"log.jcabi.com","size":3130,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":21,"mirror_url":null,"open_issues_count":10,"forks":21,"open_issues":10,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jcabi/jcabi-log/pulls/76"},"html":{"href":"https://github.com/jcabi/jcabi-log/pull/76"},"issue":{"href":"https://api.github.com/repos/jcabi/jcabi-log/issues/76"},"comments":{"href":"https://api.github.com/repos/jcabi/jcabi-log/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/jcabi/jcabi-log/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/jcabi/jcabi-log/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jcabi/jcabi-log/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/jcabi/jcabi-log/statuses/21c863825c608a49035387c05d6f391986e63ac2"}}}}