geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [09/56] [abbrv] incubator-geode git commit: Automatically converting calls of vm.invoke to lambdas
Date Tue, 16 Feb 2016 22:11:29 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationLoopBackDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationLoopBackDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationLoopBackDUnitTest.java
index dff14b1..4dd9b20 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationLoopBackDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationLoopBackDUnitTest.java
@@ -42,117 +42,115 @@ public class ParallelWANPropagationLoopBackDUnitTest extends WANTestBase {
    * Site2 (NY): vm3, vm6, vm7
    */
   public void testParallelPropagationLoopBack() {
-    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 ));
 
     //create receiver on site1 and site2
-    vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { lnPort });
-    vm3.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
+    vm2.invoke(() -> WANTestBase.createReceiver( lnPort ));
+    vm3.invoke(() -> WANTestBase.createReceiver( nyPort ));
 
     //create cache on site1 and site2
-    vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm6.invoke(WANTestBase.class, "createCache", new Object[] { nyPort });
-    vm7.invoke(WANTestBase.class, "createCache", new Object[] { nyPort });
+    vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm5.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm6.invoke(() -> WANTestBase.createCache( nyPort ));
+    vm7.invoke(() -> WANTestBase.createCache( nyPort ));
 
     //create senders on site1
-    vm2.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-      true, 100, 10, false, false, null, true });
-    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 });
+    vm2.invoke(() -> WANTestBase.createSender( "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 ));
     
     //create senders on site2
-    vm3.invoke(WANTestBase.class, "createSender", new Object[] { "ny", 1,
-      true, 100, 10, false, false, null, true });
-    vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ny", 1,
-      true, 100, 10, false, false, null, true });
-    vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ny", 1,
-      true, 100, 10, false, false, null, true });
+    vm3.invoke(() -> WANTestBase.createSender( "ny", 1,
+      true, 100, 10, false, false, null, true ));
+    vm6.invoke(() -> WANTestBase.createSender( "ny", 1,
+      true, 100, 10, false, false, null, true ));
+    vm7.invoke(() -> WANTestBase.createSender( "ny", 1,
+      true, 100, 10, false, false, null, true ));
     
     //create PR on site1
-    vm2.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ln", 0, 100, isOffHeap()  });
-    vm4.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ln", 0, 100, isOffHeap()  });
-    vm5.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ln", 0, 100, isOffHeap()  });
+    vm2.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ln", 0, 100, isOffHeap()  ));
+    vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ln", 0, 100, isOffHeap()  ));
+    vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ln", 0, 100, isOffHeap()  ));
     
     //create PR on site2
-    vm3.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ny", 0, 100, isOffHeap()  });
-    vm6.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ny", 0, 100, isOffHeap()  });
-    vm7.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ny", 0, 100, isOffHeap()  });
+    vm3.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ny", 0, 100, isOffHeap()  ));
+    vm6.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ny", 0, 100, isOffHeap()  ));
+    vm7.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ny", 0, 100, isOffHeap()  ));
     
     //start sender on site1
-    vm2.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
+    vm2.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm4.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.startSender( "ln" ));
     
     //start sender on site2
-    vm3.invoke(WANTestBase.class, "startSender", new Object[] { "ny" });
-    vm6.invoke(WANTestBase.class, "startSender", new Object[] { "ny" });
-    vm7.invoke(WANTestBase.class, "startSender", new Object[] { "ny" });
+    vm3.invoke(() -> WANTestBase.startSender( "ny" ));
+    vm6.invoke(() -> WANTestBase.startSender( "ny" ));
+    vm7.invoke(() -> WANTestBase.startSender( "ny" ));
     
     //pause senders on site1
-    vm2.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
-    vm4.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
+    vm2.invoke(() -> WANTestBase.pauseSender( "ln" ));
+    vm4.invoke(() -> WANTestBase.pauseSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.pauseSender( "ln" ));
     
     //pause senders on site2
-    vm3.invoke(WANTestBase.class, "pauseSender", new Object[] { "ny" });
-    vm6.invoke(WANTestBase.class, "pauseSender", new Object[] { "ny" });
-    vm7.invoke(WANTestBase.class, "pauseSender", new Object[] { "ny" });
+    vm3.invoke(() -> WANTestBase.pauseSender( "ny" ));
+    vm6.invoke(() -> WANTestBase.pauseSender( "ny" ));
+    vm7.invoke(() -> WANTestBase.pauseSender( "ny" ));
     
     //this is required since sender pause doesn't take effect immediately
     Wait.pause(1000);
     
     //Do 100 puts on site1
-    vm2.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_PR",
-      100 });
+    vm2.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_PR",
+      100 ));
     //do next 100 puts on site2
-    vm3.invoke(WANTestBase.class, "doPutsFrom", new Object[] { getTestMethodName() + "_PR",
-      100, 200 });
+    vm3.invoke(() -> WANTestBase.doPutsFrom( getTestMethodName() + "_PR",
+      100, 200 ));
     //verify queue size on both sites
-    vm2.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ln", 100 });
-    vm4.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ln", 100 });
-    vm5.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ln", 100 });
+    vm2.invoke(() -> WANTestBase.verifyQueueSize( "ln", 100 ));
+    vm4.invoke(() -> WANTestBase.verifyQueueSize( "ln", 100 ));
+    vm5.invoke(() -> WANTestBase.verifyQueueSize( "ln", 100 ));
     
-    vm3.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ny", 100 });
-    vm6.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ny", 100 });
-    vm7.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ny", 100 });
+    vm3.invoke(() -> WANTestBase.verifyQueueSize( "ny", 100 ));
+    vm6.invoke(() -> WANTestBase.verifyQueueSize( "ny", 100 ));
+    vm7.invoke(() -> WANTestBase.verifyQueueSize( "ny", 100 ));
     
     //resume sender on site1
-    vm2.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
-    vm4.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
+    vm2.invoke(() -> WANTestBase.resumeSender( "ln" ));
+    vm4.invoke(() -> WANTestBase.resumeSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.resumeSender( "ln" ));
      
     //validate events reached site2 from site1
-    vm3.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_PR", 200 });
+    vm3.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_PR", 200 ));
     
     //on site2, verify queue size again
     //this ensures that loopback is not happening since the queue size is same as before
     //the event coming from site1 are not enqueued again
-    vm3.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ny", 100 });
-    vm6.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ny", 100 });
-    vm7.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ny", 100 });
+    vm3.invoke(() -> WANTestBase.verifyQueueSize( "ny", 100 ));
+    vm6.invoke(() -> WANTestBase.verifyQueueSize( "ny", 100 ));
+    vm7.invoke(() -> WANTestBase.verifyQueueSize( "ny", 100 ));
     
     //resume sender on site2
-    vm3.invoke(WANTestBase.class, "resumeSender", new Object[] { "ny" });
-    vm6.invoke(WANTestBase.class, "resumeSender", new Object[] { "ny" });
-    vm7.invoke(WANTestBase.class, "resumeSender", new Object[] { "ny" });
+    vm3.invoke(() -> WANTestBase.resumeSender( "ny" ));
+    vm6.invoke(() -> WANTestBase.resumeSender( "ny" ));
+    vm7.invoke(() -> WANTestBase.resumeSender( "ny" ));
     
     //validate region size on both the sites
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 200 });
-    vm3.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 200 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 200 ));
+    vm3.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 200 ));
   }
   
   /**
@@ -163,103 +161,100 @@ public class ParallelWANPropagationLoopBackDUnitTest extends WANTestBase {
    */
   public void testParallelPropagationLoopBack3Sites() {
     //Create locators
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
-    Integer tkPort = (Integer)vm2.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 3, lnPort });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+    Integer tkPort = (Integer)vm2.invoke(() -> WANTestBase.createFirstRemoteLocator( 3, lnPort ));
     
     //create cache and receivers on all the 3 sites
