geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [41/63] [abbrv] incubator-geode git commit: Automatically converting calls of vm.invoke to lambdas
Date Fri, 19 Feb 2016 18:37:18 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADuplicateDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADuplicateDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADuplicateDUnitTest.java
index 732e22a..4a7d5db 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADuplicateDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADuplicateDUnitTest.java
@@ -109,11 +109,11 @@ public class HADuplicateDUnitTest extends DistributedTestCase
 
   @Override
   protected final void preTearDown() throws Exception {
-    client1.invoke(HADuplicateDUnitTest.class, "closeCache");
+    client1.invoke(() -> HADuplicateDUnitTest.closeCache());
     // close server
-    server1.invoke(HADuplicateDUnitTest.class, "reSetQRMslow");
-    server1.invoke(HADuplicateDUnitTest.class, "closeCache");
-    server2.invoke(HADuplicateDUnitTest.class, "closeCache");
+    server1.invoke(() -> HADuplicateDUnitTest.reSetQRMslow());
+    server1.invoke(() -> HADuplicateDUnitTest.closeCache());
+    server2.invoke(() -> HADuplicateDUnitTest.closeCache());
   }
 
   public void _testDuplicate() throws Exception
@@ -153,7 +153,7 @@ public class HADuplicateDUnitTest extends DistributedTestCase
       }
     });
 
-    server1.invoke(HADuplicateDUnitTest.class, "reSetQRMslow");
+    server1.invoke(() -> HADuplicateDUnitTest.reSetQRMslow());
   }
 
 
@@ -219,13 +219,10 @@ public class HADuplicateDUnitTest extends DistributedTestCase
   // function to create 2servers and 1 clients
   private void createClientServerConfiguration()
   {
-    PORT1 = ((Integer)server1.invoke(HADuplicateDUnitTest.class,
-        "createServerCache")).intValue();
-    server1.invoke(HADuplicateDUnitTest.class, "setQRMslow");
-    PORT2 = ((Integer)server2.invoke(HADuplicateDUnitTest.class,
-        "createServerCache")).intValue();
-    client1.invoke(HADuplicateDUnitTest.class, "createClientCache",
-        new Object[] { NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2) });
+    PORT1 = ((Integer)server1.invoke(() -> HADuplicateDUnitTest.createServerCache())).intValue();
+    server1.invoke(() -> HADuplicateDUnitTest.setQRMslow());
+    PORT2 = ((Integer)server2.invoke(() -> HADuplicateDUnitTest.createServerCache())).intValue();
+    client1.invoke(() -> HADuplicateDUnitTest.createClientCache( NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2) ));
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAEventIdPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAEventIdPropagationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAEventIdPropagationDUnitTest.java
index af1eb8b..4753fb7 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAEventIdPropagationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAEventIdPropagationDUnitTest.java
@@ -92,16 +92,16 @@ public class HAEventIdPropagationDUnitTest extends DistributedTestCase
     super.setUp();
     final Host host = Host.getHost(0);
     server1 = host.getVM(0);
-    server1.invoke(ConflationDUnitTest.class, "unsetIsSlowStart");
+    server1.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
     client1 = host.getVM(2);
   }
 
   /** close the caches* */
   @Override
   protected final void preTearDown() throws Exception {
-    client1.invoke(HAEventIdPropagationDUnitTest.class, "closeCache");
+    client1.invoke(() -> HAEventIdPropagationDUnitTest.closeCache());
     // close server
-    server1.invoke(HAEventIdPropagationDUnitTest.class, "closeCache");
+    server1.invoke(() -> HAEventIdPropagationDUnitTest.closeCache());
   }
 
   /** stops the server * */
@@ -124,10 +124,8 @@ public class HAEventIdPropagationDUnitTest extends DistributedTestCase
   private void createClientServerConfiguration()
   {
 
-    int PORT1 = ((Integer)server1.invoke(HAEventIdPropagationDUnitTest.class,
-        "createServerCache")).intValue();
-    client1.invoke(HAEventIdPropagationDUnitTest.class, "createClientCache",
-        new Object[] { NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1) });
+    int PORT1 = ((Integer)server1.invoke(() -> HAEventIdPropagationDUnitTest.createServerCache())).intValue();
+    client1.invoke(() -> HAEventIdPropagationDUnitTest.createClientCache( NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1) ));
   }
 
   /** create the server * */
@@ -319,64 +317,50 @@ public class HAEventIdPropagationDUnitTest extends DistributedTestCase
   {
     try {
       createClientServerConfiguration();
-      client1.invoke(HAEventIdPropagationDUnitTest.class,"setReceivedOperationToFalse");
-      client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "assertThreadIdToSequenceIdMapisNotNullButEmpty");
-      Object eventId1 = server1.invoke(HAEventIdPropagationDUnitTest.class,
-          "putKey1Val1");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.setReceivedOperationToFalse());
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.assertThreadIdToSequenceIdMapisNotNullButEmpty());
+      Object eventId1 = server1.invoke(() -> HAEventIdPropagationDUnitTest.putKey1Val1());
       assertNotNull(eventId1);
       // wait for key to propagate till client
       // assert map not null on client
-      client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "waitTillOperationReceived");
-      Object eventId2 = client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "assertThreadIdToSequenceIdMapHasEntryId");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.waitTillOperationReceived());
+      Object eventId2 = client1.invoke(() -> HAEventIdPropagationDUnitTest.assertThreadIdToSequenceIdMapHasEntryId());
       assertNotNull(eventId2);
       if (!eventId1.equals(eventId2)) {
         fail("Test failed as the eventIds are not equal");
       }
 
-      client1.invoke(HAEventIdPropagationDUnitTest.class,"setReceivedOperationToFalse");
-      eventId1 = server1.invoke(HAEventIdPropagationDUnitTest.class,
-          "updateKey1");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.setReceivedOperationToFalse());
+      eventId1 = server1.invoke(() -> HAEventIdPropagationDUnitTest.updateKey1());
       assertNotNull(eventId1);
       // wait for key to propagate till client
       // assert map not null on client
-      client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "waitTillOperationReceived");
-      eventId2 = client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "assertThreadIdToSequenceIdMapHasEntryId");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.waitTillOperationReceived());
+      eventId2 = client1.invoke(() -> HAEventIdPropagationDUnitTest.assertThreadIdToSequenceIdMapHasEntryId());
       assertNotNull(eventId2);
       if (!eventId1.equals(eventId2)) {
         fail("Test failed as the eventIds are not equal");
       }
 
-      client1.invoke(HAEventIdPropagationDUnitTest.class,"setReceivedOperationToFalse");
-      eventId1 = server1.invoke(HAEventIdPropagationDUnitTest.class,
-          "invalidateKey1");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.setReceivedOperationToFalse());
+      eventId1 = server1.invoke(() -> HAEventIdPropagationDUnitTest.invalidateKey1());
       assertNotNull(eventId1);
       // wait for key to propagate till client
       // assert map not null on client
-      client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "waitTillOperationReceived");
-      eventId2 = client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "assertThreadIdToSequenceIdMapHasEntryId");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.waitTillOperationReceived());
+      eventId2 = client1.invoke(() -> HAEventIdPropagationDUnitTest.assertThreadIdToSequenceIdMapHasEntryId());
       assertNotNull(eventId2);
       if (!eventId1.equals(eventId2)) {
         fail("Test failed as the eventIds are not equal");
       }
 
-      client1.invoke(HAEventIdPropagationDUnitTest.class,"setReceivedOperationToFalse");
-      EventID[] eventIds1 = (EventID[])server1.invoke(
-          HAEventIdPropagationDUnitTest.class, "putAll");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.setReceivedOperationToFalse());
+      EventID[] eventIds1 = (EventID[])server1.invoke(() -> HAEventIdPropagationDUnitTest.putAll());
       assertNotNull(eventIds1);
       // wait for key to propagate till client
       // assert map not null on client
