@Test
  public void testResponseRegionOnMemberAccessor() {
    System.out.println(
        "ClusterSelectedRegionsMemberServiceTest ::  ------TESTCASE BEGIN : ACCESSOR RESPONSE CHECK FOR CLUSTER REGION MEMBERS------");
    if (httpclient != null) {
      try {
        HttpUriRequest pulseupdate = RequestBuilder.post().setUri(new URI(PULSE_UPDATE_URL))
            .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_3_VALUE).build();
        try (CloseableHttpResponse response = httpclient.execute(pulseupdate)) {
          HttpEntity entity = response.getEntity();

          System.out.println("ClusterSelectedRegionsMemberServiceTest :: HTTP request status : "
              + response.getStatusLine());

          BufferedReader respReader =
              new BufferedReader(new InputStreamReader(entity.getContent()));
          StringWriter sw = new StringWriter();
          PrintWriter pw = new PrintWriter(sw);
          String sz;
          while ((sz = respReader.readLine()) != null) {
            pw.print(sz);
          }
          String jsonResp = sw.getBuffer().toString();
          System.out.println(
              "ClusterSelectedRegionsMemberServiceTest :: JSON response returned : " + jsonResp);
          EntityUtils.consume(entity);

          JSONObject jsonObj = new JSONObject(jsonResp);
          JSONObject clusterSelectedRegionObj =
              jsonObj.getJSONObject("ClusterSelectedRegionsMember");
          Assert.assertNotNull(
              "ClusterSelectedRegionsMemberServiceTest :: Server returned null response for ClusterSelectedRegionsMember",
              clusterSelectedRegionObj);
          JSONObject jsonObjRegion =
              clusterSelectedRegionObj.getJSONObject("selectedRegionsMembers");
          Assert.assertNotNull(
              "ClusterSelectedRegionsMemberServiceTest :: Server returned null response for selectedRegionsMembers",
              jsonObjRegion);
          @SuppressWarnings("unchecked")
          Iterator<String> itrMemberNames = jsonObjRegion.keys();
          Assert.assertNotNull(
              "ClusterSelectedRegionsMemberServiceTest :: Server returned null region on member info",
              itrMemberNames);
          while (itrMemberNames.hasNext()) {
            String szMemberName = itrMemberNames.next();
            Assert.assertNotNull(
                "ClusterSelectedRegionsMemberServiceTest :: Server returned null member name",
                szMemberName);
            Assert.assertTrue("Server did not return member details",
                jsonObjRegion.has(szMemberName));
            JSONObject jsonMemberObj = jsonObjRegion.getJSONObject(szMemberName);

            Assert.assertTrue(
                "ClusterSelectedRegionsMemberServiceTest :: Server did not return 'accessor' of region on member",
                jsonMemberObj.has("accessor"));
            String szAccessor = jsonMemberObj.getString("accessor");
            Assert.assertTrue(
                "ClusterSelectedRegionsMemberServiceTest :: Server returned non-boolean value for accessor attribute",
                ((szAccessor.equalsIgnoreCase("True")) || (szAccessor.equalsIgnoreCase("False"))));
          }
        }
      } catch (Exception failed) {
        logException(failed);
        Assert.fail("Exception ! ");
      }
    } else {
      Assert.fail("ClusterSelectedRegionsMemberServiceTest :: No Http connection was established.");
    }
    System.out.println(
        "ClusterSelectedRegionsMemberServiceTest ::  ------TESTCASE END : ACCESSOR RESPONSE CHECK FOR CLUSTER REGION MEMBERS------");
  }
Tests that response is for same region
geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/junit/ClusterSelectedRegionsMemberServiceTest.java