-    vm3.invoke(WANTestBase.class, "createReceiver", new Object[] { lnPort });
-    vm4.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-    vm5.invoke(WANTestBase.class, "createReceiver", new Object[] { tkPort });
+    vm3.invoke(() -> WANTestBase.createReceiver( lnPort ));
+    vm4.invoke(() -> WANTestBase.createReceiver( nyPort ));
+    vm5.invoke(() -> WANTestBase.createReceiver( tkPort ));
     
-    vm6.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm7.invoke(WANTestBase.class, "createCache", new Object[] { nyPort });
+    vm6.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm7.invoke(() -> WANTestBase.createCache( nyPort ));
     
     //create senders on all the 3 sites
-    vm3.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 });
+    vm3.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 ));
     
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ny", 3,
-      true, 100, 10, false, false, null, true });
-    vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ny", 3,
-      true, 100, 10, false, false, null, true });
+    vm4.invoke(() -> WANTestBase.createSender( "ny", 3,
+      true, 100, 10, false, false, null, true ));
+    vm7.invoke(() -> WANTestBase.createSender( "ny", 3,
+      true, 100, 10, false, false, null, true ));
     
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "tk", 1,
-      true, 100, 10, false, false, null, true });
+    vm5.invoke(() -> WANTestBase.createSender( "tk", 1,
+      true, 100, 10, false, false, null, true ));
     
     //create PR on the 3 sites
-    vm3.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ln", 0, 100, isOffHeap() });
-    vm6.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ln", 0, 100, isOffHeap() });
+    vm3.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ln", 0, 100, isOffHeap() ));
+    vm6.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ln", 0, 100, isOffHeap() ));
     
-    vm4.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ny", 0, 100, isOffHeap() });
-    vm7.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ny", 0, 100, isOffHeap() });
+    vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ny", 0, 100, isOffHeap() ));
+    vm7.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ny", 0, 100, isOffHeap() ));
     
-    vm5.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "tk", 0, 100, isOffHeap() });
+    vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "tk", 0, 100, isOffHeap() ));
     
     //start senders on all the sites 
-    vm3.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm6.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
+    vm3.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm6.invoke(() -> WANTestBase.startSender( "ln" ));
     
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ny" });
-    vm7.invoke(WANTestBase.class, "startSender", new Object[] { "ny" });
+    vm4.invoke(() -> WANTestBase.startSender( "ny" ));
+    vm7.invoke(() -> WANTestBase.startSender( "ny" ));
     
-    vm5.invoke(WANTestBase.class, "startSender", new Object[] { "tk" });
+    vm5.invoke(() -> WANTestBase.startSender( "tk" ));
     
     //pause senders on site1 and site3. Site2 has the sender running to pass along events
-    vm3.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
-    vm6.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
+    vm3.invoke(() -> WANTestBase.pauseSender( "ln" ));
+    vm6.invoke(() -> WANTestBase.pauseSender( "ln" ));
     
-    vm5.invoke(WANTestBase.class, "pauseSender", new Object[] { "tk" });
+    vm5.invoke(() -> WANTestBase.pauseSender( "tk" ));
     
     //need to have this pause since pauseSender doesn't take effect immediately
     Wait.pause(1000);
     
     //do puts on site1
-    vm3.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_PR",
-      100 });
+    vm3.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_PR",
+      100 ));
     
     //do more puts on site3
-    vm5.invoke(WANTestBase.class, "doPutsFrom", new Object[] { getTestMethodName() + "_PR",
-      100, 200 });
+    vm5.invoke(() -> WANTestBase.doPutsFrom( getTestMethodName() + "_PR",
+      100, 200 ));
     
     //verify queue size on site1 and site3
-    vm3.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ln", 100 });
-    vm5.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "tk", 100 });
+    vm3.invoke(() -> WANTestBase.verifyQueueSize( "ln", 100 ));
+    vm5.invoke(() -> WANTestBase.verifyQueueSize( "tk", 100 ));
 
     //resume sender on site1 so that events reach site2 and from there to site3
-    vm3.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
-    vm6.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
+    vm3.invoke(() -> WANTestBase.resumeSender( "ln" ));
+    vm6.invoke(() -> WANTestBase.resumeSender( "ln" ));
     
     //validate region size on site2 (should have 100) and site3 (should have 200)
-    vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_PR", 100 });
-    vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_PR", 200 });
+    vm4.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_PR", 100 ));
+    vm5.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_PR", 200 ));
     
     //verify queue size remains same on site3 which means event loopback did not happen
     //this means events coming from site1 are not enqueued back into the sender
-    vm5.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "tk", 100 });
+    vm5.invoke(() -> WANTestBase.verifyQueueSize( "tk", 100 ));
     
     //resume sender on site3
-    vm5.invoke(WANTestBase.class, "resumeSender", new Object[] { "tk" });
+    vm5.invoke(() -> WANTestBase.resumeSender( "tk" ));
     
     //validate region size
-    vm3.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 200 });
-    vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 200 });
-    vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 200 });
+    vm3.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 200 ));
+    vm4.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 200 ));
+    vm5.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 200 ));
   }
   
   /**
@@ -271,154 +266,151 @@ public class ParallelWANPropagationLoopBackDUnitTest extends WANTestBase {
    * TK site: vm5
    */
   public void testParallelPropagationLoopBack3SitesNtoNTopologyPutFromOneDS() {
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
-    Integer tkPort = (Integer)vm2.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 3, lnPort });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+    Integer tkPort = (Integer)vm2.invoke(() -> WANTestBase.createFirstRemoteLocator( 3, lnPort ));
     
-    vm3.invoke(WANTestBase.class, "createReceiver", new Object[] { lnPort });
-    vm4.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-    vm5.invoke(WANTestBase.class, "createReceiver", new Object[] { tkPort });
+    vm3.invoke(() -> WANTestBase.createReceiver( lnPort ));
+    vm4.invoke(() -> WANTestBase.createReceiver( nyPort ));
+    vm5.invoke(() -> WANTestBase.createReceiver( tkPort ));
     
-    vm6.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm7.invoke(WANTestBase.class, "createCache", new Object[] { nyPort });
+    vm6.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm7.invoke(() -> WANTestBase.createCache( nyPort ));
     
     //site1
-    vm3.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-      true, 100, 10, false, false, null, true });
-    vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln1", 2,
-      true, 100, 10, false, false, null, true });
+    vm3.invoke(() -> WANTestBase.createSender( "ln1", 2,
+      true, 100, 10, false, false, null, true ));
+    vm6.invoke(() -> WANTestBase.createSender( "ln1", 2,
+      true, 100, 10, false, false, null, true ));
 
-    vm3.invoke(WANTestBase.class, "createSender", new Object[] { "ln2", 3,
-      true, 100, 10, false, false, null, true });
-    vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln2", 3,
-      true, 100, 10, false, false, null, true });
+    vm3.invoke(() -> WANTestBase.createSender( "ln2", 3,
+      true, 100, 10, false, false, null, true ));
+    vm6.invoke(() -> WANTestBase.createSender( "ln2", 3,
+      true, 100, 10, false, false, null, true ));
     
     //site2
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ny1", 1,
-      true, 100, 10, false, false, null, true });
-    vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ny1", 1,
-      true, 100, 10, false, false, null, true });
+    vm4.invoke(() -> WANTestBase.createSender( "ny1", 1,
+      true, 100, 10, false, false, null, true ));
+    vm7.invoke(() -> WANTestBase.createSender( "ny1", 1,
+      true, 100, 10, false, false, null, true ));
 
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ny2", 3,
-      true, 100, 10, false, false, null, true });
-    vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ny2", 3,
-      true, 100, 10, false, false, null, true });
+    vm4.invoke(() -> WANTestBase.createSender( "ny2", 3,
+      true, 100, 10, false, false, null, true ));
+    vm7.invoke(() -> WANTestBase.createSender( "ny2", 3,
+      true, 100, 10, false, false, null, true ));
 
     //site3
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "tk1", 1,
-      true, 100, 10, false, false, null, true });
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "tk2", 2,
-      true, 100, 10, false, false, null, true });
+    vm5.invoke(() -> WANTestBase.createSender( "tk1", 1,
+      true, 100, 10, false, false, null, true ));
+    vm5.invoke(() -> WANTestBase.createSender( "tk2", 2,
+      true, 100, 10, false, false, null, true ));
 
     //create PR