-      client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "waitTillOperationReceived");
-      EventID[] eventIds2 = (EventID[])client1.invoke(
-          HAEventIdPropagationDUnitTest.class,
-          "assertThreadIdToSequenceIdMapHasEntryIds");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.waitTillOperationReceived());
+      EventID[] eventIds2 = (EventID[])client1.invoke(() -> HAEventIdPropagationDUnitTest.assertThreadIdToSequenceIdMapHasEntryIds());
       assertNotNull(eventIds2);
       for (int i = 0; i < 5; i++) {
         assertNotNull(eventIds1[i]);
@@ -387,31 +371,25 @@ public class HAEventIdPropagationDUnitTest extends DistributedTestCase
       }
 
 
-      client1.invoke(HAEventIdPropagationDUnitTest.class,"setReceivedOperationToFalse");
-      eventId1 = server1.invoke(HAEventIdPropagationDUnitTest.class,
-          "removePUTALL_KEY1");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.setReceivedOperationToFalse());
+      eventId1 = server1.invoke(() -> HAEventIdPropagationDUnitTest.removePUTALL_KEY1());
       assertNotNull(eventId1);
       // wait for key to propagate till client
       // assert map not null on client
-      client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "waitTillOperationReceived");
-      eventId2 = client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "assertThreadIdToSequenceIdMapHasEntryId");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.waitTillOperationReceived());
+      eventId2 = client1.invoke(() -> HAEventIdPropagationDUnitTest.assertThreadIdToSequenceIdMapHasEntryId());
       assertNotNull(eventId2);
       if (!eventId1.equals(eventId2)) {
         fail("Test failed as the eventIds are not equal");
       }
 
-      client1.invoke(HAEventIdPropagationDUnitTest.class,"setReceivedOperationToFalse");
-      eventId1 = server1.invoke(HAEventIdPropagationDUnitTest.class,
-          "destroyKey1");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.setReceivedOperationToFalse());
+      eventId1 = server1.invoke(() -> HAEventIdPropagationDUnitTest.destroyKey1());
       assertNotNull(eventId1);
       // wait for key to propagate till client
       // assert map not null on client
