/** * Executes a {@link QueryTestCase} by sending the * {@link QueryTestCase#getContent() query} as an POST request to the * <code>{@link #endpointPath}/{@link QueryTestCase#getServicePath()}</Code>. * @param path the path to perform the field query. "/query" is added to the * parsed value * @param test the field query test * @return the result executor used for the test * @throws IOException on any exception while connecting to the entityhub * @throws JSONException if the returned results are not valid JSON */ protected RequestExecutor executeQuery(QueryTestCase test) throws IOException, JSONException { Request request = builder.buildPostRequest(endpointPath+test.getServicePath()); for(Entry<String,String> header : test.getHeaders().entrySet()){ request.withHeader(header.getKey(), header.getValue()); } request.withContent(test.getContent()); RequestExecutor re = executor.execute(request); assertQueryResults(re, test); return re; } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -