@Test
  public void deleteRegionKey() {
    // Test an unknown user - 401 error
    assertResponse(restClient.doDelete("/" + REGION_NAME + "/key1", "user", "wrongPswd"))
        .hasStatusCode(401);

    // Test a user with insufficient rights - 403
    assertResponse(restClient.doDelete("/" + REGION_NAME + "/key1", "dataRead", "dataRead"))
        .hasStatusCode(403);

    // Test an authorized user - 200
    assertResponse(restClient.doDelete("/" + REGION_NAME + "/key1", "dataWriteAuthRegionKey1",
        "dataWriteAuthRegionKey1"))
            .hasStatusCode(200);
  }
Test permissions on deleting a region's key(s)
geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java