geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zho...@apache.org
Subject [33/50] [abbrv] geode git commit: GEODE-3271: Renaming punePort variables, refactoring WANCommandsTestBase
Date Sat, 29 Jul 2017 00:52:44 GMT
GEODE-3271: Renaming punePort variables, refactoring WANCommandsTestBase

This closes #647


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/c62764b5
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/c62764b5
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/c62764b5

Branch: refs/heads/feature/GEM-1483
Commit: c62764b5affc137c9e5a6dc6d076678e36f9d17e
Parents: e1befef
Author: YehEmily <emilyyeh1997@gmail.com>
Authored: Fri Jul 21 16:44:55 2017 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Wed Jul 26 15:39:46 2017 -0700

----------------------------------------------------------------------
 ...ndDestroyGatewaySenderCommandsDUnitTest.java |  96 +++++++--------
 .../CreateGatewayReceiverCommandDUnitTest.java  | 120 +++++++++----------
 .../CreateGatewaySenderCommandDUnitTest.java    |  24 ++--
 .../DestroyGatewaySenderCommandDUnitTest.java   |  12 +-
 .../PauseGatewaySenderCommandDUnitTest.java     |  56 ++++-----
 .../ResumeGatewaySenderCommandDUnitTest.java    |  56 ++++-----
 .../StartGatewayReceiverCommandDUnitTest.java   |  62 +++++-----
 .../StartGatewaySenderCommandDUnitTest.java     |  68 +++++------
 .../StopGatewayReceiverCommandDUnitTest.java    |  62 +++++-----
 .../StopGatewaySenderCommandDUnitTest.java      |  56 ++++-----
 .../wan/wancommand/WANCommandTestBase.java      |  64 +++-------
 .../wan/wancommand/WanCommandListDUnitTest.java |  49 ++++----
 .../management/WANManagementDUnitTest.java      |  58 +++++----
 .../pulse/TestRemoteClusterDUnitTest.java       |  39 +++---
 14 files changed, 396 insertions(+), 426 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateAndDestroyGatewaySenderCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateAndDestroyGatewaySenderCommandsDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateAndDestroyGatewaySenderCommandsDUnitTest.java
index ab0a355..f89ca29 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateAndDestroyGatewaySenderCommandsDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateAndDestroyGatewaySenderCommandsDUnitTest.java
@@ -44,13 +44,13 @@ public class CreateAndDestroyGatewaySenderCommandsDUnitTest extends WANCommandTe
    */
   @Test
   public void testCreateDestroyGatewaySenderWithDefault() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
         + "=ln" + " --" + CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID + "=2";
@@ -82,13 +82,13 @@ public class CreateAndDestroyGatewaySenderCommandsDUnitTest extends WANCommandTe
    */
   @Test
   public void testCreateDestroyGatewaySender() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
@@ -139,13 +139,13 @@ public class CreateAndDestroyGatewaySenderCommandsDUnitTest extends WANCommandTe
    */
   @Test
   public void testCreateDestroyGatewaySenderWithGatewayEventFilters() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
@@ -203,13 +203,13 @@ public class CreateAndDestroyGatewaySenderCommandsDUnitTest extends WANCommandTe
    */
   @Test
   public void testCreateDestroyGatewaySenderWithGatewayTransportFilters() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
@@ -267,13 +267,13 @@ public class CreateAndDestroyGatewaySenderCommandsDUnitTest extends WANCommandTe
    */
   @Test
   public void testCreateDestroyGatewaySender_OnMember() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     final DistributedMember vm3Member = vm3.invoke(this::getMember);
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
@@ -320,13 +320,13 @@ public class CreateAndDestroyGatewaySenderCommandsDUnitTest extends WANCommandTe
    */
   @Test
   public void testCreateDestroyGatewaySender_Group() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
@@ -374,13 +374,13 @@ public class CreateAndDestroyGatewaySenderCommandsDUnitTest extends WANCommandTe
    */
   @Test
   public void testCreateDestroyGatewaySender_Group_Scenario2() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup2"));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup2"));
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
@@ -425,13 +425,13 @@ public class CreateAndDestroyGatewaySenderCommandsDUnitTest extends WANCommandTe
    */
   @Test
   public void testCreateDestroyParallelGatewaySender() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewayReceiverCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewayReceiverCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewayReceiverCommandDUnitTest.java
index 5fb18a5..af27a60 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewayReceiverCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewayReceiverCommandDUnitTest.java
@@ -50,13 +50,13 @@ public class CreateGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testCreateGatewayReceiverWithDefault() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     String command = CliStrings.CREATE_GATEWAYRECEIVER;
     CommandResult cmdResult = executeCommand(command);
@@ -96,13 +96,13 @@ public class CreateGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testCreateGatewayReceiver() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     String command =
         CliStrings.CREATE_GATEWAYRECEIVER + " --" + CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART
@@ -141,13 +141,13 @@ public class CreateGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testCreateGatewayReceiverWithGatewayTransportFilter() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     String command =
         CliStrings.CREATE_GATEWAYRECEIVER + " --" + CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART
@@ -191,13 +191,13 @@ public class CreateGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testCreateGatewayReceiverWithMultipleGatewayTransportFilters() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     String command = CliStrings.CREATE_GATEWAYRECEIVER + " --"
         + CliStrings.CREATE_GATEWAYRECEIVER__BINDADDRESS + "=localhost" + " --"