-    vm3.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ln1,ln2", 0, 1, isOffHeap() });
-    vm6.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ln1,ln2", 0, 1, isOffHeap() });
-    
-    vm4.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ny1,ny2", 0, 1, isOffHeap() });
-    vm7.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "ny1,ny2", 0, 1, isOffHeap() });
-    
-    vm5.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", "tk1,tk2", 0, 1, isOffHeap() });
+    vm3.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ln1,ln2", 0, 1, isOffHeap() ));
+    vm6.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ln1,ln2", 0, 1, isOffHeap() ));
+    
+    vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ny1,ny2", 0, 1, isOffHeap() ));
+    vm7.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "ny1,ny2", 0, 1, isOffHeap() ));
+    
+    vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", "tk1,tk2", 0, 1, isOffHeap() ));
 
     //start all the senders
-    vm3.invoke(WANTestBase.class, "startSender", new Object[] { "ln1" });
-    vm3.invoke(WANTestBase.class, "startSender", new Object[] { "ln2" });
-    vm6.invoke(WANTestBase.class, "startSender", new Object[] { "ln1" });
-    vm6.invoke(WANTestBase.class, "startSender", new Object[] { "ln2" });
+    vm3.invoke(() -> WANTestBase.startSender( "ln1" ));
+    vm3.invoke(() -> WANTestBase.startSender( "ln2" ));
+    vm6.invoke(() -> WANTestBase.startSender( "ln1" ));
+    vm6.invoke(() -> WANTestBase.startSender( "ln2" ));
     
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ny1" });
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ny2" });
-    vm7.invoke(WANTestBase.class, "startSender", new Object[] { "ny1" });
-    vm7.invoke(WANTestBase.class, "startSender", new Object[] { "ny2" });
+    vm4.invoke(() -> WANTestBase.startSender( "ny1" ));
+    vm4.invoke(() -> WANTestBase.startSender( "ny2" ));
+    vm7.invoke(() -> WANTestBase.startSender( "ny1" ));
+    vm7.invoke(() -> WANTestBase.startSender( "ny2" ));
     
-    vm5.invoke(WANTestBase.class, "startSender", new Object[] { "tk1" });
-    vm5.invoke(WANTestBase.class, "startSender", new Object[] { "tk2" });
+    vm5.invoke(() -> WANTestBase.startSender( "tk1" ));
+    vm5.invoke(() -> WANTestBase.startSender( "tk2" ));
     
     //pause senders on all the sites
-    vm3.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln1" });
-    vm3.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln2" });
-    vm6.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln1" });
-    vm6.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln2" });
+    vm3.invoke(() -> WANTestBase.pauseSender( "ln1" ));
+    vm3.invoke(() -> WANTestBase.pauseSender( "ln2" ));
+    vm6.invoke(() -> WANTestBase.pauseSender( "ln1" ));
+    vm6.invoke(() -> WANTestBase.pauseSender( "ln2" ));
     
-    vm4.invoke(WANTestBase.class, "pauseSender", new Object[] { "ny1" });
-    vm4.invoke(WANTestBase.class, "pauseSender", new Object[] { "ny2" });
-    vm7.invoke(WANTestBase.class, "pauseSender", new Object[] { "ny1" });
-    vm7.invoke(WANTestBase.class, "pauseSender", new Object[] { "ny2" });
+    vm4.invoke(() -> WANTestBase.pauseSender( "ny1" ));
+    vm4.invoke(() -> WANTestBase.pauseSender( "ny2" ));
+    vm7.invoke(() -> WANTestBase.pauseSender( "ny1" ));
+    vm7.invoke(() -> WANTestBase.pauseSender( "ny2" ));
     
-    vm5.invoke(WANTestBase.class, "pauseSender", new Object[] { "tk1" });
-    vm5.invoke(WANTestBase.class, "pauseSender", new Object[] { "tk2" });
+    vm5.invoke(() -> WANTestBase.pauseSender( "tk1" ));
+    vm5.invoke(() -> WANTestBase.pauseSender( "tk2" ));
     
     //this is required since sender pause doesn't take effect immediately
     Wait.pause(1000);
 
     //do puts on site1
-    vm3.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_PR",
-      100 });
+    vm3.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_PR",
+      100 ));
     
     //verify queue size on site1 and site3
-    vm3.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ln1", 100 });
-    vm3.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ln2", 100 });
+    vm3.invoke(() -> WANTestBase.verifyQueueSize( "ln1", 100 ));
+    vm3.invoke(() -> WANTestBase.verifyQueueSize( "ln2", 100 ));
     
     //resume sender (from site1 to site2) on site1
-    vm3.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln1" });
-    vm6.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln1" });
+    vm3.invoke(() -> WANTestBase.resumeSender( "ln1" ));
+    vm6.invoke(() -> WANTestBase.resumeSender( "ln1" ));
 
     //validate region size on site2
-    vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 100 });
+    vm4.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 100 ));
 
     //verify queue size on site2 (sender 2 to 1)
     //should remain at 0 as the events from site1 should not go back to site1
-    vm4.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ny1", 0 });
+    vm4.invoke(() -> WANTestBase.verifyQueueSize( "ny1", 0 ));
     
     //verify queue size on site2 (sender 2 to 3)
     //should remain at 0 as events from site1 will reach site3 directly..site2 need not send to site3 again  
-    vm4.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ny2", 0 });
+    vm4.invoke(() -> WANTestBase.verifyQueueSize( "ny2", 0 ));
     
     //do more puts on site3
-    vm5.invoke(WANTestBase.class, "doPutsFrom", new Object[] { getTestMethodName() + "_PR",
-      100, 200 });
+    vm5.invoke(() -> WANTestBase.doPutsFrom( getTestMethodName() + "_PR",
+      100, 200 ));
     
     //resume sender (from site3 to site2) on site3
-    vm5.invoke(WANTestBase.class, "resumeSender", new Object[] { "tk2" });
+    vm5.invoke(() -> WANTestBase.resumeSender( "tk2" ));
     
     //validate region size on site2
-    vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 200 });
+    vm4.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 200 ));
     
     //verify queue size on site2 (sender 2 to 3)
     //should remain at 0 as the events from site3 should not go back to site3
-    vm4.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ny2", 0 });
+    vm4.invoke(() -> WANTestBase.verifyQueueSize( "ny2", 0 ));
     
     //verify queue size on site2 (sender 2 to 1)
     //should remain at 0 as events from site3 will reach site1 directly..site2 need not send to site1 again  
-    vm4.invoke(WANTestBase.class, "verifyQueueSize", new Object[] { "ny1", 0 });
+    vm4.invoke(() -> WANTestBase.verifyQueueSize( "ny1", 0 ));
     
     //resume all senders
-    vm3.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln2" });
-    vm6.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln2" });
+    vm3.invoke(() -> WANTestBase.resumeSender( "ln2" ));
+    vm6.invoke(() -> WANTestBase.resumeSender( "ln2" ));
     
-    vm4.invoke(WANTestBase.class, "resumeSender", new Object[] { "ny1" });
-    vm4.invoke(WANTestBase.class, "resumeSender", new Object[] { "ny2" });
-    vm7.invoke(WANTestBase.class, "resumeSender", new Object[] { "ny1" });
-    vm7.invoke(WANTestBase.class, "resumeSender", new Object[] { "ny2" });
+    vm4.invoke(() -> WANTestBase.resumeSender( "ny1" ));
+    vm4.invoke(() -> WANTestBase.resumeSender( "ny2" ));
+    vm7.invoke(() -> WANTestBase.resumeSender( "ny1" ));
+    vm7.invoke(() -> WANTestBase.resumeSender( "ny2" ));
     