-      client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "waitTillOperationReceived");
-      eventId2 = client1.invoke(HAEventIdPropagationDUnitTest.class,
-          "assertThreadIdToSequenceIdMapHasEntryId");
+      client1.invoke(() -> HAEventIdPropagationDUnitTest.waitTillOperationReceived());
+      eventId2 = client1.invoke(() -> HAEventIdPropagationDUnitTest.assertThreadIdToSequenceIdMapHasEntryId());
       assertNotNull(eventId2);
       if (!eventId1.equals(eventId2)) {
         fail("Test failed as the eventIds are not equal");
@@ -427,18 +405,14 @@ public class HAEventIdPropagationDUnitTest extends DistributedTestCase
   public void testEventIDPropagationForClear() throws Exception
   {
     createClientServerConfiguration();
-    client1.invoke(HAEventIdPropagationDUnitTest.class,"setReceivedOperationToFalse");
-    client1.invoke(HAEventIdPropagationDUnitTest.class,
-        "assertThreadIdToSequenceIdMapisNotNullButEmpty");
-    Object eventId1 = server1.invoke(HAEventIdPropagationDUnitTest.class,
-    "clearRg");
+    client1.invoke(() -> HAEventIdPropagationDUnitTest.setReceivedOperationToFalse());
+    client1.invoke(() -> HAEventIdPropagationDUnitTest.assertThreadIdToSequenceIdMapisNotNullButEmpty());
+    Object eventId1 = server1.invoke(() -> HAEventIdPropagationDUnitTest.clearRg());
     assertNotNull(eventId1);
     // wait for key to propagate till client
     // assert map not null on client
-    client1.invoke(HAEventIdPropagationDUnitTest.class,
-        "waitTillOperationReceived");
-    Object eventId2 = client1.invoke(HAEventIdPropagationDUnitTest.class,
-        "assertThreadIdToSequenceIdMapHasEntryId");
+    client1.invoke(() -> HAEventIdPropagationDUnitTest.waitTillOperationReceived());
+    Object eventId2 = client1.invoke(() -> HAEventIdPropagationDUnitTest.assertThreadIdToSequenceIdMapHasEntryId());
     assertNotNull(eventId2);
     if (!eventId1.equals(eventId2)) {
       fail("Test failed as the clear eventIds are not equal");
@@ -450,16 +424,13 @@ public class HAEventIdPropagationDUnitTest extends DistributedTestCase
   public void _testEventIDPropagationForDestroyRegion() throws Exception
   {
     createClientServerConfiguration();
-    client1.invoke(HAEventIdPropagationDUnitTest.class,"setReceivedOperationToFalse");
-    Object eventId1 = server1.invoke(HAEventIdPropagationDUnitTest.class,
-        "destroyRegion");
+    client1.invoke(() -> HAEventIdPropagationDUnitTest.setReceivedOperationToFalse());
+    Object eventId1 = server1.invoke(() -> HAEventIdPropagationDUnitTest.destroyRegion());
     assertNotNull(eventId1);
     // wait for key to propagate till client
     // assert map not null on client
-    client1.invoke(HAEventIdPropagationDUnitTest.class,
-        "waitTillOperationReceived");
-    Object eventId2 = client1.invoke(HAEventIdPropagationDUnitTest.class,
-        "assertThreadIdToSequenceIdMapHasEntryId");
+    client1.invoke(() -> HAEventIdPropagationDUnitTest.waitTillOperationReceived());
+    Object eventId2 = client1.invoke(() -> HAEventIdPropagationDUnitTest.assertThreadIdToSequenceIdMapHasEntryId());
     assertNotNull(eventId2);
     if (!eventId1.equals(eventId2)) {
       fail("Test failed as the eventIds are not equal");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAExpiryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAExpiryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAExpiryDUnitTest.java
index 92ee889..4ef9dc0 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAExpiryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAExpiryDUnitTest.java
@@ -98,20 +98,20 @@ public class HAExpiryDUnitTest extends DistributedTestCase
 
   @Override
   protected final void preTearDown() throws Exception {
-    vm0.invoke(HAExpiryDUnitTest.class, "closeCache");
-    vm1.invoke(HAExpiryDUnitTest.class, "closeCache");
-    vm2.invoke(HAExpiryDUnitTest.class, "closeCache");
-    vm3.invoke(HAExpiryDUnitTest.class, "closeCache");
+    vm0.invoke(() -> HAExpiryDUnitTest.closeCache());
+    vm1.invoke(() -> HAExpiryDUnitTest.closeCache());
+    vm2.invoke(() -> HAExpiryDUnitTest.closeCache());
+    vm3.invoke(() -> HAExpiryDUnitTest.closeCache());
     cache = null;
     Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
   }
 
   public void testExpiryPeriod() throws Exception
   {
-    vm0.invoke(HAExpiryDUnitTest.class, "createRegionQueue", new Object[] {new Boolean(false)});
-    vm1.invoke(HAExpiryDUnitTest.class, "createRegionQueue", new Object[] {new Boolean(false)});
-    vm2.invoke(HAExpiryDUnitTest.class, "createRegionQueue", new Object[] {new Boolean(false)});
-    vm3.invoke(HAExpiryDUnitTest.class, "createRegionQueue", new Object[] {new Boolean(false)});
+    vm0.invoke(() -> HAExpiryDUnitTest.createRegionQueue(new Boolean(false)));
+    vm1.invoke(() -> HAExpiryDUnitTest.createRegionQueue(new Boolean(false)));
+    vm2.invoke(() -> HAExpiryDUnitTest.createRegionQueue(new Boolean(false)));
+    vm3.invoke(() -> HAExpiryDUnitTest.createRegionQueue(new Boolean(false)));
     
     vm0.invoke(new CacheSerializableRunnable("putFromVm") {
 
@@ -122,25 +122,25 @@ public class HAExpiryDUnitTest extends DistributedTestCase
       }
     });
 
-    vm0.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
-    vm1.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
-    vm2.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
-    vm3.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
+    vm0.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
+    vm1.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
+    vm2.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
+    vm3.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
 
    // Thread.sleep(7 * 1000);
 
-    vm0.invoke(HAExpiryDUnitTest.class, "checkSizeAfterExpiration");
-    vm1.invoke(HAExpiryDUnitTest.class, "checkSizeAfterExpiration");
-    vm2.invoke(HAExpiryDUnitTest.class, "checkSizeAfterExpiration");
-    vm3.invoke(HAExpiryDUnitTest.class, "checkSizeAfterExpiration");
+    vm0.invoke(() -> HAExpiryDUnitTest.checkSizeAfterExpiration());
+    vm1.invoke(() -> HAExpiryDUnitTest.checkSizeAfterExpiration());
+    vm2.invoke(() -> HAExpiryDUnitTest.checkSizeAfterExpiration());
+    vm3.invoke(() -> HAExpiryDUnitTest.checkSizeAfterExpiration());
   }
   
   public void testDurableExpiryPeriod() throws Exception
   {
-    vm0.invoke(HAExpiryDUnitTest.class, "createRegionQueue", new Object[] {new Boolean(true)});
-    vm1.invoke(HAExpiryDUnitTest.class, "createRegionQueue", new Object[] {new Boolean(true)});
-    vm2.invoke(HAExpiryDUnitTest.class, "createRegionQueue", new Object[] {new Boolean(true)});
-    vm3.invoke(HAExpiryDUnitTest.class, "createRegionQueue", new Object[] {new Boolean(true)});
+    vm0.invoke(() -> HAExpiryDUnitTest.createRegionQueue(new Boolean(true)));
+    vm1.invoke(() -> HAExpiryDUnitTest.createRegionQueue(new Boolean(true)));
+    vm2.invoke(() -> HAExpiryDUnitTest.createRegionQueue(new Boolean(true)));
+    vm3.invoke(() -> HAExpiryDUnitTest.createRegionQueue(new Boolean(true)));
     
     vm0.invoke(new CacheSerializableRunnable("putFromVm") {
 
@@ -151,19 +151,19 @@ public class HAExpiryDUnitTest extends DistributedTestCase
       }
     });
 
-    vm0.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
-    vm1.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
-    vm2.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
-    vm3.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
+    vm0.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
+    vm1.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
+    vm2.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
+    vm3.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
 
    Wait.pause(5000); // wait for some time to make sure that we give sufficient time
                 // to expiry
    // in spite of giving time the events should not expire, and queue should be
    // same as before expiration
-   vm0.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
-   vm1.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
-   vm2.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
-   vm3.invoke(HAExpiryDUnitTest.class, "checkSizeBeforeExpiration");
+   vm0.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
+   vm1.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
+   vm2.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
+   vm3.invoke(() -> HAExpiryDUnitTest.checkSizeBeforeExpiration());
    
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIBugDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIBugDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIBugDUnitTest.java
index df754d0..4a24378 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIBugDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIBugDUnitTest.java
@@ -112,16 +112,16 @@ public class HAGIIBugDUnitTest extends DistributedTestCase
 
     vm3 = host.getVM(3);
 
-    vm0.invoke(HAGIIBugDUnitTest.class, "createRegionQueue");
+    vm0.invoke(() -> HAGIIBugDUnitTest.createRegionQueue());
 
   }
 
   @Override
   protected final void preTearDown() throws Exception {
-    vm0.invoke(HAGIIBugDUnitTest.class, "closeCache");
-    vm1.invoke(HAGIIBugDUnitTest.class, "closeCache");
-    vm2.invoke(HAGIIBugDUnitTest.class, "closeCache");
-    vm3.invoke(HAGIIBugDUnitTest.class, "closeCache");
+    vm0.invoke(() -> HAGIIBugDUnitTest.closeCache());
+    vm1.invoke(() -> HAGIIBugDUnitTest.closeCache());
+    vm2.invoke(() -> HAGIIBugDUnitTest.closeCache());
+    vm3.invoke(() -> HAGIIBugDUnitTest.closeCache());
     cache = null;
     Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
   }
@@ -197,7 +197,7 @@ public class HAGIIBugDUnitTest extends DistributedTestCase
       }
     }
 
-    total_no_puts[0] = vm0.invoke(HAGIIBugDUnitTest.class, "getTotalNoPuts");
+    total_no_puts[0] = vm0.invoke(() -> HAGIIBugDUnitTest.getTotalNoPuts());
     populate_keys_after_gii();
 
     boolean validationFlag = false;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
index 40d44b4..3d62b99 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
@@ -143,31 +143,30 @@ public class HAGIIDUnitTest extends DistributedTestCase
     client0 = host.getVM(2);
 
     //start server1
-    PORT1 = ((Integer)server0.invoke(HAGIIDUnitTest.class, "createServer1Cache" )).intValue();
-    server0.invoke(ConflationDUnitTest.class, "setIsSlowStart");
-    server0.invoke(HAGIIDUnitTest.class, "setSystemProperty");
+    PORT1 = ((Integer)server0.invoke(() -> HAGIIDUnitTest.createServer1Cache())).intValue();
+    server0.invoke(() -> ConflationDUnitTest.setIsSlowStart());
+    server0.invoke(() -> HAGIIDUnitTest.setSystemProperty());
 
 
     PORT2 =  AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
     //Start the client
-    client0.invoke(HAGIIDUnitTest.class, "createClientCache",
-        new Object[] { NetworkUtils.getServerHostName(host), new Integer(PORT1),new Integer(PORT2)});
+    client0.invoke(() -> HAGIIDUnitTest.createClientCache( NetworkUtils.getServerHostName(host), new Integer(PORT1),new Integer(PORT2)));
   }
   
   public void testGIIRegionQueue()
   {
-    client0.invoke(HAGIIDUnitTest.class, "createEntries");
-    client0.invoke(HAGIIDUnitTest.class, "registerInterestList");
-    server0.invoke(HAGIIDUnitTest.class, "put");
+    client0.invoke(() -> HAGIIDUnitTest.createEntries());
+    client0.invoke(() -> HAGIIDUnitTest.registerInterestList());
+    server0.invoke(() -> HAGIIDUnitTest.put());
     
-    server0.invoke(HAGIIDUnitTest.class, "tombstonegc");
+    server0.invoke(() -> HAGIIDUnitTest.tombstonegc());
 
-    client0.invoke(HAGIIDUnitTest.class, "verifyEntries");
+    client0.invoke(() -> HAGIIDUnitTest.verifyEntries());
     server1.invoke(HAGIIDUnitTest.class, "createServer2Cache" ,new Object[] {new Integer(PORT2)});
     Wait.pause(6000);
-    server0.invoke(HAGIIDUnitTest.class, "stopServer");
+    server0.invoke(() -> HAGIIDUnitTest.stopServer());
     //pause(10000);
-    client0.invoke(HAGIIDUnitTest.class, "verifyEntriesAfterGiiViaListener");
+    client0.invoke(() -> HAGIIDUnitTest.verifyEntriesAfterGiiViaListener());
   }
 
   public void createCache(Properties props) throws Exception
@@ -457,10 +456,10 @@ public class HAGIIDUnitTest extends DistributedTestCase
     ConflationDUnitTest.unsetIsSlowStart();
     Invoke.invokeInEveryVM(ConflationDUnitTest.class, "unsetIsSlowStart");
     // close the clients first
-    client0.invoke(HAGIIDUnitTest.class, "closeCache");
+    client0.invoke(() -> HAGIIDUnitTest.closeCache());
     // then close the servers