@@ -241,13 +241,13 @@ public class CreateGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testCreateGatewayReceiver_Error() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     String command =
         CliStrings.CREATE_GATEWAYRECEIVER + " --" + CliStrings.CREATE_GATEWAYRECEIVER__BINDADDRESS
@@ -280,13 +280,13 @@ public class CreateGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testCreateGatewayReceiver_onMember() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     final DistributedMember vm3Member = vm3.invoke(this::getMember);
 
@@ -325,13 +325,13 @@ public class CreateGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testCreateGatewayReceiver_onMultipleMembers() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     final DistributedMember vm3Member = vm3.invoke(this::getMember);
     final DistributedMember vm4Member = vm4.invoke(this::getMember);
@@ -372,13 +372,13 @@ public class CreateGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testCreateGatewayReceiver_onGroup() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "receiverGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "receiverGroup1"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "receiverGroup1"));
 
     String command =
         CliStrings.CREATE_GATEWAYRECEIVER + " --" + CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART
@@ -420,13 +420,13 @@ public class CreateGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testCreateGatewayReceiver_onGroup_Scenario2() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "receiverGroup2"));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "receiverGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "receiverGroup1"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "receiverGroup2"));
 
     String command =
         CliStrings.CREATE_GATEWAYRECEIVER + " --" + CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART
@@ -464,13 +464,13 @@ public class CreateGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testCreateGatewayReceiver_onMultipleGroups() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "receiverGroup2"));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "receiverGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "receiverGroup1"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "receiverGroup2"));
 
     String command =
         CliStrings.CREATE_GATEWAYRECEIVER + " --" + CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewaySenderCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewaySenderCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewaySenderCommandDUnitTest.java
index 5132ef5..15c7d38 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewaySenderCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewaySenderCommandDUnitTest.java
@@ -43,13 +43,13 @@ public class CreateGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testCreateGatewaySender_Error() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
@@ -89,13 +89,13 @@ public class CreateGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testCreateParallelGatewaySender_Error() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/DestroyGatewaySenderCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/DestroyGatewaySenderCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/DestroyGatewaySenderCommandDUnitTest.java
index 6ec0d72..5310be7 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/DestroyGatewaySenderCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/DestroyGatewaySenderCommandDUnitTest.java
@@ -36,13 +36,13 @@ import org.apache.geode.test.junit.categories.DistributedTest;
 public class DestroyGatewaySenderCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testDestroyGatewaySender_NotCreatedSender() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     // Test Destroy Command
     String command =

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/PauseGatewaySenderCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/PauseGatewaySenderCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/PauseGatewaySenderCommandDUnitTest.java
index c97b0ae..246ff97 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/PauseGatewaySenderCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/PauseGatewaySenderCommandDUnitTest.java
@@ -37,11 +37,11 @@ import org.apache.geode.test.junit.categories.DistributedTest;
 public class PauseGatewaySenderCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testPauseGatewaySender_ErrorConditions() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
 
     final DistributedMember vm1Member = vm3.invoke(this::getMember);
@@ -65,11 +65,11 @@ public class PauseGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testPauseGatewaySender_onMember() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm3.invoke(() -> verifySenderState("ln", true, false));
@@ -93,15 +93,15 @@ public class PauseGatewaySenderCommandDUnitTest extends WANCommandTestBase {
 
   @Test
   public void testPauseGatewaySender() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCache(punePort));
+    vm4.invoke(() -> createCache(dsIdPort));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCache(punePort));
+    vm5.invoke(() -> createCache(dsIdPort));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm4.invoke(() -> startSender("ln"));
@@ -137,15 +137,15 @@ public class PauseGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testPauseGatewaySender_Group() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm4.invoke(() -> startSender("ln"));
@@ -182,19 +182,19 @@ public class PauseGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testPauseGatewaySender_MultipleGroup() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1, SenderGroup2"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1, SenderGroup2"));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm6.invoke(() -> createCacheWithGroups(punePort, "SenderGroup2"));
+    vm6.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup2"));
     vm6.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm7.invoke(() -> createCacheWithGroups(punePort, "SenderGroup3"));
+    vm7.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup3"));
     vm7.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm4.invoke(() -> startSender("ln"));

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/ResumeGatewaySenderCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/ResumeGatewaySenderCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/ResumeGatewaySenderCommandDUnitTest.java
index 61d512f..09aa627 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/ResumeGatewaySenderCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/ResumeGatewaySenderCommandDUnitTest.java
@@ -38,11 +38,11 @@ import org.apache.geode.test.junit.categories.DistributedTest;
 public class ResumeGatewaySenderCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testResumeGatewaySender_ErrorConditions() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
 
     final DistributedMember vm1Member = vm3.invoke(this::getMember);
@@ -64,15 +64,15 @@ public class ResumeGatewaySenderCommandDUnitTest extends WANCommandTestBase {
 
   @Test
   public void testResumeGatewaySender() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCache(punePort));
+    vm4.invoke(() -> createCache(dsIdPort));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCache(punePort));
+    vm5.invoke(() -> createCache(dsIdPort));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm4.invoke(() -> startSender("ln"));
@@ -114,11 +114,11 @@ public class ResumeGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testResumeGatewaySender_onMember() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm3.invoke(() -> verifySenderState("ln", true, false));
@@ -146,15 +146,15 @@ public class ResumeGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testResumeGatewaySender_Group() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
 
     vm3.invoke(() -> startSender("ln"));
