{"action":"created","comment":{"url":"https://api.github.com/repos/dotCMS/core/pulls/comments/240882576","pull_request_review_id":184012873,"id":240882576,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDg4MjU3Ng==","diff_hunk":"@@ -0,0 +1,154 @@\n+package com.dotcms.rest.api.v1.content;\n+\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertFalse;\n+import static org.junit.Assert.assertNotNull;\n+import static org.junit.Assert.assertTrue;\n+import static org.mockito.Matchers.any;\n+import static org.mockito.Matchers.anyBoolean;\n+import static org.mockito.Mockito.mock;\n+import static org.mockito.Mockito.when;\n+\n+import com.dotcms.repackage.javax.ws.rs.core.Response;\n+import com.dotcms.repackage.javax.ws.rs.core.Response.Status;\n+import com.dotcms.rest.InitDataObject;\n+import com.dotcms.rest.ResponseEntityView;\n+import com.dotcms.rest.WebResource;\n+import com.dotcms.util.IntegrationTestInitService;\n+import com.dotmarketing.beans.Identifier;\n+import com.dotmarketing.business.APILocator;\n+import com.dotmarketing.exception.DotDataException;\n+import com.dotmarketing.exception.DotSecurityException;\n+import com.dotmarketing.portlets.contentlet.model.Contentlet;\n+import com.dotmarketing.portlets.languagesmanager.business.LanguageAPI;\n+import com.dotmarketing.portlets.workflows.business.BaseWorkflowIntegrationTest;\n+import com.liferay.portal.model.User;\n+import java.util.List;\n+import java.util.Locale;\n+import java.util.Map;\n+import java.util.Set;\n+import java.util.stream.Collectors;\n+import javax.servlet.http.HttpServletRequest;\n+import org.junit.BeforeClass;\n+import org.junit.Test;\n+\n+public class VersionResourceIntegrationTest extends BaseWorkflowIntegrationTest {\n+\n+    private static final String ADMIN_DEFAULT_ID = \"dotcms.org.1\";\n+    private static final String ADMIN_DEFAULT_MAIL = \"admin@dotcms.com\";\n+    private static final String ADMIN_NAME = \"User Admin\";\n+\n+    private static VersionResource versionResource;\n+\n+    @BeforeClass\n+    public static void prepare() throws Exception {\n+        IntegrationTestInitService.getInstance().init();\n+\n+        final User user = mock(User.class);\n+        when(user.getUserId()).thenReturn(ADMIN_DEFAULT_ID);\n+        when(user.getEmailAddress()).thenReturn(ADMIN_DEFAULT_MAIL);\n+        when(user.getFullName()).thenReturn(ADMIN_NAME);\n+        when(user.getLocale()).thenReturn(Locale.getDefault());\n+\n+        final WebResource webResource = mock(WebResource.class);\n+        final InitDataObject dataObject = mock(InitDataObject.class);\n+        when(dataObject.getUser()).thenReturn(user);\n+        when(webResource\n+                .init(anyBoolean(), any(HttpServletRequest.class), anyBoolean())).thenReturn(dataObject);\n+\n+        versionResource = new VersionResource(APILocator.getContentletAPI(),\n+                APILocator.getLanguageAPI(), webResource);\n+\n+    }\n+\n+    @SuppressWarnings(\"unchecked\")","path":"dotCMS/src/integration-test/java/com/dotcms/rest/api/v1/content/VersionResourceIntegrationTest.java","position":64,"original_position":64,"commit_id":"9400e63af1af72ccd6528aacd6f98979bd38a0a7","original_commit_id":"9400e63af1af72ccd6528aacd6f98979bd38a0a7","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [The String literal \"unchecked\" appears 5 times in this file; the first occurrence is on line 64](https://app.codacy.com/app/dotCMS/core/pullRequest?prid=2717254)","created_at":"2018-12-12T04:58:00Z","updated_at":"2018-12-12T04:58:00Z","html_url":"https://github.com/dotCMS/core/pull/15689#discussion_r240882576","pull_request_url":"https://api.github.com/repos/dotCMS/core/pulls/15689","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/dotCMS/core/pulls/comments/240882576"},"html":{"href":"https://github.com/dotCMS/core/pull/15689#discussion_r240882576"},"pull_request":{"href":"https://api.github.com/repos/dotCMS/core/pulls/15689"}}},"pull_request":{"url":"https://api.github.com/repos/dotCMS/core/pulls/15689","id":237778520,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3Nzc4NTIw","html_url":"https://github.com/dotCMS/core/pull/15689","diff_url":"https://github.com/dotCMS/core/pull/15689.diff","patch_url":"https://github.com/dotCMS/core/pull/15689.patch","issue_url":"https://api.github.com/repos/dotCMS/core/issues/15689","number":15689,"state":"open","locked":false,"title":"#14659  incorporate Versions Endpoint into core","user":{"login":"fabrizzio-dotCMS","id":37148755,"node_id":"MDQ6VXNlcjM3MTQ4NzU1","avatar_url":"https://avatars1.githubusercontent.com/u/37148755?v=4","gravatar_id":"","url":"https://api.github.com/users/fabrizzio-dotCMS","html_url":"https://github.com/fabrizzio-dotCMS","followers_url":"https://api.github.com/users/fabrizzio-dotCMS/followers","following_url":"https://api.github.com/users/fabrizzio-dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/fabrizzio-dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/fabrizzio-dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabrizzio-dotCMS/subscriptions","organizations_url":"https://api.github.com/users/fabrizzio-dotCMS/orgs","repos_url":"https://api.github.com/users/fabrizzio-dotCMS/repos","events_url":"https://api.github.com/users/fabrizzio-dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/fabrizzio-dotCMS/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-11T18:14:22Z","updated_at":"2018-12-12T04:58:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"119f5fdb7508121b545ff0fabb2f1a9e106fff5d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotCMS/core/pulls/15689/commits","review_comments_url":"https://api.github.com/repos/dotCMS/core/pulls/15689/comments","review_comment_url":"https://api.github.com/repos/dotCMS/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotCMS/core/issues/15689/comments","statuses_url":"https://api.github.com/repos/dotCMS/core/statuses/9400e63af1af72ccd6528aacd6f98979bd38a0a7","head":{"label":"dotCMS:issue-14659-rest-versions","ref":"issue-14659-rest-versions","sha":"9400e63af1af72ccd6528aacd6f98979bd38a0a7","user":{"login":"dotCMS","id":1005263,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMDUyNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":3729629,"node_id":"MDEwOlJlcG9zaXRvcnkzNzI5NjI5","name":"core","full_name":"dotCMS/core","private":false,"owner":{"login":"dotCMS","id":1005263,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMDUyNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dotCMS/core","description":"Source Code for dotCMS Java Enterprise Content Management System","fork":false,"url":"https://api.github.com/repos/dotCMS/core","forks_url":"https://api.github.com/repos/dotCMS/core/forks","keys_url":"https://api.github.com/repos/dotCMS/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotCMS/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotCMS/core/teams","hooks_url":"https://api.github.com/repos/dotCMS/core/hooks","issue_events_url":"https://api.github.com/repos/dotCMS/core/issues/events{/number}","events_url":"https://api.github.com/repos/dotCMS/core/events","assignees_url":"https://api.github.com/repos/dotCMS/core/assignees{/user}","branches_url":"https://api.github.com/repos/dotCMS/core/branches{/branch}","tags_url":"https://api.github.com/repos/dotCMS/core/tags","blobs_url":"https://api.github.com/repos/dotCMS/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotCMS/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotCMS/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotCMS/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotCMS/core/statuses/{sha}","languages_url":"https://api.github.com/repos/dotCMS/core/languages","stargazers_url":"https://api.github.com/repos/dotCMS/core/stargazers","contributors_url":"https://api.github.com/repos/dotCMS/core/contributors","subscribers_url":"https://api.github.com/repos/dotCMS/core/subscribers","subscription_url":"https://api.github.com/repos/dotCMS/core/subscription","commits_url":"https://api.github.com/repos/dotCMS/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotCMS/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotCMS/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotCMS/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotCMS/core/contents/{+path}","compare_url":"https://api.github.com/repos/dotCMS/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotCMS/core/merges","archive_url":"https://api.github.com/repos/dotCMS/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotCMS/core/downloads","issues_url":"https://api.github.com/repos/dotCMS/core/issues{/number}","pulls_url":"https://api.github.com/repos/dotCMS/core/pulls{/number}","milestones_url":"https://api.github.com/repos/dotCMS/core/milestones{/number}","notifications_url":"https://api.github.com/repos/dotCMS/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotCMS/core/labels{/name}","releases_url":"https://api.github.com/repos/dotCMS/core/releases{/id}","deployments_url":"https://api.github.com/repos/dotCMS/core/deployments","created_at":"2012-03-15T15:24:14Z","updated_at":"2018-12-11T17:36:53Z","pushed_at":"2018-12-11T21:35:57Z","git_url":"git://github.com/dotCMS/core.git","ssh_url":"git@github.com:dotCMS/core.git","clone_url":"https://github.com/dotCMS/core.git","svn_url":"https://github.com/dotCMS/core","homepage":"http://dotcms.com","size":314691,"stargazers_count":428,"watchers_count":428,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":333,"mirror_url":null,"archived":false,"open_issues_count":2065,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":333,"open_issues":2065,"watchers":428,"default_branch":"master"}},"base":{"label":"dotCMS:master","ref":"master","sha":"6eab61b3d071f08efa4658d8dbcb3f8221b134b7","user":{"login":"dotCMS","id":1005263,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMDUyNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":3729629,"node_id":"MDEwOlJlcG9zaXRvcnkzNzI5NjI5","name":"core","full_name":"dotCMS/core","private":false,"owner":{"login":"dotCMS","id":1005263,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMDUyNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dotCMS/core","description":"Source Code for dotCMS Java Enterprise Content Management System","fork":false,"url":"https://api.github.com/repos/dotCMS/core","forks_url":"https://api.github.com/repos/dotCMS/core/forks","keys_url":"https://api.github.com/repos/dotCMS/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotCMS/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotCMS/core/teams","hooks_url":"https://api.github.com/repos/dotCMS/core/hooks","issue_events_url":"https://api.github.com/repos/dotCMS/core/issues/events{/number}","events_url":"https://api.github.com/repos/dotCMS/core/events","assignees_url":"https://api.github.com/repos/dotCMS/core/assignees{/user}","branches_url":"https://api.github.com/repos/dotCMS/core/branches{/branch}","tags_url":"https://api.github.com/repos/dotCMS/core/tags","blobs_url":"https://api.github.com/repos/dotCMS/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotCMS/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotCMS/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotCMS/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotCMS/core/statuses/{sha}","languages_url":"https://api.github.com/repos/dotCMS/core/languages","stargazers_url":"https://api.github.com/repos/dotCMS/core/stargazers","contributors_url":"https://api.github.com/repos/dotCMS/core/contributors","subscribers_url":"https://api.github.com/repos/dotCMS/core/subscribers","subscription_url":"https://api.github.com/repos/dotCMS/core/subscription","commits_url":"https://api.github.com/repos/dotCMS/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotCMS/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotCMS/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotCMS/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotCMS/core/contents/{+path}","compare_url":"https://api.github.com/repos/dotCMS/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotCMS/core/merges","archive_url":"https://api.github.com/repos/dotCMS/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotCMS/core/downloads","issues_url":"https://api.github.com/repos/dotCMS/core/issues{/number}","pulls_url":"https://api.github.com/repos/dotCMS/core/pulls{/number}","milestones_url":"https://api.github.com/repos/dotCMS/core/milestones{/number}","notifications_url":"https://api.github.com/repos/dotCMS/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotCMS/core/labels{/name}","releases_url":"https://api.github.com/repos/dotCMS/core/releases{/id}","deployments_url":"https://api.github.com/repos/dotCMS/core/deployments","created_at":"2012-03-15T15:24:14Z","updated_at":"2018-12-11T17:36:53Z","pushed_at":"2018-12-11T21:35:57Z","git_url":"git://github.com/dotCMS/core.git","ssh_url":"git@github.com:dotCMS/core.git","clone_url":"https://github.com/dotCMS/core.git","svn_url":"https://github.com/dotCMS/core","homepage":"http://dotcms.com","size":314691,"stargazers_count":428,"watchers_count":428,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":333,"mirror_url":null,"archived":false,"open_issues_count":2065,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":333,"open_issues":2065,"watchers":428,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotCMS/core/pulls/15689"},"html":{"href":"https://github.com/dotCMS/core/pull/15689"},"issue":{"href":"https://api.github.com/repos/dotCMS/core/issues/15689"},"comments":{"href":"https://api.github.com/repos/dotCMS/core/issues/15689/comments"},"review_comments":{"href":"https://api.github.com/repos/dotCMS/core/pulls/15689/comments"},"review_comment":{"href":"https://api.github.com/repos/dotCMS/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotCMS/core/pulls/15689/commits"},"statuses":{"href":"https://api.github.com/repos/dotCMS/core/statuses/9400e63af1af72ccd6528aacd6f98979bd38a0a7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}