geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [16/63] [abbrv] incubator-geode git commit: Automatically converting calls of vm.invoke to lambdas
Date Fri, 19 Feb 2016 18:36:53 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ReplicatedRegion_ParallelWANPropogationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ReplicatedRegion_ParallelWANPropogationDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ReplicatedRegion_ParallelWANPropogationDUnitTest.java
index 6c451a3..83bf1e5 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ReplicatedRegion_ParallelWANPropogationDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ReplicatedRegion_ParallelWANPropogationDUnitTest.java
@@ -64,24 +64,22 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
 
   public void test_DR_PGS_1Nodes_Put_Receiver() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 
-      vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-      vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", null, isOffHeap() });
+      vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+      vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", null, isOffHeap() ));
 
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
 
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln1", isOffHeap() });
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1", isOffHeap() ));
 
-      vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-          true, 10, 100, false, false, null, true });
+      vm4.invoke(() -> WANTestBase.createSender( "ln1", 2,
+          true, 10, 100, false, false, null, true ));
 
-      vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln1" });
+      vm4.invoke(() -> WANTestBase.startSender( "ln1" ));
       fail("Expected GatewaySenderConfigException where parallel gateway sender can not be used with replicated region");
     }
     catch (Exception e) {
@@ -129,25 +127,23 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
    */
   public void DISABLED_test_PGS_Started_DR_CREATED_NO_RECEIVER() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
 /*      ExpectedException exp1 = addExpectedException(GatewaySenderException.class
           .getName(), vm4);
       ExpectedException exp2 = addExpectedException(InterruptedException.class
           .getName(), vm4);
       try {
-*/        vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-            true, 10, 100, false, false, null, false });
-        vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-            getTestMethodName() + "_RR", "ln1", isOffHeap()  });
-        vm4.invoke(WANTestBase.class, "doPuts", new Object[] {
-            getTestMethodName() + "_RR", 1000 });
-        vm4.invoke(WANTestBase.class, "validateQueueContents", new Object[] {
-            "ln1", 1000 });
+*/        vm4.invoke(() -> WANTestBase.createSender( "ln1", 2,
+            true, 10, 100, false, false, null, false ));
+        vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+            getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
+        vm4.invoke(() -> WANTestBase.doPuts(
+            getTestMethodName() + "_RR", 1000 ));
+        vm4.invoke(() -> WANTestBase.validateQueueContents(
+            "ln1", 1000 ));
 
 /*      }
       finally {
@@ -174,25 +170,23 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
    */
   public void DISABLED_test_DR_CREATED_PGS_STARTED_NO_RECEIVER() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
-
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln1", isOffHeap()  });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
 /*      ExpectedException exp1 = addExpectedException(GatewaySenderException.class
           .getName(), vm4);
       ExpectedException exp2 = addExpectedException(InterruptedException.class
           .getName(), vm4);
       try {*/
-        vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-            true, 10, 100, false, false, null, false });
-        vm4.invoke(WANTestBase.class, "doPuts", new Object[] {
-            getTestMethodName() + "_RR", 1000 });
-        vm4.invoke(WANTestBase.class, "validateQueueContents", new Object[] {
-            "ln1", 1000 });
+        vm4.invoke(() -> WANTestBase.createSender( "ln1", 2,
+            true, 10, 100, false, false, null, false ));
+        vm4.invoke(() -> WANTestBase.doPuts(
+            getTestMethodName() + "_RR", 1000 ));
+        vm4.invoke(() -> WANTestBase.validateQueueContents(
+            "ln1", 1000 ));
 /*      }
       finally {
         exp1.remove();
@@ -213,32 +207,30 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
      and version prior to 8.0*/
   public void DISABLED_test_DR_PGS_1Node_Put_ValidateQueue_No_Receiver() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
       
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln1", isOffHeap()  });
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
       
 /*      ExpectedException exp1 = addExpectedException(GatewaySenderException.class
           .getName(), vm4);
       ExpectedException exp2 = addExpectedException(InterruptedException.class
           .getName(), vm4);
       try {*/
-        vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-            true, 10, 100, false, false, null, true });
-        vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln1" });
+        vm4.invoke(() -> WANTestBase.createSender( "ln1", 2,
+            true, 10, 100, false, false, null, true ));
+        vm4.invoke(() -> WANTestBase.startSender( "ln1" ));
 
-        vm4.invoke(WANTestBase.class, "doPuts", new Object[] {
-            getTestMethodName() + "_RR", 10000 });
+        vm4.invoke(() -> WANTestBase.doPuts(
+            getTestMethodName() + "_RR", 10000 ));
 
-        vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-            getTestMethodName() + "_RR", 10000 });
-        vm4.invoke(WANTestBase.class, "validateQueueContents", new Object[] {
-            "ln1", 10000 });
+        vm4.invoke(() -> WANTestBase.validateRegionSize(
+            getTestMethodName() + "_RR", 10000 ));
+        vm4.invoke(() -> WANTestBase.validateQueueContents(
+            "ln1", 10000 ));
 /*      }
     finally {
       exp1.remove();
@@ -260,18 +252,16 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
      and version prior to 8.0*/
   public void DISABLED_test_DR_PGS_2Nodes_Put_ValidateQueue_No_Receiver() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm5.invoke(() -> WANTestBase.createCache( lnPort ));
       
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln1", isOffHeap()  });
-      vm5.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln1", isOffHeap()  });
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
+      vm5.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
       
 /*      ExpectedException exp1 = addExpectedException(
           GatewaySenderException.class.getName());
@@ -280,26 +270,26 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
       ExpectedException exp3 = addExpectedException(
           CacheClosedException.class.getName());
       try {
-*/        vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-            true, 10, 100, false, false, null, true });
-        vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-            true, 10, 100, false, false, null, true });
+*/        vm4.invoke(() -> WANTestBase.createSender( "ln1", 2,
+            true, 10, 100, false, false, null, true ));
+        vm5.invoke(() -> WANTestBase.createSender( "ln1", 2,
+            true, 10, 100, false, false, null, true ));
 
