@Test
  public void getRegions() throws IOException {
    JsonNode jsonObject = assertResponse(restClient.doGet("", "dataRead", "dataRead"))
        .hasStatusCode(200).hasContentType(APPLICATION_JSON_UTF8_VALUE)
        .getJsonObject();

    JsonNode regions = jsonObject.get("regions");
    assertNotNull(regions);
    assertTrue(regions.size() > 0);

    JsonNode region = regions.get(0);
    assertEquals("AuthRegion", region.get("name").asText());
    assertEquals("REPLICATE", region.get("type").asText());

    // List regions with an unknown user - 401
    assertResponse(restClient.doGet("", "user", "wrongPswd"))
        .hasStatusCode(401);

    // list regions with insufficent rights - 403
    assertResponse(restClient.doGet("", "dataReadAuthRegion", "dataReadAuthRegion"))
        .hasStatusCode(403);
  }
Test permissions on retrieving a list of regions.
geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java