@@ -202,19 +202,19 @@ public class ResumeGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testResumeGatewaySender_MultipleGroup() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1, SenderGroup2"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1, SenderGroup2"));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm6.invoke(() -> createCacheWithGroups(punePort, "SenderGroup2"));
+    vm6.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup2"));
     vm6.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm7.invoke(() -> createCacheWithGroups(punePort, "SenderGroup3"));
+    vm7.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup3"));
     vm7.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm4.invoke(() -> startSender("ln"));

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewayReceiverCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewayReceiverCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewayReceiverCommandDUnitTest.java
index e84b8e3..5794d3a 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewayReceiverCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewayReceiverCommandDUnitTest.java
@@ -45,11 +45,11 @@ public class StartGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewayReceiver_ErrorConditions() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createReceiver(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createReceiver(dsIdPort));
 
     final DistributedMember vm1Member = vm3.invoke(this::getMember);
     String command = CliStrings.START_GATEWAYRECEIVER + " --" + CliStrings.MEMBER + "="
@@ -71,13 +71,13 @@ public class StartGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewayReceiver() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createReceiver(punePort));
-    vm4.invoke(() -> createReceiver(punePort));
-    vm5.invoke(() -> createReceiver(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createReceiver(dsIdPort));
+    vm4.invoke(() -> createReceiver(dsIdPort));
+    vm5.invoke(() -> createReceiver(dsIdPort));
     vm3.invoke(() -> verifyReceiverState(false));
     vm4.invoke(() -> verifyReceiverState(false));
     vm5.invoke(() -> verifyReceiverState(false));
@@ -107,13 +107,13 @@ public class StartGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewayReceiver_onMember() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createReceiver(punePort));
-    vm4.invoke(() -> createReceiver(punePort));
-    vm5.invoke(() -> createReceiver(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createReceiver(dsIdPort));
+    vm4.invoke(() -> createReceiver(dsIdPort));
+    vm5.invoke(() -> createReceiver(dsIdPort));
     vm3.invoke(() -> verifyReceiverState(false));
     vm4.invoke(() -> verifyReceiverState(false));
     vm5.invoke(() -> verifyReceiverState(false));
@@ -144,13 +144,13 @@ public class StartGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewayReceiver_Group() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createReceiverWithGroup(punePort, "RG1"));
-    vm4.invoke(() -> createReceiverWithGroup(punePort, "RG1"));
-    vm5.invoke(() -> createReceiverWithGroup(punePort, "RG1"));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createReceiverWithGroup(dsIdPort, "RG1"));
+    vm4.invoke(() -> createReceiverWithGroup(dsIdPort, "RG1"));
+    vm5.invoke(() -> createReceiverWithGroup(dsIdPort, "RG1"));
     vm3.invoke(() -> verifyReceiverState(false));
     vm4.invoke(() -> verifyReceiverState(false));
     vm5.invoke(() -> verifyReceiverState(false));
@@ -184,15 +184,15 @@ public class StartGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewayReceiver_MultipleGroup() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createReceiverWithGroup(punePort, "RG1"));
-    vm4.invoke(() -> createReceiverWithGroup(punePort, "RG1"));
-    vm5.invoke(() -> createReceiverWithGroup(punePort, "RG1, RG2"));
-    vm6.invoke(() -> createReceiverWithGroup(punePort, "RG1, RG2"));
-    vm7.invoke(() -> createReceiverWithGroup(punePort, "RG3"));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createReceiverWithGroup(dsIdPort, "RG1"));
+    vm4.invoke(() -> createReceiverWithGroup(dsIdPort, "RG1"));
+    vm5.invoke(() -> createReceiverWithGroup(dsIdPort, "RG1, RG2"));
+    vm6.invoke(() -> createReceiverWithGroup(dsIdPort, "RG1, RG2"));
+    vm7.invoke(() -> createReceiverWithGroup(dsIdPort, "RG3"));
     vm3.invoke(() -> verifyReceiverState(false));
     vm4.invoke(() -> verifyReceiverState(false));
     vm5.invoke(() -> verifyReceiverState(false));

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewaySenderCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewaySenderCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewaySenderCommandDUnitTest.java
index 57b3072..2f8e96b 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewaySenderCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewaySenderCommandDUnitTest.java
@@ -42,11 +42,11 @@ public class StartGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testStartGatewaySender_ErrorConditions() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
 
     final DistributedMember vm1Member = vm3.invoke(this::getMember);
@@ -67,15 +67,15 @@ public class StartGatewaySenderCommandDUnitTest extends WANCommandTestBase {
 
   @Test
   public void testStartGatewaySender() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCache(punePort));
+    vm4.invoke(() -> createCache(dsIdPort));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCache(punePort));
+    vm5.invoke(() -> createCache(dsIdPort));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> verifySenderState("ln", false, false));
     vm4.invoke(() -> verifySenderState("ln", false, false));
@@ -108,11 +108,11 @@ public class StartGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testStartGatewaySender_onMember() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> verifySenderState("ln", false, false));
 
@@ -138,15 +138,15 @@ public class StartGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testStartGatewaySender_Group() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> verifySenderState("ln", false, false));
     vm4.invoke(() -> verifySenderState("ln", false, false));