-        vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln1" });
-        vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln1" });
+        vm4.invoke(() -> WANTestBase.startSender( "ln1" ));
+        vm5.invoke(() -> WANTestBase.startSender( "ln1" ));
 
-        vm4.invoke(WANTestBase.class, "doPuts", new Object[] {
-            getTestMethodName() + "_RR", 1000 });
+        vm4.invoke(() -> WANTestBase.doPuts(
+            getTestMethodName() + "_RR", 1000 ));
 
-        vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-            getTestMethodName() + "_RR", 1000 });
-        vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-            getTestMethodName() + "_RR", 1000 });
+        vm4.invoke(() -> WANTestBase.validateRegionSize(
+            getTestMethodName() + "_RR", 1000 ));
+        vm5.invoke(() -> WANTestBase.validateRegionSize(
+            getTestMethodName() + "_RR", 1000 ));
 
-        vm4.invoke(WANTestBase.class, "validateQueueContents", new Object[] {
-            "ln1", 1000 });
-        vm5.invoke(WANTestBase.class, "validateQueueContents", new Object[] {
-            "ln1", 1000 });
+        vm4.invoke(() -> WANTestBase.validateQueueContents(
+            "ln1", 1000 ));
+        vm5.invoke(() -> WANTestBase.validateQueueContents(
+            "ln1", 1000 ));
 
 /*      }
       finally {
@@ -349,36 +339,34 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
      and version prior to 8.0*/
   public void DISABLED_test_DR_PGS_1Nodes_Put_Receiver() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
-
-      vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-      vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", null, isOffHeap()  });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+
+      vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+      vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", null, isOffHeap()  ));
       
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
       
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln1", isOffHeap()  });
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
       
-      vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-        true, 10, 100, false, false, null, true});
+      vm4.invoke(() -> WANTestBase.createSender( "ln1", 2,
+        true, 10, 100, false, false, null, true));
 
-      vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln1"});
+      vm4.invoke(() -> WANTestBase.startSender( "ln1"));
       
-      vm4.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_RR",
-        1000});
+      vm4.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_RR",
+        1000));
      
-      vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000});
+      vm4.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000));
       
-      vm4.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
+      vm4.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
       
-      vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_RR", 1000});
+      vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_RR", 1000));
     }
     catch (Exception e) {
       Assert.fail("Unexpected exception", e);
@@ -394,46 +382,44 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
      and version prior to 8.0*/
   public void DISABLED_test_DR_PGS_2Nodes_Put_Receiver() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
-
-      vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-      vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", null, isOffHeap()  });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+
+      vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+      vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", null, isOffHeap()  ));
       
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm5.invoke(() -> WANTestBase.createCache( lnPort ));
       
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln1", isOffHeap()  });
-      vm5.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln1", isOffHeap()  });
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
+      vm5.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
       
-      vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-        true, 10, 100, false, false, null, true});
-      vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-      true, 10, 100, false, false, null, true});
+      vm4.invoke(() -> WANTestBase.createSender( "ln1", 2,
+        true, 10, 100, false, false, null, true));
+      vm5.invoke(() -> WANTestBase.createSender( "ln1", 2,
+      true, 10, 100, false, false, null, true));
 
-      vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln1"});
-      vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln1"});
+      vm4.invoke(() -> WANTestBase.startSender( "ln1"));
+      vm5.invoke(() -> WANTestBase.startSender( "ln1"));
       
-      vm4.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_RR",
-        1000 });
+      vm4.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_RR",
+        1000 ));
      
-      vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000 });
-      vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000 });
+      vm4.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000 ));
+      vm5.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000 ));
       
-      vm4.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
-      vm5.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
+      vm4.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
+      vm5.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
       
-      vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_RR", 1000 });
+      vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_RR", 1000 ));
     }
     catch (Exception e) {
       Assert.fail("Unexpected exception", e);
@@ -449,46 +435,44 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
      and version prior to 8.0*/
   public void DISABLED_test_DR_PGS_2Nodes_EMPTY_Put_Receiver() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
-
-      vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-      vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", null, isOffHeap()  });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+
+      vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+      vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", null, isOffHeap()  ));
       
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm5.invoke(() -> WANTestBase.createCache( lnPort ));
       
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln1", Scope.DISTRIBUTED_ACK, DataPolicy.EMPTY, isOffHeap()  });
-      vm5.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln1", Scope.DISTRIBUTED_ACK, DataPolicy.REPLICATE, isOffHeap()  });
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1", Scope.DISTRIBUTED_ACK, DataPolicy.EMPTY, isOffHeap()  ));
+      vm5.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln1", Scope.DISTRIBUTED_ACK, DataPolicy.REPLICATE, isOffHeap()  ));
       
-      vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-        true, 10, 100, false, false, null, true});
-      vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-      true, 10, 100, false, false, null, true});
+      vm4.invoke(() -> WANTestBase.createSender( "ln1", 2,
+        true, 10, 100, false, false, null, true));
+      vm5.invoke(() -> WANTestBase.createSender( "ln1", 2,
+      true, 10, 100, false, false, null, true));
 
-      vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln1"});
-      vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln1"});
+      vm4.invoke(() -> WANTestBase.startSender( "ln1"));
+      vm5.invoke(() -> WANTestBase.startSender( "ln1"));
       
-      vm4.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_RR",
-        1000 });
+      vm4.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_RR",
+        1000 ));
      