-    server0.invoke(HAGIIDUnitTest.class, "closeCache");
-    server1.invoke(HAGIIDUnitTest.class, "closeCache");
+    server0.invoke(() -> HAGIIDUnitTest.closeCache());
+    server1.invoke(() -> HAGIIDUnitTest.closeCache());
   }
 
   public static void closeCache()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
index 3691ba1..75c087a 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
@@ -119,12 +119,8 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
     clientVM1 = host.getVM(2);
     clientVM2 = host.getVM(3);
 
-    PORT1 = ((Integer)serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "createServerCache",
-        new Object[] { HARegionQueue.HA_EVICTION_POLICY_MEMORY })).intValue();
-    PORT2 = ((Integer)serverVM1.invoke(HARQueueNewImplDUnitTest.class,
-        "createServerCache",
-        new Object[] { HARegionQueue.HA_EVICTION_POLICY_ENTRY })).intValue();
+    PORT1 = ((Integer)serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
+    PORT2 = ((Integer)serverVM1.invoke(() -> HARQueueNewImplDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_ENTRY ))).intValue();
     numOfCreates = 0;
     numOfUpdates = 0;
     numOfInvalidates = 0;
@@ -136,15 +132,15 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
   @Override
   protected final void preTearDown() throws Exception {
     closeCache();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "closeCache");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "closeCache");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.closeCache());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.closeCache());
     
     // Unset the isSlowStartForTesting flag
-    serverVM0.invoke(ConflationDUnitTest.class, "unsetIsSlowStart");
-    serverVM1.invoke(ConflationDUnitTest.class, "unsetIsSlowStart");
+    serverVM0.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
+    serverVM1.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
     // then close the servers
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "closeCache");
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "closeCache");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.closeCache());
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.closeCache());
     disconnectAllFromDS();
   }
 
@@ -349,33 +345,27 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    */
   public void testClientMsgsRegionSize() throws Exception {
     // slow start for dispatcher
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
-    serverVM1.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
+    serverVM1.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
 
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "stopServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.stopServer());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "createEntries");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createEntries());
 
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "startServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.startServer());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyRegionSize",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyRegionSize",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyRegionSize( new Integer(5), new Integer(5), new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyRegionSize( new Integer(5), new Integer(5), new Integer(PORT2) ));
   }
 
   /**
@@ -387,37 +377,31 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    */
   public void testRefCountForNormalAndGIIPut() throws Exception {
     // slow start for dispatcher
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
-    serverVM1.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
+    serverVM1.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
 
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "stopServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.stopServer());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "createEntries");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createEntries());
 
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "startServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.startServer());
     Thread.sleep(3000); // TODO: Find a better 'n reliable alternative
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "updateMapForVM0");
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "updateMapForVM1");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.updateMapForVM0());
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.updateMapForVM1());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyQueueData",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyQueueData",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyQueueData( new Integer(5), new Integer(5), new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyQueueData( new Integer(5), new Integer(5), new Integer(PORT2) ));
   }
 
   /**
@@ -428,33 +412,27 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    * @throws Exception
    */
   public void testRefCountForPeekAndRemove() throws Exception {
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "createEntries");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createEntries());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyRegionSize",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT1) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyRegionSize( new Integer(5), new Integer(5), new Integer(PORT1) ));
 
-    serverVM0.invoke(ConflationDUnitTest.class, "unsetIsSlowStart");
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "waitTillMessagesAreDispatched", new Object[] { new Integer(PORT1),
-            new Long(5000) });
+    serverVM0.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.waitTillMessagesAreDispatched( new Integer(PORT1),
+            new Long(5000) ));
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyRegionSize",
-        new Object[] { new Integer(5), new Integer(0), new Integer(PORT1) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyRegionSize( new Integer(5), new Integer(0), new Integer(PORT1) ));
   }
 
   /**
@@ -465,34 +443,29 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    * @throws Exception
    */
   public void testRefCountForQRM() throws Exception {
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
 
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "stopServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.stopServer());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "createEntries");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createEntries());
 
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "startServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.startServer());
 
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyRegionSize",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT2) });
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyRegionSize( new Integer(5), new Integer(5), new Integer(PORT2) ));
 
-    serverVM0.invoke(ConflationDUnitTest.class, "unsetIsSlowStart");
+    serverVM0.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
 
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyRegionSize",
-        new Object[] { new Integer(5), new Integer(0), new Integer(PORT2) });
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyRegionSize( new Integer(5), new Integer(0), new Integer(PORT2) ));
   }
 
   /**
@@ -505,51 +478,43 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    */
   public void testRefCountForDestroy() throws Exception {
     // slow start for dispatcher
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
-    serverVM1.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
+    serverVM1.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
     // 1. stop the second server
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "stopServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.stopServer());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "createEntries");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createEntries());
     // 3. start the second server.
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "startServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.startServer());
     Thread.sleep(3000);
 
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "closeCache");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.closeCache());
 
     Thread.sleep(1000);
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "updateMap1");
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "updateMap1");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.updateMap1());
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.updateMap1());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyQueueData",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyQueueData",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyQueueData( new Integer(5), new Integer(5), new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyQueueData( new Integer(5), new Integer(5), new Integer(PORT2) ));
 
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "closeCache");
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.closeCache());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "updateMap2");
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "updateMap2");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.updateMap2());
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.updateMap2());
 
     Thread.sleep(1000);
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyQueueData",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyQueueData",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyQueueData( new Integer(5), new Integer(5), new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyQueueData( new Integer(5), new Integer(5), new Integer(PORT2) ));
   }
 
   /**
@@ -560,46 +525,40 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    * @throws Exception
    */
   public void testConcurrentGIIAndDispatch() throws Exception {
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "40000" });
-    serverVM1.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "40000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "40000" ));
+    serverVM1.invoke(() -> ConflationDUnitTest.setIsSlowStart( "40000" ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestListAll");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestListAll");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestListAll());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestListAll());
     // 1. stop the second server
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "stopServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.stopServer());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "createEntries");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createEntries());
     serverVM0.invoke(HARQueueNewImplDUnitTest.class,
         "makeValuesOfSomeKeysNullInClientMsgsRegion", new Object[] {
             new Integer(PORT1), new String[] { "k1", "k3" } });
     // 3. start the second server.
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "startServer");
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyRegionSize",
-        new Object[] { new Integer(5), new Integer(3), new Integer(PORT1) });
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.startServer());
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyRegionSize( new Integer(5), new Integer(3), new Integer(PORT1) ));
 
     serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyNullValuesInCMR",
         new Object[] { new Integer(3), new Integer(PORT2),
             new String[] { "k1", "k3" } });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyRegionSize",
-        new Object[] { new Integer(5), new Integer(3), new Integer(PORT2) });
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyRegionSize( new Integer(5), new Integer(3), new Integer(PORT2) ));
 
     serverVM0.invoke(HARQueueNewImplDUnitTest.class,
         "populateValuesOfSomeKeysInClientMsgsRegion", new Object[] {
             new Integer(PORT1), new String[] { "k1", "k3" } });
 