@@ -180,19 +180,19 @@ public class StartGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testStartGatewaySender_MultipleGroup() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1, SenderGroup2"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1, SenderGroup2"));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm6.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1, SenderGroup2"));
+    vm6.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1, SenderGroup2"));
     vm6.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm7.invoke(() -> createCacheWithGroups(punePort, "SenderGroup3"));
+    vm7.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup3"));
     vm7.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> verifySenderState("ln", false, false));
     vm4.invoke(() -> verifySenderState("ln", false, false));
@@ -229,14 +229,14 @@ public class StartGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testStartGatewaySender_Group_MissingSenderFromGroup() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> verifySenderState("ln", false, false));
     vm5.invoke(() -> verifySenderState("ln", false, false));

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StopGatewayReceiverCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StopGatewayReceiverCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StopGatewayReceiverCommandDUnitTest.java
index 70b94be..dd29fb0 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StopGatewayReceiverCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StopGatewayReceiverCommandDUnitTest.java
@@ -45,11 +45,11 @@ public class StopGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewayReceiver_ErrorConditions() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createReceiver(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createReceiver(dsIdPort));
 
     final DistributedMember vm1Member = vm3.invoke(this::getMember);
     String command = CliStrings.STOP_GATEWAYRECEIVER + " --" + CliStrings.MEMBER + "="