-//      vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] { testName + "_RR",
-//        1000 });
-      vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000 });
+//      vm4.invoke(() -> WANTestBase.validateRegionSize( testName + "_RR",
+//        1000 ));
+      vm5.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000 ));
       
-      vm4.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
-      vm5.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
+      vm4.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
+      vm5.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
       
-      vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_RR", 1000 });
+      vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_RR", 1000 ));
     }
     catch (Exception e) {
       Assert.fail("Unexpected exception", e);
@@ -504,96 +488,90 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
      and version prior to 8.0*/
   public void DISABLED_test_DR_PR_PGS_4Nodes_Put_Receiver_2Nodes() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 
-      vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-      vm3.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
+      vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+      vm3.invoke(() -> WANTestBase.createReceiver( nyPort ));
       
-      vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", null, isOffHeap()  });
-      vm3.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", null, isOffHeap()  });
+      vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", null, isOffHeap()  ));
+      vm3.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", null, isOffHeap()  ));
       
-      vm2.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", null, 1, 100, isOffHeap()  });
-      vm3.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", null, 1, 100, isOffHeap()  });
+      vm2.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", null, 1, 100, isOffHeap()  ));
+      vm3.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", null, 1, 100, isOffHeap()  ));
       
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm6.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm7.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm5.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm6.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm7.invoke(() -> WANTestBase.createCache( lnPort ));
       
-      vm4.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-          getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap()  });
-      vm5.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-          getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap()  });
-      vm6.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-          getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap()  });
-      vm7.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-          getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap()  });
-
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-      vm5.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-      vm6.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-      vm7.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-
-      vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 10, 100, false, false, null, true });
-      vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 10, 100, false, false, null, true });
-      vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 10, 100, false, false, null, true });
-      vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 10, 100, false, false, null, true });
-
-      vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln"});
-      vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln"});
-      vm6.invoke(WANTestBase.class, "startSender", new Object[] { "ln"});
-      vm7.invoke(WANTestBase.class, "startSender", new Object[] { "ln"});
+      vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+          getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap()  ));
+      vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+          getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap()  ));
+      vm6.invoke(() -> WANTestBase.createPartitionedRegion(
+          getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap()  ));
+      vm7.invoke(() -> WANTestBase.createPartitionedRegion(
+          getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap()  ));
+
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+      vm5.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+      vm6.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+      vm7.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+
+      vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 10, 100, false, false, null, true ));
+      vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 10, 100, false, false, null, true ));
+      vm6.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 10, 100, false, false, null, true ));
+      vm7.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 10, 100, false, false, null, true ));
+
+      vm4.invoke(() -> WANTestBase.startSender( "ln"));
+      vm5.invoke(() -> WANTestBase.startSender( "ln"));
+      vm6.invoke(() -> WANTestBase.startSender( "ln"));
+      vm7.invoke(() -> WANTestBase.startSender( "ln"));
       
-      vm4.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-      vm5.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-      vm6.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-      vm7.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-
-      vm4.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_RR",
-        1000 });
-      vm5.invoke(WANTestBase.class, "doNextPuts", new Object[] { getTestMethodName() + "_PR",
-        1000, 2000 });
+      vm4.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+      vm5.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+      vm6.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+      vm7.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+
+      vm4.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_RR",
+        1000 ));
+      vm5.invoke(() -> WANTestBase.doNextPuts( getTestMethodName() + "_PR",
+        1000, 2000 ));
       
-      vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_PR",
-        1000 });
-      vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000 });
+      vm4.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_PR",
+        1000 ));
+      vm5.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000 ));
       
-      vm4.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln",
-        0 });
-      vm5.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln",
-        0 });
+      vm4.invoke(() -> WANTestBase.validateQueueContents( "ln",
+        0 ));
+      vm5.invoke(() -> WANTestBase.validateQueueContents( "ln",
+        0 ));
       
 /*      ExpectedException exp1 = addExpectedException(CacheClosedException.class
           .getName());
       try {*/
-        vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-            getTestMethodName() + "_RR", 1000 });
-        vm3.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-            getTestMethodName() + "_RR", 1000 });
-        vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-            getTestMethodName() + "_PR", 1000 });
-        vm3.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-            getTestMethodName() + "_PR", 1000 });
+        vm2.invoke(() -> WANTestBase.validateRegionSize(
+            getTestMethodName() + "_RR", 1000 ));
+        vm3.invoke(() -> WANTestBase.validateRegionSize(
+            getTestMethodName() + "_RR", 1000 ));
+        vm2.invoke(() -> WANTestBase.validateRegionSize(
+            getTestMethodName() + "_PR", 1000 ));
+        vm3.invoke(() -> WANTestBase.validateRegionSize(
+            getTestMethodName() + "_PR", 1000 ));
 /*      }
       finally {
         exp1.remove();
@@ -613,65 +591,63 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
      and version prior to 8.0*/
   public void DISABLED_test_DR_PGS_NOMANUALSTART_4Nodes_Put_ValidateReceiver() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
-
-      vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-      vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", null, isOffHeap()  });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+
+      vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+      vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", null, isOffHeap()  ));
       
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm6.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm7.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm5.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm6.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm7.invoke(() -> WANTestBase.createCache( lnPort ));
       
