geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jensde...@apache.org
Subject [03/96] [abbrv] [partial] incubator-geode git commit: GEODE-12: rename pulse to gemfire-pulse and make build pass
Date Thu, 21 Jan 2016 22:54:44 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/BaseServiceTest.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/BaseServiceTest.java b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/BaseServiceTest.java
new file mode 100644
index 0000000..627abec
--- /dev/null
+++ b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/BaseServiceTest.java
@@ -0,0 +1,233 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests.junit;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.URI;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.client.methods.RequestBuilder;
+import org.apache.http.cookie.Cookie;
+import org.apache.http.impl.client.BasicCookieStore;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+
+/**
+ * Base class to be extended by other JUnit test classes. This class defines and automatically invokes test for testing server login-logout so no need to add
+ * this test in each sub-class. It also provides doLogin(), doLogout() and print error functionality as protected
+ * functions.
+ *
+ * <b>Sub-classes should ensure that they call doLogin() in @BeforeClass and doLogout() in @AfterClass otherwise tests will fail.</b>
+ *
+ * @author rbhandekar
+ *
+ */
+public abstract class BaseServiceTest {
+
+  protected static Properties propsForJUnit = new Properties();
+  protected static String strHost = null;
+  protected static String strPort = null;
+
+  static{
+
+    InputStream stream = BaseServiceTest.class.getClassLoader().getResourceAsStream("pulse.properties");
+
+    try{
+      propsForJUnit.load(stream);
+    } catch(Exception exProps){
+      System.out.println("BaseServiceTest :: Error loading properties from pulse.properties in classpath");
+    }
+    strHost = propsForJUnit.getProperty("pulse.host");
+    strPort = propsForJUnit.getProperty("pulse.port");
+    System.out.println("BaseServiceTest :: Loaded properties from classpath. Checking properties for hostname. Hostname found = " + strHost);
+  }
+
+  protected static final String LOGIN_URL =                 "http://" + strHost + ":" + strPort + "/pulse/j_spring_security_check";
+  protected static final String LOGOUT_URL =                "http://" + strHost + ":" + strPort + "/pulse/clusterLogout";
+  protected static final String IS_AUTHENTICATED_USER_URL = "http://" + strHost + ":" + strPort + "/pulse/authenticateUser";
+  protected static final String PULSE_UPDATE_URL =          "http://" + strHost + ":" + strPort + "/pulse/pulseUpdate";
+  protected static final String PULSE_UPDATE_PARAM = "pulseData";
+  protected static final String PULSE_UPDATE_1_VALUE = "{'ClusterSelectedRegion':{'regionFullPath':'/GlobalVilage_2/GlobalVilage_9'}}";
+  protected static final String PULSE_UPDATE_2_VALUE = "{'ClusterSelectedRegion':{'regionFullPath':'/Rubbish'}}";
+
+  protected static final String PULSE_UPDATE_3_VALUE = "{'ClusterSelectedRegionsMember':{'regionFullPath':'/GlobalVilage_2/GlobalVilage_9'}}";
+  protected static final String PULSE_UPDATE_4_VALUE = "{'ClusterSelectedRegionsMember':{'regionFullPath':'/Rubbish'}}";
+
+  protected static final String PULSE_UPDATE_5_VALUE = "{'MemberGatewayHub':{'memberName':'pnq-visitor1'}}";
+  protected static final String PULSE_UPDATE_6_VALUE = "{'MemberGatewayHub':{'memberName':'pnq-visitor2'}}";
+  protected static CloseableHttpClient httpclient = null;
+
+
+  /**
+  *
+  * @author rbhandekar
+  * @throws java.lang.Exception
+  */
+  @Before
+  public void setUp() throws Exception {
+    doLogout();
+    System.out.println("BaseServiceTest :: Setup done");
+  }
+
+  /**
+  *
+  * @author rbhandekar
+  * @throws java.lang.Exception
+  */
+  @After
+  public void tearDown() throws Exception {
+    doLogin();
+    System.out.println("BaseServiceTest :: Teardown done");
+  }
+
+  /**
+   * Login to pulse server and setup httpClient for tests
+   * To be called from setupBeforeClass in each test class
+   */
+  protected static void doLogin() throws Exception {
+    System.out.println("BaseServiceTest ::  Executing doLogin with user : admin, password : admin.");
+
+    CloseableHttpResponse loginResponse = null;
+    try{
+      BasicCookieStore cookieStore = new BasicCookieStore();
+      httpclient = HttpClients.custom().setDefaultCookieStore(cookieStore).build();
+      HttpUriRequest login = RequestBuilder.post().setUri(new URI(LOGIN_URL))
+        .addParameter("j_username", "admin").addParameter("j_password", "admin")
+        .build();
+      loginResponse = httpclient.execute(login);
+      try {
+           HttpEntity entity = loginResponse.getEntity();
+           EntityUtils.consume(entity);
+           System.out.println("BaseServiceTest :: HTTP request status : " + loginResponse.getStatusLine());
+
+           List<Cookie> cookies = cookieStore.getCookies();
+           if (cookies.isEmpty()) {
+           } else {
+               for (int i = 0; i < cookies.size(); i++) {
+               }
+           }
+      } finally {
+         if(loginResponse != null)
+           loginResponse.close();
+      }
+    } catch(Exception failed) {
+      logException(failed);
+      throw failed;
+    }
+
+    System.out.println("BaseServiceTest ::  Executed doLogin");
+  }
+
+  /**
+   * Logout to pulse server and close httpClient
+   * To be called from setupAfterClass in each test class
+   */
+  protected static void doLogout() throws Exception {
+    System.out.println("BaseServiceTest ::  Executing doLogout with user : admin, password : admin.");
+    if(httpclient != null){
+      CloseableHttpResponse logoutResponse = null;
+      try{
+        HttpUriRequest logout = RequestBuilder.get().setUri(new URI(LOGOUT_URL))
+            .build();
+        logoutResponse = httpclient.execute(logout);
+        try {
+             HttpEntity entity = logoutResponse.getEntity();
+             EntityUtils.consume(entity);
+        } finally {
+           if(logoutResponse != null)
+             logoutResponse.close();
+           httpclient.close();
+           httpclient = null;
+        }
+      } catch(Exception failed) {
+        logException(failed);
+        throw failed;
+      }
+      System.out.println("BaseServiceTest ::  Executed doLogout");
+    } else{
+      System.out.println("BaseServiceTest ::  User NOT logged-in");
+    }
+  }
+
+  /**
+   * Print exception string to system.out
+   *
+   * @param failed
+   */
+  protected static void logException(Exception failed){
+    StringWriter sw = new StringWriter();
+    PrintWriter pw = new PrintWriter(sw);
+    failed.printStackTrace(pw);
+    System.out.println("BaseServiceTest :: Logging exception details : " + sw.getBuffer().toString());
+  }
+
+  /**
+  *
+  * Tests that service returns json object
+  *
+  * Test method for {@link com.vmware.gemfire.tools.pulse.internal.service.ClusterSelectedRegionService#execute(javax.servlet.http.HttpServletRequest)}.
+  */
+  @Test
+  public void testServerLoginLogout() {
+      System.out.println("BaseServiceTest ::  ------TESTCASE BEGIN : SERVER LOGIN-LOGOUT------");
+      try{
+          doLogin();
+
+          HttpUriRequest pulseupdate = RequestBuilder.get()
+            .setUri(new URI(IS_AUTHENTICATED_USER_URL))
+            .build();
+          CloseableHttpResponse response = httpclient.execute(pulseupdate);
+          try {
+            HttpEntity entity = response.getEntity();
+
+            System.out.println("BaseServiceTest :: HTTP request status : " + response.getStatusLine());
+
+            BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+            StringWriter sw = new StringWriter();
+            PrintWriter pw = new PrintWriter(sw);
+            String sz = null;
+            while((sz = respReader.readLine()) != null){
+              pw.print(sz);
+            }
+            String jsonResp = sw.getBuffer().toString();
+            System.out.println("BaseServiceTest :: JSON response returned : " + jsonResp);
+            EntityUtils.consume(entity);
+
+            JSONObject jsonObj = new JSONObject(jsonResp);
+            boolean isUserLoggedIn = jsonObj.getBoolean("isUserLoggedIn");
+            Assert.assertNotNull("BaseServiceTest :: Server returned null response in 'isUserLoggedIn'", isUserLoggedIn);
+            Assert.assertTrue("BaseServiceTest :: User login failed for this username, password", (isUserLoggedIn == true));
+          } finally {
+            response.close();
+          }
+
+          doLogout();
+      } catch(Exception failed) {
+          logException(failed);
+          Assert.fail("Exception ! ");
+      }
+      System.out.println("BaseServiceTest ::  ------TESTCASE END : SERVER LOGIN-LOGOUT------");
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/ClusterSelectedRegionServiceTest.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/ClusterSelectedRegionServiceTest.java b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/ClusterSelectedRegionServiceTest.java
new file mode 100644
index 0000000..10a1956
--- /dev/null
+++ b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/ClusterSelectedRegionServiceTest.java
@@ -0,0 +1,344 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests.junit;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.URI;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.client.methods.RequestBuilder;
+import org.apache.http.util.EntityUtils;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * JUnit Tests for ClusterSelectedRegionService in the back-end server for region detail page
+ *
+ * @author rbhandekar
+ *
+ */
+public class ClusterSelectedRegionServiceTest extends BaseServiceTest {
+
+  /**
+   *
+   * @author rbhandekar
+   * @throws java.lang.Exception
+   */
+  @BeforeClass
+  public static void setUpBeforeClass() throws Exception {
+    doLogin();
+    System.out.println("\n\nClusterSelectedRegionServiceTest :: Setup done");
+  }
+
+  /**
+   *
+   * @author rbhandekar
+   * @throws java.lang.Exception
+   */
+  @AfterClass
+  public static void tearDownAfterClass() throws Exception {
+    doLogout();
+    System.out.println("ClusterSelectedRegionServiceTest :: Teardown done");
+  }
+
+  /**
+   *
+   * @author rbhandekar
+   * @throws java.lang.Exception
+   */
+  @Override
+  @Before
+  public void setUp() throws Exception {
+  }
+
+  /**
+   *
+   * @author rbhandekar
+   * @throws java.lang.Exception
+   */
+  @Override
+  @After
+  public void tearDown() throws Exception {
+  }
+
+  /**
+   * Tests that service returns json object
+   *
+   * @author rbhandekar
+   */
+  @Test
+  public void testResponseNotNull() {
+    System.out.println("ClusterSelectedRegionServiceTest ::  ------TESTCASE BEGIN : NULL RESPONSE CHECK FOR CLUSTER REGIONS------");
+    if(httpclient != null){
+        try{
+            HttpUriRequest pulseupdate = RequestBuilder.post()
+                .setUri(new URI(PULSE_UPDATE_URL))
+                .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_1_VALUE)
+                .build();
+            CloseableHttpResponse response = httpclient.execute(pulseupdate);
+            try {
+              HttpEntity entity = response.getEntity();
+
+              System.out.println("ClusterSelectedRegionServiceTest :: HTTP request status : " + response.getStatusLine());
+              BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+              StringWriter sw = new StringWriter();
+              PrintWriter pw = new PrintWriter(sw);
+              String sz = null;
+              while((sz = respReader.readLine()) != null){
+                pw.print(sz);
+              }
+              String jsonResp = sw.getBuffer().toString();
+              System.out.println("ClusterSelectedRegionServiceTest :: JSON response returned : " + jsonResp);
+              EntityUtils.consume(entity);
+
+              JSONObject jsonObj = new JSONObject(jsonResp);
+              Assert.assertNotNull("ClusterSelectedRegionServiceTest :: Server returned null response for ClusterSelectedRegion", jsonObj.getJSONObject("ClusterSelectedRegion"));
+            } finally {
+              response.close();
+            }
+        } catch(Exception failed) {
+          logException(failed);
+          Assert.fail("Exception ! ");
+        }
+    } else {
+      Assert.fail("ClusterSelectedRegionServiceTest :: No Http connection was established.");
+    }
+    System.out.println("ClusterSelectedRegionServiceTest ::  ------TESTCASE END : NULL RESPONSE CHECK FOR CLUSTER REGIONS------\n");
+  }
+
+  /**
+  *
+  * Tests that response is for same logged in user
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseUsername() {
+    System.out.println("ClusterSelectedRegionServiceTest ::  ------TESTCASE BEGIN : NULL USERNAME IN RESPONSE CHECK FOR CLUSTER REGIONS------");
+     if(httpclient != null){
+         try{
+             HttpUriRequest pulseupdate = RequestBuilder.post()
+                 .setUri(new URI(PULSE_UPDATE_URL))
+                 .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_1_VALUE)
+                 .build();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               HttpEntity entity = response.getEntity();
+
+               System.out.println("ClusterSelectedRegionServiceTest :: HTTP request status : " + response.getStatusLine());
+
+               BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+               StringWriter sw = new StringWriter();
+               PrintWriter pw = new PrintWriter(sw);
+               String sz = null;
+               while((sz = respReader.readLine()) != null){
+                 pw.print(sz);
+               }
+               String jsonResp = sw.getBuffer().toString();
+               System.out.println("ClusterSelectedRegionServiceTest :: JSON response returned : " + jsonResp);
+               EntityUtils.consume(entity);
+
+               JSONObject jsonObj = new JSONObject(jsonResp);
+               JSONObject clusterSelectedRegionObj = jsonObj.getJSONObject("ClusterSelectedRegion");
+               Assert.assertNotNull("ClusterSelectedRegionServiceTest :: Server returned null response for ClusterSelectedRegion", clusterSelectedRegionObj);
+               String szUser = clusterSelectedRegionObj.getString("userName");
+               Assert.assertEquals("ClusterSelectedRegionServiceTest :: Server returned wrong user name. Expected was admin. Server returned = " + szUser, szUser, "admin");
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("ClusterSelectedRegionServiceTest :: No Http connection was established.");
+     }
+     System.out.println("ClusterSelectedRegionServiceTest ::  ------TESTCASE END : NULL USERNAME IN RESPONSE CHECK FOR CLUSTER REGIONS------\n");
+  }
+
+  /**
+  *
+  * Tests that response is for same region
+  *
+  * Test method for {@link com.vmware.gemfire.tools.pulse.internal.service.ClusterSelectedRegionService#execute(javax.servlet.http.HttpServletRequest)}.
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseRegionPathMatches() {
+    System.out.println("ClusterSelectedRegionServiceTest ::  ------TESTCASE BEGIN : REGION PATH IN RESPONSE CHECK FOR CLUSTER REGIONS------");
+     if(httpclient != null){
+         try{
+             HttpUriRequest pulseupdate = RequestBuilder.post()
+                 .setUri(new URI(PULSE_UPDATE_URL))
+                 .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_1_VALUE)
+                 .build();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               HttpEntity entity = response.getEntity();
+
+               System.out.println("ClusterSelectedRegionServiceTest :: HTTP request status : " + response.getStatusLine());
+
+               BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+               StringWriter sw = new StringWriter();
+               PrintWriter pw = new PrintWriter(sw);
+               String sz = null;
+               while((sz = respReader.readLine()) != null){
+                 pw.print(sz);
+               }
+               String jsonResp = sw.getBuffer().toString();
+               System.out.println("ClusterSelectedRegionServiceTest :: JSON response returned : " + jsonResp);
+               EntityUtils.consume(entity);
+
+               JSONObject jsonObj = new JSONObject(jsonResp);
+               JSONObject clusterSelectedRegionObj = jsonObj.getJSONObject("ClusterSelectedRegion");
+               Assert.assertNotNull("ClusterSelectedRegionServiceTest :: Server returned null response for ClusterSelectedRegion",clusterSelectedRegionObj);
+               JSONObject jsonObjRegion = clusterSelectedRegionObj.getJSONObject("selectedRegion");
+               Assert.assertNotNull("ClusterSelectedRegionServiceTest :: Server returned null response for selectedRegion",jsonObjRegion);
+               Assert.assertTrue("ClusterSelectedRegionServiceTest :: Server did not return 'path' of region",jsonObjRegion.has("path"));
+               String szPath = jsonObjRegion.getString("path");
+               Assert.assertEquals("ClusterSelectedRegionServiceTest :: Server returned wrong region path. Expected region path = /GlobalVilage_2/GlobalVilage_9 , actual region path = " + szPath, szPath, "/GlobalVilage_2/GlobalVilage_9");
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("ClusterSelectedRegionServiceTest :: No Http connection was established.");
+     }
+     System.out.println("ClusterSelectedRegionServiceTest ::  ------TESTCASE END : REGION PATH IN RESPONSE CHECK FOR CLUSTER REGIONS------\n");
+  }
+
+  /**
+  *
+  * Tests that response is for same region
+  *
+  * Test method for {@link com.vmware.gemfire.tools.pulse.internal.service.ClusterSelectedRegionService#execute(javax.servlet.http.HttpServletRequest)}.
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseNonExistentRegion() {
+    System.out.println("ClusterSelectedRegionServiceTest ::  ------TESTCASE BEGIN : NON-EXISTENT REGION CHECK FOR CLUSTER REGIONS------");
+     if(httpclient != null){
+         try{
+             HttpUriRequest pulseupdate = RequestBuilder.post()
+                 .setUri(new URI(PULSE_UPDATE_URL))
+                 .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_2_VALUE)
+                 .build();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               HttpEntity entity = response.getEntity();
+
+               System.out.println("ClusterSelectedRegionServiceTest :: HTTP request status : " + response.getStatusLine());
+
+               BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+               StringWriter sw = new StringWriter();
+               PrintWriter pw = new PrintWriter(sw);
+               String sz = null;
+               while((sz = respReader.readLine()) != null){
+                 pw.print(sz);
+               }
+               String jsonResp = sw.getBuffer().toString();
+               System.out.println("ClusterSelectedRegionServiceTest :: JSON response returned : " + jsonResp);
+               EntityUtils.consume(entity);
+
+               JSONObject jsonObj = new JSONObject(jsonResp);
+               JSONObject clusterSelectedRegionObj = jsonObj.getJSONObject("ClusterSelectedRegion");
+               Assert.assertNotNull("ClusterSelectedRegionServiceTest :: Server returned null response for ClusterSelectedRegion",clusterSelectedRegionObj);
+               JSONObject jsonObjRegion = clusterSelectedRegionObj.getJSONObject("selectedRegion");
+               Assert.assertNotNull("ClusterSelectedRegionServiceTest :: Server returned null response for selectedRegion",jsonObjRegion);
+               Assert.assertTrue("ClusterSelectedRegionServiceTest :: Server did not return error on non-existent region",jsonObjRegion.has("errorOnRegion"));
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("ClusterSelectedRegionServiceTest :: No Http connection was established.");
+     }
+     System.out.println("ClusterSelectedRegionServiceTest ::  ------TESTCASE END : NON-EXISTENT REGION CHECK FOR CLUSTER REGIONS------\n");
+  }
+
+  /**
+  *
+  * Tests that service returns json object
+  *
+  * Test method for {@link com.vmware.gemfire.tools.pulse.internal.service.ClusterSelectedRegionService#execute(javax.servlet.http.HttpServletRequest)}.
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseMemerberCount() {
+   System.out.println("ClusterSelectedRegionServiceTest ::  ------TESTCASE BEGIN : MISMATCHED MEMBERCOUNT FOR REGION CHECK FOR CLUSTER REGIONS------");
+   if(httpclient != null){
+       try{
+           HttpUriRequest pulseupdate = RequestBuilder.post()
+               .setUri(new URI(PULSE_UPDATE_URL))
+               .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_1_VALUE)
+               .build();
+           CloseableHttpResponse response = httpclient.execute(pulseupdate);
+           try {
+             HttpEntity entity = response.getEntity();
+
+             System.out.println("ClusterSelectedRegionServiceTest :: HTTP request status : " + response.getStatusLine());
+
+             BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+             StringWriter sw = new StringWriter();
+             PrintWriter pw = new PrintWriter(sw);
+             String sz = null;
+             while((sz = respReader.readLine()) != null){
+               pw.print(sz);
+             }
+             String jsonResp = sw.getBuffer().toString();
+             System.out.println("ClusterSelectedRegionServiceTest :: JSON response returned : " + jsonResp);
+             EntityUtils.consume(entity);
+
+             JSONObject jsonObj = new JSONObject(jsonResp);
+             JSONObject clusterSelectedRegionObj = jsonObj.getJSONObject("ClusterSelectedRegion");
+             Assert.assertNotNull("ClusterSelectedRegionServiceTest :: Server returned null ClusterSelectedRegion",clusterSelectedRegionObj);
+             JSONObject jsonObjRegion = clusterSelectedRegionObj.getJSONObject("selectedRegion");
+             Assert.assertNotNull("ClusterSelectedRegionServiceTest :: Server returned null for selectedRegion",jsonObjRegion);
+             Assert.assertTrue("ClusterSelectedRegionServiceTest :: Server did not return 'memberCount' of region",jsonObjRegion.has("memberCount"));
+             int memberCount = jsonObjRegion.getInt("memberCount");
+             Assert.assertTrue("ClusterSelectedRegionServiceTest :: Server did not return 'members' of region",jsonObjRegion.has("members"));
+             JSONArray arrMembers = jsonObjRegion.getJSONArray("members");
+             Assert.assertNotNull("ClusterSelectedRegionServiceTest :: Server returned null response in selectedRegion",arrMembers);
+             int members = arrMembers.length();
+             Assert.assertEquals("ClusterSelectedRegionServiceTest :: Server returned mismatched member count and region members", members, memberCount);
+           } finally {
+             response.close();
+           }
+       } catch(Exception failed) {
+         logException(failed);
+         Assert.fail("Exception ! ");
+       }
+   } else {
+     Assert.fail("ClusterSelectedRegionServiceTest :: No Http connection was established.");
+   }
+   System.out.println("ClusterSelectedRegionServiceTest ::  ------TESTCASE END : MISMATCHED MEMBERCOUNT FOR REGION CHECK FOR CLUSTER REGIONS------\n");
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/ClusterSelectedRegionsMemberServiceTest.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/ClusterSelectedRegionsMemberServiceTest.java b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/ClusterSelectedRegionsMemberServiceTest.java
new file mode 100644
index 0000000..867056c
--- /dev/null
+++ b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/ClusterSelectedRegionsMemberServiceTest.java
@@ -0,0 +1,356 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests.junit;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.URI;
+import java.util.Iterator;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.client.methods.RequestBuilder;
+import org.apache.http.util.EntityUtils;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * JUnit Tests for ClusterSelectedRegionsMemberService in the back-end server for region detail page
+ *
+ * @author rbhandekar
+ *
+ */
+public class ClusterSelectedRegionsMemberServiceTest  extends BaseServiceTest {
+
+  /**
+   * @throws java.lang.Exception
+   *
+   * @author rbhandekar
+   */
+  @BeforeClass
+  public static void setUpBeforeClass() throws Exception {
+    doLogin();
+    System.out.println("\n\nClusterSelectedRegionsMemberServiceTest :: Setup done");
+  }
+
+  /**
+   * @throws java.lang.Exception
+   *
+   * @author rbhandekar
+   */
+  @AfterClass
+  public static void tearDownAfterClass() throws Exception {
+    doLogout();
+    System.out.println("ClusterSelectedRegionsMemberServiceTest :: Teardown done");
+  }
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @Override
+  @Before
+  public void setUp() throws Exception {
+    System.out.println("running setup -- ClusterSelectedRegionsMemberServiceTest");
+  }
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @Override
+  @After
+  public void tearDown() throws Exception {
+    System.out.println("running teardown -- ClusterSelectedRegionsMemberServiceTest");
+  }
+
+  /**
+   * Tests that service returns json object
+   *
+   * @author rbhandekar
+   */
+  @Test
+  public void testResponseNotNull() {
+    System.out.println("ClusterSelectedRegionsMemberServiceTest ::  ------TESTCASE BEGIN : NULL 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();
+            CloseableHttpResponse response = httpclient.execute(pulseupdate);
+            try {
+              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 = null;
+              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);
+              Assert.assertNotNull("ClusterSelectedRegionsMemberServiceTest :: Server returned null response for ClusterSelectedRegionsMember", jsonObj.getJSONObject("ClusterSelectedRegionsMember"));
+            } finally {
+              response.close();
+            }
+        } catch(Exception failed) {
+          logException(failed);
+          Assert.fail("Exception ! ");
+        }
+    } else {
+      Assert.fail("ClusterSelectedRegionsMemberServiceTest :: No Http connection was established.");
+    }
+    System.out.println("ClusterSelectedRegionsMemberServiceTest ::  ------TESTCASE END : NULL RESPONSE CHECK FOR CLUSTER REGION MEMBERS------");
+  }
+
+  /**
+  *
+  * Tests that response is for same logged in user
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseUsername() {
+    System.out.println("ClusterSelectedRegionsMemberServiceTest ::  ------TESTCASE BEGIN : NULL USERNAME IN 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();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               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 = null;
+               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);
+               Assert.assertTrue("ClusterSelectedRegionsMemberServiceTest :: Server did not return 'userName' in request",clusterSelectedRegionObj.has("userName"));
+               String szUser = clusterSelectedRegionObj.getString("userName");
+               Assert.assertEquals("ClusterSelectedRegionsMemberServiceTest :: Server returned wrong user name. Expected was admin. Server returned = " + szUser, szUser, "admin");
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("ClusterSelectedRegionsMemberServiceTest :: No Http connection was established.");
+     }
+     System.out.println("ClusterSelectedRegionsMemberServiceTest ::  ------TESTCASE END : NULL USERNAME IN RESPONSE CHECK FOR CLUSTER REGION MEMBERS------");
+  }
+
+  /**
+  *
+  * Tests that response is for same region
+  *
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseRegionOnMemberInfoMatches() {
+    System.out.println("ClusterSelectedRegionsMemberServiceTest ::  ------TESTCASE BEGIN : MEMBER INFO 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();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               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 = null;
+               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);
+               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 'regionFullPath' of region on member",jsonMemberObj.has("regionFullPath"));
+                 String szPath = jsonMemberObj.getString("regionFullPath");
+                 Assert.assertEquals("ClusterSelectedRegionsMemberServiceTest :: Server returned wrong region path for region on member", szPath, "/GlobalVilage_2/GlobalVilage_9");
+               }
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("ClusterSelectedRegionsMemberServiceTest :: No Http connection was established.");
+     }
+     System.out.println("ClusterSelectedRegionsMemberServiceTest ::  ------TESTCASE END : MEMBER INFO RESPONSE CHECK FOR CLUSTER REGION MEMBERS------");
+  }
+
+  /**
+  *
+  * Tests that response is for same region
+  *
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseNonExistentRegion() {
+    System.out.println("ClusterSelectedRegionsMemberServiceTest ::  ------TESTCASE BEGIN : NON-EXISTENT REGION CHECK FOR CLUSTER REGION MEMBERS------");
+     if(httpclient != null){
+         try{
+           System.out.println("Test for non-existent region : /Rubbish");
+             HttpUriRequest pulseupdate = RequestBuilder.post()
+                 .setUri(new URI(PULSE_UPDATE_URL))
+                 .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_4_VALUE)
+                 .build();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               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 = null;
+               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 for ClusterSelectedRegionsMember",clusterSelectedRegionObj);
+               JSONObject jsonObjRegion = clusterSelectedRegionObj.getJSONObject("selectedRegionsMembers");
+               Assert.assertNotNull("ClusterSelectedRegionsMemberServiceTest :: Server returned null for selectedRegionsMembers",jsonObjRegion);
+               Assert.assertTrue("ClusterSelectedRegionsMemberServiceTest :: Server did not return error on non-existent region",jsonObjRegion.has("errorOnRegion"));
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("ClusterSelectedRegionsMemberServiceTest :: No Http connection was established.");
+     }
+     System.out.println("ClusterSelectedRegionsMemberServiceTest ::  ------TESTCASE END : NON-EXISTENT REGION CHECK FOR CLUSTER REGION MEMBERS------");
+  }
+
+  /**
+  *
+  * Tests that response is for same region
+  *
+  *
+  * @author rbhandekar
+  */
+  @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();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               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 = null;
+               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);
+               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"))) );
+               }
+             } finally {
+               response.close();
+             }
+         } 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------");
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/MemberGatewayHubServiceTest.java
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/MemberGatewayHubServiceTest.java b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/MemberGatewayHubServiceTest.java
new file mode 100644
index 0000000..d4033f6
--- /dev/null
+++ b/gemfire-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/junit/MemberGatewayHubServiceTest.java
@@ -0,0 +1,417 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests.junit;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.URI;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.client.methods.RequestBuilder;
+import org.apache.http.util.EntityUtils;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * JUnit Tests for MemberGatewayHubService in the back-end server for region detail page
+ *
+ * @author rbhandekar
+ *
+ */
+public class MemberGatewayHubServiceTest extends BaseServiceTest {
+
+  /**
+   *
+   * @author rbhandekar
+   * @throws java.lang.Exception
+   */
+  @BeforeClass
+  public static void setUpBeforeClass() throws Exception {
+    doLogin();
+    System.out.println("\n\nMemberGatewayHubServiceTest :: Setup done");
+  }
+
+  /**
+   *
+   * @author rbhandekar
+   * @throws java.lang.Exception
+   */
+  @AfterClass
+  public static void tearDownAfterClass() throws Exception {
+    doLogout();
+    System.out.println("MemberGatewayHubServiceTest :: Teardown done");
+  }
+
+  /**
+   *
+   * @author rbhandekar
+   * @throws java.lang.Exception
+   */
+  @Override
+  @Before
+  public void setUp() throws Exception {
+  }
+
+  /**
+   *
+   * @author rbhandekar
+   * @throws java.lang.Exception
+   */
+  @Override
+  @After
+  public void tearDown() throws Exception {
+  }
+
+  /**
+   * Tests that service returns json object
+   *
+   * @author rbhandekar
+   */
+  @Test
+  public void testResponseNotNull() {
+    System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE BEGIN : NULL RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE --------");
+    if(httpclient != null){
+        try{
+            HttpUriRequest pulseupdate = RequestBuilder.post()
+                .setUri(new URI(PULSE_UPDATE_URL))
+                .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_5_VALUE)
+                .build();
+            CloseableHttpResponse response = httpclient.execute(pulseupdate);
+            try {
+              HttpEntity entity = response.getEntity();
+
+              System.out.println("MemberGatewayHubServiceTest :: HTTP request status : " + response.getStatusLine());
+              BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+              StringWriter sw = new StringWriter();
+              PrintWriter pw = new PrintWriter(sw);
+              String sz = null;
+              while((sz = respReader.readLine()) != null){
+                pw.print(sz);
+              }
+              String jsonResp = sw.getBuffer().toString();
+              System.out.println("MemberGatewayHubServiceTest :: JSON response returned : " + jsonResp);
+              EntityUtils.consume(entity);
+
+              JSONObject jsonObj = new JSONObject(jsonResp);
+              Assert.assertNotNull("MemberGatewayHubServiceTest :: Server returned null response for MemberGatewayHub", jsonObj.getJSONObject("MemberGatewayHub"));
+            } finally {
+              response.close();
+            }
+        } catch(Exception failed) {
+          logException(failed);
+          Assert.fail("Exception ! ");
+        }
+    } else {
+      Assert.fail("MemberGatewayHubServiceTest :: No Http connection was established.");
+    }
+    System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE END : NULL RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE ------\n");
+  }
+
+ /**
+  *
+  * Tests that response is for same region
+  *
+  * Test method for {@link com.vmware.gemfire.tools.pulse.internal.service.MemberGatewayHubService#execute(javax.servlet.http.HttpServletRequest)}.
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseIsGatewaySender() {
+    System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE BEGIN : IS GATEWAY SENDER IN RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE------");
+     if(httpclient != null){
+         try{
+             HttpUriRequest pulseupdate = RequestBuilder.post()
+                 .setUri(new URI(PULSE_UPDATE_URL))
+                 .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_5_VALUE)
+                 .build();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               HttpEntity entity = response.getEntity();
+
+               System.out.println("MemberGatewayHubServiceTest :: HTTP request status : " + response.getStatusLine());
+
+               BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+               StringWriter sw = new StringWriter();
+               PrintWriter pw = new PrintWriter(sw);
+               String sz = null;
+               while((sz = respReader.readLine()) != null){
+                 pw.print(sz);
+               }
+               String jsonResp = sw.getBuffer().toString();
+               System.out.println("MemberGatewayHubServiceTest :: JSON response returned : " + jsonResp);
+               EntityUtils.consume(entity);
+
+               JSONObject jsonObj = new JSONObject(jsonResp);
+               JSONObject memberGatewayHubObj = jsonObj.getJSONObject("MemberGatewayHub");
+               Assert.assertNotNull("MemberGatewayHubServiceTest :: Server returned null response for MemberGatewayHub", memberGatewayHubObj);
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'isGatewaySender' for member", memberGatewayHubObj.has("isGatewaySender"));
+               Boolean boolIsGatewaySender = memberGatewayHubObj.getBoolean("isGatewaySender");
+               Assert.assertEquals("MemberGatewayHubServiceTest :: Server returned wrong value for 'isGatewaySender'. Expected 'isGatewaySender' = true, actual 'isGatewaySender' = " + boolIsGatewaySender, boolIsGatewaySender, true);
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("MemberGatewayHubServiceTest :: No Http connection was established.");
+     }
+     System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE END : IS GATEWAY SENDER IN RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE ------\n");
+  }
+
+
+  /**
+  *
+  * Tests that response is for same region
+  *
+  * Test method for {@link com.vmware.gemfire.tools.pulse.internal.service.MemberGatewayHubService#execute(javax.servlet.http.HttpServletRequest)}.
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseGatewaySenderCount() {
+    System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE BEGIN : GATEWAY SENDER COUNT IN RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE------");
+     if(httpclient != null){
+         try{
+             HttpUriRequest pulseupdate = RequestBuilder.post()
+                 .setUri(new URI(PULSE_UPDATE_URL))
+                 .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_5_VALUE)
+                 .build();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               HttpEntity entity = response.getEntity();
+
+               System.out.println("MemberGatewayHubServiceTest :: HTTP request status : " + response.getStatusLine());
+
+               BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+               StringWriter sw = new StringWriter();
+               PrintWriter pw = new PrintWriter(sw);
+               String sz = null;
+               while((sz = respReader.readLine()) != null){
+                 pw.print(sz);
+               }
+               String jsonResp = sw.getBuffer().toString();
+               System.out.println("MemberGatewayHubServiceTest :: JSON response returned : " + jsonResp);
+               EntityUtils.consume(entity);
+
+               JSONObject jsonObj = new JSONObject(jsonResp);
+               JSONObject memberGatewayHubObj = jsonObj.getJSONObject("MemberGatewayHub");
+               Assert.assertNotNull("MemberGatewayHubServiceTest :: Server returned null response for MemberGatewayHub", memberGatewayHubObj);
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'isGatewaySender' for member", memberGatewayHubObj.has("isGatewaySender"));
+               Boolean boolIsGatewaySender = memberGatewayHubObj.getBoolean("isGatewaySender");
+
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'gatewaySenders' for member", memberGatewayHubObj.has("gatewaySenders"));
+               JSONArray arrGatewaySender = memberGatewayHubObj.getJSONArray("gatewaySenders");
+               Assert.assertNotNull("MemberGatewayHubServiceTest :: Server returned null response for 'gatewaySenders'", arrGatewaySender);
+               Assert.assertTrue( "MemberGatewayHubServiceTest :: Server returned mis-matched values for 'isGatewaySender' and gateway senders array count", ((boolIsGatewaySender && (arrGatewaySender.length() > 0)) || ((! boolIsGatewaySender) && (arrGatewaySender.length() == 0))) );
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("MemberGatewayHubServiceTest :: No Http connection was established.");
+     }
+     System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE END : GATEWAY SENDER COUNT IN RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE ------\n");
+  }
+
+  /**
+  *
+  * Tests that response is for same region
+  *
+  * Test method for {@link com.vmware.gemfire.tools.pulse.internal.service.MemberGatewayHubService#execute(javax.servlet.http.HttpServletRequest)}.
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseGatewaySenderProperties() {
+    System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE BEGIN : GATEWAY SENDER PROPERTIES IN RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE------");
+     if(httpclient != null){
+         try{
+             HttpUriRequest pulseupdate = RequestBuilder.post()
+                 .setUri(new URI(PULSE_UPDATE_URL))
+                 .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_5_VALUE)
+                 .build();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               HttpEntity entity = response.getEntity();
+
+               System.out.println("MemberGatewayHubServiceTest :: HTTP request status : " + response.getStatusLine());
+
+               BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+               StringWriter sw = new StringWriter();
+               PrintWriter pw = new PrintWriter(sw);
+               String sz = null;
+               while((sz = respReader.readLine()) != null){
+                 pw.print(sz);
+               }
+               String jsonResp = sw.getBuffer().toString();
+               System.out.println("MemberGatewayHubServiceTest :: JSON response returned : " + jsonResp);
+               EntityUtils.consume(entity);
+
+               JSONObject jsonObj = new JSONObject(jsonResp);
+               JSONObject memberGatewayHubObj = jsonObj.getJSONObject("MemberGatewayHub");
+               Assert.assertNotNull("MemberGatewayHubServiceTest :: Server returned null response for MemberGatewayHub", memberGatewayHubObj);
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'isGatewaySender' for member", memberGatewayHubObj.has("isGatewaySender"));
+               Boolean boolIsGatewaySender = memberGatewayHubObj.getBoolean("isGatewaySender");
+
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'gatewaySenders' for member", memberGatewayHubObj.has("gatewaySenders"));
+               JSONArray arrGatewaySender = memberGatewayHubObj.getJSONArray("gatewaySenders");
+               Assert.assertNotNull("MemberGatewayHubServiceTest :: Server returned null response for 'gatewaySenders'", arrGatewaySender);
+               Assert.assertTrue( "MemberGatewayHubServiceTest :: Server returned mis-matched values for 'isGatewaySender' and gateway senders array count", ((boolIsGatewaySender && (arrGatewaySender.length() > 0)) || ((! boolIsGatewaySender) && (arrGatewaySender.length() == 0))) );
+
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'remoteDSId' for member", ((JSONObject)arrGatewaySender.get(0)).has("remoteDSId"));
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'eventsExceedingAlertThreshold' for member", ((JSONObject)arrGatewaySender.get(0)).has("eventsExceedingAlertThreshold"));
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("MemberGatewayHubServiceTest :: No Http connection was established.");
+     }
+     System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE END : GATEWAY SENDER PROPERTIES IN RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE ------\n");
+  }
+
+  /**
+  *
+  * Tests that response is for same region
+  *
+  * Test method for {@link com.vmware.gemfire.tools.pulse.internal.service.MemberGatewayHubService#execute(javax.servlet.http.HttpServletRequest)}.
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseAsyncEventQueueProperties() {
+    System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE BEGIN : ASYNC EVENT QUEUE PROPERTIES IN RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE------");
+     if(httpclient != null){
+         try{
+             HttpUriRequest pulseupdate = RequestBuilder.post()
+                 .setUri(new URI(PULSE_UPDATE_URL))
+                 .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_5_VALUE)
+                 .build();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               HttpEntity entity = response.getEntity();
+
+               System.out.println("MemberGatewayHubServiceTest :: HTTP request status : " + response.getStatusLine());
+
+               BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+               StringWriter sw = new StringWriter();
+               PrintWriter pw = new PrintWriter(sw);
+               String sz = null;
+               while((sz = respReader.readLine()) != null){
+                 pw.print(sz);
+               }
+               String jsonResp = sw.getBuffer().toString();
+               System.out.println("MemberGatewayHubServiceTest :: JSON response returned : " + jsonResp);
+               EntityUtils.consume(entity);
+
+               JSONObject jsonObj = new JSONObject(jsonResp);
+               JSONObject memberGatewayHubObj = jsonObj.getJSONObject("MemberGatewayHub");
+               Assert.assertNotNull("MemberGatewayHubServiceTest :: Server returned null response for MemberGatewayHub", memberGatewayHubObj);
+
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'asyncEventQueues' for member", memberGatewayHubObj.has("asyncEventQueues"));
+               JSONArray arrAsyncEventQueues = memberGatewayHubObj.getJSONArray("asyncEventQueues");
+               Assert.assertNotNull("MemberGatewayHubServiceTest :: Server returned null response for 'asyncEventQueues'", arrAsyncEventQueues);
+
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'id' for member", ((JSONObject)arrAsyncEventQueues.get(0)).has("id"));
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'primary' for member", ((JSONObject)arrAsyncEventQueues.get(0)).has("primary"));
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'senderType' for member", ((JSONObject)arrAsyncEventQueues.get(0)).has("senderType"));
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'batchSize' for member", ((JSONObject)arrAsyncEventQueues.get(0)).has("batchSize"));
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'batchTimeInterval' for member", ((JSONObject)arrAsyncEventQueues.get(0)).has("batchTimeInterval"));
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'batchConflationEnabled' for member", ((JSONObject)arrAsyncEventQueues.get(0)).has("batchConflationEnabled"));
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'asyncEventListener' for member", ((JSONObject)arrAsyncEventQueues.get(0)).has("asyncEventListener"));
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'queueSize' for member", ((JSONObject)arrAsyncEventQueues.get(0)).has("queueSize"));
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("MemberGatewayHubServiceTest :: No Http connection was established.");
+     }
+     System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE END : ASYNC EVENT QUEUE PROPERTIES IN RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE ------\n");
+  }
+
+  /**
+  *
+  * Tests that response is for same region
+  *
+  * Test method for {@link com.vmware.gemfire.tools.pulse.internal.service.MemberGatewayHubService#execute(javax.servlet.http.HttpServletRequest)}.
+  *
+  * @author rbhandekar
+  */
+  @Test
+  public void testResponseNoAsyncEventQueues() {
+    System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE BEGIN : NO ASYNC EVENT QUEUES IN RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE------");
+     if(httpclient != null){
+         try{
+             HttpUriRequest pulseupdate = RequestBuilder.post()
+                 .setUri(new URI(PULSE_UPDATE_URL))
+                 .addParameter(PULSE_UPDATE_PARAM, PULSE_UPDATE_6_VALUE)
+                 .build();
+             CloseableHttpResponse response = httpclient.execute(pulseupdate);
+             try {
+               HttpEntity entity = response.getEntity();
+
+               System.out.println("MemberGatewayHubServiceTest :: HTTP request status : " + response.getStatusLine());
+
+               BufferedReader respReader = new BufferedReader(new InputStreamReader(entity.getContent()));
+               StringWriter sw = new StringWriter();
+               PrintWriter pw = new PrintWriter(sw);
+               String sz = null;
+               while((sz = respReader.readLine()) != null){
+                 pw.print(sz);
+               }
+               String jsonResp = sw.getBuffer().toString();
+               System.out.println("MemberGatewayHubServiceTest :: JSON response returned : " + jsonResp);
+               EntityUtils.consume(entity);
+
+               JSONObject jsonObj = new JSONObject(jsonResp);
+               JSONObject memberGatewayHubObj = jsonObj.getJSONObject("MemberGatewayHub");
+               Assert.assertNotNull("MemberGatewayHubServiceTest :: Server returned null response for MemberGatewayHub", memberGatewayHubObj);
+
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server did not return 'asyncEventQueues' for member", memberGatewayHubObj.has("asyncEventQueues"));
+               JSONArray arrAsyncEventQueues = memberGatewayHubObj.getJSONArray("asyncEventQueues");
+               Assert.assertNotNull("MemberGatewayHubServiceTest :: Server returned null response for 'asyncEventQueues'", arrAsyncEventQueues);
+               Assert.assertTrue("MemberGatewayHubServiceTest :: Server returned non-empty array for member 'pnq-visitor2' which has no event queues", (arrAsyncEventQueues.length() == 0));
+             } finally {
+               response.close();
+             }
+         } catch(Exception failed) {
+           logException(failed);
+           Assert.fail("Exception ! ");
+         }
+     } else {
+       Assert.fail("MemberGatewayHubServiceTest :: No Http connection was established.");
+     }
+     System.out.println("MemberGatewayHubServiceTest ::  ------TESTCASE END : NO ASYNC EVENT QUEUES PROPERTIES IN RESPONSE CHECK FOR MEMBER GATEWAY HUB SERVICE ------\n");
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/NoDataFound1.txt
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/NoDataFound1.txt b/gemfire-pulse/src/test/resources/NoDataFound1.txt
new file mode 100644
index 0000000..2fb180d
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/NoDataFound1.txt
@@ -0,0 +1 @@
+{"message":"No Data Found"}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/NoDataFound2.txt
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/NoDataFound2.txt b/gemfire-pulse/src/test/resources/NoDataFound2.txt
new file mode 100644
index 0000000..c22e3af
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/NoDataFound2.txt
@@ -0,0 +1,35 @@
+{"result":[
+  {"message":"No Data Found"},
+  {
+   "member":[["java.lang.String","SachinK(S1:5840)<v1>:24856"]],
+   "result":[
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]]
+    ]
+  },
+  
+  {"message":"No Data Found"},
+  
+  {"message":"No Data Found"},
+  
+  {
+   "member":[["java.lang.String","SachinK(S3:5230)<v1>:32145"]],
+   "result":[
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]]
+    ]
+  },
+  
+  {
+   "member":[["java.lang.String","SachinK(S2:7572)<v2>:14582"]],
+   "result":[
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]]
+    ]
+  },
+  
+  {"message":"No Data Found"}
+]}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/NoDataFound3.txt
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/NoDataFound3.txt b/gemfire-pulse/src/test/resources/NoDataFound3.txt
new file mode 100644
index 0000000..a6248eb
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/NoDataFound3.txt
@@ -0,0 +1,6 @@
+{"result":[
+   {"message":"No Data Found"},
+   {"message":"No Data Found"},
+   {"message":"No Data Found"},
+   {"message":"No Data Found"}
+]}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/message.txt
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/message.txt b/gemfire-pulse/src/test/resources/message.txt
new file mode 100644
index 0000000..fadced5
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/message.txt
@@ -0,0 +1 @@
+{"message":"No Data Found"}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/test.properties
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/test.properties b/gemfire-pulse/src/test/resources/test.properties
new file mode 100644
index 0000000..60d3c3f
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/test.properties
@@ -0,0 +1,307 @@
+servers=S1
+gemfirexdclusters=C1
+regions=R1 R2 R3
+tables=R1 R2
+members=M1 M2 M3
+gemfirexdmembers=M1 M2 M3
+aggregatequeries=Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 Q19 Q20 Q21 Q22 Q23 Q24 Q25
+
+server.S1.listCacheServers=true
+server.S1.listServers=M1 M2 M3
+server.S1.memberCount=3
+server.S1.numClients=2
+server.S1.distributedSystemId=1222
+server.S1.locatorCount=1
+server.S1.totalRegionCount=3
+server.S1.numRunningFunctions=12
+server.S1.registeredCQCount=10
+server.S1.numSubscriptions=9
+server.S1.TransactionCommitted=101
+server.S1.TransactionRolledBack=11
+server.S1.totalHeapSize=23222
+server.S1.usedHeapSize=10200
+server.S1.MaxMemory=24242
+server.S1.UsedMemory=10201
+server.S1.totalRegionEntryCount=2344
+server.S1.currentQueryCount=2
+server.S1.totalDiskUsage=23929
+server.S1.diskWritesRate=230
+server.S1.averageWrites=10.23
+server.S1.averageReads=90.92
+server.S1.queryRequestRate=10.29
+server.S1.diskReadsRate=56.00
+server.S1.jvmPauses=233345
+server.S1.wanInfo=C1 true C2 false
+
+gemfirexd.C1.ProcedureCallsCompleted=4
+gemfirexd.C1.ProcedureCallsInProgress=13
+gemfirexd.C1.NetworkServerClientConnectionStats=13,1,5,4
+
+member.M1.manager=true
+member.M1.totalRegionCount=3
+member.M1.locator=false
+member.M1.totalDiskUsage=199302
+member.M1.server=false
+member.M1.totalFileDescriptorOpen=299
+member.M1.loadAverage=12.221
+member.M1.diskWritesRate=23.92
+member.M1.JVMPauses=232221
+member.M1.currentHeapSize=2322
+member.M1.maximumHeapSize=700000
+member.M1.UsedMemory=2322
+member.M1.MaxMemory=700000
+member.M1.numThreads=4
+member.M1.memberUpTime=1123333
+member.M1.host=h1
+member.M1.totalBytesOnDisk=199392
+member.M1.cpuUsage=15.23
+member.M1.member=M1
+member.M1.id=M1
+member.M1.averageReads=29.2921
+member.M1.averageWrites=92.22
+member.M1.port=8821
+member.M1.OffHeapFreeSize=12325
+member.M1.OffHeapUsedSize=6532
+member.M1.OffHeapFreeMemory=54321
+member.M1.OffHeapUsedMemory=2356
+member.M1.Groups=SG1 SG2
+member.M1.RedundancyZone=RZ1 RZ2
+member.M1.Version=Java version:   7.5.Beta build 46879 04/28/2014 08:04:10 PDT
+
+gemfirexdmember.M1.DataStore=true
+gemfirexdmember.M1.NetworkServerClientConnectionStats=10,3,5,2
+
+member.M2.manager=false
+member.M2.totalRegionCount=3
+member.M2.locator=true
+member.M2.totalDiskUsage=199302
+member.M2.server=false
+member.M2.totalFileDescriptorOpen=299
+member.M2.loadAverage=12.221
+member.M2.diskWritesRate=23.92
+member.M2.JVMPauses=232221
+member.M2.currentHeapSize=1322
+member.M2.maximumHeapSize=700000
+member.M2.UsedMemory=1322
+member.M2.MaxMemory=700000
+member.M2.numThreads=3
+member.M2.memberUpTime=1123333
+member.M2.host=h2
+member.M2.totalBytesOnDisk=199392
+member.M2.cpuUsage=18.31
+member.M2.member=M2
+member.M2.id=M2
+member.M2.averageReads=29.2921
+member.M2.averageWrites=92.22
+member.M2.port=8822
+member.M2.OffHeapFreeSize=11234
+member.M2.OffHeapUsedSize=5436
+member.M2.OffHeapFreeMemory=65432
+member.M2.OffHeapUsedMemory=1235
+member.M2.Groups=SG1 SG2
+member.M2.RedundancyZone=RZ1 RZ2
+member.M2.Version=Java version:   7.5.Beta build 46879 04/28/2014 08:04:10 PDT
+
+gemfirexdmember.M2.DataStore=true
+gemfirexdmember.M2.NetworkServerClientConnectionStats=15,2,6,7
+
+member.M3.manager=false
+member.M3.totalRegionCount=1
+member.M3.locator=false
+member.M3.totalDiskUsage=199302
+member.M3.server=false
+member.M3.totalFileDescriptorOpen=299
+member.M3.loadAverage=12.221
+member.M3.diskWritesRate=23.92
+member.M3.JVMPauses=232221
+member.M3.currentHeapSize=2312
+member.M3.maximumHeapSize=700000
+member.M3.UsedMemory=2312
+member.M3.MaxMemory=700000
+member.M3.numThreads=4
+member.M3.memberUpTime=1123333
+member.M3.host=h3
+member.M3.totalBytesOnDisk=199392
+member.M3.cpuUsage=16.02
+member.M3.member=M3
+member.M3.id=M3
+member.M3.averageReads=29.2921
+member.M3.averageWrites=92.22
+member.M3.port=8823
+member.M3.OffHeapFreeSize=21321
+member.M3.OffHeapUsedSize=3456
+member.M3.OffHeapFreeMemory=76543
+member.M3.OffHeapUsedMemory=2468
+member.M3.Groups=SG1 SG3
+member.M3.RedundancyZone=RZ2
+member.M3.Version=Java version:   7.5.Beta build 46879 04/28/2014 08:04:10 PDT
+
+gemfirexdmember.M3.DataStore=false
+gemfirexdmember.M3.NetworkServerClientConnectionStats=9,5,4,0
+
+table.R1.EntrySize=1234
+table.R1.NumberOfRows=23
+
+region.R1.members=M1 M2 M3
+region.R1.fullPath=/R1
+region.R1.diskReadsRate=21.32
+region.R1.diskWritesRate=26.32
+region.R1.emptyNodes=0
+region.R1.getsRate=20.33
+region.R1.lruEvictionRate=23.44
+region.R1.putsRate=30.22
+region.R1.regionType=PERSISTENT
+region.R1.entrySize=23399200
+region.R1.systemRegionEntryCount=20020
+region.R1.memberCount=3
+region.R1.persistentEnabled=true
+region.R1.name=/R1
+region.R1.gatewayEnabled=false
+region.R1.diskUsage=200200
+#region.R1.scope=local
+#region.R1.diskStoreName=TestDiskStore
+#region.R1.diskSynchronous=false
+# operations
+# listRegionAttributes operation should values for return 
+# String compressionCodec, boolean enableOffHeapMemory, boolean hdfsWriteOnly,
+# String scope, String diskStoreName, boolean diskSynchronous
+region.R1.listRegionAttributes=comp-Codec,true,true,local,TestDiskStoreLcl,false
+
+
+regionOnMember./R1.M1.fullPath=/R1
+regionOnMember./R1.M1.memberName=M1
+regionOnMember./R1.M1.name=/R1
+regionOnMember./R1.M1.regionType=PERSISTENT
+regionOnMember./R1.M1.entrySize=21
+regionOnMember./R1.M1.entryCount=26
+regionOnMember./R1.M1.getsRate=10.50
+regionOnMember./R1.M1.putsRate=20.33
+regionOnMember./R1.M1.diskGetsRate=23.44
+regionOnMember./R1.M1.diskPutsRate=30.22
+regionOnMember./R1.M1.localMaxMemory=0
+
+regionOnMember./R1.M2.fullPath=/R1
+regionOnMember./R1.M2.memberName=M2
+regionOnMember./R1.M2.name=/R1
+regionOnMember./R1.M2.regionType=PERSISTENT
+regionOnMember./R1.M2.entrySize=215
+regionOnMember./R1.M2.entryCount=30
+regionOnMember./R1.M2.getsRate=15.50
+regionOnMember./R1.M2.putsRate=25.33
+regionOnMember./R1.M2.diskGetsRate=33.44
+regionOnMember./R1.M2.diskPutsRate=55.22
+regionOnMember./R1.M2.localMaxMemory=10
+
+regionOnMember./R1.M3.fullPath=/R1
+regionOnMember./R1.M3.memberName=M3
+regionOnMember./R1.M3.name=/R1
+regionOnMember./R1.M3.regionType=PERSISTENT
+regionOnMember./R1.M3.entrySize=28
+regionOnMember./R1.M3.entryCount=70
+regionOnMember./R1.M3.getsRate=19.50
+regionOnMember./R1.M3.putsRate=21.33
+regionOnMember./R1.M3.diskGetsRate=20.44
+regionOnMember./R1.M3.diskPutsRate=32.22
+regionOnMember./R1.M3.localMaxMemory=0
+
+
+table.R2.EntrySize=4321
+table.R2.NumberOfRows=32
+
+region.R2.members=M1 M2 
+region.R2.fullPath=/R2
+region.R2.diskReadsRate=21.32
+region.R2.diskWritesRate=26.32
+region.R2.emptyNodes=0
+region.R2.getsRate=20.33
+region.R2.lruEvictionRate=23.44
+region.R2.putsRate=30.22
+region.R2.regionType=REPLICATED
+region.R2.entrySize=23399200
+region.R2.systemRegionEntryCount=20020
+region.R2.memberCount=2
+region.R2.persistentEnabled=true
+region.R2.name=/R2
+region.R2.gatewayEnabled=false
+region.R2.diskUsage=200200
+#region.R2.scope=global
+#region.R2.diskStoreName=TestDiskStore
+#region.R2.diskSynchronous=true
+# operations
+# listRegionAttributes operation should values for return 
+# string compressionCodec, boolean enableOffHeapMemory, boolean hdfsWriteOnly
+# String scope, String diskStoreName, boolean diskSynchronous
+region.R2.listRegionAttributes=comp-Codec,true,false,global,TestDiskStoreGbl,true
+
+regionOnMember./R2.M1.fullPath=/R2
+regionOnMember./R2.M1.memberName=M1
+regionOnMember./R2.M1.name=/R2
+regionOnMember./R2.M1.regionType=REPLICATED
+regionOnMember./R2.M1.entrySize=21
+regionOnMember./R2.M1.entryCount=26
+regionOnMember./R2.M1.getsRate=10.50
+regionOnMember./R2.M1.putsRate=20.33
+regionOnMember./R2.M1.diskGetsRate=23.44
+regionOnMember./R2.M1.diskPutsRate=30.22
+regionOnMember./R2.M1.localMaxMemory=0
+
+regionOnMember./R2.M2.fullPath=/R2
+regionOnMember./R2.M2.memberName=M2
+regionOnMember./R2.M2.name=/R2
+regionOnMember./R2.M2.regionType=REPLICATED
+regionOnMember./R2.M2.entrySize=215
+regionOnMember./R2.M2.entryCount=30
+regionOnMember./R2.M2.getsRate=15.50
+regionOnMember./R2.M2.putsRate=25.33
+regionOnMember./R2.M2.diskGetsRate=33.44
+regionOnMember./R2.M2.diskPutsRate=55.22
+regionOnMember./R2.M2.localMaxMemory=10
+
+region.R3.members=M1 M2
+region.R3.fullPath=/R3
+region.R3.diskReadsRate=21.32
+region.R3.diskWritesRate=26.32
+region.R3.emptyNodes=0
+region.R3.getsRate=20.33
+region.R3.lruEvictionRate=23.44
+region.R3.putsRate=30.22
+region.R3.regionType=PERSISTENT
+region.R3.entrySize=23399200
+region.R3.systemRegionEntryCount=20
+region.R3.memberCount=2
+region.R3.persistentEnabled=true
+region.R3.name=/R3
+region.R3.gatewayEnabled=false
+region.R3.diskUsage=200200
+#region.R3.scope=local
+#region.R3.diskStoreName=TestDiskStore
+#region.R3.diskSynchronous=false
+# operations
+# listRegionAttributes operation should values for return 
+# String compressionCodec, boolean enableOffHeapMemory, boolean hdfsWriteOnly,
+# String scope, String diskStoreName, boolean diskSynchronous
+region.R3.listRegionAttributes=comp-Codec,true,true,local,TestDiskStoreLcl,false
+
+regionOnMember./R3.M1.fullPath=/R3
+regionOnMember./R3.M1.memberName=M1
+regionOnMember./R3.M1.name=/R3
+regionOnMember./R3.M1.regionType=PERSISTENT
+regionOnMember./R3.M1.entrySize=21
+regionOnMember./R3.M1.entryCount=26
+regionOnMember./R3.M1.getsRate=10.50
+regionOnMember./R3.M1.putsRate=20.33
+regionOnMember./R3.M1.diskGetsRate=23.44
+regionOnMember./R3.M1.diskPutsRate=30.22
+regionOnMember./R3.M1.localMaxMemory=20
+
+regionOnMember./R3.M2.fullPath=/R3
+regionOnMember./R3.M2.memberName=M2
+regionOnMember./R3.M2.name=/R3
+regionOnMember./R3.M2.regionType=PERSISTENT
+regionOnMember./R3.M2.entrySize=215
+regionOnMember./R3.M2.entryCount=30
+regionOnMember./R3.M2.getsRate=18.6
+regionOnMember./R3.M2.putsRate=45.33
+regionOnMember./R3.M2.diskGetsRate=38.44
+regionOnMember./R3.M2.diskPutsRate=50.22
+regionOnMember./R3.M2.localMaxMemory=10

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/test1.txt
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/test1.txt b/gemfire-pulse/src/test/resources/test1.txt
new file mode 100644
index 0000000..3f25ee9
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/test1.txt
@@ -0,0 +1,5 @@
+{"result":[
+ ["java.lang.Integer",45],
+ ["java.lang.Integer",12],
+ ["java.lang.Integer",34]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/test2.txt
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/test2.txt b/gemfire-pulse/src/test/resources/test2.txt
new file mode 100644
index 0000000..5d482aa
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/test2.txt
@@ -0,0 +1,7 @@
+{"result":[
+ ["java.lang.Integer",45],
+ ["java.lang.Integer",12],
+ ["java.lang.Integer",34],
+ ["String","anystring"],
+ ["String","anotherstring"]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/test3.txt
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/test3.txt b/gemfire-pulse/src/test/resources/test3.txt
new file mode 100644
index 0000000..3c30fc6
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/test3.txt
@@ -0,0 +1,5 @@
+{"result":[
+ ["int[]",[1000,1010,1020]],
+ ["int[]",[2000,2010,2020,2030]],
+ ["int[]",[3000,3010]]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/test4.txt
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/test4.txt b/gemfire-pulse/src/test/resources/test4.txt
new file mode 100644
index 0000000..ad13b06
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/test4.txt
@@ -0,0 +1,4 @@
+{"result":[
+ ["java.util.ArrayList",{"0":["java.lang.String","seeta"],"1":["java.lang.String","geeta"],"2":["java.lang.String","meeta"]}],
+ ["java.util.ArrayList",{"0":["java.lang.String","sonu"],"1":["java.lang.String","monu"],"2":["java.lang.String","chinu"]}]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/test5.txt
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/test5.txt b/gemfire-pulse/src/test/resources/test5.txt
new file mode 100644
index 0000000..4fa441c
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/test5.txt
@@ -0,0 +1,7 @@
+{"result":[
+ ["java.util.ArrayList",{
+   "0":["java.lang.String[]",["one","two","three"]],
+   "1":["java.lang.String[]",["ek","do","teen"]],
+   "2":["java.lang.String[]",["one","two","three"]]
+ }]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/446f451a/gemfire-pulse/src/test/resources/test6.txt
----------------------------------------------------------------------
diff --git a/gemfire-pulse/src/test/resources/test6.txt b/gemfire-pulse/src/test/resources/test6.txt
new file mode 100644
index 0000000..41a90b6
--- /dev/null
+++ b/gemfire-pulse/src/test/resources/test6.txt
@@ -0,0 +1,11 @@
+{"result":[
+  {"member":[["java.lang.String","pc68(7930)<v9>:30319"]],
+   "result":[
+     ["com.gemstone.gemfire.cache.query.data.PortfolioDummy[]",[
+      {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["j
 ava.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]},
+	    {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}
+	   ]]
+    ]
+  }
+ ]
+}
\ No newline at end of file


Mime
View raw message