-    serverVM0.invoke(ConflationDUnitTest.class, "unsetIsSlowStart");
-    serverVM1.invoke(ConflationDUnitTest.class, "unsetIsSlowStart");
+    serverVM0.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
+    serverVM1.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
   }
 
   /*
@@ -615,30 +574,24 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    */
   public void testTwoBridgeServersInOneVMDoShareCMR() throws Exception {
     // slow start for dispatcher
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
 
-    Integer port3 = (Integer)serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "createOneMoreBridgeServer", new Object[] { Boolean.TRUE });
+    Integer port3 = (Integer)serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createOneMoreBridgeServer( Boolean.TRUE ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), port3, "0");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "createEntries");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createEntries());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyRegionSize",
-        new Object[] { new Integer(5), new Integer(5), new Integer(PORT1) });
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyRegionSize",
-        new Object[] { new Integer(5), new Integer(5), port3 });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyRegionSize( new Integer(5), new Integer(5), new Integer(PORT1) ));
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyRegionSize( new Integer(5), new Integer(5), port3 ));
   }
 
   /**
@@ -649,33 +602,28 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    * @throws Exception
    */
   public void testUpdatesWithTwoBridgeServersInOneVM() throws Exception {
-    Integer port3 = (Integer)serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "createOneMoreBridgeServer", new Object[] { Boolean.FALSE });
+    Integer port3 = (Integer)serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createOneMoreBridgeServer( Boolean.FALSE ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1", Boolean.TRUE);
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, port3, new Integer(PORT2), "1", Boolean.TRUE });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, port3, new Integer(PORT2), "1", Boolean.TRUE ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestListAll");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestListAll());
 
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createEntries");
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "putEntries");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createEntries());
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.putEntries());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "waitTillMessagesAreDispatched", new Object[] { new Integer(PORT1),
-            new Long(5000) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.waitTillMessagesAreDispatched( new Integer(PORT1),
+            new Long(5000) ));
     serverVM0
-        .invoke(HARQueueNewImplDUnitTest.class,
-            "waitTillMessagesAreDispatched", new Object[] { port3,
-                new Long(5000) });
+        .invoke(() -> HARQueueNewImplDUnitTest.waitTillMessagesAreDispatched( port3,
+                new Long(5000) ));
 
     // expect updates
     verifyUpdatesReceived(new Integer(5), Boolean.TRUE, new Long(5000));
     // expect invalidates
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyUpdatesReceived",
-        new Object[] { new Integer(5), Boolean.TRUE, new Long(5000) });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyUpdatesReceived( new Integer(5), Boolean.TRUE, new Long(5000) ));
   }
 
   /**
@@ -687,33 +635,27 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    */
   public void testHAEventWrapperDoesNotHoldCUMOnceInsideCMR() throws Exception {
     // slow start for dispatcher
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
 
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "stopServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.stopServer());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "createEntries",
-        new Object[] { new Long(1000) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createEntries( new Long(1000) ));
 
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "startServer");
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.startServer());
     Thread.sleep(2000);
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyNullCUMReference",
-        new Object[] { new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyNullCUMReference",
-        new Object[] { new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyNullCUMReference( new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyNullCUMReference( new Integer(PORT2) ));
   }
 
   /**
@@ -726,48 +668,35 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    * @throws Exception
    */
   public void testCMRNotCreatedForNoneEvictionPolicy() throws Exception {
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "closeCache");
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "closeCache");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.closeCache());
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.closeCache());
     Thread.sleep(2000);
-    PORT1 = ((Integer)serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "createServerCache",
-        new Object[] { HARegionQueue.HA_EVICTION_POLICY_NONE })).intValue();
-    PORT2 = ((Integer)serverVM1.invoke(HARQueueNewImplDUnitTest.class,
-        "createServerCache",
-        new Object[] { HARegionQueue.HA_EVICTION_POLICY_NONE })).intValue();
+    PORT1 = ((Integer)serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_NONE ))).intValue();
+    PORT2 = ((Integer)serverVM1.invoke(() -> HARQueueNewImplDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_NONE ))).intValue();
     Boolean isRegion = Boolean.FALSE;
     // slow start for dispatcher
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyHaContainerType",
-        new Object[] { isRegion, new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyHaContainerType",
-        new Object[] { isRegion, new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyHaContainerType( isRegion, new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyHaContainerType( isRegion, new Integer(PORT2) ));
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "stopOneBridgeServer",
-        new Object[] { new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "stopOneBridgeServer",
-        new Object[] { new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.stopOneBridgeServer( new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.stopOneBridgeServer( new Integer(PORT2) ));
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "verifyHaContainerDestroyed", new Object[] { isRegion,
-            new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class,
-        "verifyHaContainerDestroyed", new Object[] { isRegion,
-            new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyHaContainerDestroyed( isRegion,
+            new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyHaContainerDestroyed( isRegion,
+            new Integer(PORT2) ));
   }
 
   /**
@@ -781,37 +710,28 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
   public void testCMRCreatedForMemOrEntryEvictionPolicy() throws Exception {
     Boolean isRegion = Boolean.TRUE;
     // slow start for dispatcher
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "30000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "verifyHaContainerType",
-        new Object[] { isRegion, new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "verifyHaContainerType",
-        new Object[] { isRegion, new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyHaContainerType( isRegion, new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyHaContainerType( isRegion, new Integer(PORT2) ));
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "stopOneBridgeServer",
-        new Object[] { new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "stopOneBridgeServer",
-        new Object[] { new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.stopOneBridgeServer( new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.stopOneBridgeServer( new Integer(PORT2) ));
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "verifyHaContainerDestroyed", new Object[] { isRegion,
-            new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class,
-        "verifyHaContainerDestroyed", new Object[] { isRegion,
-            new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyHaContainerDestroyed( isRegion,
+            new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyHaContainerDestroyed( isRegion,
+            new Integer(PORT2) ));
   }
 
   /**
@@ -824,24 +744,18 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestList");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestList());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "createEntries");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createEntries());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "verifyRootRegionsDoesNotReturnCMR",
-        new Object[] { new Integer(PORT1) });
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class,
-        "verifyRootRegionsDoesNotReturnCMR",
-        new Object[] { new Integer(PORT2) });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.verifyRootRegionsDoesNotReturnCMR( new Integer(PORT1) ));
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.verifyRootRegionsDoesNotReturnCMR( new Integer(PORT2) ));
   }
 
   /**
@@ -853,48 +767,38 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
    */
   public void _testMemoryFootprintOfHARegionQueuesWithAndWithoutOverflow()
       throws Exception {
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "closeCache");
-    serverVM1.invoke(HARQueueNewImplDUnitTest.class, "closeCache");
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.closeCache());
+    serverVM1.invoke(() -> HARQueueNewImplDUnitTest.closeCache());
     Thread.sleep(2000);
     Integer numOfEntries = new Integer(30);
 
-    PORT1 = ((Integer)serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "createServerCache", new Object[] {
-            HARegionQueue.HA_EVICTION_POLICY_MEMORY, new Integer(30) }))
+    PORT1 = ((Integer)serverVM0.invoke(() -> HARQueueNewImplDUnitTest.createServerCache(
+            HARegionQueue.HA_EVICTION_POLICY_MEMORY, new Integer(30) )))
         .intValue();
-    PORT2 = ((Integer)serverVM1.invoke(HARQueueNewImplDUnitTest.class,
-        "createServerCache",
-        new Object[] { HARegionQueue.HA_EVICTION_POLICY_NONE })).intValue();
+    PORT2 = ((Integer)serverVM1.invoke(() -> HARQueueNewImplDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_NONE ))).intValue();
 
-    serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "60000" });
-    serverVM1.invoke(ConflationDUnitTest.class, "setIsSlowStart",
-        new Object[] { "60000" });
+    serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "60000" ));
+    serverVM1.invoke(() -> ConflationDUnitTest.setIsSlowStart( "60000" ));
 
     createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1");
     final String client1Host = NetworkUtils.getServerHostName(clientVM1.getHost());
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client1Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client1Host, new Integer(PORT1), new Integer(PORT2), "1" ));
     final String client2Host = NetworkUtils.getServerHostName(clientVM2.getHost());
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "createClientCache",
-        new Object[] { client2Host, new Integer(PORT1), new Integer(PORT2), "1" });
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.createClientCache( client2Host, new Integer(PORT1), new Integer(PORT2), "1" ));
 
     registerInterestListAll();
-    clientVM1.invoke(HARQueueNewImplDUnitTest.class, "registerInterestListAll");
-    clientVM2.invoke(HARQueueNewImplDUnitTest.class, "registerInterestListAll");
+    clientVM1.invoke(() -> HARQueueNewImplDUnitTest.registerInterestListAll());
+    clientVM2.invoke(() -> HARQueueNewImplDUnitTest.registerInterestListAll());
 