-      vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-          true, 10, 100, false, false, null, false });
-      vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-          true, 10, 100, false, false, null, false });
-      vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-          true, 10, 100, false, false, null, false });
-      vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-          true, 10, 100, false, false, null, false });
+      vm4.invoke(() -> WANTestBase.createSender( "ln1", 2,
+          true, 10, 100, false, false, null, false ));
+      vm5.invoke(() -> WANTestBase.createSender( "ln1", 2,
+          true, 10, 100, false, false, null, false ));
+      vm6.invoke(() -> WANTestBase.createSender( "ln1", 2,
+          true, 10, 100, false, false, null, false ));
+      vm7.invoke(() -> WANTestBase.createSender( "ln1", 2,
+          true, 10, 100, false, false, null, false ));
     
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln1", isOffHeap()  });
-      vm5.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln1", isOffHeap()  });
-      vm6.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln1", isOffHeap()  });
-      vm7.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln1", isOffHeap()  });
-
-      vm4.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_RR",
-        1000 });
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
+      vm5.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
+      vm6.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
+      vm7.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1", isOffHeap()  ));
+
+      vm4.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_RR",
+        1000 ));
      
-      vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000 });
-      vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000 });
-      vm6.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000 });
-      vm7.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000 });
+      vm4.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000 ));
+      vm5.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000 ));
+      vm6.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000 ));
+      vm7.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000 ));
 
       
-      vm4.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
-      vm5.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
-      vm6.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
-      vm7.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
+      vm4.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
+      vm5.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
+      vm6.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
+      vm7.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
       
 /*      ExpectedException exp1 = addExpectedException(CacheClosedException.class
           .getName());
       try {*/
-        vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-            getTestMethodName() + "_RR", 1000 });
+        vm2.invoke(() -> WANTestBase.validateRegionSize(
+            getTestMethodName() + "_RR", 1000 ));
 /*      }
       finally {
         exp1.remove();
@@ -692,133 +668,119 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
   public void DISABLED_test_DR_PGS_4Nodes_Put_CLOSE4NODESCACHE_RECREATE_PUT_ValidateReceiver()
       throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
-
-      vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-      vm3.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm6.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm7.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-
-      vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 100, 10, false, false, null, true });
-      vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 100, 10, false, false, null, true });
-      vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 100, 10, false, false, null, true });
-      vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 100, 10, false, false, null, true });
-
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-      vm5.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-      vm6.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-      vm7.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-
-      vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-      vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-      vm6.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-      vm7.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-
-      vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", null, isOffHeap()  });
-      vm3.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", null, isOffHeap()  });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+
+      vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+      vm3.invoke(() -> WANTestBase.createReceiver( nyPort ));
+
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm5.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm6.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm7.invoke(() -> WANTestBase.createCache( lnPort ));
+
+      vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 100, 10, false, false, null, true ));
+      vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 100, 10, false, false, null, true ));
+      vm6.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 100, 10, false, false, null, true ));
+      vm7.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 100, 10, false, false, null, true ));
+
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+      vm5.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+      vm6.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+      vm7.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+
+      vm4.invoke(() -> WANTestBase.startSender( "ln" ));
+      vm5.invoke(() -> WANTestBase.startSender( "ln" ));
+      vm6.invoke(() -> WANTestBase.startSender( "ln" ));
+      vm7.invoke(() -> WANTestBase.startSender( "ln" ));
+
+      vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", null, isOffHeap()  ));
+      vm3.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", null, isOffHeap()  ));
 
       // before doing any puts, let the senders be running in order to ensure
       // that
       // not a single event will be lost
-      vm4.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-      vm5.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-      vm6.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-      vm7.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-
-      vm4.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_RR",
-          1000 });
-      vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-          getTestMethodName() + "_RR", 1000 });
+      vm4.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+      vm5.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+      vm6.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+      vm7.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+
+      vm4.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_RR",
+          1000 ));
+      vm2.invoke(() -> WANTestBase.validateRegionSize(
+          getTestMethodName() + "_RR", 1000 ));
 
 /*      ExpectedException exp1 = addExpectedException(CacheClosedException.class
           .getName());
       try {*/
-        vm4.invoke(WANTestBase.class, "killSender", new Object[] {});
-        vm5.invoke(WANTestBase.class, "killSender", new Object[] {});
-        vm6.invoke(WANTestBase.class, "killSender", new Object[] {});
-        vm7.invoke(WANTestBase.class, "killSender", new Object[] {});
+        vm4.invoke(() -> WANTestBase.killSender());
+        vm5.invoke(() -> WANTestBase.killSender());
+        vm6.invoke(() -> WANTestBase.killSender());
+        vm7.invoke(() -> WANTestBase.killSender());
 /*      }
       finally {
         exp1.remove();
       }*/
 
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm6.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm7.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-
-      vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 100, 10, false, false, null, true });
-      vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 100, 10, false, false, null, true });
-      vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 100, 10, false, false, null, true });
-      vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-          true, 100, 10, false, false, null, true });
-
-      vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-      vm5.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-      vm6.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-      vm7.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-          getTestMethodName() + "_RR", "ln", isOffHeap()  });
-
-      vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-      vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-      vm6.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-      vm7.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-
-      vm4.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-      vm5.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-      vm6.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
-      vm7.invoke(WANTestBase.class, "waitForSenderRunningState",
-          new Object[] { "ln" });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm5.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm6.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm7.invoke(() -> WANTestBase.createCache( lnPort ));
+
+      vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 100, 10, false, false, null, true ));
+      vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 100, 10, false, false, null, true ));
+      vm6.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 100, 10, false, false, null, true ));
+      vm7.invoke(() -> WANTestBase.createSender( "ln", 2,
+          true, 100, 10, false, false, null, true ));
+
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+      vm5.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+      vm6.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+      vm7.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+
+      vm4.invoke(() -> WANTestBase.startSender( "ln" ));
+      vm5.invoke(() -> WANTestBase.startSender( "ln" ));
+      vm6.invoke(() -> WANTestBase.startSender( "ln" ));
+      vm7.invoke(() -> WANTestBase.startSender( "ln" ));
+
+      vm4.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+      vm5.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+      vm6.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+      vm7.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
       // ------------------------------------------------------------------------------------
 
