@Test
  public void adhocQuery() throws Exception {
    String query = "/queries/adhoc?q="
        + URLEncoder.encode("SELECT * FROM " + SEPARATOR + "customers order by customerId",
            "UTF-8");
    JsonNode jsonArray = assertResponse(restClient.doGet(query, "dataReader", "1234567"))
        .hasStatusCode(200)
        .hasContentType(APPLICATION_JSON_UTF8_VALUE)
        .getJsonObject();

    final int length = jsonArray.size();
    for (int index = 0; index < length; ++index) {
      JsonNode customer = jsonArray.get(index);
      assertEquals("*********", customer.get("ssn").asText());
      assertEquals((long) index + 1, customer.get("id").asLong());
    }
  }
Test post-processing of a retrieved key from the server.
geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/RestSecurityPostProcessorTest.java