-    vm5.invoke(WANTestBase.class, "resumeSender", new Object[] { "tk1" });
+    vm5.invoke(() -> WANTestBase.resumeSender( "tk1" ));
     
     //validate region size on all sites
-    vm3.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 200 });
-    vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 200 });
-    vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 200 });
+    vm3.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 200 ));
+    vm4.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 200 ));
+    vm5.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 200 ));
   }
   
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
index 04214fb..f1c8b1c 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
@@ -44,10 +44,8 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
   }
   
   public void testPartitionedRegionParallelPropagation_BeforeDispatch() 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 ));
 
     createReceiver(vm2, nyPort);
     createReceiver(vm3, nyPort);
@@ -63,14 +61,10 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
 
     putKeyValues();
 
-    ArrayList<Integer> v4List = (ArrayList<Integer>)vm4.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", NUM_PUTS });
-    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", NUM_PUTS });
-    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", NUM_PUTS });
-    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", NUM_PUTS });
+    ArrayList<Integer> v4List = (ArrayList<Integer>)vm4.invoke(() -> WANTestBase.getSenderStats( "ln", NUM_PUTS ));
+    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(() -> WANTestBase.getSenderStats( "ln", NUM_PUTS ));
+    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(() -> WANTestBase.getSenderStats( "ln", NUM_PUTS ));
+    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(() -> WANTestBase.getSenderStats( "ln", NUM_PUTS ));
     
     assertEquals(NUM_PUTS, v4List.get(0) + v5List.get(0) + v6List.get(0) + v7List.get(0) ); //queue size
     assertEquals(NUM_PUTS, v4List.get(1) + v5List.get(1) + v6List.get(1) + v7List.get(1)); //eventsReceived
@@ -82,10 +76,8 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
   }
 
   public void testPartitionedRegionParallelPropagation_AfterDispatch_NoRedundacny() 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 ));
 
     createReceiver(vm2, nyPort);
    
@@ -98,21 +90,17 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     
     startSenders();
 
-    vm4.invoke(WANTestBase.class, "doPuts", new Object[] { testName,
-        NUM_PUTS });
+    vm4.invoke(() -> WANTestBase.doPuts( testName,
+        NUM_PUTS ));
     
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        testName, NUM_PUTS });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        testName, NUM_PUTS ));
     
     
-    ArrayList<Integer> v4List = (ArrayList<Integer>)vm4.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
+    ArrayList<Integer> v4List = (ArrayList<Integer>)vm4.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
     
     assertEquals(0, v4List.get(0) + v5List.get(0) + v6List.get(0) + v7List.get(0) ); //queue size
     assertEquals(NUM_PUTS, v4List.get(1) + v5List.get(1) + v6List.get(1) + v7List.get(1)); //eventsReceived
@@ -121,14 +109,12 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     assertTrue(v4List.get(4) + v5List.get(4) + v6List.get(4) + v7List.get(4) >= 10); //batches distributed
     assertEquals(0, v4List.get(5) + v5List.get(5) + v6List.get(5) + v7List.get(5)); //batches redistributed
     
-    vm2.invoke(WANTestBase.class, "checkGatewayReceiverStats", new Object[] {10, NUM_PUTS, NUM_PUTS });
+    vm2.invoke(() -> WANTestBase.checkGatewayReceiverStats(10, NUM_PUTS, NUM_PUTS ));
   }
   
   public void testPartitionedRegionParallelPropagation_AfterDispatch_Redundancy_3() 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 ));
 
     createReceiver(vm2, nyPort);
 
@@ -140,20 +126,16 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     
     startSenders();
 
-    vm4.invoke(WANTestBase.class, "doPuts", new Object[] { testName,
-        NUM_PUTS });
+    vm4.invoke(() -> WANTestBase.doPuts( testName,
+        NUM_PUTS ));
     
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        testName, NUM_PUTS });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        testName, NUM_PUTS ));
     
-    ArrayList<Integer> v4List = (ArrayList<Integer>)vm4.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
+    ArrayList<Integer> v4List = (ArrayList<Integer>)vm4.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
     
     assertEquals(0, v4List.get(0) + v5List.get(0) + v6List.get(0) + v7List.get(0) ); //queue size
     assertEquals(400, v4List.get(1) + v5List.get(1) + v6List.get(1) + v7List.get(1)); //eventsReceived
@@ -162,50 +144,46 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     assertTrue(v4List.get(4) + v5List.get(4) + v6List.get(4) + v7List.get(4) >= 10); //batches distributed
     assertEquals(0, v4List.get(5) + v5List.get(5) + v6List.get(5) + v7List.get(5)); //batches redistributed
     
-    vm2.invoke(WANTestBase.class, "checkGatewayReceiverStats", new Object[] {10, NUM_PUTS, NUM_PUTS });
+    vm2.invoke(() -> WANTestBase.checkGatewayReceiverStats(10, NUM_PUTS, NUM_PUTS ));
   }
   
   public void testWANStatsTwoWanSites_Bug44331() throws Exception {
     Integer lnPort = createFirstLocatorWithDSId(1);
-    Integer nyPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
-    Integer tkPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 3, lnPort });
+    Integer nyPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
+    Integer tkPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 3, lnPort ));
 
     createReceiver(vm2, nyPort);
     createReceiver(vm3, tkPort);
 
-    vm4.invoke(WANTestBase.class, "createCache", new Object[] {lnPort });
+    vm4.invoke(() -> WANTestBase.createCache(lnPort ));
 
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln1",
-        2, true, 100, 10, false, false, null, true });
+    vm4.invoke(() -> WANTestBase.createSender( "ln1",
+        2, true, 100, 10, false, false, null, true ));
   
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln2",
-        3, true, 100, 10, false, false, null, true });
+    vm4.invoke(() -> WANTestBase.createSender( "ln2",
+        3, true, 100, 10, false, false, null, true ));
   
     createReceiverPR(vm2, 0);
-    vm3.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      testName, null, 0, 10, isOffHeap() });
+    vm3.invoke(() -> WANTestBase.createPartitionedRegion(
+      testName, null, 0, 10, isOffHeap() ));
 
-    vm4.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      testName, "ln1,ln2", 0, 10, isOffHeap() });
+    vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+      testName, "ln1,ln2", 0, 10, isOffHeap() ));
     
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln1" });
+    vm4.invoke(() -> WANTestBase.startSender( "ln1" ));
 
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln2" });
+    vm4.invoke(() -> WANTestBase.startSender( "ln2" ));
 
-    vm4.invoke(WANTestBase.class, "doPuts", new Object[] { testName,
-        NUM_PUTS });
+    vm4.invoke(() -> WANTestBase.doPuts( testName,
+        NUM_PUTS ));
 
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        testName, NUM_PUTS });
-    vm3.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        testName, NUM_PUTS });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        testName, NUM_PUTS ));
+    vm3.invoke(() -> WANTestBase.validateRegionSize(
+        testName, NUM_PUTS ));
     
-    ArrayList<Integer> v4Sender1List = (ArrayList<Integer>)vm4.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln1", 0 });
-    ArrayList<Integer> v4Sender2List = (ArrayList<Integer>)vm4.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln2", 0 });
+    ArrayList<Integer> v4Sender1List = (ArrayList<Integer>)vm4.invoke(() -> WANTestBase.getSenderStats( "ln1", 0 ));
+    ArrayList<Integer> v4Sender2List = (ArrayList<Integer>)vm4.invoke(() -> WANTestBase.getSenderStats( "ln2", 0 ));
     
     assertEquals(0, v4Sender1List.get(0).intValue()); //queue size
     assertEquals(NUM_PUTS, v4Sender1List.get(1).intValue()); //eventsReceived