-      vm4.invoke(WANTestBase.class, "doNextPuts", new Object[] {
-          getTestMethodName() + "_RR", 1000, 2000 });
+      vm4.invoke(() -> WANTestBase.doNextPuts(
+          getTestMethodName() + "_RR", 1000, 2000 ));
 
       // verify all buckets drained on all sender nodes.
-      vm4.invoke(WANTestBase.class,
-          "validateParallelSenderQueueAllBucketsDrained", new Object[] { "ln" });
-      vm5.invoke(WANTestBase.class,
-          "validateParallelSenderQueueAllBucketsDrained", new Object[] { "ln" });
-      vm6.invoke(WANTestBase.class,
-          "validateParallelSenderQueueAllBucketsDrained", new Object[] { "ln" });
-      vm7.invoke(WANTestBase.class,
-          "validateParallelSenderQueueAllBucketsDrained", new Object[] { "ln" });
+      vm4.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained( "ln" ));
+      vm5.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained( "ln" ));
+      vm6.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained( "ln" ));
+      vm7.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained( "ln" ));
 
 /*      exp1 = addExpectedException(CacheClosedException.class.getName());
       try {*/
-        vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-            getTestMethodName() + "_RR", 2000 });
-        vm3.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-            getTestMethodName() + "_RR", 2000 });
+        vm2.invoke(() -> WANTestBase.validateRegionSize(
+            getTestMethodName() + "_RR", 2000 ));
+        vm3.invoke(() -> WANTestBase.validateRegionSize(
+            getTestMethodName() + "_RR", 2000 ));
 /*      }
       finally {
         exp1.remove();
@@ -839,48 +801,44 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
      and version prior to 8.0*/
   public void DISABLED_test_DR_NO_ACK_PGS_2Nodes_Put_ValidateQueue_Receiver() throws Exception {
     try {
-      Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-          "createFirstLocatorWithDSId", new Object[] { 1 });
-      Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-          "createFirstRemoteLocator", new Object[] { 2, lnPort });
-
-      vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-      vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", null, isOffHeap()  });
+      Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+      Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+
+      vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+      vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", null, isOffHeap()  ));
       
-      vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-      vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+      vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+      vm5.invoke(() -> WANTestBase.createCache( lnPort ));
       
-      vm4.invoke(WANTestBase.class,
-          "createReplicatedRegion", new Object[] { getTestMethodName() + "_RR", "ln1",
-              Scope.DISTRIBUTED_NO_ACK, DataPolicy.REPLICATE, isOffHeap()  });
-      vm5.invoke(WANTestBase.class,
-          "createReplicatedRegion", new Object[] { getTestMethodName() + "_RR", "ln1",
-              Scope.DISTRIBUTED_NO_ACK, DataPolicy.REPLICATE, isOffHeap()   });
+      vm4.invoke(() -> WANTestBase.createReplicatedRegion( getTestMethodName() + "_RR", "ln1",
+              Scope.DISTRIBUTED_NO_ACK, DataPolicy.REPLICATE, isOffHeap()  ));
+      vm5.invoke(() -> WANTestBase.createReplicatedRegion( getTestMethodName() + "_RR", "ln1",
+              Scope.DISTRIBUTED_NO_ACK, DataPolicy.REPLICATE, isOffHeap()   ));
       
-      vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-        true, 10, 100, false, false, null, true});
-      vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-      true, 10, 100, false, false, null, true});
+      vm4.invoke(() -> WANTestBase.createSender( "ln1", 2,
+        true, 10, 100, false, false, null, true));
+      vm5.invoke(() -> WANTestBase.createSender( "ln1", 2,
+      true, 10, 100, false, false, null, true));
 
-      vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln1"});
-      vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln1"});
+      vm4.invoke(() -> WANTestBase.startSender( "ln1"));
+      vm5.invoke(() -> WANTestBase.startSender( "ln1"));
       
-      vm4.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_RR",
-        1000 });
+      vm4.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_RR",
+        1000 ));
      
-      vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000 });
-      vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[] { getTestMethodName() + "_RR",
-        1000 });
+      vm4.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000 ));
+      vm5.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR",
+        1000 ));
       
-      vm4.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
-      vm5.invoke(WANTestBase.class, "validateQueueContents", new Object[] { "ln1",
-        0 });
+      vm4.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
+      vm5.invoke(() -> WANTestBase.validateQueueContents( "ln1",
+        0 ));
       
-      vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_RR", 1000 });
+      vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_RR", 1000 ));
     }
     catch (Exception e) {
       Assert.fail("Unexpected exception", e);
@@ -896,50 +854,45 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
      and version prior to 8.0*/
   public void DISABLED_test_DR_PGS_2NODES_1NODESDOWN_Validate_Receiver() throws Exception {
 
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 
-    vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-    vm3.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
+    vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+    vm3.invoke(() -> WANTestBase.createReceiver( nyPort ));
 
-    vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+    vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm5.invoke(() -> WANTestBase.createCache( lnPort ));
 
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2, true,
-        100, 10, false, false, null, true });
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2, true,
-        100, 10, false, false, null, true });
+    vm4.invoke(() -> WANTestBase.createSender( "ln", 2, true,
+        100, 10, false, false, null, true ));
+    vm5.invoke(() -> WANTestBase.createSender( "ln", 2, true,
+        100, 10, false, false, null, true ));
 
-    vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap()  });
-    vm5.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap()  });
+    vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+    vm5.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap()  ));
 
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.startSender( "ln" ));
 
-    vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap()  });
-    vm3.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap()  });
+    vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+    vm3.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap()  ));
 
