geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sai_boorlaga...@apache.org
Subject [04/55] [abbrv] incubator-geode git commit: GEODE-1276: Change UnitTests file system to IntegrationTest category GEODE-1307: Rename HeterogenousLuceneSerializer to HeterogeneousLuceneSerializer GEODE-1279: Tests for old TRAC bugs should be renamed to use
Date Tue, 24 May 2016 18:53:45 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/SemaphoreReadWriteLockJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/SemaphoreReadWriteLockJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/SemaphoreReadWriteLockJUnitTest.java
index bc598e6..21ace86 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/SemaphoreReadWriteLockJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/SemaphoreReadWriteLockJUnitTest.java
@@ -16,30 +16,52 @@
  */
 package com.gemstone.gemfire.internal.util.concurrent;
 
+import static org.junit.Assert.*;
+
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.Lock;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.Timeout;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- * 
- */
 @Category(UnitTest.class)
-public class SemaphoreReadWriteLockJUnitTest extends TestCase {
+public class SemaphoreReadWriteLockJUnitTest {
+
+  private static final long OPERATION_TIMEOUT_MILLIS = 10 * 1000;
 
-  public void testReaderWaitsForWriter() throws InterruptedException {
+  private CountDownLatch latch;
+  private CountDownLatch waitToLock;
+
+  @Rule
+  public Timeout timeout = new Timeout(30, TimeUnit.SECONDS);
+
+  @Before
+  public void setUp() throws Exception {
+    latch = new CountDownLatch(1);
+    waitToLock = new CountDownLatch(1);
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    waitToLock.countDown();
+    latch.countDown();
+  }
+
+  @Test
+  public void testReaderWaitsForWriter() throws Exception {
     SemaphoreReadWriteLock rwl = new SemaphoreReadWriteLock();
     final Lock rl = rwl.readLock();
     final Lock wl = rwl.writeLock();
     wl.lock();
-    final CountDownLatch latch = new CountDownLatch(1);
-    final CountDownLatch waitToLock = new CountDownLatch(1);
+
     Thread writer = new Thread(new Runnable() {
       @Override
       public void run() {
@@ -50,19 +72,21 @@ public class SemaphoreReadWriteLockJUnitTest extends TestCase {
       }
     });
     writer.start();
-    waitToLock.await();
+
+    assertTrue(waitToLock.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
     assertEquals(1, latch.getCount());
+
     wl.unlock();
-    assertTrue(latch.await(10, TimeUnit.SECONDS));
+    assertTrue(latch.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
   }
 
-  public void testWriterWaitsForReader() throws InterruptedException {
+  @Test
+  public void testWriterWaitsForReader() throws Exception {
     SemaphoreReadWriteLock rwl = new SemaphoreReadWriteLock();
     final Lock rl = rwl.readLock();
     final Lock wl = rwl.writeLock();
     rl.lock();
-    final CountDownLatch latch = new CountDownLatch(1);
-    final CountDownLatch waitToLock = new CountDownLatch(1);
+
     Thread writer = new Thread(new Runnable() {
       @Override
       public void run() {
@@ -73,19 +97,21 @@ public class SemaphoreReadWriteLockJUnitTest extends TestCase {
       }
     });
     writer.start();
-    waitToLock.await();
+
+    assertTrue(waitToLock.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
     assertEquals(1, latch.getCount());
+
     rl.unlock();
-    assertTrue(latch.await(10, TimeUnit.SECONDS));
+    assertTrue(latch.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
   }
 
-  public void testReadersNotBlockedByReaders() throws InterruptedException {
+  @Test
+  public void testReadersNotBlockedByReaders() throws Exception {
     SemaphoreReadWriteLock rwl = new SemaphoreReadWriteLock();
     final Lock rl = rwl.readLock();
     final Lock wl = rwl.writeLock();
     rl.lock();
-    final CountDownLatch latch = new CountDownLatch(1);
-    final CountDownLatch waitToLock = new CountDownLatch(1);
+
     Thread reader = new Thread(new Runnable() {
       @Override
       public void run() {
@@ -95,17 +121,18 @@ public class SemaphoreReadWriteLockJUnitTest extends TestCase {
       }
     });
     reader.start();
-    waitToLock.await();
-    assertTrue(latch.await(10, TimeUnit.SECONDS));
+
+    assertTrue(waitToLock.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
+    assertTrue(latch.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
   }
 
-  public void testWritersBlockedByWriters() throws InterruptedException {
+  @Test
+  public void testWritersBlockedByWriters() throws Exception {
     SemaphoreReadWriteLock rwl = new SemaphoreReadWriteLock();
     final Lock rl = rwl.readLock();
     final Lock wl = rwl.writeLock();
-    final CountDownLatch latch = new CountDownLatch(1);
-    final CountDownLatch waitToLock = new CountDownLatch(1);
     wl.lock();
+
     Thread writer = new Thread(new Runnable() {
       @Override
       public void run() {
@@ -116,20 +143,23 @@ public class SemaphoreReadWriteLockJUnitTest extends TestCase {
       }
     });
     writer.start();
-    waitToLock.await();
+
+    assertTrue(waitToLock.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
     assertEquals(1, latch.getCount());
+
     wl.unlock();
-    assertTrue(latch.await(10, TimeUnit.SECONDS));
+    assertTrue(latch.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
   }
 
-  public void testTrylock() throws InterruptedException {
+  @Test
+  public void testTryLock() throws Exception {
     SemaphoreReadWriteLock rwl = new SemaphoreReadWriteLock();
     final Lock rl = rwl.readLock();
     final Lock wl = rwl.writeLock();
-    final CountDownLatch latch = new CountDownLatch(1);
-    final CountDownLatch waitToLock = new CountDownLatch(1);
     assertTrue(wl.tryLock());
+
     final AtomicBoolean failed = new AtomicBoolean(false);
+
     Thread reader = new Thread(new Runnable() {
       @Override
       public void run() {
@@ -141,26 +171,27 @@ public class SemaphoreReadWriteLockJUnitTest extends TestCase {
       }
     });
     reader.start();
-    waitToLock.await();
-    assertTrue(latch.await(10, TimeUnit.SECONDS));
+
+    assertTrue(waitToLock.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
+    assertTrue(latch.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
     assertFalse(failed.get());
   }
 
-  public void testLockAndReleasebyDifferentThreads() throws InterruptedException {
+  @Test
+  public void testLockAndReleaseByDifferentThreads() throws Exception {
     SemaphoreReadWriteLock rwl = new SemaphoreReadWriteLock();
     final Lock rl = rwl.readLock();
     final Lock wl = rwl.writeLock();
-    final CountDownLatch latch = new CountDownLatch(1);
-    final CountDownLatch waitToLock = new CountDownLatch(1);
     rl.lock();
+
     Thread writer = new Thread(new Runnable() {
       @Override
       public void run() {
         waitToLock.countDown();
         try {
-          assertTrue(wl.tryLock(10, TimeUnit.SECONDS));
+          assertTrue(wl.tryLock(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
         } catch (InterruptedException e) {
-          fail(e.getMessage());
+          throw new AssertionError(e);
         }
         latch.countDown();
       }
@@ -171,14 +202,15 @@ public class SemaphoreReadWriteLockJUnitTest extends TestCase {
       @Override
       public void run() {
         try {
-          waitToLock.await();
+          assertTrue(waitToLock.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
         } catch (InterruptedException e) {
-          fail(e.getMessage());
+          throw new AssertionError(e);
         }
         rl.unlock();
       }
     });
     reader2.start();
-    assertTrue(latch.await(10, TimeUnit.SECONDS));
+
+    assertTrue(latch.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
index be73adc..c96c1c8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
@@ -448,7 +448,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     assertTrue(firedBridge[JOINED]);
     assertEquals(clientMember, memberBridge[JOINED]);
     //as of 6.1 the id can change when a bridge is created or a connection pool is created
-    //assertEquals(clientMemberId, memberIdBridge[JOINED]);
+    //assertIndexDetailsEquals(clientMemberId, memberIdBridge[JOINED]);
     assertTrue(isClientBridge[JOINED]);
     assertFalse(firedBridge[LEFT]);
     assertNull(memberBridge[LEFT]);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/GatewayReceiverStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/GatewayReceiverStatsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/GatewayReceiverStatsJUnitTest.java
index f007800..e188df4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/GatewayReceiverStatsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/GatewayReceiverStatsJUnitTest.java
@@ -88,8 +88,8 @@ public class GatewayReceiverStatsJUnitTest extends MBeanStatsTestCase {
     
     bridge.stopMonitor();
     
-    // TODO:FAIL: assertEquals(0, getCurrentClients());
-    // TODO:FAIL: assertEquals(0, getConnectionThreads());
+    // TODO:FAIL: assertIndexDetailsEquals(0, getCurrentClients());
+    // TODO:FAIL: assertIndexDetailsEquals(0, getConnectionThreads());
   }
   
   @Test
@@ -112,8 +112,8 @@ public class GatewayReceiverStatsJUnitTest extends MBeanStatsTestCase {
     assertEquals(1, getOutoforderBatchesReceived());
     bridge.stopMonitor();
     
-    // TODO:FAIL: assertEquals(0, getOutoforderBatchesReceived());
-    // TODO:FAIL: assertEquals(0, getDuplicateBatchesReceived());
+    // TODO:FAIL: assertIndexDetailsEquals(0, getOutoforderBatchesReceived());
+    // TODO:FAIL: assertIndexDetailsEquals(0, getDuplicateBatchesReceived());
   }
 
   private float getCreateRequestsRate() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/RegionStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/RegionStatsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/RegionStatsJUnitTest.java
index 6650fb2..f9b5489 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/RegionStatsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/RegionStatsJUnitTest.java
@@ -78,7 +78,7 @@ public class RegionStatsJUnitTest extends MBeanStatsTestCase{
     assertEquals(1, getNumBucketsWithoutRedundancy());
     assertEquals(2, getActualRedundancy());
     //assertTrue(getAvgBucketSize() > 0);
-    //assertEquals(3, getConfiguredRedundancy());
+    //assertIndexDetailsEquals(3, getConfiguredRedundancy());
     assertEquals(1, getDataStoreEntryCount());
     assertEquals(10, getPrimaryBucketCount());
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/StatsRateJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/StatsRateJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/StatsRateJUnitTest.java
index bdccba5..1629cdd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/StatsRateJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/StatsRateJUnitTest.java
@@ -14,9 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.management.bean.stats;
 
+import static org.junit.Assert.*;
+
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.Statistics;
@@ -25,33 +28,18 @@ import com.gemstone.gemfire.management.internal.beans.stats.StatType;
 import com.gemstone.gemfire.management.internal.beans.stats.StatsRate;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- * 
- * 
- */
 @Category(UnitTest.class)
-public class StatsRateJUnitTest extends TestCase  {
+public class StatsRateJUnitTest  {
 
   private Long SINGLE_STATS_LONG_COUNTER = null;
-
   private Integer SINGLE_STATS_INT_COUNTER = null;
-
   private Long MULTI_STATS_LONG_COUNTER_1 = null;
-
   private Long MULTI_STATS_LONG_COUNTER_2 = null;
-
   private Integer MULTI_STATS_INT_COUNTER_1 = null;
-
   private Integer MULTI_STATS_INT_COUNTER_2 = null;
-  
-  private TestMBeanStatsMonitor statsMonitor = new TestMBeanStatsMonitor("TestStatsMonitor"); 
-
-  public StatsRateJUnitTest(String name) {
-    super(name);
-  }
+  private TestMBeanStatsMonitor statsMonitor;
 
+  @Before
   public void setUp() throws Exception {
     SINGLE_STATS_LONG_COUNTER = 0L;
     SINGLE_STATS_INT_COUNTER = 0;
@@ -59,12 +47,13 @@ public class StatsRateJUnitTest extends TestCase  {
     MULTI_STATS_LONG_COUNTER_2 = 0L;
     MULTI_STATS_INT_COUNTER_1 = 0;
     MULTI_STATS_INT_COUNTER_2 = 0;
+    statsMonitor = new TestMBeanStatsMonitor("TestStatsMonitor");
   }
 
+  @Test
   public void testSingleStatLongRate() throws Exception {
     StatsRate singleStatsRate = new StatsRate("SINGLE_STATS_LONG_COUNTER", StatType.LONG_TYPE, statsMonitor);
 
-
     SINGLE_STATS_LONG_COUNTER = 5000L;
     float actualRate = singleStatsRate.getRate();
 
@@ -74,13 +63,13 @@ public class StatsRateJUnitTest extends TestCase  {
 
     float expectedRate = 5000;
 
-    assertEquals(expectedRate, actualRate);
+    assertEquals(expectedRate, actualRate, 0);
   }
 
+  @Test
   public void testSingleStatIntRate() throws Exception {
     StatsRate singleStatsRate = new StatsRate("SINGLE_STATS_INT_COUNTER", StatType.INT_TYPE, statsMonitor);
 
-    
     SINGLE_STATS_INT_COUNTER = 5000;
     float actualRate = singleStatsRate.getRate();
 
@@ -91,9 +80,10 @@ public class StatsRateJUnitTest extends TestCase  {
 
     float expectedRate = 5000;
 
-    assertEquals(expectedRate, actualRate);
+    assertEquals(expectedRate, actualRate, 0);
   }
 
+  @Test
   public void testMultiStatLongRate() throws Exception {
     String[] counters = new String[] { "MULTI_STATS_LONG_COUNTER_1", "MULTI_STATS_LONG_COUNTER_2" };
     StatsRate multiStatsRate = new StatsRate(counters, StatType.LONG_TYPE, statsMonitor);
@@ -109,15 +99,14 @@ public class StatsRateJUnitTest extends TestCase  {
 
     float expectedRate = 9000;
 
-    assertEquals(expectedRate, actualRate);
-
+    assertEquals(expectedRate, actualRate, 0);
   }
 
+  @Test
   public void testMultiStatIntRate() throws Exception {
     String[] counters = new String[] { "MULTI_STATS_INT_COUNTER_1", "MULTI_STATS_INT_COUNTER_2" };
     StatsRate multiStatsRate = new StatsRate(counters, StatType.INT_TYPE, statsMonitor);
 
-
     MULTI_STATS_INT_COUNTER_1 = 5000;
     MULTI_STATS_INT_COUNTER_2 = 4000;
     float actualRate = multiStatsRate.getRate();
@@ -125,27 +114,21 @@ public class StatsRateJUnitTest extends TestCase  {
     MULTI_STATS_INT_COUNTER_1 = 10000;
     MULTI_STATS_INT_COUNTER_2 = 8000;
 
-
     actualRate = multiStatsRate.getRate();
 
     float expectedRate = 9000;
 
-    assertEquals(expectedRate, actualRate);
-
+    assertEquals(expectedRate, actualRate, 0);
   }
   
-  private class TestMBeanStatsMonitor extends MBeanStatsMonitor{
-    
-    
+  private class TestMBeanStatsMonitor extends MBeanStatsMonitor {
+
     public TestMBeanStatsMonitor(String name) {
       super(name);
-      // TODO Auto-generated constructor stub
     }
 
     @Override
     public void addStatisticsToMonitor(Statistics stats) {
-      // TODO Auto-generated method stub
-
     }
 
     @Override
@@ -174,17 +157,11 @@ public class StatsRateJUnitTest extends TestCase  {
 
     @Override
     public void removeStatisticsFromMonitor(Statistics stats) {
-      // TODO Auto-generated method stub
-
     }
 
     @Override
     public void stopListener() {
-      // TODO Auto-generated method stub
-
     }
   }
 
-  
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
index b7580ca..1c66780 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
@@ -20,10 +20,6 @@ import static org.junit.Assert.*;
 
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.ServerConnector;
-import org.jmock.Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -31,9 +27,8 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * The JettyHelperJUnitTest class is a test suite of test cases testing the
- * contract and functionality of the JettyHelper
- * class.
- * <p/>
+ * contract and functionality of the JettyHelper class. Does not start Jetty.
+ *
  * @see com.gemstone.gemfire.management.internal.JettyHelper
  * @see org.jmock.Mockery
  * @see org.junit.Assert
@@ -42,20 +37,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class JettyHelperJUnitTest {
 
-  private Mockery mockContext;
-
-  @Before
-  public void setUp() {
-    mockContext = new Mockery();
-    mockContext.setImposteriser(ClassImposteriser.INSTANCE);
-  }
-
-  @After
-  public void tearDown() {
-    mockContext.assertIsSatisfied();
-    mockContext = null;
-  }
-
   @Test
   public void testSetPortNoBindAddress() throws Exception {
 
@@ -63,7 +44,7 @@ public class JettyHelperJUnitTest {
 
     assertNotNull(jetty);
     assertNotNull(jetty.getConnectors()[0]);
-    assertEquals(8090, ((ServerConnector)jetty.getConnectors()[0]).getPort());
+    assertEquals(8090, ((ServerConnector) jetty.getConnectors()[0]).getPort());
   }
 
   @Test
@@ -73,7 +54,7 @@ public class JettyHelperJUnitTest {
 
     assertNotNull(jetty);
     assertNotNull(jetty.getConnectors()[0]);
-    assertEquals(10480, ((ServerConnector)jetty.getConnectors()[0]).getPort());
+    assertEquals(10480, ((ServerConnector) jetty.getConnectors()[0]).getPort());
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridgeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridgeJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridgeJUnitTest.java
index 84b39d4..81d6b18 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridgeJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/beans/DistributedSystemBridgeJUnitTest.java
@@ -68,7 +68,7 @@ public class DistributedSystemBridgeJUnitTest {
   }
   
   @Test
-  public void testSucessfulBackup() throws Exception {
+  public void testSuccessfulBackup() throws Exception {
     DM dm = cache.getDistributionManager();
     
     DistributedSystemBridge bridge = new DistributedSystemBridge(null);
@@ -97,7 +97,6 @@ public class DistributedSystemBridgeJUnitTest {
       bridge.backupAllMembers("/tmp", null);
       fail("Should have failed with an exception");
     } catch(RuntimeException expected) {
-      
     }
     
     verify(dm).putOutgoing(isA(FinishBackupRequest.class));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/ClasspathScanLoadHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/ClasspathScanLoadHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/ClasspathScanLoadHelperJUnitTest.java
index 79a0f09..29e77ac 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/ClasspathScanLoadHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/ClasspathScanLoadHelperJUnitTest.java
@@ -18,9 +18,11 @@ package com.gemstone.gemfire.management.internal.cli;
 
 import static org.junit.Assert.*;
 
-import java.io.IOException;
 import java.util.Set;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.internal.util.Versionable;
 import com.gemstone.gemfire.management.internal.cli.domain.AbstractImpl;
 import com.gemstone.gemfire.management.internal.cli.domain.Impl1;
@@ -29,20 +31,18 @@ import com.gemstone.gemfire.management.internal.cli.domain.Interface1;
 import com.gemstone.gemfire.management.internal.cli.domain.Interface2;
 import com.gemstone.gemfire.management.internal.cli.util.ClasspathScanLoadHelper;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
 
 @Category(UnitTest.class)
 public class ClasspathScanLoadHelperJUnitTest {
   
-  private static final String PACKAGE_NAME = "com.gemstone.gemfire.management.internal.cli.domain";
-  private static final String WRONG_PACKAGE_NAME = "com.gemstone.gemfire.management.internal.cli.domain1";
-  private static final Class<?> INTERFACE1 = Interface1.class;
-  private static final Class<?> NO_IMPL_INTERFACE = Versionable.class;
-  private static final Class<?> INTERFACE2 = Interface2.class;
-  private static final Class<?> IMPL1 = Impl1.class;
-  private static final Class<?> IMPL2 = Impl12.class;
-  private static final Class<?> ABSTRACT_IMPL = AbstractImpl.class;
+  private final String PACKAGE_NAME = "com.gemstone.gemfire.management.internal.cli.domain";
+  private final String WRONG_PACKAGE_NAME = "com.gemstone.gemfire.management.internal.cli.domain1";
+  private final Class<?> INTERFACE1 = Interface1.class;
+  private final Class<?> NO_IMPL_INTERFACE = Versionable.class;
+  private final Class<?> INTERFACE2 = Interface2.class;
+  private final Class<?> IMPL1 = Impl1.class;
+  private final Class<?> IMPL2 = Impl12.class;
+  private final Class<?> ABSTRACT_IMPL = AbstractImpl.class;
   
   @Test
   public void testLoadAndGet() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
index 1cfc94c..cea95c1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
@@ -388,7 +388,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
     /* "FIXME - Abhishek" This is failing because last param is not considered in method
     set = CliUtil.getRegionAssociatedMembers(region1, cache, false);
     assertNotNull(set);
-    assertEquals(1, set.size());*/
+    assertIndexDetailsEquals(1, set.size());*/
     
     set = CliUtil.getRegionAssociatedMembers(region_group1, cache, true);
     assertNotNull(set);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandManagerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandManagerJUnitTest.java
index 66decd6..f026a52 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandManagerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandManagerJUnitTest.java
@@ -16,16 +16,15 @@
  */
 package com.gemstone.gemfire.management.internal.cli;
 
-import com.gemstone.gemfire.management.cli.CliMetaData;
-import com.gemstone.gemfire.management.cli.ConverterHint;
-import com.gemstone.gemfire.management.cli.Result;
-import com.gemstone.gemfire.management.internal.cli.annotation.CliArgument;
-import com.gemstone.gemfire.management.internal.cli.parser.Argument;
-import com.gemstone.gemfire.management.internal.cli.parser.AvailabilityTarget;
-import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget;
-import com.gemstone.gemfire.management.internal.cli.parser.Option;
-import com.gemstone.gemfire.management.internal.security.ResourceOperation;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import static com.gemstone.gemfire.cache.operations.OperationContext.*;
+import static org.junit.Assert.*;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
 import org.junit.After;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -37,22 +36,23 @@ import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
 import org.springframework.shell.core.annotation.CliCommand;
 import org.springframework.shell.core.annotation.CliOption;
 
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import static com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
-import static com.gemstone.gemfire.cache.operations.OperationContext.Resource;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.management.cli.CliMetaData;
+import com.gemstone.gemfire.management.cli.ConverterHint;
+import com.gemstone.gemfire.management.cli.Result;
+import com.gemstone.gemfire.management.internal.cli.annotation.CliArgument;
+import com.gemstone.gemfire.management.internal.cli.parser.Argument;
+import com.gemstone.gemfire.management.internal.cli.parser.AvailabilityTarget;
+import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget;
+import com.gemstone.gemfire.management.internal.cli.parser.Option;
+import com.gemstone.gemfire.management.internal.security.ResourceOperation;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * CommandManagerTest - Includes tests to check the CommandManager functions
- * 
  */
 @Category(UnitTest.class)
 public class CommandManagerJUnitTest {
+
   private static final String COMMAND1_NAME = "command1";
   private static final String COMMAND1_NAME_ALIAS = "command1_alias";
   private static final String COMMAND2_NAME = "c2";
@@ -64,7 +64,7 @@ public class CommandManagerJUnitTest {
   private static final String ARGUMENT1_CONTEXT = "context for argument 1";
   private static final Completion[] ARGUMENT1_COMPLETIONS = {
       new Completion("arg1"), new Completion("arg1alt") };
-  private static final String ARGUEMNT2_NAME = "argument2";
+  private static final String ARGUMENT2_NAME = "argument2";
   private static final String ARGUMENT2_CONTEXT = "context for argument 2";
   private static final String ARGUMENT2_HELP = "help for argument2";
   private static final String ARGUMENT2_UNSPECIFIED_DEFAULT_VALUE = "{unspecified default value for argument2}";
@@ -95,7 +95,9 @@ public class CommandManagerJUnitTest {
     CommandManager.clearInstance();
   }
   
-  // tests loadCommands()
+  /**
+   * tests loadCommands()
+   */
   @Test
   public void testCommandManagerLoadCommands() throws Exception {
     CommandManager commandManager = CommandManager.getInstance(true);
@@ -103,14 +105,18 @@ public class CommandManagerJUnitTest {
     assertNotSame(0, commandManager.getCommands().size());
   }
 
-  // tests commandManagerInstance method
+  /**
+   * tests commandManagerInstance method
+   */
   @Test
   public void testCommandManagerInstance() throws Exception {
     CommandManager commandManager = CommandManager.getInstance(true);
     assertNotNull(commandManager);
   }
 
-  // tests createOption method for creating option
+  /**
+   * tests createOption method for creating option
+   */
   @Test
   public void testCommandManagerCreateOption() throws Exception {
     CommandManager commandManager = CommandManager.getInstance(true);
@@ -151,7 +157,9 @@ public class CommandManagerJUnitTest {
     }
   }
 
-  // tests createArgument method for creating argument
+  /**
+   * tests createArgument method for creating argument
+   */
   @Test
   public void testCommandManagerCreateArgument() throws Exception {
     CommandManager commandManager = CommandManager.getInstance(true);
@@ -164,7 +172,7 @@ public class CommandManagerJUnitTest {
     Class<?>[] parameterTypes = method.getParameterTypes();
     List<String> argumentList = new ArrayList<String>();
     argumentList.add(ARGUMENT1_NAME);
-    argumentList.add(ARGUEMNT2_NAME);
+    argumentList.add(ARGUMENT2_NAME);
 
     int parameterNo = 0;
     for (int i = 0; i < annotations.length; i++) {
@@ -185,7 +193,9 @@ public class CommandManagerJUnitTest {
     }
   }
 
-  // tests availabilityIndicator for a method
+  /**
+   * tests availabilityIndicator for a method
+   */
   @Test
   public void testCommandManagerAvailabilityIndicator() throws Exception {
     CommandManager commandManager = CommandManager.getInstance(true);
@@ -222,16 +232,18 @@ public class CommandManagerJUnitTest {
     assertTrue("Should not find unlisted plugin.", !commandManager.getCommands().containsKey("mock plugin command unlisted"));
   }
 
+  /**
+   * class that represents dummy commands
+   */
+  public static class Commands implements CommandMarker {
 
-  // class that represents dummy commands
-  static public class Commands implements CommandMarker {
     @CliCommand(value = { COMMAND1_NAME, COMMAND1_NAME_ALIAS }, help = COMMAND1_HELP)
     @CliMetaData(shellOnly = true, relatedTopic = { "relatedTopicOfCommand1" })
     @ResourceOperation(resource = Resource.CLUSTER, operation = OperationCode.READ)
     public static String command1(
         @CliArgument(name = ARGUMENT1_NAME, argumentContext = ARGUMENT1_CONTEXT, help = ARGUMENT1_HELP, mandatory = true)
         String argument1,
-        @CliArgument(name = ARGUEMNT2_NAME, argumentContext = ARGUMENT2_CONTEXT, help = ARGUMENT2_HELP, mandatory = false, unspecifiedDefaultValue = ARGUMENT2_UNSPECIFIED_DEFAULT_VALUE, systemProvided = false)
+        @CliArgument(name = ARGUMENT2_NAME, argumentContext = ARGUMENT2_CONTEXT, help = ARGUMENT2_HELP, mandatory = false, unspecifiedDefaultValue = ARGUMENT2_UNSPECIFIED_DEFAULT_VALUE, systemProvided = false)
         String argument2,
         @CliOption(key = { OPTION1_NAME, OPTION1_SYNONYM }, help = OPTION1_HELP, mandatory = true, optionContext = OPTION1_CONTEXT, specifiedDefaultValue = OPTION1_SPECIFIED_DEFAULT_VALUE)
         String option1,
@@ -276,13 +288,15 @@ public class CommandManagerJUnitTest {
     @CliAvailabilityIndicator({ COMMAND1_NAME })
     public boolean isAvailable() {
       return true; // always available on server
-
     }
-
   }
 
-  static class SimpleConverter implements Converter<String> {
+  /**
+   * Used by testCommandManagerLoadPluginCommands
+   */
+  private static class SimpleConverter implements Converter<String> {
 
+    @Override
     public boolean supports(Class<?> type, String optionContext) {
       if (type.isAssignableFrom(String.class)) {
         return true;
@@ -290,11 +304,13 @@ public class CommandManagerJUnitTest {
       return false;
     }
 
+    @Override
     public String convertFromText(String value, Class<?> targetType,
         String optionContext) {
       return value;
     }
 
+    @Override
     public boolean getAllPossibleValues(List<Completion> completions,
         Class<?> targetType, String existingData, String context,
         MethodTarget target) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandSeparatorEscapeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandSeparatorEscapeJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandSeparatorEscapeJUnitTest.java
index 8057a1e..735a209 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandSeparatorEscapeJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandSeparatorEscapeJUnitTest.java
@@ -16,21 +16,18 @@
  */
 package com.gemstone.gemfire.management.internal.cli;
 
+import static com.gemstone.gemfire.management.internal.cli.shell.MultiCommandHelper.*;
+import static org.junit.Assert.*;
+
 import java.util.List;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-import static com.gemstone.gemfire.management.internal.cli.shell.MultiCommandHelper.getMultipleCommands;
-
-/**
- * 
- *
- */
 @Category(UnitTest.class)
-public class CommandSeparatorEscapeJUnitTest  extends TestCase{
+public class CommandSeparatorEscapeJUnitTest {
 
   //testcases : single command
   //testcases : multiple commands with cmdSeparator
@@ -38,8 +35,9 @@ public class CommandSeparatorEscapeJUnitTest  extends TestCase{
   //testcases : multiplecommand with comma-value : first value
   //testcases : multiplecommand with comma-value : last value
   //testcases : multiplecommand with comma-value : middle value
-  
-  public void testEmptyCommand(){
+
+  @Test
+  public void testEmptyCommand() {
     String input = ";";
     //System.out.println("I >> " + input);
     List<String> split = getMultipleCommands(input);
@@ -48,8 +46,9 @@ public class CommandSeparatorEscapeJUnitTest  extends TestCase{
     }*/
     assertEquals(0,split.size());    
   }
-  
-  public void testSingleCommand(){
+
+  @Test
+  public void testSingleCommand() {
     String input = "stop server";
     //System.out.println("I >> " + input);
     List<String> split = getMultipleCommands(input);
@@ -59,8 +58,9 @@ public class CommandSeparatorEscapeJUnitTest  extends TestCase{
     assertEquals(1,split.size());
     assertEquals("stop server", split.get(0));
   }
-  
-  public void testMultiCommand(){
+
+  @Test
+  public void testMultiCommand() {
     String input = "stop server1 --option1=value1; stop server2;stop server3 ";
     //System.out.println("I >> " + input);
     List<String> split = getMultipleCommands(input);
@@ -72,8 +72,9 @@ public class CommandSeparatorEscapeJUnitTest  extends TestCase{
     assertEquals(" stop server2", split.get(1));
     assertEquals("stop server3 ", split.get(2));
   }
-  
-  public void testMultiCommandWithCmdSep(){    
+
+  @Test
+  public void testMultiCommandWithCmdSep() {
     String input = "put --region=/region1 --key='key1\\;part' --value='value1\\;part2';put --region=/region1 --key='key2\\;part' --value='value2\\;part2'";
     //System.out.println("I >> " + input);
     List<String> split = getMultipleCommands(input);
@@ -85,7 +86,8 @@ public class CommandSeparatorEscapeJUnitTest  extends TestCase{
     assertEquals("put --region=/region1 --key='key2;part' --value='value2;part2'", split.get(1));
   }
 
-  public void testSingleCommandWithComma(){
+  @Test
+  public void testSingleCommandWithComma() {
     String input = "put --region=/region1 --key='key\\;part' --value='value\\;part2'";
     //System.out.println("I >> " + input);
     List<String> split = getMultipleCommands(input);
@@ -96,7 +98,8 @@ public class CommandSeparatorEscapeJUnitTest  extends TestCase{
     assertEquals("put --region=/region1 --key='key;part' --value='value;part2'", split.get(0));
   }
 
-  public void testMultiCmdCommaValueFirst(){
+  @Test
+  public void testMultiCmdCommaValueFirst() {
     String input = "put --region=/region1 --key='key\\;part' --value='value\\;part2';stop server";
     //System.out.println("I >> " + input);
     List<String> split = getMultipleCommands(input);
@@ -107,8 +110,9 @@ public class CommandSeparatorEscapeJUnitTest  extends TestCase{
     assertEquals("put --region=/region1 --key='key;part' --value='value;part2'", split.get(0));
     assertEquals("stop server", split.get(1));
   }
-  
-  public void testMultiCmdCommaValueLast(){
+
+  @Test
+  public void testMultiCmdCommaValueLast() {
     String input = "stop server;put --region=/region1 --key='key\\;part' --value='value\\;part2'";
     //System.out.println("I >> " + input);
     List<String> split = getMultipleCommands(input);
@@ -120,7 +124,8 @@ public class CommandSeparatorEscapeJUnitTest  extends TestCase{
     assertEquals("put --region=/region1 --key='key;part' --value='value;part2'", split.get(1));    
   }
 
-  public void testMultiCmdCommaValueMiddle(){
+  @Test
+  public void testMultiCmdCommaValueMiddle() {
     String input = "stop server1;put --region=/region1 --key='key\\;part' --value='value\\;part2';stop server2;stop server3";
     //System.out.println("I >> " + input);
     List<String> split = getMultipleCommands(input);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/DataCommandJsonJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/DataCommandJsonJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/DataCommandJsonJUnitTest.java
index c95faee..f11afd0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/DataCommandJsonJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/DataCommandJsonJUnitTest.java
@@ -16,26 +16,23 @@
  */
 package com.gemstone.gemfire.management.internal.cli;
 
+import static org.junit.Assert.*;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.management.internal.cli.dto.Car;
 import com.gemstone.gemfire.management.internal.cli.util.JsonUtil;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- * 
- *
- */
 @Category(UnitTest.class)
-public class DataCommandJsonJUnitTest  extends TestCase{
+public class DataCommandJsonJUnitTest {
 
-  
+  @Test
   public void testCollectionTypesInJson(){    
     String json = "{'attributes':{'power':'90hp'},'make':'502.1825','model':'502.1825','colors':['red','white','blue'],'attributeSet':['red','white','blue'], 'attributeArray':['red','white','blue']}";
     Car car = (Car)JsonUtil.jsonToObject(json, Car.class);    
@@ -55,6 +52,5 @@ public class DataCommandJsonJUnitTest  extends TestCase{
     assertNotNull(car.getAttributeArray());
     assertTrue(car.getAttributeArray() instanceof String[]);
     assertEquals(3, car.getAttributeArray().length);
-    
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java
index d51df2a..0f93871 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java
@@ -16,20 +16,16 @@
  */
 package com.gemstone.gemfire.management.internal.cli;
 
-import com.gemstone.gemfire.management.cli.CliMetaData;
-import com.gemstone.gemfire.management.cli.CommandProcessingException;
-import com.gemstone.gemfire.management.cli.ConverterHint;
-import com.gemstone.gemfire.management.cli.Result;
-import com.gemstone.gemfire.management.internal.cli.annotation.CliArgument;
-import com.gemstone.gemfire.management.internal.cli.converters.StringArrayConverter;
-import com.gemstone.gemfire.management.internal.cli.converters.StringListConverter;
-import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
-import com.gemstone.gemfire.management.internal.cli.parser.SyntaxConstants;
-import com.gemstone.gemfire.management.internal.cli.result.ResultBuilder;
-import com.gemstone.gemfire.management.internal.security.ResourceOperation;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import static com.gemstone.gemfire.cache.operations.OperationContext.*;
+import static org.junit.Assert.*;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.springframework.shell.core.CommandMarker;
@@ -42,75 +38,44 @@ import org.springframework.shell.core.annotation.CliCommand;
 import org.springframework.shell.core.annotation.CliOption;
 import org.springframework.shell.event.ParseResult;
 
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-import static com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
-import static com.gemstone.gemfire.cache.operations.OperationContext.Resource;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.management.cli.CliMetaData;
+import com.gemstone.gemfire.management.cli.CommandProcessingException;
+import com.gemstone.gemfire.management.cli.ConverterHint;
+import com.gemstone.gemfire.management.cli.Result;
+import com.gemstone.gemfire.management.internal.cli.annotation.CliArgument;
+import com.gemstone.gemfire.management.internal.cli.converters.StringArrayConverter;
+import com.gemstone.gemfire.management.internal.cli.converters.StringListConverter;
+import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
+import com.gemstone.gemfire.management.internal.cli.parser.SyntaxConstants;
+import com.gemstone.gemfire.management.internal.cli.result.ResultBuilder;
+import com.gemstone.gemfire.management.internal.security.ResourceOperation;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * GfshParserJUnitTest - Includes tests to check the parsing and auto-completion
  * capabilities of {@link GfshParser}
- *
  */
 @Category(UnitTest.class)
 public class GfshParserJUnitTest {
-  
-  /**
-   * @since 8.1
-   */
-  private static final Method METHOD_command1;
-  static {
-    try {
-      METHOD_command1 = Commands.class.getMethod("command1", String.class, String.class, String.class, String.class, String.class);
-    } catch (Exception e) {
-      throw new IllegalStateException(e);
-    }
-  }
-
-  /**
-   * @since 8.1
-   */
-  private static final Method METHOD_testParamConcat;
-  static {
-    try {
-      METHOD_testParamConcat = Commands.class.getMethod("testParamConcat", String.class, String[].class, List.class, Integer.class, String[].class);
-    } catch (Exception e) {
-      throw new IllegalStateException(e);
-    }
-  }
-  
-  /**
-   * @since 8.1
-   */
-  private static final Method METHOD_testMultiWordArg;
-  static {
-    try {
-      METHOD_testMultiWordArg = Commands.class.getMethod("testMultiWordArg", String.class, String.class);
-    } catch (Exception e) {
-      throw new IllegalStateException(e);
-    }
-  }
 
   private static final String COMMAND1_NAME = "command1";
   private static final String COMMAND1_NAME_ALIAS = "command1_alias";
   private static final String COMMAND2_NAME = "c2";
 
   private static final String COMMAND1_HELP = "help for " + COMMAND1_NAME;
+
   // ARGUMENTS
   private static final String ARGUMENT1_NAME = "argument1";
   private static final String ARGUMENT1_HELP = "help for argument1";
   private static final String ARGUMENT1_CONTEXT = "context for argument 1";
   private static final Completion[] ARGUMENT1_COMPLETIONS = {
-      new Completion("arg1"), new Completion("arg1alt") };
-  private static final String ARGUEMNT2_NAME = "argument2";
+          new Completion("arg1"), new Completion("arg1alt") };
+  private static final String ARGUMENT2_NAME = "argument2";
   private static final String ARGUMENT2_CONTEXT = "context for argument 2";
   private static final String ARGUMENT2_HELP = "help for argument2";
   private static final String ARGUMENT2_UNSPECIFIED_DEFAULT_VALUE = "{unspecified default value for argument2}";
   private static final Completion[] ARGUMENT2_COMPLETIONS = {
-      new Completion("arg2"), new Completion("arg2alt") };
+          new Completion("arg2"), new Completion("arg2alt") };
 
   // OPTIONS
   private static final String OPTION1_NAME = "option1";
@@ -118,27 +83,34 @@ public class GfshParserJUnitTest {
   private static final String OPTION1_HELP = "help for option1";
   private static final String OPTION1_CONTEXT = "context for option1";
   private static final Completion[] OPTION1_COMPLETIONS = {
-      new Completion("option1"), new Completion("option1Alternate") };
+          new Completion("option1"), new Completion("option1Alternate") };
   private static final String OPTION2_NAME = "option2";
   private static final String OPTION2_HELP = "help for option2";
   private static final String OPTION2_CONTEXT = "context for option2";
   private static final String OPTION2_SPECIFIED_DEFAULT_VALUE = "{specified default value for option2}";
   private static final Completion[] OPTION2_COMPLETIONS = {
-      new Completion("option2"), new Completion("option2Alternate") };
+          new Completion("option2"), new Completion("option2Alternate") };
   private static final String OPTION3_NAME = "option3";
   private static final String OPTION3_SYNONYM = "opt3";
   private static final String OPTION3_HELP = "help for option3";
   private static final String OPTION3_CONTEXT = "context for option3";
   private static final String OPTION3_UNSPECIFIED_DEFAULT_VALUE = "{unspecified default value for option3}";
   private static final Completion[] OPTION3_COMPLETIONS = {
-      new Completion("option3"), new Completion("option3Alternate") };
+          new Completion("option3"), new Completion("option3Alternate") };
 
-  private CommandManager commandManager;
+  private Method methodCommand1;
+  private Method methodTestParamConcat;
+  private Method methodTestMultiWordArg;
 
+  private CommandManager commandManager;
   private GfshParser parser;
 
   @Before
   public void setUp() throws Exception {
+    methodCommand1 = Commands.class.getMethod("command1", String.class, String.class, String.class, String.class, String.class);
+    methodTestParamConcat = Commands.class.getMethod("testParamConcat", String.class, String[].class, List.class, Integer.class, String[].class);
+    methodTestMultiWordArg = Commands.class.getMethod("testMultiWordArg", String.class, String.class);
+
     // Make sure no prior tests leave the CommandManager in a funky state
     CommandManager.clearInstance();
 
@@ -147,6 +119,7 @@ public class GfshParserJUnitTest {
     commandManager.add(SimpleConverter.class.newInstance());
     commandManager.add(StringArrayConverter.class.newInstance());
     commandManager.add(StringListConverter.class.newInstance());
+
     // Set up the parser
     parser = new GfshParser(commandManager);
 
@@ -161,16 +134,11 @@ public class GfshParserJUnitTest {
   /**
    * Tests the auto-completion capability of {@link GfshParser} with the method
    * {@link GfshParser#complete(String, int, List)}
-   *
-   * @throws IllegalAccessException
-   * @throws InstantiationException
-   * @throws NoSuchMethodException
-   * @throws SecurityException
    */
   @Test
   public void testComplete() throws Exception {
     // Get the names of the command
-    String[] command1Names = ((CliCommand) METHOD_command1
+    String[] command1Names = ((CliCommand) methodCommand1
         .getAnnotation(CliCommand.class)).value();
 
     // Input contains an entirely different string
@@ -446,7 +414,6 @@ public class GfshParserJUnitTest {
 
   private void assertSimpleCompletionValues(List<String> expected,
       List<String> actual) {
-    // TODO Auto-generated method stub
     assertEquals("Check size", expected.size(), actual.size());
     for (int i = 0; i < expected.size(); i++) {
       assertEquals("Check completion value no." + i +". Expected("+expected.get(i)+") & Actual("+actual.get(i)+").", expected.get(i),
@@ -457,16 +424,11 @@ public class GfshParserJUnitTest {
   /**
    * Tests the auto-completion capability of {@link GfshParser} with the method
    * {@link GfshParser#completeAdvanced(String, int, List)}
-   *
-   * @throws IllegalAccessException
-   * @throws InstantiationException
-   * @throws NoSuchMethodException
-   * @throws SecurityException
    */
   @Test
   public void testCompleteAdvanced() throws Exception {
     // Get the names of the command
-    String[] command1Names = ((CliCommand) METHOD_command1
+    String[] command1Names = ((CliCommand) methodCommand1
         .getAnnotation(CliCommand.class)).value();
 
     // Input contains an entirely different string
@@ -745,7 +707,6 @@ public class GfshParserJUnitTest {
           null, 0));
     }
     assertAdvancedCompletionValues(completionValues, completionCandidates);
-
   }
 
   private void clearAndAdvancedComplete(List<Completion> completionCandidates,List<Completion> completionValues,String input,Parser parser){
@@ -756,7 +717,6 @@ public class GfshParserJUnitTest {
 
   private void assertAdvancedCompletionValues(List<Completion> expected,
       List<Completion> actual) {
-    // TODO Auto-generated method stub
     assertEquals("Check size", expected.size(), actual.size());
     for (int i = 0; i < expected.size(); i++) {
       assertEquals("Check completion value no." + i+". Expected("+expected.get(i)+") & Actual("+actual.get(i)+").",
@@ -774,16 +734,11 @@ public class GfshParserJUnitTest {
    *
    * Does not include testing for multiple values as this change is still
    * pending in spring-shell
-   *
-   * @throws InstantiationException
-   * @throws IllegalAccessException
-   * @throws NoSuchMethodException
-   * @throws SecurityException
    */
   @Test
   public void testParse() throws Exception {
     // Get the names of the command
-    String[] command1Names = ((CliCommand) METHOD_command1
+    String[] command1Names = ((CliCommand) methodCommand1
         .getAnnotation(CliCommand.class)).value();
 
     // Input contains an entirely different string
@@ -792,8 +747,8 @@ public class GfshParserJUnitTest {
     CommandProcessingException expectedException = null;
     try {
       parse = parser.parse(input);
-    } catch (CommandProcessingException e) {
-      expectedException = e;
+    } catch (CommandProcessingException expected) {
+      expectedException = expected;
     } finally {
       assertNotNull("Expecting a "+CommandProcessingException.class+" for an invalid command name: "+input, expectedException);
       assertEquals("CommandProcessingException type doesn't match. "
@@ -827,8 +782,8 @@ public class GfshParserJUnitTest {
     expectedException = null;
     try {
       parse = parser.parse(input);
-    } catch (CommandProcessingException e) {
-      expectedException = e;
+    } catch (CommandProcessingException expected) {
+      expectedException = expected;
     } finally {
       //FIXME - Nikhil/Abhishek prefix shouldn't work
       assertNotNull("Expecting a "+CommandProcessingException.class+" for an invalid/incomplete command name: "+input, expectedException);
@@ -844,8 +799,8 @@ public class GfshParserJUnitTest {
     expectedException = null;
     try {
       parse = parser.parse(input);
-    } catch (CommandProcessingException e) {
-      expectedException = e;
+    } catch (CommandProcessingException expected) {
+      expectedException = expected;
     } finally {
       assertNotNull("Expecting a "+CommandProcessingException.class+" for an invalid/incomplete command name: "+input, expectedException);
       assertEquals("CommandProcessingException type doesn't match. Actual("
@@ -861,7 +816,7 @@ public class GfshParserJUnitTest {
         + SyntaxConstants.OPTION_VALUE_SPECIFIER + "somevalue";
     parse = parser.parse(input);
     assertNotNull(parse);
-    assertEquals("Check ParseResult method", parse.getMethod(), METHOD_command1);
+    assertEquals("Check ParseResult method", parse.getMethod(), methodCommand1);
     assertEquals("Check no. of method arguments", 5,
         parse.getArguments().length);
     assertEquals("Check argument1", "ARGUMENT1_VALUE", parse.getArguments()[0]);
@@ -878,8 +833,8 @@ public class GfshParserJUnitTest {
         + " ARGUMENT1_VALUE?      ARGUMENT2_VALUE -- ----------";
     try {
       parse = parser.parse(input);
-    } catch (CommandProcessingException e) {
-      expectedException = e;
+    } catch (CommandProcessingException expected) {
+      expectedException = expected;
     } finally {
       assertNotNull("Expecting a "+CommandProcessingException.class+" for an invalid/incomplete command name: "+input, expectedException);
       assertEquals("CommandProcessingException type doesn't match. Actual("
@@ -899,7 +854,7 @@ public class GfshParserJUnitTest {
         + SyntaxConstants.LONG_OPTION_SPECIFIER + OPTION2_NAME;
     parse = parser.parse(input);
     assertNotNull(parse);
-    assertEquals("Check ParseResult method", parse.getMethod(), METHOD_command1);
+    assertEquals("Check ParseResult method", parse.getMethod(), methodCommand1);
     assertEquals("Check no. of method arguments", 5,
         parse.getArguments().length);
     assertEquals("Check argument1", "ARGUMENT1_VALUE", parse.getArguments()[0]);
@@ -922,7 +877,7 @@ public class GfshParserJUnitTest {
         + SyntaxConstants.OPTION_VALUE_SPECIFIER + "option3value";
     parse = parser.parse(input);
     assertNotNull(parse);
-    assertEquals("Check ParseResult method", parse.getMethod(), METHOD_command1);
+    assertEquals("Check ParseResult method", parse.getMethod(), methodCommand1);
     assertEquals("Check no. of method arguments", 5,
         parse.getArguments().length);
     assertEquals("Check argument1", "ARGUMENT1_VALUE", parse.getArguments()[0]);
@@ -935,7 +890,7 @@ public class GfshParserJUnitTest {
     String command = "testParamConcat --string=string1 --stringArray=1,2 --stringArray=3,4 --stringList=11,12,13 --integer=10 --stringArray=5 --stringList=14,15";
     ParseResult parseResult = parser.parse(command);
     assertNotNull(parseResult);
-    assertEquals("Check ParseResult method", parseResult.getMethod(), METHOD_testParamConcat);
+    assertEquals("Check ParseResult method", parseResult.getMethod(), methodTestParamConcat);
     assertEquals("Check no. of method arguments", 5, parseResult.getArguments().length);
     Object[] arguments = parseResult.getArguments();
     assertEquals(arguments[0], "string1");
@@ -955,7 +910,7 @@ public class GfshParserJUnitTest {
     command = "testParamConcat --stringArray=1,2 --stringArray=\'3,4\'";
     parseResult = parser.parse(command);
     assertNotNull(parseResult);
-    assertEquals("Check ParseResult method", parseResult.getMethod(), METHOD_testParamConcat);
+    assertEquals("Check ParseResult method", parseResult.getMethod(), methodTestParamConcat);
     assertEquals("Check no. of method arguments", 5, parseResult.getArguments().length);
     arguments = parseResult.getArguments();
     assertEquals(((String[]) arguments[1])[0], "1");
@@ -965,7 +920,7 @@ public class GfshParserJUnitTest {
     command = "testParamConcat --string=\"1\" --colonArray=2:3:4 --stringArray=5,\"6,7\",8 --stringList=\"9,10,11,12\"";
     parseResult = parser.parse(command);
     assertNotNull(parseResult);
-    assertEquals("Check ParseResult method", parseResult.getMethod(), METHOD_testParamConcat);
+    assertEquals("Check ParseResult method", parseResult.getMethod(), methodTestParamConcat);
     assertEquals("Check no. of method arguments", 5, parseResult.getArguments().length);
     arguments = parseResult.getArguments();
     assertEquals(arguments[0], "1");
@@ -988,17 +943,20 @@ public class GfshParserJUnitTest {
     command = "testMultiWordArg this is just one argument?this is a second argument";
     parseResult = parser.parse(command);
     assertNotNull(parseResult);
-    assertEquals("Check ParseResult method", parseResult.getMethod(), METHOD_testMultiWordArg);
+    assertEquals("Check ParseResult method", parseResult.getMethod(), methodTestMultiWordArg);
     assertEquals("Check no. of method arguments", 2, parseResult.getArguments().length);
     arguments = parseResult.getArguments();
     assertEquals(arguments[0], "this is just one argument");
     assertEquals(arguments[1], "this is a second argument");
   }
 
+  @Test
   public void testDefaultAvailabilityMessage() throws Exception {
     checkAvailabilityMessage(new AvailabilityCommands(), AvailabilityCommands.C2_NAME, AvailabilityCommands.C2_MSG_UNAVAILABLE, AvailabilityCommands.C2_PROP);
   }
 
+  @Ignore("This test was not previously enabled and it fails. Is it valid?")
+  @Test
   public void testCustomAvailabilityMessage() throws Exception {
     checkAvailabilityMessage(new AvailabilityCommands(), AvailabilityCommands.C1_NAME, AvailabilityCommands.C1_MSG_UNAVAILABLE, AvailabilityCommands.C1_PROP);
   }
@@ -1016,7 +974,7 @@ public class GfshParserJUnitTest {
     } catch (CommandProcessingException e) {
       String actualMessage = e.getMessage();
       String expectedMessage = CliStrings.format(CliStrings.GFSHPARSER__MSG__0_IS_NOT_AVAILABLE_REASON_1, new Object[] {commandString, unavailableMessage});
-      assertEquals("1. Unavailabilty message ["+actualMessage+"] is not as expected["+expectedMessage+"].", actualMessage, expectedMessage);
+      assertEquals("1. Unavailability message ["+actualMessage+"] is not as expected["+expectedMessage+"].", actualMessage, expectedMessage);
     }
 
     // Case 2: Command is 'made' available
@@ -1024,9 +982,6 @@ public class GfshParserJUnitTest {
       System.setProperty(availabiltyBooleanProp, "true");
       parseResult = parser.parse(commandString);
       assertNotNull("ParseResult should not be null for available command.", parseResult);
-    } catch (CommandProcessingException e) {
-      fail("Command \""+commandString+"\" is expected to be available");
-      e.printStackTrace();
     } finally {
       System.clearProperty(availabiltyBooleanProp);
     }
@@ -1048,7 +1003,7 @@ public class GfshParserJUnitTest {
     public static String command1(
         @CliArgument(name = ARGUMENT1_NAME, argumentContext = ARGUMENT1_CONTEXT, help = ARGUMENT1_HELP, mandatory = true)
         String argument1,
-        @CliArgument(name = ARGUEMNT2_NAME, argumentContext = ARGUMENT2_CONTEXT, help = ARGUMENT2_HELP, mandatory = false, unspecifiedDefaultValue = ARGUMENT2_UNSPECIFIED_DEFAULT_VALUE, systemProvided = false)
+        @CliArgument(name = ARGUMENT2_NAME, argumentContext = ARGUMENT2_CONTEXT, help = ARGUMENT2_HELP, mandatory = false, unspecifiedDefaultValue = ARGUMENT2_UNSPECIFIED_DEFAULT_VALUE, systemProvided = false)
         String argument2,
         @CliOption(key = { OPTION1_NAME, OPTION1_SYNONYM }, help = OPTION1_HELP, mandatory = true, optionContext = OPTION1_CONTEXT)
         String option1,
@@ -1087,24 +1042,24 @@ public class GfshParserJUnitTest {
 
   static class SimpleConverter implements Converter<String> {
 
+    @Override
     public boolean supports(Class<?> type, String optionContext) {
-      // TODO Auto-generated method stub
       if (type.isAssignableFrom(String.class)) {
         return true;
       }
       return false;
     }
 
+    @Override
     public String convertFromText(String value, Class<?> targetType,
         String optionContext) {
-      // TODO Auto-generated method stub
       return value;
     }
 
+    @Override
     public boolean getAllPossibleValues(List<Completion> completions,
         Class<?> targetType, String existingData, String context,
         MethodTarget target) {
-      // TODO Auto-generated method stub
       if (context.equals(ARGUMENT1_CONTEXT)) {
         for (Completion completion : ARGUMENT1_COMPLETIONS) {
           completions.add(completion);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/annotations/CliArgumentJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/annotations/CliArgumentJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/annotations/CliArgumentJUnitTest.java
index f7b55f3..e3aa771 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/annotations/CliArgumentJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/annotations/CliArgumentJUnitTest.java
@@ -16,20 +16,19 @@
  */
 package com.gemstone.gemfire.management.internal.cli.annotations;
 
-import org.junit.experimental.categories.Category;
+import static org.junit.Assert.*;
 
-import junit.framework.TestCase;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.management.internal.cli.annotation.CliArgument;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Includes tests for checking assignment of {@link CliArgument}
- * 
- * 
  */
 @Category(UnitTest.class)
-public class CliArgumentJUnitTest extends TestCase {
+public class CliArgumentJUnitTest {
 
   private static final String ARGUMENT_NAME = "ARGUMENT_NAME";
   private static final String ARGUMENT_HELP = "ARGUMENT_HELP";
@@ -43,169 +42,87 @@ public class CliArgumentJUnitTest extends TestCase {
   /**
    * Test for {@link CliArgument#name()}
    */
-  public void testName() {
-    try {
-      String name = ((CliArgument) (ArgumentTestingClass.class.getMethod(
-          "defaultArgumentTestingMethod", String.class)
-          .getParameterAnnotations()[0][0])).name();
-      assertNotNull(name);
-      assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, name, ARGUMENT_NAME);
-      name = ((CliArgument) (ArgumentTestingClass.class.getMethod(
-          "argumentTestingMethod", String.class).getParameterAnnotations()[0][0]))
-          .name();
-      assertNotNull(name);
-      assertEquals(MESSAGE_FOR_ARGUMENT, name, ARGUMENT_NAME);
-    } catch (SecurityException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    } catch (NoSuchMethodException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
+  @Test
+  public void testName() throws Exception {
+    String name = ((CliArgument) (ArgumentTestingClass.class.getMethod("defaultArgumentTestingMethod", String.class).getParameterAnnotations()[0][0])).name();
+    assertNotNull(name);
+    assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, name, ARGUMENT_NAME);
+    name = ((CliArgument) (ArgumentTestingClass.class.getMethod("argumentTestingMethod", String.class).getParameterAnnotations()[0][0])).name();
+    assertNotNull(name);
+    assertEquals(MESSAGE_FOR_ARGUMENT, name, ARGUMENT_NAME);
   }
 
   /**
    * Test for {@link CliArgument#help()}
    */
-  public void testHelp() {
-    try {
-      String help = ((CliArgument) (ArgumentTestingClass.class.getMethod(
-          "defaultArgumentTestingMethod", String.class)
-          .getParameterAnnotations()[0][0])).help();
-      assertNotNull(help);
-      assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, help, "");
-      help = ((CliArgument) (ArgumentTestingClass.class.getMethod(
-          "argumentTestingMethod", String.class).getParameterAnnotations()[0][0]))
-          .help();
-      assertNotNull(help);
-      assertEquals(MESSAGE_FOR_ARGUMENT, help, ARGUMENT_HELP);
-    } catch (SecurityException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    } catch (NoSuchMethodException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
+  @Test
+  public void testHelp() throws Exception {
+    String help = ((CliArgument) (ArgumentTestingClass.class.getMethod("defaultArgumentTestingMethod", String.class).getParameterAnnotations()[0][0])).help();
+    assertNotNull(help);
+    assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, help, "");
+    help = ((CliArgument) (ArgumentTestingClass.class.getMethod("argumentTestingMethod", String.class).getParameterAnnotations()[0][0])).help();
+    assertNotNull(help);
+    assertEquals(MESSAGE_FOR_ARGUMENT, help, ARGUMENT_HELP);
   }
 
   /**
    * Test for {@link CliArgument#mandatory()}
    */
-  public void testMandatory() {
-    try {
-      boolean mandatory = ((CliArgument) (ArgumentTestingClass.class.getMethod(
-          "defaultArgumentTestingMethod", String.class)
-          .getParameterAnnotations()[0][0])).mandatory();
-      assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, mandatory, false);
-      mandatory = ((CliArgument) (ArgumentTestingClass.class.getMethod(
-          "argumentTestingMethod", String.class).getParameterAnnotations()[0][0]))
-          .mandatory();
-      assertEquals(MESSAGE_FOR_ARGUMENT, mandatory, ARGUMENT_MANDATORY);
-    } catch (SecurityException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    } catch (NoSuchMethodException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
+  @Test
+  public void testMandatory() throws Exception {
+    boolean mandatory = ((CliArgument) (ArgumentTestingClass.class.getMethod("defaultArgumentTestingMethod", String.class).getParameterAnnotations()[0][0])).mandatory();
+    assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, mandatory, false);
+    mandatory = ((CliArgument) (ArgumentTestingClass.class.getMethod("argumentTestingMethod", String.class).getParameterAnnotations()[0][0])).mandatory();
+    assertEquals(MESSAGE_FOR_ARGUMENT, mandatory, ARGUMENT_MANDATORY);
   }
 
   /**
    * Test for {@link CliArgument#argumentContext()}
    */
-  public void testArgumentContext() {
-    try {
-      String argumentContext = ((CliArgument) (ArgumentTestingClass.class
-          .getMethod("defaultArgumentTestingMethod", String.class)
-          .getParameterAnnotations()[0][0])).argumentContext();
-      assertNotNull(argumentContext);
-      assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, argumentContext, "");
-      argumentContext = ((CliArgument) (ArgumentTestingClass.class.getMethod(
-          "argumentTestingMethod", String.class).getParameterAnnotations()[0][0]))
-          .argumentContext();
-      assertNotNull(argumentContext);
-      assertEquals(MESSAGE_FOR_ARGUMENT, argumentContext, ARGUMENT_CONTEXT);
-    } catch (SecurityException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    } catch (NoSuchMethodException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
+  @Test
+  public void testArgumentContext() throws Exception {
+    String argumentContext = ((CliArgument) (ArgumentTestingClass.class.getMethod("defaultArgumentTestingMethod", String.class).getParameterAnnotations()[0][0])).argumentContext();
+    assertNotNull(argumentContext);
+    assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, argumentContext, "");
+    argumentContext = ((CliArgument) (ArgumentTestingClass.class.getMethod("argumentTestingMethod", String.class).getParameterAnnotations()[0][0])).argumentContext();
+    assertNotNull(argumentContext);
+    assertEquals(MESSAGE_FOR_ARGUMENT, argumentContext, ARGUMENT_CONTEXT);
   }
 
   /**
    * Test for {@link CliArgument#systemProvided()}
    */
-  public void testSystemProvided() {
-    try {
-      boolean systemProvided = ((CliArgument) (ArgumentTestingClass.class
-          .getMethod("defaultArgumentTestingMethod", String.class)
-          .getParameterAnnotations()[0][0])).systemProvided();
-      assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, systemProvided, false);
-      systemProvided = ((CliArgument) (ArgumentTestingClass.class.getMethod(
-          "argumentTestingMethod", String.class).getParameterAnnotations()[0][0]))
-          .systemProvided();
-      assertEquals(MESSAGE_FOR_ARGUMENT, systemProvided, SYSTEM_PROVIDED);
-    } catch (SecurityException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    } catch (NoSuchMethodException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
+  @Test
+  public void testSystemProvided() throws Exception {
+    boolean systemProvided = ((CliArgument) (ArgumentTestingClass.class.getMethod("defaultArgumentTestingMethod", String.class).getParameterAnnotations()[0][0])).systemProvided();
+    assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, systemProvided, false);
+    systemProvided = ((CliArgument) (ArgumentTestingClass.class.getMethod("argumentTestingMethod", String.class).getParameterAnnotations()[0][0])).systemProvided();
+    assertEquals(MESSAGE_FOR_ARGUMENT, systemProvided, SYSTEM_PROVIDED);
   }
 
   /**
    * Test for {@link CliArgument#unspecifiedDefaultValue()}
    */
-  public void testUnspecifiedDefaultValue() {
-    try {
-      String unspecifiedDefaultValue = ((CliArgument) (ArgumentTestingClass.class
-          .getMethod("defaultArgumentTestingMethod", String.class)
-          .getParameterAnnotations()[0][0])).unspecifiedDefaultValue();
-      assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, unspecifiedDefaultValue,
-          "__NULL__");
-      unspecifiedDefaultValue = ((CliArgument) (ArgumentTestingClass.class
-          .getMethod("argumentTestingMethod", String.class)
-          .getParameterAnnotations()[0][0])).unspecifiedDefaultValue();
-      assertEquals(MESSAGE_FOR_ARGUMENT, unspecifiedDefaultValue,
-          ARGUMENT_UNSPECIFIED_DEFAULT_VALUE);
-    } catch (SecurityException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    } catch (NoSuchMethodException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
+  @Test
+  public void testUnspecifiedDefaultValue() throws Exception {
+    String unspecifiedDefaultValue = ((CliArgument) (ArgumentTestingClass.class.getMethod("defaultArgumentTestingMethod", String.class).getParameterAnnotations()[0][0])).unspecifiedDefaultValue();
+    assertEquals(MESSAGE_FOR_DEFAULT_ARGUMENT, unspecifiedDefaultValue, "__NULL__");
+    unspecifiedDefaultValue = ((CliArgument) (ArgumentTestingClass.class.getMethod("argumentTestingMethod", String.class).getParameterAnnotations()[0][0])).unspecifiedDefaultValue();
+    assertEquals(MESSAGE_FOR_ARGUMENT, unspecifiedDefaultValue, ARGUMENT_UNSPECIFIED_DEFAULT_VALUE);
   }
 
   /**
    * Class used by the tests
-   * 
-   * 
    */
-  public static class ArgumentTestingClass {
+  private static class ArgumentTestingClass {
 
-    /**
-     * @param defaultargument
-     * @return Object
-     */
     @SuppressWarnings("unused")
-    public static Object defaultArgumentTestingMethod(
-        @CliArgument(name = ARGUMENT_NAME)
-        String defaultargument) {
+    public static Object defaultArgumentTestingMethod(@CliArgument(name = ARGUMENT_NAME) String defaultArgument) {
       return null;
     }
 
-    /**
-     * @param argument
-     * @return Object
-     */
     @SuppressWarnings("unused")
-    public static Object argumentTestingMethod(
-        @CliArgument(name = ARGUMENT_NAME, help = ARGUMENT_HELP, mandatory = ARGUMENT_MANDATORY, argumentContext = ARGUMENT_CONTEXT, systemProvided = SYSTEM_PROVIDED, unspecifiedDefaultValue = ARGUMENT_UNSPECIFIED_DEFAULT_VALUE)
-        String argument) {
+    public static Object argumentTestingMethod(@CliArgument(name = ARGUMENT_NAME, help = ARGUMENT_HELP, mandatory = ARGUMENT_MANDATORY, argumentContext = ARGUMENT_CONTEXT, systemProvided = SYSTEM_PROVIDED, unspecifiedDefaultValue = ARGUMENT_UNSPECIFIED_DEFAULT_VALUE) String argument) {
       return null;
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/AbstractCommandsSupportJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/AbstractCommandsSupportJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/AbstractCommandsSupportJUnitTest.java
index 2b2377b..a865699 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/AbstractCommandsSupportJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/AbstractCommandsSupportJUnitTest.java
@@ -72,11 +72,11 @@ public class AbstractCommandsSupportJUnitTest {
     mockContext = null;
   }
 
-  protected AbstractCommandsSupport createAbstractCommandsSupport(final Cache cache) {
+  private AbstractCommandsSupport createAbstractCommandsSupport(final Cache cache) {
     return new TestCommands(cache);
   }
 
-  protected DistributedMember createMockMember(final String memberId, final String memberName) {
+  private DistributedMember createMockMember(final String memberId, final String memberName) {
     final DistributedMember mockMember = mockContext.mock(DistributedMember.class, "DistributedMember " + memberId);
 
     mockContext.checking(new Expectations() {{
@@ -385,7 +385,7 @@ public class AbstractCommandsSupportJUnitTest {
     assertEquals(writer.toString(), AbstractCommandsSupport.toString(t, true));
   }
 
-  protected static class TestCommands extends AbstractCommandsSupport {
+  private static class TestCommands extends AbstractCommandsSupport {
 
     private final Cache cache;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsJUnitTest.java
index 775c8d0..0a82283 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsJUnitTest.java
@@ -83,14 +83,14 @@ public class DiskStoreCommandsJUnitTest {
     mockContext = null;
   }
 
-  protected DiskStoreCommands createDiskStoreCommands(final Cache cache,
+  private DiskStoreCommands createDiskStoreCommands(final Cache cache,
                                                       final DistributedMember distributedMember,
                                                       final Execution functionExecutor)
   {
     return new TestDiskStoreCommands(cache, distributedMember, functionExecutor);
   }
 
-  protected DiskStoreDetails createDiskStoreDetails(final String memberId, final String diskStoreName) {
+  private DiskStoreDetails createDiskStoreDetails(final String memberId, final String diskStoreName) {
     return new DiskStoreDetails(diskStoreName, memberId);
   }
 
@@ -364,7 +364,7 @@ public class DiskStoreCommandsJUnitTest {
     assertEquals(expectedDiskStores, actualDiskStores);
   }
 
-  protected static class TestDiskStoreCommands extends DiskStoreCommands {
+  private static class TestDiskStoreCommands extends DiskStoreCommands {
 
     private final Cache cache;
     private final DistributedMember distributedMember;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
index 7097918..eed7db1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
@@ -307,7 +307,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
               "Members Array for region " + region + " : " + StringUtils.objectToString(membersName, true, 10));
           if (bean.getMemberCount() < 1) fail(
               "Even after waiting mbean reports number of member hosting region " + DATA_REGION_NAME_VM1_PATH + " is less than one");
-          //assertEquals(1, membersName.length); //exists in one members vm1
+          //assertIndexDetailsEquals(1, membersName.length); //exists in one members vm1
         }
       }
     };

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
index 344d116..38849c7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
@@ -118,7 +118,7 @@ public class HTTPServiceSSLSupportJUnitTest {
 
     assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.keyStore"), jks.getCanonicalPath());
     assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.keyStorePassword"), "password");
-    // assertEquals(system.getConfig().getHttpServiceSSLKeyStoreType(),"JKS");
+    // assertIndexDetailsEquals(system.getConfig().getHttpServiceSSLKeyStoreType(),"JKS");
     assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.trustStore"), jks.getCanonicalPath());
     assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.trustStorePassword"), "password");
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsJUnitTest.java
index ce36401..a51a83a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsJUnitTest.java
@@ -76,11 +76,11 @@ public class IndexCommandsJUnitTest {
     mockContext = null;
   }
 
-  protected IndexCommands createIndexCommands(final Cache cache, final Execution functionExecutor) {
+  private IndexCommands createIndexCommands(final Cache cache, final Execution functionExecutor) {
     return new TestIndexCommands(cache, functionExecutor);
   }
 
-  protected IndexDetails createIndexDetails(final String memberId, final String regionPath, final String indexName) {
+  private IndexDetails createIndexDetails(final String memberId, final String regionPath, final String indexName) {
     return new IndexDetails(memberId, regionPath, indexName);
   }
 
@@ -174,7 +174,7 @@ public class IndexCommandsJUnitTest {
     assertEquals(expectedIndexDetails, actualIndexDetails);
   }
 
-  protected static class TestIndexCommands extends IndexCommands {
+  private static class TestIndexCommands extends IndexCommands {
 
     private final Cache cache;
     private final Execution functionExecutor;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
index d2bdcba..c8e0ed9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
@@ -278,7 +278,7 @@ public class MemberCommandsDUnitTest extends JUnit4CacheTestCase {
           EMPTY_ENV).process();
       assertEquals(true, result.getStatus().equals(Status.OK));
       getLogWriter().info("#SB" + getResultAsString(result));
-      //assertEquals(true, result.getStatus().equals(Status.OK));
+      //assertIndexDetailsEquals(true, result.getStatus().equals(Status.OK));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/converters/RegionPathConverterJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/converters/RegionPathConverterJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/converters/RegionPathConverterJUnitTest.java
index 6a2e1c0..320ea17 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/converters/RegionPathConverterJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/converters/RegionPathConverterJUnitTest.java
@@ -39,11 +39,9 @@ public class RegionPathConverterJUnitTest {
 
   @Before
   public void setup() {
-    mockContext = new Mockery() {
-      {
-        setImposteriser(ClassImposteriser.INSTANCE);
-      }
-    };
+    mockContext = new Mockery() {{
+      setImposteriser(ClassImposteriser.INSTANCE);
+    }};
   }
 
   @After
@@ -51,16 +49,14 @@ public class RegionPathConverterJUnitTest {
     mockContext.assertIsSatisfied();
     mockContext = null;
   }
-  
-  protected RegionPathConverter createMockRegionPathConverter(final String[] allRegionPaths) {
+
+  private RegionPathConverter createMockRegionPathConverter(final String[] allRegionPaths) {
     
     final RegionPathConverter mockRegionPathConverter = mockContext.mock(RegionPathConverter.class, "RPC");
-    mockContext.checking(new Expectations() {
-      {
-        oneOf(mockRegionPathConverter).getAllRegionPaths();
-        will(returnValue(new TreeSet<String>(Arrays.asList(allRegionPaths))));
-      }
-    });
+    mockContext.checking(new Expectations() {{
+      oneOf(mockRegionPathConverter).getAllRegionPaths();
+      will(returnValue(new TreeSet<String>(Arrays.asList(allRegionPaths))));
+    }});
 
     return mockRegionPathConverter;
   }
@@ -76,7 +72,6 @@ public class RegionPathConverterJUnitTest {
     Set<String> mocked = mockRegionPathConverter.getAllRegionPaths();
     
     assertEquals("mocked paths don't match expectedPaths.", mocked, expectedPaths);
-    
   }
 
 }


Mime
View raw message