@@ -221,15 +199,13 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     assertTrue(v4Sender2List.get(4).intValue()>=10); //batches distributed
     assertEquals(0, v4Sender2List.get(5).intValue()); //batches redistributed
     
-    vm2.invoke(WANTestBase.class, "checkGatewayReceiverStats", new Object[] {10, NUM_PUTS, NUM_PUTS });
-    vm3.invoke(WANTestBase.class, "checkGatewayReceiverStats", new Object[] {10, NUM_PUTS, NUM_PUTS });
+    vm2.invoke(() -> WANTestBase.checkGatewayReceiverStats(10, NUM_PUTS, NUM_PUTS ));
+    vm3.invoke(() -> WANTestBase.checkGatewayReceiverStats(10, NUM_PUTS, NUM_PUTS ));
   }
   
   public void testParallelPropagationHA() 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 ));
 
     createReceiver(vm2, nyPort);
     
@@ -242,22 +218,18 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     
     startSenders();
 
-    AsyncInvocation inv1 = vm5.invokeAsync(WANTestBase.class, "doPuts",
-        new Object[] { testName, 1000 });
+    AsyncInvocation inv1 = vm5.invokeAsync(() -> WANTestBase.doPuts( testName, 1000 ));
     pause(200);
-    AsyncInvocation inv2 = vm4.invokeAsync(WANTestBase.class, "killSender");
+    AsyncInvocation inv2 = vm4.invokeAsync(() -> WANTestBase.killSender());
     inv1.join();
     inv2.join();
     
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        testName, 1000 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        testName, 1000 ));
     
-    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0});
-    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0});
-    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0});
+    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(() -> WANTestBase.getSenderStats( "ln", 0));
+    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(() -> WANTestBase.getSenderStats( "ln", 0));
+    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(() -> WANTestBase.getSenderStats( "ln", 0));
     
     assertEquals(0, v5List.get(0) + v6List.get(0) + v7List.get(0) ); //queue size
     int receivedEvents = v5List.get(1) + v6List.get(1) + v7List.get(1);
@@ -269,7 +241,7 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     //assertTrue(v5List.get(4) + v6List.get(4) + v7List.get(4) > 1000); //batches distributed : its quite possible that vm4 has distributed some of the batches.
     assertEquals(0, v5List.get(5) + v6List.get(5) + v7List.get(5)); //batches redistributed
   
-    vm2.invoke(WANTestBase.class, "checkGatewayReceiverStatsHA", new Object[] {NUM_PUTS, 1000, 1000 });
+    vm2.invoke(() -> WANTestBase.checkGatewayReceiverStatsHA(NUM_PUTS, 1000, 1000 ));
   }
 
   /**
@@ -281,10 +253,8 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
    */
   public void  testParallePropagationWithRemoteRegionDestroy() throws Exception {
     addIgnoredException("RegionDestroyedException");
-    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 ));
 
     createReceiver(vm2, nyPort);
 
@@ -292,28 +262,24 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
 
     createReceiverPR(vm2, 0);
 
-    vm2.invoke(WANTestBase.class, "addCacheListenerAndDestroyRegion", new Object[] {
-        testName});
+    vm2.invoke(() -> WANTestBase.addCacheListenerAndDestroyRegion(
+        testName));
 
     createSenderPRs(0);
 
     startSenders();
 
     //start puts in RR_1 in another thread
-    vm4.invoke(WANTestBase.class, "doPuts", new Object[] { testName, 2000 });
+    vm4.invoke(() -> WANTestBase.doPuts( testName, 2000 ));
     
     //verify that all is well in local site. All the events should be present in local region
-    vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        testName, 2000 });
+    vm4.invoke(() -> WANTestBase.validateRegionSize(
+        testName, 2000 ));
     
-    ArrayList<Integer> v4List = (ArrayList<Integer>)vm5.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", -1});
-    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", -1});
-    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", -1});
-    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", -1});
+    ArrayList<Integer> v4List = (ArrayList<Integer>)vm5.invoke(() -> WANTestBase.getSenderStats( "ln", -1));
+    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(() -> WANTestBase.getSenderStats( "ln", -1));
+    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(() -> WANTestBase.getSenderStats( "ln", -1));
+    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(() -> WANTestBase.getSenderStats( "ln", -1));
     
     
     assertTrue(v4List.get(4) + v5List.get(4) + v6List.get(4) + v7List.get(4) >= 1); //batches distributed : its quite possible that vm4 has distributed some of the batches.
@@ -322,30 +288,28 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
 
   public void testParallelPropogationWithFilter() 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 ));
 
     createReceiver(vm2, 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.createCache(lnPort ));
+    vm5.invoke(() -> WANTestBase.createCache(lnPort ));
+    vm6.invoke(() -> WANTestBase.createCache(lnPort ));
+    vm7.invoke(() -> WANTestBase.createCache(lnPort ));
 
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
+    vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
         true, 100, 10, false, false,
-        new MyGatewayEventFilter(), true });
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
+        new MyGatewayEventFilter(), true ));
+    vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
         true, 100, 10, false, false,
-        new MyGatewayEventFilter(), true });
-    vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
+        new MyGatewayEventFilter(), true ));
+    vm6.invoke(() -> WANTestBase.createSender( "ln", 2,
       true, 100, 10, false, false,
-      new MyGatewayEventFilter(), true });
-    vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
+      new MyGatewayEventFilter(), true ));
+    vm7.invoke(() -> WANTestBase.createSender( "ln", 2,
       true, 100, 10, false, false,
-      new MyGatewayEventFilter(), true });
+      new MyGatewayEventFilter(), true ));
   
     createSenderPRs(0);
 
@@ -353,19 +317,15 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
 
     createReceiverPR(vm2, 1);
     
-    vm4.invoke(WANTestBase.class, "doPuts", new Object[] { testName, 1000 });
+    vm4.invoke(() -> WANTestBase.doPuts( testName, 1000 ));
 
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        testName, 800 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        testName, 800 ));
     
-    ArrayList<Integer> v4List = (ArrayList<Integer>)vm4.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
+    ArrayList<Integer> v4List = (ArrayList<Integer>)vm4.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
     
     assertEquals(0, v4List.get(0) + v5List.get(0) + v6List.get(0) + v7List.get(0) ); //queue size
     assertEquals(1000, v4List.get(1) + v5List.get(1) + v6List.get(1) + v7List.get(1)); //eventsReceived
@@ -375,14 +335,12 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     assertEquals(0, v4List.get(5) + v5List.get(5) + v6List.get(5) + v7List.get(5)); //batches redistributed
     assertEquals(200, v4List.get(6) + v5List.get(6) + v6List.get(6) + v7List.get(6)); //events filtered
     
-    vm2.invoke(WANTestBase.class, "checkGatewayReceiverStats", new Object[] {80, 800, 800});
+    vm2.invoke(() -> WANTestBase.checkGatewayReceiverStats(80, 800, 800));
   }
   
   public void testParallelPropagationConflation() 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 ));
 
     createReceiver(vm2, nyPort);
 
@@ -400,44 +358,40 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
       updateKeyValues.put(i, i+"_updated");
     }
     
-    vm4.invoke(WANTestBase.class, "putGivenKeyValue", new Object[] { testName, updateKeyValues });
+    vm4.invoke(() -> WANTestBase.putGivenKeyValue( testName, updateKeyValues ));
 
-    vm4.invoke(WANTestBase.class, "checkQueueSize", new Object[] { "ln", keyValues.size() + updateKeyValues.size() /*creates aren't conflated*/ });
+    vm4.invoke(() -> WANTestBase.checkQueueSize( "ln", keyValues.size() + updateKeyValues.size() /*creates aren't conflated*/ ));
     
     // Do the puts again. Since these are updates, the previous updates will be conflated.