-    vm4.invoke(WANTestBase.class, "waitForSenderRunningState",
-        new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "waitForSenderRunningState",
-        new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+    vm5.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
 
     pauseWaitCriteria(60000);
     
 /*    ExpectedException exp1 = addExpectedException(CacheClosedException.class
         .getName());
     try {*/
-      AsyncInvocation inv1 = vm4.invokeAsync(
-          ReplicatedRegion_ParallelWANPropogationDUnitTest.class, "doPuts0", new Object[] {
-              getTestMethodName() + "_RR", 1000 });
+      AsyncInvocation inv1 = vm4.invokeAsync(() -> ReplicatedRegion_ParallelWANPropogationDUnitTest.doPuts0(
+              getTestMethodName() + "_RR", 1000 ));
       Wait.pause(1000);
-      AsyncInvocation inv2 = vm5.invokeAsync(WANTestBase.class, "killSender");
+      AsyncInvocation inv2 = vm5.invokeAsync(() -> WANTestBase.killSender());
       try {
         inv1.join();
         inv2.join();
@@ -952,20 +905,17 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
       exp1.remove();
     }*/
 
-    Integer size = (Integer)vm4.invoke(WANTestBase.class,
-        "getQueueContentSize", new Object[] { "ln" });
+    Integer size = (Integer)vm4.invoke(() -> WANTestBase.getQueueContentSize( "ln" ));
     LogWriterUtils.getLogWriter().info("The size of the queue is in vm4 " + size);
     
 
-    vm4.invoke(WANTestBase.class,
-        "validateParallelSenderQueueAllBucketsDrained", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained( "ln" ));
     
-    size = (Integer)vm4.invoke(WANTestBase.class,
-        "getQueueContentSize", new Object[] { "ln" });
+    size = (Integer)vm4.invoke(() -> WANTestBase.getQueueContentSize( "ln" ));
     LogWriterUtils.getLogWriter().info("The size of the queue is in vm4 " + size);
     
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_RR", 1000 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_RR", 1000 ));
   }
   
   /**Below test is disabled intentionally
@@ -977,71 +927,63 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
      and version prior to 8.0*/
   public void DISABLED_test_DR_PGS_4NODES_2NODESDOWN_Validate_Receiver() throws Exception {
 
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
-
-    vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-    vm3.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-
-    vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm6.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm7.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2, true,
-        100, 10, false, false, null, true });
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2, true,
-        100, 10, false, false, null, true });
-    vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2, true,
-        100, 10, false, false, null, true });
-    vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2, true,
-        100, 10, false, false, null, true });
-
-    vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap()  });
-    vm5.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap()  });
-    vm6.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap()  });
-    vm7.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap()  });
-
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm6.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm7.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-
-    vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap()  });
-    vm3.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap()  });
-
-    vm4.invoke(WANTestBase.class, "waitForSenderRunningState",
-        new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "waitForSenderRunningState",
-        new Object[] { "ln" });
-    vm6.invoke(WANTestBase.class, "waitForSenderRunningState",
-        new Object[] { "ln" });
-    vm7.invoke(WANTestBase.class, "waitForSenderRunningState",
-        new Object[] { "ln" });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+
+    vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+    vm3.invoke(() -> WANTestBase.createReceiver( nyPort ));
+
+    vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm5.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm6.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm7.invoke(() -> WANTestBase.createCache( lnPort ));
+
+    vm4.invoke(() -> WANTestBase.createSender( "ln", 2, true,
+        100, 10, false, false, null, true ));
+    vm5.invoke(() -> WANTestBase.createSender( "ln", 2, true,
+        100, 10, false, false, null, true ));
+    vm6.invoke(() -> WANTestBase.createSender( "ln", 2, true,
+        100, 10, false, false, null, true ));
+    vm7.invoke(() -> WANTestBase.createSender( "ln", 2, true,
+        100, 10, false, false, null, true ));
+
+    vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+    vm5.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+    vm6.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+    vm7.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+
+    vm4.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm6.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm7.invoke(() -> WANTestBase.startSender( "ln" ));
+
+    vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+    vm3.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap()  ));
+
+    vm4.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+    vm5.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+    vm6.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+    vm7.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
 
     pauseWaitCriteria(60000);
 /*    ExpectedException exp1 = addExpectedException(CacheClosedException.class
         .getName());
     try */{
-      AsyncInvocation inv1 = vm7.invokeAsync(
-          ReplicatedRegion_ParallelWANPropogationDUnitTest.class, "doPuts0", new Object[] {
-              getTestMethodName() + "_RR", 10000 });
+      AsyncInvocation inv1 = vm7.invokeAsync(() -> ReplicatedRegion_ParallelWANPropogationDUnitTest.doPuts0(
+              getTestMethodName() + "_RR", 10000 ));
       pauseWaitCriteria(1000);
-      AsyncInvocation inv2 = vm4.invokeAsync(WANTestBase.class, "killSender");
+      AsyncInvocation inv2 = vm4.invokeAsync(() -> WANTestBase.killSender());
       pauseWaitCriteria(2000);
-      AsyncInvocation inv3 = vm6.invokeAsync(
-          ReplicatedRegion_ParallelWANPropogationDUnitTest.class, "doPuts1", new Object[] {
-              getTestMethodName() + "_RR", 10000 });
+      AsyncInvocation inv3 = vm6.invokeAsync(() -> ReplicatedRegion_ParallelWANPropogationDUnitTest.doPuts1(
+              getTestMethodName() + "_RR", 10000 ));
       pauseWaitCriteria(1500);
-      AsyncInvocation inv4 = vm5.invokeAsync(WANTestBase.class, "killSender");
+      AsyncInvocation inv4 = vm5.invokeAsync(() -> WANTestBase.killSender());
       try {
         inv1.join();
         inv2.join();
@@ -1056,13 +998,11 @@ public class ReplicatedRegion_ParallelWANPropogationDUnitTest extends WANTestBas
       exp1.remove();
     }*/
 
-    vm6.invoke(WANTestBase.class,
-        "validateParallelSenderQueueAllBucketsDrained", new Object[] { "ln" });
-    vm7.invoke(WANTestBase.class,
-        "validateParallelSenderQueueAllBucketsDrained", new Object[] { "ln" });
+    vm6.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained( "ln" ));
+    vm7.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained( "ln" ));
 
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_RR", 10000 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_RR", 10000 ));
     
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
index 193d360..a019751 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
@@ -53,63 +53,53 @@ public class SenderWithTransportFilterDUnitTest extends WANTestBase {
   }
 
   public void testSerialSenderWithTansportFilter() {
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
 
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 
-    vm2.invoke(SenderWithTransportFilterDUnitTest.class,
-        "createReceiverWithTransportFilters", new Object[] { nyPort });
-    vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", null, isOffHeap() });
+    vm2.invoke(() -> SenderWithTransportFilterDUnitTest.createReceiverWithTransportFilters( nyPort ));
+    vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", null, isOffHeap() ));
 
-    vm3.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+    vm3.invoke(() -> WANTestBase.createCache( lnPort ));
 
-    vm3.invoke(SenderWithTransportFilterDUnitTest.class,
-        "createSenderWithTransportFilter", new Object[] { "ln", 2, false, 100,
-            1, false, false, true });
+    vm3.invoke(() -> SenderWithTransportFilterDUnitTest.createSenderWithTransportFilter( "ln", 2, false, 100,
+            1, false, false, true ));
 
-    vm3.invoke(WANTestBase.class, "createReplicatedRegion", new Object[] {
-        getTestMethodName() + "_RR", "ln", isOffHeap() });
+    vm3.invoke(() -> WANTestBase.createReplicatedRegion(
+        getTestMethodName() + "_RR", "ln", isOffHeap() ));
 
-    vm3.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
+    vm3.invoke(() -> WANTestBase.startSender( "ln" ));
 
-    vm3.invoke(WANTestBase.class, "doPuts",
-        new Object[] { getTestMethodName() + "_RR", 100 });
+    vm3.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_RR", 100 ));
 
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_RR", 100 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_RR", 100 ));
   }
 
   public void testParallelSenderWithTansportFilter() {
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
 
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 
-    vm2.invoke(SenderWithTransportFilterDUnitTest.class,
-        "createReceiverWithTransportFilters", new Object[] { nyPort });
-    vm2.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", null, 0, 10, isOffHeap() });
+    vm2.invoke(() -> SenderWithTransportFilterDUnitTest.createReceiverWithTransportFilters( nyPort ));
+    vm2.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", null, 0, 10, isOffHeap() ));
 
-    vm3.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+    vm3.invoke(() -> WANTestBase.createCache( lnPort ));
 
-    vm3.invoke(SenderWithTransportFilterDUnitTest.class,
-        "createSenderWithTransportFilter", new Object[] { "ln", 2, true, 100,
-            1, false, false, true });
+    vm3.invoke(() -> SenderWithTransportFilterDUnitTest.createSenderWithTransportFilter( "ln", 2, true, 100,
+            1, false, false, true ));
 
-    vm3.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 0, 10, isOffHeap() });
+    vm3.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 0, 10, isOffHeap() ));
 