-    serverVM0.invoke(HARQueueNewImplDUnitTest.class, "putHeavyEntries",
-        new Object[] { numOfEntries });
+    serverVM0.invoke(() -> HARQueueNewImplDUnitTest.putHeavyEntries( numOfEntries ));
 
-    Long usedMemInVM0 = (Long)serverVM0.invoke(HARQueueNewImplDUnitTest.class,
-        "getUsedMemoryAndVerifyRegionSize", new Object[] { new Integer(1),
-            numOfEntries, new Integer(PORT1) });
-    Long usedMemInVM1 = (Long)serverVM1.invoke(HARQueueNewImplDUnitTest.class,
-        "getUsedMemoryAndVerifyRegionSize", new Object[] { new Integer(1),
-            numOfEntries, new Integer(-1) });
+    Long usedMemInVM0 = (Long)serverVM0.invoke(() -> HARQueueNewImplDUnitTest.getUsedMemoryAndVerifyRegionSize( new Integer(1),
+            numOfEntries, new Integer(PORT1) ));
+    Long usedMemInVM1 = (Long)serverVM1.invoke(() -> HARQueueNewImplDUnitTest.getUsedMemoryAndVerifyRegionSize( new Integer(1),
+            numOfEntries, new Integer(-1) ));
 
-    serverVM0.invoke(ConflationDUnitTest.class, "unsetIsSlowStart");
-    serverVM1.invoke(ConflationDUnitTest.class, "unsetIsSlowStart");
+    serverVM0.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
+    serverVM1.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
 
     logger
         .fine("Used Mem: " + usedMemInVM1.longValue() + "(without overflow), "

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionDUnitTest.java
index d553d1c..91f2ea5 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionDUnitTest.java
@@ -73,8 +73,8 @@ public class HARegionDUnitTest extends DistributedTestCase
    */
   @Override
   protected final void preTearDown() throws Exception {
-    vm0.invoke(HARegionDUnitTest.class, "closeCache");
-    vm1.invoke(HARegionDUnitTest.class, "closeCache");
+    vm0.invoke(() -> HARegionDUnitTest.closeCache());
+    vm1.invoke(() -> HARegionDUnitTest.closeCache());
   }
 
   /**
@@ -106,13 +106,13 @@ public class HARegionDUnitTest extends DistributedTestCase
    */
   public void testLocalPut()
   {
-    vm0.invoke(HARegionDUnitTest.class, "createRegion");
-    vm1.invoke(HARegionDUnitTest.class, "createRegion");
-    vm0.invoke(HARegionDUnitTest.class, "putValue1");
-    vm1.invoke(HARegionDUnitTest.class, "getNull");
-    vm1.invoke(HARegionDUnitTest.class, "putValue2");
-    vm0.invoke(HARegionDUnitTest.class, "getValue1");
-    vm1.invoke(HARegionDUnitTest.class, "getValue2");
+    vm0.invoke(() -> HARegionDUnitTest.createRegion());
+    vm1.invoke(() -> HARegionDUnitTest.createRegion());
+    vm0.invoke(() -> HARegionDUnitTest.putValue1());
+    vm1.invoke(() -> HARegionDUnitTest.getNull());
+    vm1.invoke(() -> HARegionDUnitTest.putValue2());
+    vm0.invoke(() -> HARegionDUnitTest.getValue1());
+    vm1.invoke(() -> HARegionDUnitTest.getValue2());
 
   }
 
@@ -127,16 +127,16 @@ public class HARegionDUnitTest extends DistributedTestCase
    */
   public void testLocalDestroy()
   {
-    vm0.invoke(HARegionDUnitTest.class, "createRegion");
-    vm1.invoke(HARegionDUnitTest.class, "createRegion");
-    vm0.invoke(HARegionDUnitTest.class, "putValue1");
-    vm1.invoke(HARegionDUnitTest.class, "getNull");
-    vm1.invoke(HARegionDUnitTest.class, "putValue2");
-    vm0.invoke(HARegionDUnitTest.class, "getValue1");
-    vm1.invoke(HARegionDUnitTest.class, "getValue2");
-    vm0.invoke(HARegionDUnitTest.class, "destroy");
-    vm0.invoke(HARegionDUnitTest.class, "getNull");
-    vm1.invoke(HARegionDUnitTest.class, "getValue2");
+    vm0.invoke(() -> HARegionDUnitTest.createRegion());
+    vm1.invoke(() -> HARegionDUnitTest.createRegion());
+    vm0.invoke(() -> HARegionDUnitTest.putValue1());
+    vm1.invoke(() -> HARegionDUnitTest.getNull());
+    vm1.invoke(() -> HARegionDUnitTest.putValue2());
+    vm0.invoke(() -> HARegionDUnitTest.getValue1());
+    vm1.invoke(() -> HARegionDUnitTest.getValue2());
+    vm0.invoke(() -> HARegionDUnitTest.destroy());
+    vm0.invoke(() -> HARegionDUnitTest.getNull());
+    vm1.invoke(() -> HARegionDUnitTest.getValue2());
   }
 
   /**
@@ -148,13 +148,13 @@ public class HARegionDUnitTest extends DistributedTestCase
    */
   public void testGII()
   {
-    vm0.invoke(HARegionDUnitTest.class, "createRegion");
-    vm0.invoke(HARegionDUnitTest.class, "putValue1");
-    vm0.invoke(HARegionDUnitTest.class, "getValue1");
-    vm1.invoke(HARegionDUnitTest.class, "createRegion");
-    vm1.invoke(HARegionDUnitTest.class, "getValue1");
-    vm1.invoke(HARegionDUnitTest.class, "putValue2");
-    vm1.invoke(HARegionDUnitTest.class, "getValue2");
+    vm0.invoke(() -> HARegionDUnitTest.createRegion());
+    vm0.invoke(() -> HARegionDUnitTest.putValue1());
+    vm0.invoke(() -> HARegionDUnitTest.getValue1());
+    vm1.invoke(() -> HARegionDUnitTest.createRegion());
+    vm1.invoke(() -> HARegionDUnitTest.getValue1());
+    vm1.invoke(() -> HARegionDUnitTest.putValue2());
+    vm1.invoke(() -> HARegionDUnitTest.getValue2());
 
   }
 
@@ -167,10 +167,10 @@ public class HARegionDUnitTest extends DistributedTestCase
    */
   public void testLocalDestroyRegion()
   {
-    vm0.invoke(HARegionDUnitTest.class, "createRegion");
-    vm1.invoke(HARegionDUnitTest.class, "createRegion");
-    vm0.invoke(HARegionDUnitTest.class, "destroyRegion");
-    vm1.invoke(HARegionDUnitTest.class, "verifyRegionNotDestroyed");
+    vm0.invoke(() -> HARegionDUnitTest.createRegion());
+    vm1.invoke(() -> HARegionDUnitTest.createRegion());
+    vm0.invoke(() -> HARegionDUnitTest.destroyRegion());
+    vm1.invoke(() -> HARegionDUnitTest.verifyRegionNotDestroyed());
   
   }
 
@@ -201,16 +201,16 @@ public class HARegionDUnitTest extends DistributedTestCase
    */
   public void testQRM()
   {
-    vm0.invoke(HARegionDUnitTest.class, "createRegionQueue");
-    vm1.invoke(HARegionDUnitTest.class, "createRegionQueue");
-    vm0.invoke(HARegionDUnitTest.class, "verifyAddingDispatchMesgs");
+    vm0.invoke(() -> HARegionDUnitTest.createRegionQueue());
+    vm1.invoke(() -> HARegionDUnitTest.createRegionQueue());
+    vm0.invoke(() -> HARegionDUnitTest.verifyAddingDispatchMesgs());
     try {
       Thread.sleep(5000);
     }
     catch (InterruptedException e) {
       fail("interrupted");
     }
-    vm1.invoke(HARegionDUnitTest.class, "verifyDispatchedMessagesRemoved");
+    vm1.invoke(() -> HARegionDUnitTest.verifyDispatchedMessagesRemoved());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
index da57b86..cf31493 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
@@ -103,10 +103,10 @@ public class HARegionQueueDUnitTest extends DistributedTestCase
    */
   @Override
   protected final void preTearDown() throws Exception {
-    vm0.invoke(HARegionQueueDUnitTest.class, "closeCache");
-    vm1.invoke(HARegionQueueDUnitTest.class, "closeCache");
-    vm2.invoke(HARegionQueueDUnitTest.class, "closeCache");
-    vm3.invoke(HARegionQueueDUnitTest.class, "closeCache");
+    vm0.invoke(() -> HARegionQueueDUnitTest.closeCache());
+    vm1.invoke(() -> HARegionQueueDUnitTest.closeCache());
+    vm2.invoke(() -> HARegionQueueDUnitTest.closeCache());
+    vm3.invoke(() -> HARegionQueueDUnitTest.closeCache());
   }
 
   /**
@@ -136,13 +136,13 @@ public class HARegionQueueDUnitTest extends DistributedTestCase
    */
   public void testLocalPut()
   {
-    vm0.invoke(HARegionQueueDUnitTest.class, "createRegion");
-    vm1.invoke(HARegionQueueDUnitTest.class, "createRegion");
-    vm0.invoke(HARegionQueueDUnitTest.class, "putValue1");
-    vm1.invoke(HARegionQueueDUnitTest.class, "getNull");
-    vm1.invoke(HARegionQueueDUnitTest.class, "putValue2");
-    vm0.invoke(HARegionQueueDUnitTest.class, "getValue1");
-    vm1.invoke(HARegionQueueDUnitTest.class, "getValue2");
+    vm0.invoke(() -> HARegionQueueDUnitTest.createRegion());
+    vm1.invoke(() -> HARegionQueueDUnitTest.createRegion());
+    vm0.invoke(() -> HARegionQueueDUnitTest.putValue1());
+    vm1.invoke(() -> HARegionQueueDUnitTest.getNull());
+    vm1.invoke(() -> HARegionQueueDUnitTest.putValue2());
+    vm0.invoke(() -> HARegionQueueDUnitTest.getValue1());
+    vm1.invoke(() -> HARegionQueueDUnitTest.getValue2());
 
   }
 
@@ -157,16 +157,16 @@ public class HARegionQueueDUnitTest extends DistributedTestCase
    */
   public void testLocalDestroy()
   {
-    vm0.invoke(HARegionQueueDUnitTest.class, "createRegion");
-    vm1.invoke(HARegionQueueDUnitTest.class, "createRegion");
-    vm0.invoke(HARegionQueueDUnitTest.class, "putValue1");
-    vm1.invoke(HARegionQueueDUnitTest.class, "getNull");
-    vm1.invoke(HARegionQueueDUnitTest.class, "putValue2");
-    vm0.invoke(HARegionQueueDUnitTest.class, "getValue1");
-    vm1.invoke(HARegionQueueDUnitTest.class, "getValue2");
-    vm0.invoke(HARegionQueueDUnitTest.class, "destroy");
-    vm0.invoke(HARegionQueueDUnitTest.class, "getNull");
-    vm1.invoke(HARegionQueueDUnitTest.class, "getValue2");
+    vm0.invoke(() -> HARegionQueueDUnitTest.createRegion());
+    vm1.invoke(() -> HARegionQueueDUnitTest.createRegion());
+    vm0.invoke(() -> HARegionQueueDUnitTest.putValue1());
+    vm1.invoke(() -> HARegionQueueDUnitTest.getNull());
+    vm1.invoke(() -> HARegionQueueDUnitTest.putValue2());
+    vm0.invoke(() -> HARegionQueueDUnitTest.getValue1());
+    vm1.invoke(() -> HARegionQueueDUnitTest.getValue2());
+    vm0.invoke(() -> HARegionQueueDUnitTest.destroy());
+    vm0.invoke(() -> HARegionQueueDUnitTest.getNull());
+    vm1.invoke(() -> HARegionQueueDUnitTest.getValue2());
   }
 
   /**
@@ -178,13 +178,13 @@ public class HARegionQueueDUnitTest extends DistributedTestCase
    */
   public void testGII()
   {
-    vm0.invoke(HARegionQueueDUnitTest.class, "createRegion");
-    vm0.invoke(HARegionQueueDUnitTest.class, "putValue1");
-    vm0.invoke(HARegionQueueDUnitTest.class, "getValue1");
-    vm1.invoke(HARegionQueueDUnitTest.class, "createRegion");
-    vm1.invoke(HARegionQueueDUnitTest.class, "getValue1");
-    vm1.invoke(HARegionQueueDUnitTest.class, "putValue2");
-    vm1.invoke(HARegionQueueDUnitTest.class, "getValue2");
+    vm0.invoke(() -> HARegionQueueDUnitTest.createRegion());
+    vm0.invoke(() -> HARegionQueueDUnitTest.putValue1());
+    vm0.invoke(() -> HARegionQueueDUnitTest.getValue1());
+    vm1.invoke(() -> HARegionQueueDUnitTest.createRegion());
+    vm1.invoke(() -> HARegionQueueDUnitTest.getValue1());
+    vm1.invoke(() -> HARegionQueueDUnitTest.putValue2());
+    vm1.invoke(() -> HARegionQueueDUnitTest.getValue2());
 
   }
 
@@ -199,11 +199,11 @@ public class HARegionQueueDUnitTest extends DistributedTestCase
    */
  /* public void testGIIAndMapUpdates()
   {
-    vm0.invoke(HARegionQueueDUnitTest.class, "createRegionQueue2");
-    vm0.invoke(HARegionQueueDUnitTest.class, "putConflatables");
-    vm1.invoke(HARegionQueueDUnitTest.class, "createRegionQueue2");
-    vm0.invoke(HARegionQueueDUnitTest.class, "clearRegion");
-    vm1.invoke(HARegionQueueDUnitTest.class, "verifyMapsAndData");
+    vm0.invoke(() -> HARegionQueueDUnitTest.createRegionQueue2());
+    vm0.invoke(() -> HARegionQueueDUnitTest.putConflatables());
+    vm1.invoke(() -> HARegionQueueDUnitTest.createRegionQueue2());
+    vm0.invoke(() -> HARegionQueueDUnitTest.clearRegion());
+    vm1.invoke(() -> HARegionQueueDUnitTest.verifyMapsAndData());
 
   } */
 
@@ -216,11 +216,11 @@ public class HARegionQueueDUnitTest extends DistributedTestCase
    */
   public void testQRM()
   {
-    vm0.invoke(HARegionQueueDUnitTest.class, "createRegionQueue");
-    vm1.invoke(HARegionQueueDUnitTest.class, "createRegionQueue");
-    vm0.invoke(HARegionQueueDUnitTest.class, "verifyAddingDispatchMesgs");
+    vm0.invoke(() -> HARegionQueueDUnitTest.createRegionQueue());
+    vm1.invoke(() -> HARegionQueueDUnitTest.createRegionQueue());
+    vm0.invoke(() -> HARegionQueueDUnitTest.verifyAddingDispatchMesgs());
 
-    vm1.invoke(HARegionQueueDUnitTest.class, "verifyDispatchedMessagesRemoved");
+    vm1.invoke(() -> HARegionQueueDUnitTest.verifyDispatchedMessagesRemoved());
   }
 
   /**
@@ -1076,9 +1076,8 @@ public class HARegionQueueDUnitTest extends DistributedTestCase
    */
  /* public void testBugNo35989()
   {
-    vm0.invoke(HARegionQueueDUnitTest.class, "createRegionQueue");
-    vm1.invoke(HARegionQueueDUnitTest.class,
-        "createHARegionQueueandCheckExpiration");
+    vm0.invoke(() -> HARegionQueueDUnitTest.createRegionQueue());
+    vm1.invoke(() -> HARegionQueueDUnitTest.createHARegionQueueandCheckExpiration());
 
   } */
 
@@ -1114,8 +1113,8 @@ public class HARegionQueueDUnitTest extends DistributedTestCase
 
   public void testForDuplicateEvents()
   {
-    vm0.invoke(HARegionQueueDUnitTest.class, "createRegionQueue");
-    vm1.invoke(HARegionQueueDUnitTest.class, "createRegionQueueandCheckDuplicates");
+    vm0.invoke(() -> HARegionQueueDUnitTest.createRegionQueue());
+    vm1.invoke(() -> HARegionQueueDUnitTest.createRegionQueueandCheckDuplicates());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
index 6b805ad..8df3513 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
@@ -83,21 +83,19 @@ public class HASlowReceiverDUnitTest extends DistributedTestCase {
     clientVM = host.getVM(3);
 
     PORT0 = createServerCache().intValue();
-    PORT1 = ((Integer)serverVM1.invoke(HASlowReceiverDUnitTest.class,
-        "createServerCache")).intValue();
-    PORT2 = ((Integer)serverVM2.invoke(HASlowReceiverDUnitTest.class,
-        "createServerCache")).intValue();
+    PORT1 = ((Integer)serverVM1.invoke(() -> HASlowReceiverDUnitTest.createServerCache())).intValue();
+    PORT2 = ((Integer)serverVM2.invoke(() -> HASlowReceiverDUnitTest.createServerCache())).intValue();
 
   }
 
   @Override
   protected final void preTearDown() throws Exception {
-    clientVM.invoke(HASlowReceiverDUnitTest.class, "closeCache");
+    clientVM.invoke(() -> HASlowReceiverDUnitTest.closeCache());
 
     // then close the servers
     closeCache();
-    serverVM1.invoke(HASlowReceiverDUnitTest.class, "closeCache");
-    serverVM2.invoke(HASlowReceiverDUnitTest.class, "closeCache");
+    serverVM1.invoke(() -> HASlowReceiverDUnitTest.closeCache());
+    serverVM2.invoke(() -> HASlowReceiverDUnitTest.closeCache());
     disconnectAllFromDS();
   }
 
@@ -249,10 +247,9 @@ public class HASlowReceiverDUnitTest extends DistributedTestCase {
   // Test slow client
   public void testSlowClient() throws Exception {
     setBridgeObeserverForAfterQueueDestroyMessage();
-    clientVM.invoke(HASlowReceiverDUnitTest.class, "createClientCache",
-        new Object[] { NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT0),
-            new Integer(PORT1), new Integer(PORT2), new Integer(2) });
-    clientVM.invoke(HASlowReceiverDUnitTest.class, "registerInterest");
+    clientVM.invoke(() -> HASlowReceiverDUnitTest.createClientCache( NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT0),
+            new Integer(PORT1), new Integer(PORT2), new Integer(2) ));
+    clientVM.invoke(() -> HASlowReceiverDUnitTest.registerInterest());
     // add expected socket exception string
     final IgnoredException ex1 = IgnoredException.addIgnoredException(SocketException.class
         .getName());
@@ -261,8 +258,7 @@ public class HASlowReceiverDUnitTest extends DistributedTestCase {
     putEntries();
     Thread.sleep(20000);// wait for put to block and allow server to remove
                         // client queue
-    clientVM.invoke(HASlowReceiverDUnitTest.class, "checkRedundancyLevel",
-        new Object[] { new Integer(2) });
+    clientVM.invoke(() -> HASlowReceiverDUnitTest.checkRedundancyLevel( new Integer(2) ));
     // check for slow client queue is removed or not.
     assertTrue("isUnresponsiveClientRemoved is false, but should be true "
         + "after 20 seconds", isUnresponsiveClientRemoved);
@@ -276,8 +272,7 @@ public class HASlowReceiverDUnitTest extends DistributedTestCase {
     ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter() {
       @Override
       public void afterQueueDestroyMessage() {       
-        clientVM.invoke(HASlowReceiverDUnitTest.class, "checkRedundancyLevel",
-            new Object[] { new Integer(0) });
+        clientVM.invoke(() -> HASlowReceiverDUnitTest.checkRedundancyLevel( new Integer(0) ));
         isUnresponsiveClientRemoved = true;   
         PoolImpl.AFTER_QUEUE_DESTROY_MESSAGE_FLAG = false;
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/OperationsPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/OperationsPropagationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/OperationsPropagationDUnitTest.java
index 154f9cc..60e154c 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/OperationsPropagationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/OperationsPropagationDUnitTest.java
@@ -113,12 +113,9 @@ public class OperationsPropagationDUnitTest extends DistributedTestCase
     // Client 1 VM
     client1 = host.getVM(2);
 
-    PORT1 = ((Integer)server1.invoke(OperationsPropagationDUnitTest.class,
-        "createServerCache")).intValue();
-    PORT2 = ((Integer)server2.invoke(OperationsPropagationDUnitTest.class,
-        "createServerCache")).intValue();
-    client1.invoke(OperationsPropagationDUnitTest.class, "createClientCache",
-        new Object[] { NetworkUtils.getServerHostName(host), new Integer(PORT2) });
+    PORT1 = ((Integer)server1.invoke(() -> OperationsPropagationDUnitTest.createServerCache())).intValue();
+    PORT2 = ((Integer)server2.invoke(() -> OperationsPropagationDUnitTest.createServerCache())).intValue();
+    client1.invoke(() -> OperationsPropagationDUnitTest.createClientCache( NetworkUtils.getServerHostName(host), new Integer(PORT2) ));
 
   }
 
@@ -127,9 +124,9 @@ public class OperationsPropagationDUnitTest extends DistributedTestCase
    */
   @Override
   protected final void preTearDown() throws Exception {
-    client1.invoke(OperationsPropagationDUnitTest.class, "closeCache");
-    server1.invoke(OperationsPropagationDUnitTest.class, "closeCache");
-    server2.invoke(OperationsPropagationDUnitTest.class, "closeCache");
+    client1.invoke(() -> OperationsPropagationDUnitTest.closeCache());
+    server1.invoke(() -> OperationsPropagationDUnitTest.closeCache());
+    server2.invoke(() -> OperationsPropagationDUnitTest.closeCache());
   }
 
   /**
@@ -261,15 +258,12 @@ public class OperationsPropagationDUnitTest extends DistributedTestCase
    */
   public void testOperationsPropagation() throws Exception
   {
-    server1.invoke(OperationsPropagationDUnitTest.class, "initialPutKeyValue");
-    client1.invoke(OperationsPropagationDUnitTest.class,
-        "assertKeyValuePresent");
-    server1.invoke(OperationsPropagationDUnitTest.class, "doOperations");
-    client1.invoke(OperationsPropagationDUnitTest.class,
-        "assertOperationsSucceeded");
-    server1.invoke(OperationsPropagationDUnitTest.class, "doRemoveAll");
-    client1.invoke(OperationsPropagationDUnitTest.class,
-        "assertRemoveAllSucceeded");
+    server1.invoke(() -> OperationsPropagationDUnitTest.initialPutKeyValue());
+    client1.invoke(() -> OperationsPropagationDUnitTest.assertKeyValuePresent());
+    server1.invoke(() -> OperationsPropagationDUnitTest.doOperations());
+    client1.invoke(() -> OperationsPropagationDUnitTest.assertOperationsSucceeded());
+    server1.invoke(() -> OperationsPropagationDUnitTest.doRemoveAll());
+    client1.invoke(() -> OperationsPropagationDUnitTest.assertRemoveAllSucceeded());
   }
 
   /**



Mime
View raw message