-    vm4.invoke(WANTestBase.class, "putGivenKeyValue", new Object[] { testName, updateKeyValues });
+    vm4.invoke(() -> WANTestBase.putGivenKeyValue( testName, updateKeyValues ));
 
-    vm4.invoke(WANTestBase.class, "checkQueueSize", new Object[] { "ln", keyValues.size() + updateKeyValues.size() /*creates aren't conflated*/ });
+    vm4.invoke(() -> WANTestBase.checkQueueSize( "ln", keyValues.size() + updateKeyValues.size() /*creates aren't conflated*/ ));
 
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        testName, 0 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        testName, 0 ));
 
-    vm2.invoke(WANTestBase.class, "checkGatewayReceiverStats", new Object[] {0, 0, 0});
+    vm2.invoke(() -> WANTestBase.checkGatewayReceiverStats(0, 0, 0));
     
-    vm4.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
-    vm6.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
-    vm7.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.resumeSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.resumeSender( "ln" ));
+    vm6.invoke(() -> WANTestBase.resumeSender( "ln" ));
+    vm7.invoke(() -> WANTestBase.resumeSender( "ln" ));
 
     keyValues.putAll(updateKeyValues);
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        testName, keyValues.size() });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        testName, keyValues.size() ));
     
-    vm2.invoke(WANTestBase.class, "validateRegionContents", new Object[] {
-        testName, keyValues });
+    vm2.invoke(() -> WANTestBase.validateRegionContents(
+        testName, keyValues ));
     
-    vm2.invoke(WANTestBase.class, "checkGatewayReceiverStats", new Object[] {0, 150, NUM_PUTS});
+    vm2.invoke(() -> WANTestBase.checkGatewayReceiverStats(0, 150, NUM_PUTS));
     
-    vm4.invoke(WANTestBase.class, "checkQueueSize", new Object[] { "ln", 0 });
+    vm4.invoke(() -> WANTestBase.checkQueueSize( "ln", 0 ));
     
-    ArrayList<Integer> v4List = (ArrayList<Integer>)vm4.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
-    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(
-        WANTestBase.class, "getSenderStats", new Object[] { "ln", 0 });
+    ArrayList<Integer> v4List = (ArrayList<Integer>)vm4.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
+    ArrayList<Integer> v7List = (ArrayList<Integer>)vm7.invoke(() -> WANTestBase.getSenderStats( "ln", 0 ));
     
     assertEquals(0, v4List.get(0) + v5List.get(0) + v6List.get(0) + v7List.get(0) ); //queue size
     assertEquals(200, v4List.get(1) + v5List.get(1) + v6List.get(1) + v7List.get(1)); //eventsReceived
@@ -455,27 +409,27 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
       keyValues.put(i, i);
     }
     
-    vm4.invoke(WANTestBase.class, "putGivenKeyValue", new Object[] { testName, keyValues });
+    vm4.invoke(() -> WANTestBase.putGivenKeyValue( testName, keyValues ));
 
-    vm4.invoke(WANTestBase.class, "checkQueueSize", new Object[] { "ln", keyValues.size() });
+    vm4.invoke(() -> WANTestBase.checkQueueSize( "ln", keyValues.size() ));
     
     return keyValues;
   }
 
   protected void createReceiverPR(VM vm, int redundancy) {
-    vm.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        testName, null, redundancy, 10, isOffHeap() });
+    vm.invoke(() -> WANTestBase.createPartitionedRegion(
+        testName, null, redundancy, 10, isOffHeap() ));
   }
   
   protected void createSenderPRs(int redundancy) {
-    vm4.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        testName, "ln", redundancy, 10, isOffHeap() });
-    vm5.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        testName, "ln", redundancy, 10, isOffHeap() });
-    vm6.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        testName, "ln", redundancy, 10, isOffHeap() });
-    vm7.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        testName, "ln", redundancy, 10, isOffHeap() });
+    vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+        testName, "ln", redundancy, 10, isOffHeap() ));
+    vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+        testName, "ln", redundancy, 10, isOffHeap() ));
+    vm6.invoke(() -> WANTestBase.createPartitionedRegion(
+        testName, "ln", redundancy, 10, isOffHeap() ));
+    vm7.invoke(() -> WANTestBase.createPartitionedRegion(
+        testName, "ln", redundancy, 10, isOffHeap() ));
   }
 
   protected void startPausedSenders() {
@@ -488,45 +442,45 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
   }
 
   protected void createReceiver(VM vm, Integer nyPort) {
-    vm.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
+    vm.invoke(() -> WANTestBase.createReceiver( nyPort ));
   }
   
   protected void startSenders() {
-    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.startSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm6.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm7.invoke(() -> WANTestBase.startSender( "ln" ));
   }
 
   protected void createSendersWithConflation(Integer lnPort) {
-    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, true, false, null, true });
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-        true, 100, 10, true, false, null, true });
-    vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-        true, 100, 10, true, false, null, true });
-    vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-        true, 100, 10, true, false, null, true });
+    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, true, false, null, true ));
+    vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
+        true, 100, 10, true, false, null, true ));
+    vm6.invoke(() -> WANTestBase.createSender( "ln", 2,
+        true, 100, 10, true, false, null, true ));
+    vm7.invoke(() -> WANTestBase.createSender( "ln", 2,
+        true, 100, 10, true, false, null, true ));
   }
 
   protected void createSenders(Integer lnPort) {
-    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.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 ));
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderDistributedDeadlockDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderDistributedDeadlockDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderDistributedDeadlockDUnitTest.java
index 3ea2674..8e3a760 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderDistributedDeadlockDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderDistributedDeadlockDUnitTest.java
@@ -47,11 +47,9 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
     //Uses replicated regions and conserve-sockets=false
     public void testPrimarySendersOnDifferentVMsReplicated() throws Exception {
 
-        Integer lnPort = (Integer) vm0.invoke(WANTestBase.class,
-                "createFirstPeerLocator", new Object[]{1});
+        Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstPeerLocator(1));
 
-        Integer nyPort = (Integer) vm1.invoke(WANTestBase.class,
-                "createFirstRemoteLocator", new Object[]{2, lnPort});
+        Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
 
         createCachesWith(Boolean.FALSE, nyPort, lnPort);
 
@@ -65,10 +63,10 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
 
         //exercise region and gateway operations with different messaging
         exerciseWANOperations();
-        AsyncInvocation invVM4transaction = vm4.invokeAsync(WANTestBase.class, "doTxPuts", new Object[]{getTestMethodName() + "_RR", 100});
-        AsyncInvocation invVM5transaction = vm5.invokeAsync(WANTestBase.class, "doTxPuts", new Object[]{getTestMethodName() + "_RR", 100});
-        AsyncInvocation invVM4 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 1000});
-        AsyncInvocation invVM5 = vm5.invokeAsync(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 1000});
+        AsyncInvocation invVM4transaction = vm4.invokeAsync(() -> WANTestBase.doTxPuts(getTestMethodName() + "_RR", 100));
+        AsyncInvocation invVM5transaction = vm5.invokeAsync(() -> WANTestBase.doTxPuts(getTestMethodName() + "_RR", 100));
+        AsyncInvocation invVM4 = vm4.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 1000));
+        AsyncInvocation invVM5 = vm5.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 1000));
 
         exerciseFunctions();
 
@@ -86,11 +84,9 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
 
     //Uses partitioned regions and conserve-sockets=false
     public void testPrimarySendersOnDifferentVMsPR() throws Exception {
-        Integer lnPort = (Integer) vm0.invoke(WANTestBase.class,
-                "createFirstPeerLocator", new Object[]{1});
+        Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstPeerLocator(1));
 
-        Integer nyPort = (Integer) vm1.invoke(WANTestBase.class,
-                "createFirstRemoteLocator", new Object[]{2, lnPort});
+        Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
 
         createCachesWith(Boolean.FALSE, nyPort, lnPort);
 