-    vm3.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
+    vm3.invoke(() -> WANTestBase.startSender( "ln" ));
 
-    vm3.invoke(WANTestBase.class, "doPuts",
-        new Object[] { getTestMethodName() + "_PR", 100 });
+    vm3.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_PR", 100 ));
 
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_PR", 100 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_PR", 100 ));
   }
   
   public static int createReceiverWithTransportFilters(int locPort) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
index c5100f9..9028531 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
@@ -56,31 +56,25 @@ public class ShutdownAllPersistentGatewaySenderDUnitTest extends WANTestBase {
   public void testGatewaySender() throws Exception {
     IgnoredException.addIgnoredException("Cache is shutting down");
 
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
 
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 
-    vm2.invoke(WANTestBase.class, "createCache", new Object[] { nyPort });
-    vm3.invoke(WANTestBase.class, "createCache", new Object[] { nyPort });
-    vm2.invoke(WANTestBase.class, "createReceiverAfterCache",
-        new Object[] { nyPort });
+    vm2.invoke(() -> WANTestBase.createCache( nyPort ));
+    vm3.invoke(() -> WANTestBase.createCache( nyPort ));
+    vm2.invoke(() -> WANTestBase.createReceiverAfterCache( nyPort ));
 
-    vm2.invoke(WANTestBase.class, "createPersistentPartitionedRegion",
-        new Object[] { getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() });
-    vm3.invoke(WANTestBase.class, "createPersistentPartitionedRegion",
-        new Object[] { getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() });
+    vm2.invoke(() -> WANTestBase.createPersistentPartitionedRegion( getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() ));
+    vm3.invoke(() -> WANTestBase.createPersistentPartitionedRegion( getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() ));
 
-    vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+    vm4.invoke(() -> WANTestBase.createCache( lnPort ));
 
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-        false, 100, 400, false, false, null, true });
+    vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
+        false, 100, 400, false, false, null, true ));
 
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.startSender( "ln" ));
 