@@ -70,13 +70,13 @@ public class StopGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewayReceiver() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createAndStartReceiver(punePort));
-    vm4.invoke(() -> createAndStartReceiver(punePort));
-    vm5.invoke(() -> createAndStartReceiver(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createAndStartReceiver(dsIdPort));
+    vm4.invoke(() -> createAndStartReceiver(dsIdPort));
+    vm5.invoke(() -> createAndStartReceiver(dsIdPort));
     vm3.invoke(() -> verifyReceiverState(true));
     vm4.invoke(() -> verifyReceiverState(true));
     vm5.invoke(() -> verifyReceiverState(true));
@@ -106,13 +106,13 @@ public class StopGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewayReceiver_onMember() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createAndStartReceiver(punePort));
-    vm4.invoke(() -> createAndStartReceiver(punePort));
-    vm5.invoke(() -> createAndStartReceiver(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createAndStartReceiver(dsIdPort));
+    vm4.invoke(() -> createAndStartReceiver(dsIdPort));
+    vm5.invoke(() -> createAndStartReceiver(dsIdPort));
     vm3.invoke(() -> verifyReceiverState(true));
     vm4.invoke(() -> verifyReceiverState(true));
     vm5.invoke(() -> verifyReceiverState(true));
@@ -142,13 +142,13 @@ public class StopGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewayReceiver_Group() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1"));
-    vm4.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1"));
-    vm5.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1"));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createAndStartReceiverWithGroup(dsIdPort, "RG1"));
+    vm4.invoke(() -> createAndStartReceiverWithGroup(dsIdPort, "RG1"));
+    vm5.invoke(() -> createAndStartReceiverWithGroup(dsIdPort, "RG1"));
     vm3.invoke(() -> verifyReceiverState(true));
     vm4.invoke(() -> verifyReceiverState(true));
     vm5.invoke(() -> verifyReceiverState(true));
@@ -182,15 +182,15 @@ public class StopGatewayReceiverCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewayReceiver_MultipleGroup() {
     VM puneLocator = Host.getLocator();
-    int punePort = puneLocator.invoke(this::getLocatorPort);
-    propsSetUp(punePort);
-
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1"));
-    vm4.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1"));
-    vm5.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1"));
-    vm6.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1, RG2"));
-    vm7.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG3"));
+    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
+    propsSetUp(dsIdPort);
+
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createAndStartReceiverWithGroup(dsIdPort, "RG1"));
+    vm4.invoke(() -> createAndStartReceiverWithGroup(dsIdPort, "RG1"));
+    vm5.invoke(() -> createAndStartReceiverWithGroup(dsIdPort, "RG1"));
+    vm6.invoke(() -> createAndStartReceiverWithGroup(dsIdPort, "RG1, RG2"));
+    vm7.invoke(() -> createAndStartReceiverWithGroup(dsIdPort, "RG3"));
     vm3.invoke(() -> verifyReceiverState(true));
     vm4.invoke(() -> verifyReceiverState(true));
     vm5.invoke(() -> verifyReceiverState(true));

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StopGatewaySenderCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StopGatewaySenderCommandDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StopGatewaySenderCommandDUnitTest.java
index 53dd6cf..ac43e1b 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StopGatewaySenderCommandDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/StopGatewaySenderCommandDUnitTest.java
@@ -38,11 +38,11 @@ import org.apache.geode.test.junit.categories.DistributedTest;
 public class StopGatewaySenderCommandDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewaySender_ErrorConditions() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
 
     final DistributedMember vm1Member = vm3.invoke(this::getMember);
@@ -62,15 +62,15 @@ public class StopGatewaySenderCommandDUnitTest extends WANCommandTestBase {
 
   @Test
   public void testStopGatewaySender() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCache(punePort));
+    vm4.invoke(() -> createCache(dsIdPort));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCache(punePort));
+    vm5.invoke(() -> createCache(dsIdPort));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm4.invoke(() -> startSender("ln"));
@@ -105,11 +105,11 @@ public class StopGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testStopGatewaySender_onMember() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCache(punePort));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm3.invoke(() -> verifySenderState("ln", true, false));
@@ -135,15 +135,15 @@ public class StopGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testStopGatewaySender_Group() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm4.invoke(() -> startSender("ln"));
@@ -179,19 +179,19 @@ public class StopGatewaySenderCommandDUnitTest extends WANCommandTestBase {
    */
   @Test
   public void testStopGatewaySender_MultipleGroup() {
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
-    propsSetUp(punePort);
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    propsSetUp(dsIdPort);
 
-    vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
-    vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
+    vm3.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
+    vm4.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1"));
     vm4.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm5.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1, SenderGroup2"));
+    vm5.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup1, SenderGroup2"));
     vm5.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm6.invoke(() -> createCacheWithGroups(punePort, "SenderGroup2"));
+    vm6.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup2"));
     vm6.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
-    vm7.invoke(() -> createCacheWithGroups(punePort, "SenderGroup3"));
+    vm7.invoke(() -> createCacheWithGroups(dsIdPort, "SenderGroup3"));
     vm7.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
     vm3.invoke(() -> startSender("ln"));
     vm4.invoke(() -> startSender("ln"));

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WANCommandTestBase.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WANCommandTestBase.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WANCommandTestBase.java
index 8229745..1e67093 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WANCommandTestBase.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WANCommandTestBase.java
@@ -186,13 +186,8 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
     final IgnoredException exln = IgnoredException.addIgnoredException("Could not connect");
     try {
       Set<GatewaySender> senders = cache.getGatewaySenders();
-      GatewaySender sender = null;
-      for (GatewaySender s : senders) {
-        if (s.getId().equals(senderId)) {
-          sender = s;
-          break;
-        }
-      }
+      AbstractGatewaySender sender = (AbstractGatewaySender) senders.stream()
+          .filter(s -> s.getId().equalsIgnoreCase(senderId)).findFirst().orElse(null);
       sender.start();
     } finally {
       exln.remove();
@@ -203,13 +198,8 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
     final IgnoredException exln = IgnoredException.addIgnoredException("Could not connect");
     try {
       Set<GatewaySender> senders = cache.getGatewaySenders();
-      GatewaySender sender = null;
-      for (GatewaySender s : senders) {
-        if (s.getId().equals(senderId)) {
-          sender = s;
-          break;
-        }
-      }
+      AbstractGatewaySender sender = (AbstractGatewaySender) senders.stream()
+          .filter(s -> s.getId().equalsIgnoreCase(senderId)).findFirst().orElse(null);
       sender.pause();
     } finally {
       exln.remove();
@@ -337,14 +327,8 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
     final IgnoredException exln = IgnoredException.addIgnoredException("Could not connect");
     try {
       Set<GatewaySender> senders = cache.getGatewaySenders();
-      AbstractGatewaySender sender = null;
-      for (GatewaySender s : senders) {
-        if (s.getId().equals(senderId)) {
-          sender = (AbstractGatewaySender) s;
-          break;
-        }
-      }
-
+      AbstractGatewaySender sender = (AbstractGatewaySender) senders.stream()
+          .filter(s -> s.getId().equalsIgnoreCase(senderId)).findFirst().orElse(null);
       assertEquals(isRunning, sender.isRunning());
       assertEquals(isPaused, sender.isPaused());
     } finally {
@@ -360,13 +344,8 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
       List<String> expectedGatewayTransportFilters) {
 
     Set<GatewaySender> senders = cache.getGatewaySenders();
-    AbstractGatewaySender sender = null;
-    for (GatewaySender s : senders) {
-      if (s.getId().equals(senderId)) {
-        sender = (AbstractGatewaySender) s;
-        break;
-      }
-    }
+    AbstractGatewaySender sender = (AbstractGatewaySender) senders.stream()
+        .filter(s -> s.getId().equalsIgnoreCase(senderId)).findFirst().orElse(null);
     assertEquals("remoteDistributedSystemId", remoteDsID, sender.getRemoteDSId());
     assertEquals("isParallel", isParallel, sender.isParallel());
     assertEquals("manualStart", manualStart, sender.isManualStart());
@@ -469,13 +448,8 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
 
   public static void verifySenderDestroyed(String senderId, boolean isParallel) {
     Set<GatewaySender> senders = cache.getGatewaySenders();
-    AbstractGatewaySender sender = null;
-    for (GatewaySender s : senders) {
-      if (s.getId().equals(senderId)) {
-        sender = (AbstractGatewaySender) s;
-        break;
-      }
-    }
+    AbstractGatewaySender sender = (AbstractGatewaySender) senders.stream()
+        .filter(s -> s.getId().equalsIgnoreCase(senderId)).findFirst().orElse(null);
     assertNull(sender);
     String queueRegionNameSuffix = null;
     if (isParallel) {
@@ -485,7 +459,7 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
     }
     Set<LocalRegion> allRegions = ((GemFireCacheImpl) cache).getAllRegions();
     for (LocalRegion region : allRegions) {
-      if (region.getName().indexOf(senderId + queueRegionNameSuffix) != -1) {
+      if (region.getName().contains(senderId + queueRegionNameSuffix)) {
         fail("Region underlying the sender is not destroyed.");
       }
     }
@@ -501,14 +475,14 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
   @Override
   public final void postTearDownCacheTestCase() throws Exception {
     closeCacheAndDisconnect();
-    vm0.invoke(() -> WANCommandTestBase.closeCacheAndDisconnect());
-    vm1.invoke(() -> WANCommandTestBase.closeCacheAndDisconnect());
-    vm2.invoke(() -> WANCommandTestBase.closeCacheAndDisconnect());
-    vm3.invoke(() -> WANCommandTestBase.closeCacheAndDisconnect());
-    vm4.invoke(() -> WANCommandTestBase.closeCacheAndDisconnect());
-    vm5.invoke(() -> WANCommandTestBase.closeCacheAndDisconnect());
-    vm6.invoke(() -> WANCommandTestBase.closeCacheAndDisconnect());
-    vm7.invoke(() -> WANCommandTestBase.closeCacheAndDisconnect());
+    vm0.invoke(WANCommandTestBase::closeCacheAndDisconnect);
+    vm1.invoke(WANCommandTestBase::closeCacheAndDisconnect);
+    vm2.invoke(WANCommandTestBase::closeCacheAndDisconnect);
+    vm3.invoke(WANCommandTestBase::closeCacheAndDisconnect);
+    vm4.invoke(WANCommandTestBase::closeCacheAndDisconnect);
+    vm5.invoke(WANCommandTestBase::closeCacheAndDisconnect);
+    vm6.invoke(WANCommandTestBase::closeCacheAndDisconnect);
+    vm7.invoke(WANCommandTestBase::closeCacheAndDisconnect);
   }
 
   public static void closeCacheAndDisconnect() {

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
index 409c457..3f4f5ed 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
@@ -14,6 +14,21 @@
  */
 package org.apache.geode.internal.cache.wan.wancommand;
 
+import static org.apache.geode.distributed.ConfigurationProperties.DISTRIBUTED_SYSTEM_ID;
+import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
+import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
+import static org.apache.geode.test.dunit.Assert.assertEquals;
+import static org.apache.geode.test.dunit.Assert.assertTrue;
+import static org.apache.geode.test.dunit.Assert.fail;
+import static org.apache.geode.test.dunit.LogWriterUtils.getLogWriter;
+import static org.apache.geode.test.dunit.Wait.pause;
+
+import java.util.List;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import org.apache.geode.management.cli.Result;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 import org.apache.geode.management.internal.cli.json.GfJsonException;
@@ -21,16 +36,6 @@ import org.apache.geode.management.internal.cli.result.CommandResult;
 import org.apache.geode.management.internal.cli.result.CompositeResultData;
 import org.apache.geode.management.internal.cli.result.TabularResultData;
 import org.apache.geode.test.junit.categories.DistributedTest;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.util.List;
-import java.util.Properties;
-
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-import static org.apache.geode.test.dunit.Assert.*;
-import static org.apache.geode.test.dunit.LogWriterUtils.getLogWriter;
-import static org.apache.geode.test.dunit.Wait.pause;
 
 @Category(DistributedTest.class)
 public class WanCommandListDUnitTest extends WANCommandTestBase {
@@ -40,19 +45,19 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
   @Test
   public void testListGatewayWithNoSenderReceiver() {
 
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
-    props.setProperty(LOCATORS, "localhost[" + punePort + "]");
+    props.setProperty(LOCATORS, "localhost[" + dsIdPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
-    vm3.invoke(() -> createCache(punePort));
-    vm4.invoke(() -> createCache(punePort));
-    vm5.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
+    vm4.invoke(() -> createCache(dsIdPort));
+    vm5.invoke(() -> createCache(dsIdPort));
 
     pause(10000);
     String command = CliStrings.LIST_GATEWAY;
@@ -69,28 +74,28 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
   @Test
   public void testListGatewaySender() {
 
-    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer dsIdPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
-    props.setProperty(LOCATORS, "localhost[" + punePort + "]");
+    props.setProperty(LOCATORS, "localhost[" + dsIdPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
 
     vm6.invoke(() -> createAndStartReceiver(nyPort));
     vm7.invoke(() -> createAndStartReceiver(nyPort));
 
-    vm3.invoke(() -> createCache(punePort));
+    vm3.invoke(() -> createCache(dsIdPort));
     vm3.invoke(() -> createSender("ln_Serial", 2, false, 100, 400, false, false, null, false));
     vm3.invoke(() -> createSender("ln_Parallel", 2, true, 100, 400, false, false, null, false));
 
-    vm4.invoke(() -> createCache(punePort));
+    vm4.invoke(() -> createCache(dsIdPort));
     vm4.invoke(() -> createSender("ln_Parallel", 2, true, 100, 400, false, false, null, false));
     vm4.invoke(() -> createSender("ln_Serial", 2, false, 100, 400, false, false, null, false));
 
-    vm5.invoke(() -> createCache(punePort));
+    vm5.invoke(() -> createCache(dsIdPort));
     vm5.invoke(() -> createSender("ln_Serial", 2, false, 100, 400, false, false, null, false));
 
     pause(10000);

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/management/WANManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/management/WANManagementDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/management/WANManagementDUnitTest.java
index 880648d..5584150 100644
--- a/geode-wan/src/test/java/org/apache/geode/management/WANManagementDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/management/WANManagementDUnitTest.java
@@ -14,29 +14,33 @@
  */
 package org.apache.geode.management;
 
-import org.apache.geode.management.internal.SystemManagementService;
-import org.junit.experimental.categories.Category;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-import org.awaitility.Awaitility;
-import org.apache.geode.test.junit.categories.DistributedTest;
-import org.apache.geode.test.junit.categories.FlakyTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 import javax.management.ObjectName;
 
+import org.awaitility.Awaitility;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import org.apache.geode.cache.Cache;
 import org.apache.geode.distributed.DistributedMember;
 import org.apache.geode.distributed.Locator;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.wan.WANTestBase;
+import org.apache.geode.management.internal.SystemManagementService;
 import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.SerializableRunnable;
 import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.junit.categories.DistributedTest;
+import org.apache.geode.test.junit.categories.FlakyTest;
 
 /**
  * Tests for WAN artifacts like Sender and Receiver. The purpose of this test is not to check WAN
@@ -73,15 +77,14 @@ public class WANManagementDUnitTest extends ManagementTestBase {
     VM managing = getManagingNode();
     VM puneLocator = Host.getLocator();
 
-    int punePort = (Integer) puneLocator.invoke(() -> WANManagementDUnitTest.getLocatorPort());
+    int dsIdPort = puneLocator.invoke(() -> WANManagementDUnitTest.getLocatorPort());
 
-    Integer nyPort =
-        (Integer) nyLocator.invoke(() -> WANTestBase.createFirstRemoteLocator(12, punePort));
+    Integer nyPort = nyLocator.invoke(() -> WANTestBase.createFirstRemoteLocator(12, dsIdPort));
 
 
 
-    puneSender.invoke(() -> WANTestBase.createCache(punePort));
-    managing.invoke(() -> WANTestBase.createManagementCache(punePort));
+    puneSender.invoke(() -> WANTestBase.createCache(dsIdPort));
+    managing.invoke(() -> WANTestBase.createManagementCache(dsIdPort));
     startManagingNode(managing);
 
 
@@ -118,8 +121,7 @@ public class WANManagementDUnitTest extends ManagementTestBase {
     stopGatewaySender(puneSender);
     startGatewaySender(puneSender);
 
-    DistributedMember puneMember =
-        (DistributedMember) puneSender.invoke(() -> WANManagementDUnitTest.getMember());
+    DistributedMember puneMember = puneSender.invoke(() -> WANManagementDUnitTest.getMember());
 
     checkProxySender(managing, puneMember);
     checkSenderNavigationAPIS(managing, puneMember);
@@ -140,12 +142,11 @@ public class WANManagementDUnitTest extends ManagementTestBase {
     VM managing = getManagingNode();
     VM puneLocator = Host.getLocator();
 
-    int punePort = (Integer) puneLocator.invoke(() -> WANManagementDUnitTest.getLocatorPort());
+    int dsIdPort = puneLocator.invoke(() -> WANManagementDUnitTest.getLocatorPort());
 
-    Integer nyPort =
-        (Integer) nyLocator.invoke(() -> WANTestBase.createFirstRemoteLocator(12, punePort));
+    Integer nyPort = nyLocator.invoke(() -> WANTestBase.createFirstRemoteLocator(12, dsIdPort));
 
-    puneSender.invoke(() -> WANTestBase.createCache(punePort));
+    puneSender.invoke(() -> WANTestBase.createCache(dsIdPort));
 
     nyReceiver.invoke(() -> WANTestBase.createCache(nyPort));
     nyReceiver.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + "_PR", null,
@@ -171,8 +172,7 @@ public class WANManagementDUnitTest extends ManagementTestBase {
     checkSenderMBean(puneSender, getTestMethodName() + "_PR", true);
     checkReceiverMBean(nyReceiver);
 
-    DistributedMember nyMember =
-        (DistributedMember) nyReceiver.invoke(() -> WANManagementDUnitTest.getMember());
+    DistributedMember nyMember = nyReceiver.invoke(() -> WANManagementDUnitTest.getMember());
 
     checkProxyReceiver(managing, nyMember);
     checkReceiverNavigationAPIS(managing, nyMember);
@@ -188,13 +188,12 @@ public class WANManagementDUnitTest extends ManagementTestBase {
     VM managing = getManagingNode();
     VM puneLocator = Host.getLocator();
 
-    int punePort = (Integer) puneLocator.invoke(() -> WANManagementDUnitTest.getLocatorPort());
+    int dsIdPort = puneLocator.invoke(() -> WANManagementDUnitTest.getLocatorPort());
 
-    Integer nyPort =
-        (Integer) nyLocator.invoke(() -> WANTestBase.createFirstRemoteLocator(12, punePort));
+    Integer nyPort = nyLocator.invoke(() -> WANTestBase.createFirstRemoteLocator(12, dsIdPort));
 
-    puneSender.invoke(() -> WANTestBase.createCache(punePort));
-    managing.invoke(() -> WANTestBase.createManagementCache(punePort));
+    puneSender.invoke(() -> WANTestBase.createCache(dsIdPort));
+    managing.invoke(() -> WANTestBase.createManagementCache(dsIdPort));
     startManagingNode(managing);
 
     puneSender.invoke(() -> WANTestBase.createAsyncEventQueue("pn", false, 100, 100, false, false,
@@ -215,8 +214,7 @@ public class WANManagementDUnitTest extends ManagementTestBase {
     checkAsyncQueueMBean(puneSender, true);
     checkAsyncQueueMBean(managing, true);
 
-    DistributedMember puneMember =
-        (DistributedMember) puneSender.invoke(() -> WANManagementDUnitTest.getMember());
+    DistributedMember puneMember = puneSender.invoke(() -> WANManagementDUnitTest.getMember());
 
     checkProxyAsyncQueue(managing, puneMember, true);
 
@@ -228,7 +226,7 @@ public class WANManagementDUnitTest extends ManagementTestBase {
     VM managerVm = getManagingNode();
     VM locatorVm = Host.getLocator();
 
-    int locatorPort = (Integer) locatorVm.invoke(() -> WANManagementDUnitTest.getLocatorPort());
+    int locatorPort = locatorVm.invoke(() -> WANManagementDUnitTest.getLocatorPort());
 
     memberVM.invoke(() -> WANTestBase.createCache(locatorPort));
     managerVm.invoke(() -> WANTestBase.createManagementCache(locatorPort));

http://git-wip-us.apache.org/repos/asf/geode/blob/c62764b5/geode-wan/src/test/java/org/apache/geode/management/internal/pulse/TestRemoteClusterDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/management/internal/pulse/TestRemoteClusterDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/management/internal/pulse/TestRemoteClusterDUnitTest.java
index 3f381f1..f806069 100644
--- a/geode-wan/src/test/java/org/apache/geode/management/internal/pulse/TestRemoteClusterDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/management/internal/pulse/TestRemoteClusterDUnitTest.java
@@ -14,21 +14,19 @@
  */
 package org.apache.geode.management.internal.pulse;
 
-import org.junit.experimental.categories.Category;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
-import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
-import org.apache.geode.test.junit.categories.DistributedTest;
-import org.apache.geode.test.junit.categories.FlakyTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Map;
 
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import org.apache.geode.cache.Cache;
 import org.apache.geode.distributed.DistributedMember;
 import org.apache.geode.distributed.Locator;
@@ -37,11 +35,9 @@ import org.apache.geode.internal.cache.wan.WANTestBase;
 import org.apache.geode.management.DistributedSystemMXBean;
 import org.apache.geode.management.GatewayReceiverMXBean;
 import org.apache.geode.management.GatewaySenderMXBean;
-import org.apache.geode.management.MBeanUtil;
 import org.apache.geode.management.ManagementService;
 import org.apache.geode.management.ManagementTestBase;
 import org.apache.geode.management.RegionMXBean;
-
 import org.apache.geode.management.internal.MBeanJMXAdapter;
 import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.LogWriterUtils;
@@ -49,6 +45,8 @@ import org.apache.geode.test.dunit.SerializableRunnable;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.Wait;
 import org.apache.geode.test.dunit.WaitCriterion;
+import org.apache.geode.test.junit.categories.DistributedTest;
+import org.apache.geode.test.junit.categories.FlakyTest;
 
 /**
  * This is for testing remote Cluster
@@ -77,13 +75,12 @@ public class TestRemoteClusterDUnitTest extends ManagementTestBase {
     VM managing = getManagingNode();
     VM puneLocator = Host.getLocator();
 
-    int punePort = (Integer) puneLocator.invoke(() -> TestRemoteClusterDUnitTest.getLocatorPort());
+    int dsIdPort = puneLocator.invoke(() -> TestRemoteClusterDUnitTest.getLocatorPort());
 
-    Integer nyPort =
-        (Integer) nyLocator.invoke(() -> WANTestBase.createFirstRemoteLocator(12, punePort));
+    Integer nyPort = nyLocator.invoke(() -> WANTestBase.createFirstRemoteLocator(12, dsIdPort));
 
-    puneSender.invoke(() -> WANTestBase.createCache(punePort));
-    managing.invoke(() -> WANTestBase.createManagementCache(punePort));
+    puneSender.invoke(() -> WANTestBase.createCache(dsIdPort));
+    managing.invoke(() -> WANTestBase.createManagementCache(dsIdPort));
     startManagingNode(managing);
 
     puneSender
@@ -115,8 +112,7 @@ public class TestRemoteClusterDUnitTest extends ManagementTestBase {
     stopGatewaySender(puneSender);
     startGatewaySender(puneSender);
 
-    DistributedMember puneMember =
-        (DistributedMember) puneSender.invoke(() -> TestRemoteClusterDUnitTest.getMember());
+    DistributedMember puneMember = puneSender.invoke(() -> TestRemoteClusterDUnitTest.getMember());
 
     checkRemoteClusterStatus(managing, puneMember);
 
@@ -146,10 +142,7 @@ public class TestRemoteClusterDUnitTest extends ManagementTestBase {
             Cache cache = GemFireCacheImpl.getInstance();
             final ManagementService service = ManagementService.getManagementService(cache);
             final DistributedSystemMXBean dsBean = service.getDistributedSystemMXBean();
-            if (dsBean != null) {
-              return true;
-            }
-            return false;
+            return dsBean != null;
           }
 
           @Override
@@ -164,7 +157,7 @@ public class TestRemoteClusterDUnitTest extends ManagementTestBase {
         Map<String, Boolean> dsMap = dsBean.viewRemoteClusterStatus();
         LogWriterUtils.getLogWriter().info("Ds Map is: " + dsMap.size());
         assertNotNull(dsMap);
-        assertEquals(true, dsMap.size() > 0 ? true : false);
+        assertEquals(true, dsMap.size() > 0);
       }
     };
     vm.invoke(checkProxySender);


Mime
View raw message