@@ -102,12 +98,12 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
 
         exerciseWANOperations();
         AsyncInvocation invVM4transaction
-                = vm4.invokeAsync(SerialGatewaySenderDistributedDeadlockDUnitTest.class, "doTxPutsPR", new Object[]{getTestMethodName() + "_RR", 100, 1000});
+                = vm4.invokeAsync(() -> SerialGatewaySenderDistributedDeadlockDUnitTest.doTxPutsPR(getTestMethodName() + "_RR", 100, 1000));
         AsyncInvocation invVM5transaction
-                = vm5.invokeAsync(SerialGatewaySenderDistributedDeadlockDUnitTest.class, "doTxPutsPR", new Object[]{getTestMethodName() + "_RR", 100, 1000});
+                = vm5.invokeAsync(() -> SerialGatewaySenderDistributedDeadlockDUnitTest.doTxPutsPR(getTestMethodName() + "_RR", 100, 1000));
 
-        AsyncInvocation invVM4 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 1000});
-        AsyncInvocation invVM5 = vm5.invokeAsync(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 1000});
+        AsyncInvocation invVM4 = vm4.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 1000));
+        AsyncInvocation invVM5 = vm5.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 1000));
 
         exerciseFunctions();
 
@@ -125,11 +121,9 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
     //Uses replicated regions and conserve-sockets=true
     public void testPrimarySendersOnDifferentVMsReplicatedSocketPolicy() throws Exception {
 
-        Integer lnPort = (Integer) vm0.invoke(WANTestBase.class,
-                "createFirstPeerLocator", new Object[]{1});
+        Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstPeerLocator(1));
 
-        Integer nyPort = (Integer) vm1.invoke(WANTestBase.class,
-                "createFirstRemoteLocator", new Object[]{2, lnPort});
+        Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
 
         createCachesWith(Boolean.TRUE, nyPort, lnPort);
 
@@ -143,11 +137,11 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
 
         //exercise region and gateway operations with messaging
         exerciseWANOperations();
-        AsyncInvocation invVM4transaction = vm4.invokeAsync(WANTestBase.class, "doTxPuts", new Object[]{getTestMethodName() + "_RR", 100});
-        AsyncInvocation invVM5transaction = vm5.invokeAsync(WANTestBase.class, "doTxPuts", new Object[]{getTestMethodName() + "_RR", 100});
+        AsyncInvocation invVM4transaction = vm4.invokeAsync(() -> WANTestBase.doTxPuts(getTestMethodName() + "_RR", 100));
+        AsyncInvocation invVM5transaction = vm5.invokeAsync(() -> WANTestBase.doTxPuts(getTestMethodName() + "_RR", 100));
 
-        AsyncInvocation invVM4 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 1000});
-        AsyncInvocation invVM5 = vm5.invokeAsync(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 1000});
+        AsyncInvocation invVM4 = vm4.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 1000));
+        AsyncInvocation invVM5 = vm5.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 1000));
 
         exerciseFunctions();
 
@@ -165,11 +159,9 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
     //Uses partitioned regions and conserve-sockets=true
     //this always causes a distributed deadlock
     public void testPrimarySendersOnDifferentVMsPRSocketPolicy() throws Exception {
-        Integer lnPort = (Integer) vm0.invoke(WANTestBase.class,
-                "createFirstPeerLocator", new Object[]{1});
+        Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstPeerLocator(1));
 
-        Integer nyPort = (Integer) vm1.invoke(WANTestBase.class,
-                "createFirstRemoteLocator", new Object[]{2, lnPort});
+        Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
 
         createCachesWith(Boolean.TRUE, nyPort, lnPort);
 
@@ -181,12 +173,12 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
 
         exerciseWANOperations();
         AsyncInvocation invVM4transaction
-                = vm4.invokeAsync(SerialGatewaySenderDistributedDeadlockDUnitTest.class, "doTxPutsPR", new Object[]{getTestMethodName() + "_RR", 100, 1000});
+                = vm4.invokeAsync(() -> SerialGatewaySenderDistributedDeadlockDUnitTest.doTxPutsPR(getTestMethodName() + "_RR", 100, 1000));
         AsyncInvocation invVM5transaction
-                = vm5.invokeAsync(SerialGatewaySenderDistributedDeadlockDUnitTest.class, "doTxPutsPR", new Object[]{getTestMethodName() + "_RR", 100, 1000});
+                = vm5.invokeAsync(() -> SerialGatewaySenderDistributedDeadlockDUnitTest.doTxPutsPR(getTestMethodName() + "_RR", 100, 1000));
 
-        AsyncInvocation invVM4 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 1000});
-        AsyncInvocation invVM5 = vm5.invokeAsync(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 1000});
+        AsyncInvocation invVM4 = vm4.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 1000));
+        AsyncInvocation invVM5 = vm5.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 1000));
 
         exerciseFunctions();
 
@@ -206,59 +198,55 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
     //**************************************************************************
     private void createReplicatedRegions(Integer nyPort) throws Exception {
         //create receiver
-        vm2.invoke(WANTestBase.class, "createReplicatedRegion", new Object[]{
-          getTestMethodName() + "_RR", null, false});
-        vm2.invoke(WANTestBase.class, "createReceiverAfterCache", new Object[]{nyPort});
+        vm2.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", null, false));
+        vm2.invoke(() -> WANTestBase.createReceiverAfterCache(nyPort));
 
         //create senders
-        vm4.invoke(WANTestBase.class, "createReplicatedRegion", new Object[]{
-          getTestMethodName() + "_RR", "ln1,ln2", false});
+        vm4.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1,ln2", false));
 
-        vm5.invoke(WANTestBase.class, "createReplicatedRegion", new Object[]{
-          getTestMethodName() + "_RR", "ln1,ln2", false});
+        vm5.invoke(() -> WANTestBase.createReplicatedRegion(
+          getTestMethodName() + "_RR", "ln1,ln2", false));
     }
 
     private void createCachesWith(Boolean socketPolicy, Integer nyPort, Integer lnPort) {
-        vm2.invoke(WANTestBase.class, "createCacheConserveSockets", new Object[]{socketPolicy, nyPort});
+        vm2.invoke(() -> WANTestBase.createCacheConserveSockets(socketPolicy, nyPort));
 
-        vm4.invoke(WANTestBase.class, "createCacheConserveSockets", new Object[]{socketPolicy, lnPort});
+        vm4.invoke(() -> WANTestBase.createCacheConserveSockets(socketPolicy, lnPort));
 
-        vm5.invoke(WANTestBase.class, "createCacheConserveSockets", new Object[]{socketPolicy, lnPort});
+        vm5.invoke(() -> WANTestBase.createCacheConserveSockets(socketPolicy, lnPort));
     }
 
     private void exerciseFunctions() throws Exception {
         //do function calls that use a shared connection
         for (int x = 0; x < 1000; x++) {
             //setting it to Boolean.TRUE it should pass the test
-            vm4.invoke(SerialGatewaySenderDistributedDeadlockDUnitTest.class, "doFunctionPuts",
-                    new Object[]{getTestMethodName() + "_RR", 1, Boolean.TRUE});
-            vm5.invoke(SerialGatewaySenderDistributedDeadlockDUnitTest.class, "doFunctionPuts",
-                    new Object[]{getTestMethodName() + "_RR", 1, Boolean.TRUE});
+            vm4.invoke(() -> SerialGatewaySenderDistributedDeadlockDUnitTest.doFunctionPuts(getTestMethodName() + "_RR", 1, Boolean.TRUE));
+            vm5.invoke(() -> SerialGatewaySenderDistributedDeadlockDUnitTest.doFunctionPuts(getTestMethodName() + "_RR", 1, Boolean.TRUE));
         }
         for (int x = 0; x < 1000; x++) {
             //setting the Boolean.FALSE below will cause a deadlock in some GFE versions
             //setting it to Boolean.TRUE as above it should pass the test
             //this is similar to the customer found distributed deadlock
-            vm4.invoke(SerialGatewaySenderDistributedDeadlockDUnitTest.class, "doFunctionPuts",
-                    new Object[]{getTestMethodName() + "_RR", 1, Boolean.FALSE});
-            vm5.invoke(SerialGatewaySenderDistributedDeadlockDUnitTest.class, "doFunctionPuts",
-                    new Object[]{getTestMethodName() + "_RR", 1, Boolean.FALSE});
+            vm4.invoke(() -> SerialGatewaySenderDistributedDeadlockDUnitTest.doFunctionPuts(getTestMethodName() + "_RR", 1, Boolean.FALSE));
+            vm5.invoke(() -> SerialGatewaySenderDistributedDeadlockDUnitTest.doFunctionPuts(getTestMethodName() + "_RR", 1, Boolean.FALSE));
         }
     }
 
     private void createPartitionedRegions(Integer nyPort) throws Exception {
         //create remote receiver
-        vm2.invoke(WANTestBase.class, "createPartitionedRegion", new Object[]{getTestMethodName() + "_RR",
-                                                                                "", 0, 113, false});
+        vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + "_RR",
+                                                                                "", 0, 113, false));
 
