{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/product-as/pulls/comments/43216133","id":43216133,"diff_hunk":"@@ -0,0 +1,141 @@\n+package org.wso2.appserver.integration.tests.cahce;\n+/*\n+* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+*\n+* Licensed under the Apache License, Version 2.0 (the \"License\");\n+* you may not use this file except in compliance with the License.\n+* You may obtain a copy of 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,\n+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+* See the License for the specific language governing permissions and\n+* limitations under the License.\n+*/\n+\n+import org.apache.commons.httpclient.HttpClient;\n+import org.apache.commons.httpclient.HttpStatus;\n+import org.apache.commons.httpclient.methods.GetMethod;\n+import org.testng.annotations.AfterClass;\n+import org.testng.annotations.BeforeClass;\n+import org.testng.annotations.DataProvider;\n+import org.testng.annotations.Factory;\n+import org.testng.annotations.Test;\n+import org.wso2.appserver.integration.common.clients.WebAppAdminClient;\n+import org.wso2.appserver.integration.common.utils.ASIntegrationTest;\n+import org.wso2.appserver.integration.common.utils.WebAppDeploymentUtil;\n+import org.wso2.appserver.integration.common.utils.WebAppTypes;\n+import org.wso2.carbon.automation.engine.context.TestUserMode;\n+\n+import java.io.File;\n+\n+import static org.testng.Assert.assertEquals;\n+import static org.testng.Assert.assertTrue;\n+\n+/**\n+ * This class is use to test the functionality of retrieving cached values.\n+ */\n+public class CacheRetrievalTestCase extends ASIntegrationTest {\n+    private static final String WEBAPP_FILENAME = \"carbon-cache.war\";\n+    private static final String APP_NAME = \"carbon-cache\";\n+\n+    private TestUserMode userMode;\n+    private HttpClient httpClient = new HttpClient();\n+    private String cacheValue;\n+    private String cacheKey;\n+\n+    @Factory(dataProvider = \"userModeDataProvider\")\n+    public CacheRetrievalTestCase(TestUserMode userMode) {\n+        this.userMode = userMode;\n+    }\n+\n+    @BeforeClass(alwaysRun = true)\n+    public void init() throws Exception {\n+        super.init(userMode);\n+        WebAppAdminClient webAppAdminClient = new WebAppAdminClient(backendURL, sessionCookie);\n+        String path = System.getProperty(\"basedir\", \".\") + File.separator + \"target\" + File.separator + \"resources\" +","path":"modules/integration/tests-integration/tests/src/test/java/org/wso2/appserver/integration/tests/cahce/CacheRetrievalTestCase.java","position":58,"original_position":58,"commit_id":"049f40da3aef1e2d1fddd64dd2dad5d4ceccc4d5","original_commit_id":"049f40da3aef1e2d1fddd64dd2dad5d4ceccc4d5","user":{"login":"callkalpa","id":504756,"avatar_url":"https://avatars.githubusercontent.com/u/504756?v=3","gravatar_id":"","url":"https://api.github.com/users/callkalpa","html_url":"https://github.com/callkalpa","followers_url":"https://api.github.com/users/callkalpa/followers","following_url":"https://api.github.com/users/callkalpa/following{/other_user}","gists_url":"https://api.github.com/users/callkalpa/gists{/gist_id}","starred_url":"https://api.github.com/users/callkalpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callkalpa/subscriptions","organizations_url":"https://api.github.com/users/callkalpa/orgs","repos_url":"https://api.github.com/users/callkalpa/repos","events_url":"https://api.github.com/users/callkalpa/events{/privacy}","received_events_url":"https://api.github.com/users/callkalpa/received_events","type":"User","site_admin":false},"body":"It's better if we can use Paths API","created_at":"2015-10-28T03:49:08Z","updated_at":"2015-10-28T03:49:08Z","html_url":"https://github.com/wso2/product-as/pull/156#discussion_r43216133","pull_request_url":"https://api.github.com/repos/wso2/product-as/pulls/156","_links":{"self":{"href":"https://api.github.com/repos/wso2/product-as/pulls/comments/43216133"},"html":{"href":"https://github.com/wso2/product-as/pull/156#discussion_r43216133"},"pull_request":{"href":"https://api.github.com/repos/wso2/product-as/pulls/156"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/product-as/pulls/156","id":40435544,"html_url":"https://github.com/wso2/product-as/pull/156","diff_url":"https://github.com/wso2/product-as/pull/156.diff","patch_url":"https://github.com/wso2/product-as/pull/156.patch","issue_url":"https://api.github.com/repos/wso2/product-as/issues/156","number":156,"state":"closed","locked":false,"title":"Adding cache test cases","user":{"login":"thusithathilina","id":7578389,"avatar_url":"https://avatars.githubusercontent.com/u/7578389?v=3","gravatar_id":"","url":"https://api.github.com/users/thusithathilina","html_url":"https://github.com/thusithathilina","followers_url":"https://api.github.com/users/thusithathilina/followers","following_url":"https://api.github.com/users/thusithathilina/following{/other_user}","gists_url":"https://api.github.com/users/thusithathilina/gists{/gist_id}","starred_url":"https://api.github.com/users/thusithathilina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thusithathilina/subscriptions","organizations_url":"https://api.github.com/users/thusithathilina/orgs","repos_url":"https://api.github.com/users/thusithathilina/repos","events_url":"https://api.github.com/users/thusithathilina/events{/privacy}","received_events_url":"https://api.github.com/users/thusithathilina/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-21T08:56:52Z","updated_at":"2015-10-28T03:49:08Z","closed_at":"2015-07-21T09:00:59Z","merged_at":"2015-07-21T09:00:59Z","merge_commit_sha":"e8949cfa873ca25ef88a9bd238336134819fdd68","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/product-as/pulls/156/commits","review_comments_url":"https://api.github.com/repos/wso2/product-as/pulls/156/comments","review_comment_url":"https://api.github.com/repos/wso2/product-as/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/product-as/issues/156/comments","statuses_url":"https://api.github.com/repos/wso2/product-as/statuses/049f40da3aef1e2d1fddd64dd2dad5d4ceccc4d5","head":{"label":"thusithathilina:cache_test","ref":"cache_test","sha":"049f40da3aef1e2d1fddd64dd2dad5d4ceccc4d5","user":{"login":"thusithathilina","id":7578389,"avatar_url":"https://avatars.githubusercontent.com/u/7578389?v=3","gravatar_id":"","url":"https://api.github.com/users/thusithathilina","html_url":"https://github.com/thusithathilina","followers_url":"https://api.github.com/users/thusithathilina/followers","following_url":"https://api.github.com/users/thusithathilina/following{/other_user}","gists_url":"https://api.github.com/users/thusithathilina/gists{/gist_id}","starred_url":"https://api.github.com/users/thusithathilina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thusithathilina/subscriptions","organizations_url":"https://api.github.com/users/thusithathilina/orgs","repos_url":"https://api.github.com/users/thusithathilina/repos","events_url":"https://api.github.com/users/thusithathilina/events{/privacy}","received_events_url":"https://api.github.com/users/thusithathilina/received_events","type":"User","site_admin":false},"repo":{"id":32796063,"name":"product-as","full_name":"thusithathilina/product-as","owner":{"login":"thusithathilina","id":7578389,"avatar_url":"https://avatars.githubusercontent.com/u/7578389?v=3","gravatar_id":"","url":"https://api.github.com/users/thusithathilina","html_url":"https://github.com/thusithathilina","followers_url":"https://api.github.com/users/thusithathilina/followers","following_url":"https://api.github.com/users/thusithathilina/following{/other_user}","gists_url":"https://api.github.com/users/thusithathilina/gists{/gist_id}","starred_url":"https://api.github.com/users/thusithathilina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thusithathilina/subscriptions","organizations_url":"https://api.github.com/users/thusithathilina/orgs","repos_url":"https://api.github.com/users/thusithathilina/repos","events_url":"https://api.github.com/users/thusithathilina/events{/privacy}","received_events_url":"https://api.github.com/users/thusithathilina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thusithathilina/product-as","description":"","fork":true,"url":"https://api.github.com/repos/thusithathilina/product-as","forks_url":"https://api.github.com/repos/thusithathilina/product-as/forks","keys_url":"https://api.github.com/repos/thusithathilina/product-as/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thusithathilina/product-as/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thusithathilina/product-as/teams","hooks_url":"https://api.github.com/repos/thusithathilina/product-as/hooks","issue_events_url":"https://api.github.com/repos/thusithathilina/product-as/issues/events{/number}","events_url":"https://api.github.com/repos/thusithathilina/product-as/events","assignees_url":"https://api.github.com/repos/thusithathilina/product-as/assignees{/user}","branches_url":"https://api.github.com/repos/thusithathilina/product-as/branches{/branch}","tags_url":"https://api.github.com/repos/thusithathilina/product-as/tags","blobs_url":"https://api.github.com/repos/thusithathilina/product-as/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thusithathilina/product-as/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thusithathilina/product-as/git/refs{/sha}","trees_url":"https://api.github.com/repos/thusithathilina/product-as/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thusithathilina/product-as/statuses/{sha}","languages_url":"https://api.github.com/repos/thusithathilina/product-as/languages","stargazers_url":"https://api.github.com/repos/thusithathilina/product-as/stargazers","contributors_url":"https://api.github.com/repos/thusithathilina/product-as/contributors","subscribers_url":"https://api.github.com/repos/thusithathilina/product-as/subscribers","subscription_url":"https://api.github.com/repos/thusithathilina/product-as/subscription","commits_url":"https://api.github.com/repos/thusithathilina/product-as/commits{/sha}","git_commits_url":"https://api.github.com/repos/thusithathilina/product-as/git/commits{/sha}","comments_url":"https://api.github.com/repos/thusithathilina/product-as/comments{/number}","issue_comment_url":"https://api.github.com/repos/thusithathilina/product-as/issues/comments{/number}","contents_url":"https://api.github.com/repos/thusithathilina/product-as/contents/{+path}","compare_url":"https://api.github.com/repos/thusithathilina/product-as/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thusithathilina/product-as/merges","archive_url":"https://api.github.com/repos/thusithathilina/product-as/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thusithathilina/product-as/downloads","issues_url":"https://api.github.com/repos/thusithathilina/product-as/issues{/number}","pulls_url":"https://api.github.com/repos/thusithathilina/product-as/pulls{/number}","milestones_url":"https://api.github.com/repos/thusithathilina/product-as/milestones{/number}","notifications_url":"https://api.github.com/repos/thusithathilina/product-as/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thusithathilina/product-as/labels{/name}","releases_url":"https://api.github.com/repos/thusithathilina/product-as/releases{/id}","created_at":"2015-03-24T12:06:20Z","updated_at":"2015-03-24T12:06:25Z","pushed_at":"2015-10-26T07:13:21Z","git_url":"git://github.com/thusithathilina/product-as.git","ssh_url":"git@github.com:thusithathilina/product-as.git","clone_url":"https://github.com/thusithathilina/product-as.git","svn_url":"https://github.com/thusithathilina/product-as","homepage":null,"size":59595,"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":"wso2:master","ref":"master","sha":"663b2b2822cd7f5bda189088b528677b6594b44e","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":16947368,"name":"product-as","full_name":"wso2/product-as","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/product-as","description":"","fork":false,"url":"https://api.github.com/repos/wso2/product-as","forks_url":"https://api.github.com/repos/wso2/product-as/forks","keys_url":"https://api.github.com/repos/wso2/product-as/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/product-as/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/product-as/teams","hooks_url":"https://api.github.com/repos/wso2/product-as/hooks","issue_events_url":"https://api.github.com/repos/wso2/product-as/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/product-as/events","assignees_url":"https://api.github.com/repos/wso2/product-as/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/product-as/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/product-as/tags","blobs_url":"https://api.github.com/repos/wso2/product-as/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/product-as/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/product-as/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/product-as/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/product-as/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/product-as/languages","stargazers_url":"https://api.github.com/repos/wso2/product-as/stargazers","contributors_url":"https://api.github.com/repos/wso2/product-as/contributors","subscribers_url":"https://api.github.com/repos/wso2/product-as/subscribers","subscription_url":"https://api.github.com/repos/wso2/product-as/subscription","commits_url":"https://api.github.com/repos/wso2/product-as/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/product-as/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/product-as/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/product-as/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/product-as/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/product-as/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/product-as/merges","archive_url":"https://api.github.com/repos/wso2/product-as/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/product-as/downloads","issues_url":"https://api.github.com/repos/wso2/product-as/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/product-as/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/product-as/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/product-as/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/product-as/labels{/name}","releases_url":"https://api.github.com/repos/wso2/product-as/releases{/id}","created_at":"2014-02-18T11:57:09Z","updated_at":"2015-09-08T08:56:32Z","pushed_at":"2015-10-27T17:05:29Z","git_url":"git://github.com/wso2/product-as.git","ssh_url":"git@github.com:wso2/product-as.git","clone_url":"https://github.com/wso2/product-as.git","svn_url":"https://github.com/wso2/product-as","homepage":null,"size":66553,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":15,"forks":44,"open_issues":15,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/product-as/pulls/156"},"html":{"href":"https://github.com/wso2/product-as/pull/156"},"issue":{"href":"https://api.github.com/repos/wso2/product-as/issues/156"},"comments":{"href":"https://api.github.com/repos/wso2/product-as/issues/156/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/product-as/pulls/156/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/product-as/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/product-as/pulls/156/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/product-as/statuses/049f40da3aef1e2d1fddd64dd2dad5d4ceccc4d5"}}}}