{"action":"created","comment":{"url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/comments/68708894","id":68708894,"diff_hunk":"@@ -541,79 +537,65 @@ public void testPartKey() throws Exception {\n \n         String expected = jacksonMapper.writeValueAsString(Arrays.asList(property));\n \n-        JSONAssert.assertEquals(expected, queryProperty(queryObj), false);\n+        JSONAssert.assertEquals(expected, formatToJson(getProperty(queryObj)), false);\n     }\n \n     @Test\n     public void testEndDateAbsent() throws IOException {\n-        JSONArray request = new JSONArray() {{\n-            add(new JSONObject() {{\n-                put(\"type\", \"testtype\");\n-                put(\"entity\", \"testentity\");\n-                put(\"startDate\", \"2016-05-25T05:00:00Z\");\n-            }});\n-        }};\n+        Map request = new HashMap();\n+        request.put(\"type\", \"testtype\");\n+        request.put(\"entity\", \"testentity\");\n+        request.put(\"startDate\", \"2016-05-25T05:00:00Z\");\n \n-        Response response = httpApiResource.path(METHOD_PROPERTY_QUERY).request().post(javax.ws.rs.client.Entity.entity(request, MediaType.APPLICATION_JSON_TYPE));\n+        Response response = getProperty(request);\n         assertEquals(400, response.getStatus());\n-        assertEquals(\"{\\\"error\\\":\\\"IllegalArgumentException: Missing parameters. One of the following combinations is required: interval, interval + startTime/startDate, interval + endTime/endDate, startTime/startDate + endTime/endDate\\\"}\", response.readEntity(String.class));\n+        assertEquals(\"{\\\"error\\\":\\\"IllegalArgumentException: Missing parameters. One of the following combinations is required: interval, interval + startTime/startDate, interval + endTime/endDate, startTime/startDate + endTime/endDate\\\"}\", formatToJson(response));\n     }\n \n     @Test\n     public void testStartDateAbsent() throws IOException {\n-        JSONArray request = new JSONArray() {{\n-            add(new JSONObject() {{\n-                put(\"type\", \"testtype\");\n-                put(\"entity\", \"testentity\");\n-            }});\n-        }};\n+        Map request = new HashMap();\n+        request.put(\"type\", \"testtype\");\n+        request.put(\"entity\", \"testentity\");\n \n-        Response response = httpApiResource.path(METHOD_PROPERTY_QUERY).request().post(javax.ws.rs.client.Entity.entity(request, MediaType.APPLICATION_JSON_TYPE));\n+        Response response = getProperty(request);\n         assertEquals(400, response.getStatus());\n-        assertEquals(\"{\\\"error\\\":\\\"IllegalArgumentException: Missing parameters. One of the following combinations is required: interval, interval + startTime/startDate, interval + endTime/endDate, startTime/startDate + endTime/endDate\\\"}\", response.readEntity(String.class));\n+        assertEquals(\"{\\\"error\\\":\\\"IllegalArgumentException: Missing parameters. One of the following combinations is required: interval, interval + startTime/startDate, interval + endTime/endDate, startTime/startDate + endTime/endDate\\\"}\", formatToJson(response));\n     }\n \n     @Test\n     public void testOnlyTypeSpecified() throws IOException {\n-        JSONArray request = new JSONArray() {{\n-            add(new JSONObject() {{\n-                put(\"type\", \"testtype\");\n-            }});\n-        }};\n+        Map request = new HashMap();\n+        request.put(\"type\", \"testtype\");\n \n-        Response response = httpApiResource.path(METHOD_PROPERTY_QUERY).request().post(javax.ws.rs.client.Entity.entity(request, MediaType.APPLICATION_JSON_TYPE));\n+        Response response = getProperty(request);\n         assertEquals(400, response.getStatus());\n-        assertEquals(\"{\\\"error\\\":\\\"IllegalArgumentException: Missing parameters. One of the following combinations is required: interval, interval + startTime/startDate, interval + endTime/endDate, startTime/startDate + endTime/endDate\\\"}\", response.readEntity(String.class));\n+        assertEquals(\"{\\\"error\\\":\\\"IllegalArgumentException: Missing parameters. One of the following combinations is required: interval, interval + startTime/startDate, interval + endTime/endDate, startTime/startDate + endTime/endDate\\\"}\", formatToJson(response));\n     }\n \n \n     @Test\n     public void testEntityFilterEndDateAbsent() throws IOException {\n-        JSONArray request = new JSONArray() {{\n-            add(new JSONObject() {{\n-                put(\"type\", \"testtype\");\n-                put(\"startDate\", \"2016-06-01T12:04:59.191Z\");\n-            }});\n-        }};\n+        Map request = new HashMap();\n+        request.put(\"type\", \"testtype\");\n+        request.put(\"type\", \"testtype\");\n+        request.put(\"startDate\", \"2016-06-01T12:04:59.191Z\");\n \n-        Response response = httpApiResource.path(METHOD_PROPERTY_QUERY).request().post(javax.ws.rs.client.Entity.entity(request, MediaType.APPLICATION_JSON_TYPE));\n+        Response response = getProperty(request);\n         assertEquals(400, response.getStatus());","path":"src/test/java/com/axibase/tsd/api/method/property/PropertyQueryTest.java","position":303,"original_position":303,"commit_id":"190e5a3d04b9769e4a1382f0d694636e041c51b3","original_commit_id":"190e5a3d04b9769e4a1382f0d694636e041c51b3","user":{"login":"KutuzovGregory","id":5146409,"avatar_url":"https://avatars.githubusercontent.com/u/5146409?v=3","gravatar_id":"","url":"https://api.github.com/users/KutuzovGregory","html_url":"https://github.com/KutuzovGregory","followers_url":"https://api.github.com/users/KutuzovGregory/followers","following_url":"https://api.github.com/users/KutuzovGregory/following{/other_user}","gists_url":"https://api.github.com/users/KutuzovGregory/gists{/gist_id}","starred_url":"https://api.github.com/users/KutuzovGregory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KutuzovGregory/subscriptions","organizations_url":"https://api.github.com/users/KutuzovGregory/orgs","repos_url":"https://api.github.com/users/KutuzovGregory/repos","events_url":"https://api.github.com/users/KutuzovGregory/events{/privacy}","received_events_url":"https://api.github.com/users/KutuzovGregory/received_events","type":"User","site_admin":false},"body":"BAD_REQUEST.getStatusCode()","created_at":"2016-06-28T07:27:57Z","updated_at":"2016-06-28T07:27:57Z","html_url":"https://github.com/axibase/atsd-api-test/pull/19#discussion_r68708894","pull_request_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/comments/68708894"},"html":{"href":"https://github.com/axibase/atsd-api-test/pull/19#discussion_r68708894"},"pull_request":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/19","id":75323946,"html_url":"https://github.com/axibase/atsd-api-test/pull/19","diff_url":"https://github.com/axibase/atsd-api-test/pull/19.diff","patch_url":"https://github.com/axibase/atsd-api-test/pull/19.patch","issue_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/19","number":19,"state":"open","locked":false,"title":"done refactor","user":{"login":"Sild","id":1629069,"avatar_url":"https://avatars.githubusercontent.com/u/1629069?v=3","gravatar_id":"","url":"https://api.github.com/users/Sild","html_url":"https://github.com/Sild","followers_url":"https://api.github.com/users/Sild/followers","following_url":"https://api.github.com/users/Sild/following{/other_user}","gists_url":"https://api.github.com/users/Sild/gists{/gist_id}","starred_url":"https://api.github.com/users/Sild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sild/subscriptions","organizations_url":"https://api.github.com/users/Sild/orgs","repos_url":"https://api.github.com/users/Sild/repos","events_url":"https://api.github.com/users/Sild/events{/privacy}","received_events_url":"https://api.github.com/users/Sild/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-27T14:46:56Z","updated_at":"2016-06-28T07:27:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86d4e82787cc25df0ebf2070c5e2af631eee4481","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/19/commits","review_comments_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/19/comments","review_comment_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/comments{/number}","comments_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/19/comments","statuses_url":"https://api.github.com/repos/axibase/atsd-api-test/statuses/190e5a3d04b9769e4a1382f0d694636e041c51b3","head":{"label":"axibase:methods_upgrade","ref":"methods_upgrade","sha":"190e5a3d04b9769e4a1382f0d694636e041c51b3","user":{"login":"axibase","id":10971416,"avatar_url":"https://avatars.githubusercontent.com/u/10971416?v=3","gravatar_id":"","url":"https://api.github.com/users/axibase","html_url":"https://github.com/axibase","followers_url":"https://api.github.com/users/axibase/followers","following_url":"https://api.github.com/users/axibase/following{/other_user}","gists_url":"https://api.github.com/users/axibase/gists{/gist_id}","starred_url":"https://api.github.com/users/axibase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axibase/subscriptions","organizations_url":"https://api.github.com/users/axibase/orgs","repos_url":"https://api.github.com/users/axibase/repos","events_url":"https://api.github.com/users/axibase/events{/privacy}","received_events_url":"https://api.github.com/users/axibase/received_events","type":"Organization","site_admin":false},"repo":{"id":60343037,"name":"atsd-api-test","full_name":"axibase/atsd-api-test","owner":{"login":"axibase","id":10971416,"avatar_url":"https://avatars.githubusercontent.com/u/10971416?v=3","gravatar_id":"","url":"https://api.github.com/users/axibase","html_url":"https://github.com/axibase","followers_url":"https://api.github.com/users/axibase/followers","following_url":"https://api.github.com/users/axibase/following{/other_user}","gists_url":"https://api.github.com/users/axibase/gists{/gist_id}","starred_url":"https://api.github.com/users/axibase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axibase/subscriptions","organizations_url":"https://api.github.com/users/axibase/orgs","repos_url":"https://api.github.com/users/axibase/repos","events_url":"https://api.github.com/users/axibase/events{/privacy}","received_events_url":"https://api.github.com/users/axibase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/axibase/atsd-api-test","description":"Tests for ATSD api","fork":false,"url":"https://api.github.com/repos/axibase/atsd-api-test","forks_url":"https://api.github.com/repos/axibase/atsd-api-test/forks","keys_url":"https://api.github.com/repos/axibase/atsd-api-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/axibase/atsd-api-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/axibase/atsd-api-test/teams","hooks_url":"https://api.github.com/repos/axibase/atsd-api-test/hooks","issue_events_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/events{/number}","events_url":"https://api.github.com/repos/axibase/atsd-api-test/events","assignees_url":"https://api.github.com/repos/axibase/atsd-api-test/assignees{/user}","branches_url":"https://api.github.com/repos/axibase/atsd-api-test/branches{/branch}","tags_url":"https://api.github.com/repos/axibase/atsd-api-test/tags","blobs_url":"https://api.github.com/repos/axibase/atsd-api-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/axibase/atsd-api-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/axibase/atsd-api-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/axibase/atsd-api-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/axibase/atsd-api-test/statuses/{sha}","languages_url":"https://api.github.com/repos/axibase/atsd-api-test/languages","stargazers_url":"https://api.github.com/repos/axibase/atsd-api-test/stargazers","contributors_url":"https://api.github.com/repos/axibase/atsd-api-test/contributors","subscribers_url":"https://api.github.com/repos/axibase/atsd-api-test/subscribers","subscription_url":"https://api.github.com/repos/axibase/atsd-api-test/subscription","commits_url":"https://api.github.com/repos/axibase/atsd-api-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/axibase/atsd-api-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/axibase/atsd-api-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/comments{/number}","contents_url":"https://api.github.com/repos/axibase/atsd-api-test/contents/{+path}","compare_url":"https://api.github.com/repos/axibase/atsd-api-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/axibase/atsd-api-test/merges","archive_url":"https://api.github.com/repos/axibase/atsd-api-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/axibase/atsd-api-test/downloads","issues_url":"https://api.github.com/repos/axibase/atsd-api-test/issues{/number}","pulls_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls{/number}","milestones_url":"https://api.github.com/repos/axibase/atsd-api-test/milestones{/number}","notifications_url":"https://api.github.com/repos/axibase/atsd-api-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/axibase/atsd-api-test/labels{/name}","releases_url":"https://api.github.com/repos/axibase/atsd-api-test/releases{/id}","deployments_url":"https://api.github.com/repos/axibase/atsd-api-test/deployments","created_at":"2016-06-03T11:31:43Z","updated_at":"2016-06-22T12:56:00Z","pushed_at":"2016-06-27T15:41:45Z","git_url":"git://github.com/axibase/atsd-api-test.git","ssh_url":"git@github.com:axibase/atsd-api-test.git","clone_url":"https://github.com/axibase/atsd-api-test.git","svn_url":"https://github.com/axibase/atsd-api-test","homepage":null,"size":246,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"axibase:master","ref":"master","sha":"2e02656616539db2e32ba0d3afcdfe01d1f42c23","user":{"login":"axibase","id":10971416,"avatar_url":"https://avatars.githubusercontent.com/u/10971416?v=3","gravatar_id":"","url":"https://api.github.com/users/axibase","html_url":"https://github.com/axibase","followers_url":"https://api.github.com/users/axibase/followers","following_url":"https://api.github.com/users/axibase/following{/other_user}","gists_url":"https://api.github.com/users/axibase/gists{/gist_id}","starred_url":"https://api.github.com/users/axibase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axibase/subscriptions","organizations_url":"https://api.github.com/users/axibase/orgs","repos_url":"https://api.github.com/users/axibase/repos","events_url":"https://api.github.com/users/axibase/events{/privacy}","received_events_url":"https://api.github.com/users/axibase/received_events","type":"Organization","site_admin":false},"repo":{"id":60343037,"name":"atsd-api-test","full_name":"axibase/atsd-api-test","owner":{"login":"axibase","id":10971416,"avatar_url":"https://avatars.githubusercontent.com/u/10971416?v=3","gravatar_id":"","url":"https://api.github.com/users/axibase","html_url":"https://github.com/axibase","followers_url":"https://api.github.com/users/axibase/followers","following_url":"https://api.github.com/users/axibase/following{/other_user}","gists_url":"https://api.github.com/users/axibase/gists{/gist_id}","starred_url":"https://api.github.com/users/axibase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axibase/subscriptions","organizations_url":"https://api.github.com/users/axibase/orgs","repos_url":"https://api.github.com/users/axibase/repos","events_url":"https://api.github.com/users/axibase/events{/privacy}","received_events_url":"https://api.github.com/users/axibase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/axibase/atsd-api-test","description":"Tests for ATSD api","fork":false,"url":"https://api.github.com/repos/axibase/atsd-api-test","forks_url":"https://api.github.com/repos/axibase/atsd-api-test/forks","keys_url":"https://api.github.com/repos/axibase/atsd-api-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/axibase/atsd-api-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/axibase/atsd-api-test/teams","hooks_url":"https://api.github.com/repos/axibase/atsd-api-test/hooks","issue_events_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/events{/number}","events_url":"https://api.github.com/repos/axibase/atsd-api-test/events","assignees_url":"https://api.github.com/repos/axibase/atsd-api-test/assignees{/user}","branches_url":"https://api.github.com/repos/axibase/atsd-api-test/branches{/branch}","tags_url":"https://api.github.com/repos/axibase/atsd-api-test/tags","blobs_url":"https://api.github.com/repos/axibase/atsd-api-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/axibase/atsd-api-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/axibase/atsd-api-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/axibase/atsd-api-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/axibase/atsd-api-test/statuses/{sha}","languages_url":"https://api.github.com/repos/axibase/atsd-api-test/languages","stargazers_url":"https://api.github.com/repos/axibase/atsd-api-test/stargazers","contributors_url":"https://api.github.com/repos/axibase/atsd-api-test/contributors","subscribers_url":"https://api.github.com/repos/axibase/atsd-api-test/subscribers","subscription_url":"https://api.github.com/repos/axibase/atsd-api-test/subscription","commits_url":"https://api.github.com/repos/axibase/atsd-api-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/axibase/atsd-api-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/axibase/atsd-api-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/comments{/number}","contents_url":"https://api.github.com/repos/axibase/atsd-api-test/contents/{+path}","compare_url":"https://api.github.com/repos/axibase/atsd-api-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/axibase/atsd-api-test/merges","archive_url":"https://api.github.com/repos/axibase/atsd-api-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/axibase/atsd-api-test/downloads","issues_url":"https://api.github.com/repos/axibase/atsd-api-test/issues{/number}","pulls_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls{/number}","milestones_url":"https://api.github.com/repos/axibase/atsd-api-test/milestones{/number}","notifications_url":"https://api.github.com/repos/axibase/atsd-api-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/axibase/atsd-api-test/labels{/name}","releases_url":"https://api.github.com/repos/axibase/atsd-api-test/releases{/id}","deployments_url":"https://api.github.com/repos/axibase/atsd-api-test/deployments","created_at":"2016-06-03T11:31:43Z","updated_at":"2016-06-22T12:56:00Z","pushed_at":"2016-06-27T15:41:45Z","git_url":"git://github.com/axibase/atsd-api-test.git","ssh_url":"git@github.com:axibase/atsd-api-test.git","clone_url":"https://github.com/axibase/atsd-api-test.git","svn_url":"https://github.com/axibase/atsd-api-test","homepage":null,"size":246,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/19"},"html":{"href":"https://github.com/axibase/atsd-api-test/pull/19"},"issue":{"href":"https://api.github.com/repos/axibase/atsd-api-test/issues/19"},"comments":{"href":"https://api.github.com/repos/axibase/atsd-api-test/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/axibase/atsd-api-test/statuses/190e5a3d04b9769e4a1382f0d694636e041c51b3"}}}}
{"actor":{"display_login":"KutuzovGregory"}}