@Test
  public void getRegionKey() {
    // Test an authorized user
    assertResponse(restClient.doGet("/" + REGION_NAME + "/key1", "dataReadAuthRegionKey1",
        "dataReadAuthRegionKey1"))
            .hasStatusCode(200).hasContentType(APPLICATION_JSON_UTF8_VALUE);

    // Test an unauthorized user
    assertResponse(restClient.doGet("/" + REGION_NAME + "/key1", "dataWrite", "dataWrite"))
        .hasStatusCode(403);
  }
Test permissions on retrieving a key from a region
geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java