-    vm4.invoke(WANTestBase.class, "createPersistentPartitionedRegion",
-        new Object[] { getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() });
+    vm4.invoke(() -> WANTestBase.createPersistentPartitionedRegion( getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() ));
 
     // set the CacheObserver to block the ShutdownAll
     SerializableRunnable waitAtShutdownAll = new SerializableRunnable() {
@@ -109,8 +103,7 @@ public class ShutdownAllPersistentGatewaySenderDUnitTest extends WANTestBase {
     vm2.invoke(waitAtShutdownAll);
     vm3.invoke(waitAtShutdownAll);
     
-    AsyncInvocation vm4_future = vm4.invokeAsync(WANTestBase.class, "doPuts",
-        new Object[] { getTestMethodName() + "_PR", NUM_KEYS });
+    AsyncInvocation vm4_future = vm4.invokeAsync(() -> WANTestBase.doPuts( getTestMethodName() + "_PR", NUM_KEYS ));
 
     // ShutdownAll will be suspended at observer, so puts will continue
     AsyncInvocation future = shutDownAllMembers(vm2, 2, MAX_WAIT);
@@ -118,13 +111,11 @@ public class ShutdownAllPersistentGatewaySenderDUnitTest extends WANTestBase {
 
     // now restart vm1 with gatewayHub
     LogWriterUtils.getLogWriter().info("restart in VM2");
-    vm2.invoke(WANTestBase.class, "createCache", new Object[] { nyPort });
-    vm3.invoke(WANTestBase.class, "createCache", new Object[] { nyPort });
-    AsyncInvocation vm3_future = vm3.invokeAsync(WANTestBase.class,
-        "createPersistentPartitionedRegion", new Object[] { getTestMethodName() + "_PR",
-            "ln", 1, 100, isOffHeap() });
-    vm2.invoke(WANTestBase.class, "createPersistentPartitionedRegion",
-        new Object[] { getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() });
+    vm2.invoke(() -> WANTestBase.createCache( nyPort ));
+    vm3.invoke(() -> WANTestBase.createCache( nyPort ));
+    AsyncInvocation vm3_future = vm3.invokeAsync(() -> WANTestBase.createPersistentPartitionedRegion( getTestMethodName() + "_PR",
+            "ln", 1, 100, isOffHeap() ));
+    vm2.invoke(() -> WANTestBase.createPersistentPartitionedRegion( getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() ));
     vm3_future.join(MAX_WAIT);
 
     vm3.invoke(new SerializableRunnable() {
@@ -134,8 +125,7 @@ public class ShutdownAllPersistentGatewaySenderDUnitTest extends WANTestBase {
             "vm1's region size before restart gatewayhub is " + region.size());
       }
     });
-    vm2.invoke(WANTestBase.class, "createReceiverAfterCache",
-        new Object[] { nyPort });
+    vm2.invoke(() -> WANTestBase.createReceiverAfterCache( nyPort ));
 
     // wait for vm0 to finish its work
     vm4_future.join(MAX_WAIT);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
index d239cf4..54773ad 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
@@ -61,34 +61,34 @@ public class WANLocatorServerDUnitTest extends WANTestBase {
 
     int port3 = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
 
-    vm0.invoke(WANLocatorServerDUnitTest.class, "createLocator", new Object[] {
-        port1, port2, port3, port1 });
+    vm0.invoke(() -> WANLocatorServerDUnitTest.createLocator(
+        port1, port2, port3, port1 ));
 
-    vm1.invoke(WANLocatorServerDUnitTest.class, "createLocator", new Object[] {
-        port1, port2, port3, port2 });
+    vm1.invoke(() -> WANLocatorServerDUnitTest.createLocator(
+        port1, port2, port3, port2 ));
 
-    vm2.invoke(WANLocatorServerDUnitTest.class, "createLocator", new Object[] {
-        port1, port2, port3, port3 });
+    vm2.invoke(() -> WANLocatorServerDUnitTest.createLocator(
+        port1, port2, port3, port3 ));
 
-    vm3.invoke(WANLocatorServerDUnitTest.class, "createReceiver", new Object[] {
-        port1, port2, port3 });
-    vm5.invoke(WANLocatorServerDUnitTest.class, "createClient", new Object[] {
-        port1, port2, port3 });
+    vm3.invoke(() -> WANLocatorServerDUnitTest.createReceiver(
+        port1, port2, port3 ));
+    vm5.invoke(() -> WANLocatorServerDUnitTest.createClient(
+        port1, port2, port3 ));
 
-    vm0.invoke(WANLocatorServerDUnitTest.class, "disconnect");
-    vm1.invoke(WANLocatorServerDUnitTest.class, "disconnect");
-    vm2.invoke(WANLocatorServerDUnitTest.class, "disconnect");
+    vm0.invoke(() -> WANLocatorServerDUnitTest.disconnect());
+    vm1.invoke(() -> WANLocatorServerDUnitTest.disconnect());
+    vm2.invoke(() -> WANLocatorServerDUnitTest.disconnect());
 
-    vm0.invoke(WANLocatorServerDUnitTest.class, "createLocator", new Object[] {
-        port1, port2, port3, port1 });
+    vm0.invoke(() -> WANLocatorServerDUnitTest.createLocator(
+        port1, port2, port3, port1 ));
 
-    vm1.invoke(WANLocatorServerDUnitTest.class, "createLocator", new Object[] {
-        port1, port2, port3, port2 });
+    vm1.invoke(() -> WANLocatorServerDUnitTest.createLocator(
+        port1, port2, port3, port2 ));
 
-    vm2.invoke(WANLocatorServerDUnitTest.class, "createLocator", new Object[] {
-        port1, port2, port3, port3 });
+    vm2.invoke(() -> WANLocatorServerDUnitTest.createLocator(
+        port1, port2, port3, port3 ));
 
-    vm5.invoke(WANLocatorServerDUnitTest.class, "tryNewConnection");
+    vm5.invoke(() -> WANLocatorServerDUnitTest.tryNewConnection());
 
   }
 


Mime
View raw message