-        vm2.invoke(WANTestBase.class, "createReceiverAfterCache", new Object[]{nyPort});
+        vm2.invoke(() -> WANTestBase.createReceiverAfterCache(nyPort));
 
         //create sender vms
-        vm4.invoke(WANTestBase.class, "createPartitionedRegion", new Object[]{
-          getTestMethodName() + "_RR", "ln1,ln2", 1, 113, false});
+        vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+          getTestMethodName() + "_RR", "ln1,ln2", 1, 113, false));
 
-        vm5.invoke(WANTestBase.class, "createPartitionedRegion", new Object[]{
-          getTestMethodName() + "_RR", "ln1,ln2", 1, 113, false});
+        vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+          getTestMethodName() + "_RR", "ln1,ln2", 1, 113, false));
     }
 
     private void exerciseWANOperations() throws Exception {
@@ -266,64 +254,63 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
         //messaging between the WAN gateways and members
 
         //exercise region and gateway operations
-        vm4.invoke(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 100});
-        vm5.invoke(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 100});
+        vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 100));
+        vm5.invoke(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 100));
         Wait.pause(2000); //wait for events to propogate
-        vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[]{getTestMethodName() + "_RR", 100});
-        vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[]{getTestMethodName() + "_RR", 100});
-        vm5.invoke(WANTestBase.class, "doDestroys", new Object[]{getTestMethodName() + "_RR", 100});
+        vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 100));
+        vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 100));
+        vm5.invoke(() -> WANTestBase.doDestroys(getTestMethodName() + "_RR", 100));
         Wait.pause(2000);//wait for events to propogate
-        vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[]{getTestMethodName() + "_RR", 0});
-        vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[]{getTestMethodName() + "_RR", 0});
-        vm4.invoke(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 100});
-        vm5.invoke(WANTestBase.class, "doPuts", new Object[]{getTestMethodName() + "_RR", 100});
+        vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 0));
+        vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 0));
+        vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 100));
+        vm5.invoke(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 100));
         Wait.pause(2000); //wait for events to propogate
-        vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[]{getTestMethodName() + "_RR", 100});
-        vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[]{getTestMethodName() + "_RR", 100});
-        vm4.invoke(SerialGatewaySenderDistributedDeadlockDUnitTest.class, "doInvalidates",
-                new Object[]{getTestMethodName() + "_RR", 100, 100});
-        vm4.invoke(WANTestBase.class, "doPutAll", new Object[]{getTestMethodName() + "_RR", 100, 10});
-        vm5.invoke(WANTestBase.class, "doPutAll", new Object[]{getTestMethodName() + "_RR", 100, 10});
+        vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 100));
+        vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 100));
+        vm4.invoke(() -> SerialGatewaySenderDistributedDeadlockDUnitTest.doInvalidates(getTestMethodName() + "_RR", 100, 100));
+        vm4.invoke(() -> WANTestBase.doPutAll(getTestMethodName() + "_RR", 100, 10));
+        vm5.invoke(() -> WANTestBase.doPutAll(getTestMethodName() + "_RR", 100, 10));
         Wait.pause(2000);//wait for events to propogate
-        vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[]{getTestMethodName() + "_RR", 1000});
-        vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[]{getTestMethodName() + "_RR", 1000});
-        vm4.invoke(WANTestBase.class, "doDestroys", new Object[]{getTestMethodName() + "_RR", 1000});
+        vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 1000));
+        vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 1000));
+        vm4.invoke(() -> WANTestBase.doDestroys(getTestMethodName() + "_RR", 1000));
         Wait.pause(2000);//wait for events to propogate
-        vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[]{getTestMethodName() + "_RR", 0});
-        vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[]{getTestMethodName() + "_RR", 0});
-        vm4.invoke(WANTestBase.class, "doPutsPDXSerializable", new Object[]{getTestMethodName() + "_RR", 100});
+        vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 0));
+        vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 0));
+        vm4.invoke(() -> WANTestBase.doPutsPDXSerializable(getTestMethodName() + "_RR", 100));
         Wait.pause(2000);
-        vm5.invoke(WANTestBase.class, "validateRegionSize_PDX", new Object[]{getTestMethodName() + "_RR", 100});
-        vm2.invoke(WANTestBase.class, "validateRegionSize_PDX", new Object[]{getTestMethodName() + "_RR", 100});
+        vm5.invoke(() -> WANTestBase.validateRegionSize_PDX(getTestMethodName() + "_RR", 100));
+        vm2.invoke(() -> WANTestBase.validateRegionSize_PDX(getTestMethodName() + "_RR", 100));
     }
 
     private void startSerialSenders() throws Exception {
         //get one primary sender on vm4 and another primary on vm5
         //the startup order matters here so that primaries are
         //on different JVM's
-        vm4.invoke(WANTestBase.class, "startSender", new Object[]{"ln1"});
+        vm4.invoke(() -> WANTestBase.startSender("ln1"));
 
-        vm5.invoke(WANTestBase.class, "startSender", new Object[]{"ln2"});
+        vm5.invoke(() -> WANTestBase.startSender("ln2"));
 
         //start secondaries
-        vm5.invoke(WANTestBase.class, "startSender", new Object[]{"ln1"});
+        vm5.invoke(() -> WANTestBase.startSender("ln1"));
 
-        vm4.invoke(WANTestBase.class, "startSender", new Object[]{"ln2"});
+        vm4.invoke(() -> WANTestBase.startSender("ln2"));
     }
 
     private void createSerialSenders() throws Exception {
 
-        vm4.invoke(WANTestBase.class, "createSender", new Object[]{"ln1", 2,
-            false, 100, 10, false, false, null, true});
+        vm4.invoke(() -> WANTestBase.createSender("ln1", 2,
+            false, 100, 10, false, false, null, true));
 
-        vm5.invoke(WANTestBase.class, "createSender", new Object[]{"ln1", 2,
-            false, 100, 10, false, false, null, true});
+        vm5.invoke(() -> WANTestBase.createSender("ln1", 2,
+            false, 100, 10, false, false, null, true));
 
-        vm4.invoke(WANTestBase.class, "createSender", new Object[]{"ln2", 2,
-            false, 100, 10, false, false, null, true});
+        vm4.invoke(() -> WANTestBase.createSender("ln2", 2,
+            false, 100, 10, false, false, null, true));
 
-        vm5.invoke(WANTestBase.class, "createSender", new Object[]{"ln2", 2,
-            false, 100, 10, false, false, null, true});
+        vm5.invoke(() -> WANTestBase.createSender("ln2", 2,
+            false, 100, 10, false, false, null, true));
     }
 
     public static void doFunctionPuts(String name, int num, Boolean useThreadOwnedSocket) throws Exception {


Mime
View raw message