geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [1/7] incubator-geode git commit: Convert junit3 to junit4 and cleanup tests.
Date Fri, 03 Jun 2016 19:56:47 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-837 497208f2e -> 7e9d4a62a


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMapJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMapJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMapJUnitTest.java
index 6a3142e..c223aff 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMapJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMapJUnitTest.java
@@ -23,6 +23,8 @@
  */
 package com.gemstone.gemfire.internal.util.concurrent;
 
+import static org.junit.Assert.*;
+
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.ByteArrayInputStream;
@@ -36,6 +38,7 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.util.concurrent.cm.ConcurrentHashMapJUnitTest;
@@ -46,11 +49,7 @@ import com.gemstone.gemfire.util.JSR166TestCase;
  * Adopted from the JSR166 test cases. {@link ConcurrentHashMapJUnitTest}
  */
 @Category(IntegrationTest.class)
-public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
-
-    public CopyOnWriteHashMapJUnitTest(String name) {
-      super(name);
-    }
+public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase { // TODO: reformat
 
     /**
      * Create a map from Integers 1-5 to Strings "A"-"E".
@@ -75,6 +74,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *  clear removes all pairs
      */
+    @Test
     public void testClear() {
         CopyOnWriteHashMap map = map5();
         map.clear();
@@ -84,6 +84,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *  Maps with same contents are equal
      */
+    @Test
     public void testEquals() {
         CopyOnWriteHashMap map1 = map5();
         CopyOnWriteHashMap map2 = map5();
@@ -97,6 +98,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *  containsKey returns true for contained key
      */
+    @Test
     public void testContainsKey() {
         CopyOnWriteHashMap map = map5();
         assertTrue(map.containsKey(one));
@@ -106,6 +108,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *  containsValue returns true for held values
      */
+    @Test
     public void testContainsValue() {
         CopyOnWriteHashMap map = map5();
         assertTrue(map.containsValue("A"));
@@ -116,6 +119,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
      *  get returns the correct element at the given key,
      *  or null if not present
      */
+    @Test
     public void testGet() {
         CopyOnWriteHashMap map = map5();
         assertEquals("A", (String)map.get(one));
@@ -126,6 +130,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *  isEmpty is true of empty map and false for non-empty
      */
+    @Test
     public void testIsEmpty() {
         CopyOnWriteHashMap empty = newMap();
         CopyOnWriteHashMap map = map5();
@@ -136,6 +141,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *   keySet returns a Set containing all the keys
      */
+    @Test
     public void testKeySet() {
         CopyOnWriteHashMap map = map5();
         Set s = map.keySet();
@@ -150,6 +156,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *  keySet.toArray returns contains all keys
      */
+    @Test
     public void testKeySetToArray() {
         CopyOnWriteHashMap map = map5();
         Set s = map.keySet();
@@ -163,6 +170,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *  Values.toArray contains all values
      */
+    @Test
     public void testValuesToArray() {
         CopyOnWriteHashMap map = map5();
         Collection v = map.values();
@@ -179,6 +187,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *  entrySet.toArray contains all entries
      */
+    @Test
     public void testEntrySetToArray() {
         CopyOnWriteHashMap map = map5();
         Set s = map.entrySet();
@@ -193,6 +202,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * values collection contains all values
      */
+    @Test
     public void testValues() {
         CopyOnWriteHashMap map = map5();
         Collection s = map.values();
@@ -207,6 +217,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * entrySet contains all pairs
      */
+    @Test
     public void testEntrySet() {
         CopyOnWriteHashMap map = map5();
         Set s = map.entrySet();
@@ -226,6 +237,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *   putAll  adds all key-value pairs from the given map
      */
+    @Test
     public void testPutAll() {
         CopyOnWriteHashMap empty = newMap();
         CopyOnWriteHashMap map = map5();
@@ -241,6 +253,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *   putIfAbsent works when the given key is not present
      */
+    @Test
     public void testPutIfAbsent() {
         CopyOnWriteHashMap map = map5();
         map.putIfAbsent(six, "Z");
@@ -250,6 +263,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *   putIfAbsent does not add the pair if the key is already present
      */
+    @Test
     public void testPutIfAbsent2() {
         CopyOnWriteHashMap map = map5();
         assertEquals("A", map.putIfAbsent(one, "Z"));
@@ -258,6 +272,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *   replace fails when the given key is not present
      */
+    @Test
     public void testReplace() {
         CopyOnWriteHashMap map = map5();
         assertNull(map.replace(six, "Z"));
@@ -267,6 +282,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *   replace succeeds if the key is already present
      */
+    @Test
     public void testReplace2() {
         CopyOnWriteHashMap map = map5();
         assertNotNull(map.replace(one, "Z"));
@@ -277,6 +293,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace value fails when the given key not mapped to expected value
      */
+    @Test
     public void testReplaceValue() {
         CopyOnWriteHashMap map = map5();
         assertEquals("A", map.get(one));
@@ -287,6 +304,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace value succeeds when the given key mapped to expected value
      */
+    @Test
     public void testReplaceValue2() {
         CopyOnWriteHashMap map = map5();
         assertEquals("A", map.get(one));
@@ -298,6 +316,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *   remove removes the correct key-value pair from the map
      */
+    @Test
     public void testRemove() {
         CopyOnWriteHashMap map = map5();
         map.remove(five);
@@ -308,6 +327,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * remove(key,value) removes only if pair present
      */
+    @Test
     public void testRemove2() {
         CopyOnWriteHashMap map = map5();
         map.remove(five, "E");
@@ -322,6 +342,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      *   size returns the correct values
      */
+    @Test
     public void testSize() {
         CopyOnWriteHashMap map = map5();
         CopyOnWriteHashMap empty = newMap();
@@ -332,6 +353,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * toString contains toString of elements
      */
+    @Test
     public void testToString() {
         CopyOnWriteHashMap map = map5();
         String s = map.toString();
@@ -345,6 +367,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * get(null) throws NPE
      */
+    @Test
     public void testGetNull() {
       CopyOnWriteHashMap c = newMap();
       assertNull(c.get(null));
@@ -353,6 +376,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * containsKey(null) throws NPE
      */
+    @Test
     public void testContainsKeyNull() {
       CopyOnWriteHashMap c = newMap();
       assertFalse(c.containsKey(null));
@@ -361,6 +385,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * containsValue(null) throws NPE
      */
+    @Test
     public void testContainsValue_NullPointerException() {
       CopyOnWriteHashMap c = newMap();
       assertFalse(c.containsValue(null));
@@ -369,6 +394,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * put(null,x) throws NPE
      */
+    @Test
     public void testPut1NullKey() {
       CopyOnWriteHashMap c = newMap();
       c.put(null, "whatever");
@@ -379,6 +405,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * put(x, null) throws NPE
      */
+    @Test
     public void testPut2NullValue() {
       CopyOnWriteHashMap c = newMap();
       c.put("whatever", null);
@@ -389,6 +416,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * putIfAbsent(null, x) throws NPE
      */
+    @Test
     public void testPutIfAbsent1NullKey() {
       CopyOnWriteHashMap c = newMap();
       c.putIfAbsent(null, "whatever");
@@ -399,6 +427,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace(null, x) throws NPE
      */
+    @Test
     public void testReplace_NullPointerException() {
       CopyOnWriteHashMap c = newMap();
       assertNull(c.replace(null, "whatever"));
@@ -407,6 +436,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace(null, x, y) throws NPE
      */
+    @Test
     public void testReplaceValueNullKey() {
       CopyOnWriteHashMap c = newMap();
       c.replace(null, one, "whatever");
@@ -416,6 +446,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * putIfAbsent(x, null) throws NPE
      */
+    @Test
     public void testPutIfAbsent2_NullPointerException() {
       CopyOnWriteHashMap c = newMap();
       c.putIfAbsent("whatever", null);
@@ -427,6 +458,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace(x, null) throws NPE
      */
+    @Test
     public void testReplace2Null() {
       CopyOnWriteHashMap c = newMap();
       c.replace("whatever", null);
@@ -437,6 +469,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace(x, null, y) throws NPE
      */
+    @Test
     public void testReplaceValue2Null() {
       CopyOnWriteHashMap c = newMap();
       c.replace("whatever", null, "A");
@@ -446,6 +479,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace(x, y, null) throws NPE
      */
+    @Test
     public void testReplaceValue3Null() {
       CopyOnWriteHashMap c = newMap();
       c.replace("whatever", one, null);
@@ -456,6 +490,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * remove(null) throws NPE
      */
+    @Test
     public void testRemoveNull() {
       CopyOnWriteHashMap c = newMap();
       c.put("sadsdf", "asdads");
@@ -465,6 +500,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * remove(null, x) throws NPE
      */
+    @Test
     public void testRemove2_NullPointerException() {
       CopyOnWriteHashMap c = newMap();
       c.put("sadsdf", "asdads");
@@ -474,6 +510,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * remove(x, null) returns false
      */
+    @Test
     public void testRemove3() {
         try {
             CopyOnWriteHashMap c = newMap();
@@ -487,6 +524,7 @@ public class CopyOnWriteHashMapJUnitTest extends JSR166TestCase{
     /**
      * A deserialized map equals original
      */
+    @Test
     public void testSerialization() throws Exception {
         CopyOnWriteHashMap q = map5();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/ConcurrentHashMapJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/ConcurrentHashMapJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/ConcurrentHashMapJUnitTest.java
index bd29b6b..b8a52fb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/ConcurrentHashMapJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/ConcurrentHashMapJUnitTest.java
@@ -23,27 +23,31 @@
  */
 package com.gemstone.gemfire.internal.util.concurrent.cm;
 
-import java.io.*;
+import static org.junit.Assert.*;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Set;
 import java.util.Collection;
-import java.util.ArrayList;
-import java.util.Map;
+import java.util.Enumeration;
 import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.util.concurrent.CustomEntryConcurrentHashMap;
-import com.gemstone.gemfire.util.JSR166TestCase;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.JSR166TestCase;
 
 @Category(IntegrationTest.class)
-public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
-
-    public ConcurrentHashMapJUnitTest(String name) {
-      super(name);
-    }
+public class ConcurrentHashMapJUnitTest extends JSR166TestCase { // TODO: reformat
 
     /**
      * Create a map from Integers 1-5 to Strings "A"-"E".
@@ -64,6 +68,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *  clear removes all pairs
      */
+    @Test
     public void testClear() {
         CustomEntryConcurrentHashMap map = map5();
         map.clear();
@@ -73,6 +78,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *  Maps with same contents are equal
      */
+    @Test
     public void testEquals() {
         CustomEntryConcurrentHashMap map1 = map5();
         CustomEntryConcurrentHashMap map2 = map5();
@@ -86,6 +92,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *  contains returns true for contained value
      */
+    @Test
     public void testContains() {
         CustomEntryConcurrentHashMap map = map5();
         assertTrue(map.contains("A"));
@@ -95,6 +102,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *  containsKey returns true for contained key
      */
+    @Test
     public void testContainsKey() {
         CustomEntryConcurrentHashMap map = map5();
         assertTrue(map.containsKey(one));
@@ -104,6 +112,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *  containsValue returns true for held values
      */
+    @Test
     public void testContainsValue() {
         CustomEntryConcurrentHashMap map = map5();
         assertTrue(map.containsValue("A"));
@@ -114,6 +123,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
      *   enumeration returns an enumeration containing the correct
      *   elements
      */
+    @Test
     public void testEnumeration() {
         CustomEntryConcurrentHashMap map = map5();
         Enumeration e = map.elements();
@@ -129,6 +139,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
      *  get returns the correct element at the given key,
      *  or null if not present
      */
+    @Test
     public void testGet() {
         CustomEntryConcurrentHashMap map = map5();
         assertEquals("A", (String)map.get(one));
@@ -139,6 +150,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *  isEmpty is true of empty map and false for non-empty
      */
+    @Test
     public void testIsEmpty() {
         CustomEntryConcurrentHashMap empty = new CustomEntryConcurrentHashMap();
         CustomEntryConcurrentHashMap map = map5();
@@ -149,6 +161,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *   keys returns an enumeration containing all the keys from the map
      */
+    @Test
     public void testKeys() {
         CustomEntryConcurrentHashMap map = map5();
         Enumeration e = map.keys();
@@ -163,6 +176,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *   keySet returns a Set containing all the keys
      */
+    @Test
     public void testKeySet() {
         CustomEntryConcurrentHashMap map = map5();
         Set s = map.keySet();
@@ -177,6 +191,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *  keySet.toArray returns contains all keys
      */
+    @Test
     public void testKeySetToArray() {
         CustomEntryConcurrentHashMap map = map5();
         Set s = map.keySet();
@@ -190,6 +205,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *  Values.toArray contains all values
      */
+    @Test
     public void testValuesToArray() {
         CustomEntryConcurrentHashMap map = map5();
         Collection v = map.values();
@@ -206,6 +222,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *  entrySet.toArray contains all entries
      */
+    @Test
     public void testEntrySetToArray() {
         CustomEntryConcurrentHashMap map = map5();
         Set s = map.entrySet();
@@ -220,6 +237,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * values collection contains all values
      */
+    @Test
     public void testValues() {
         CustomEntryConcurrentHashMap map = map5();
         Collection s = map.values();
@@ -234,6 +252,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * entrySet contains all pairs
      */
+    @Test
     public void testEntrySet() {
         CustomEntryConcurrentHashMap map = map5();
         Set s = map.entrySet();
@@ -253,6 +272,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *   putAll  adds all key-value pairs from the given map
      */
+    @Test
     public void testPutAll() {
         CustomEntryConcurrentHashMap empty = new CustomEntryConcurrentHashMap();
         CustomEntryConcurrentHashMap map = map5();
@@ -268,6 +288,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *   putIfAbsent works when the given key is not present
      */
+    @Test
     public void testPutIfAbsent() {
         CustomEntryConcurrentHashMap map = map5();
         map.putIfAbsent(six, "Z");
@@ -277,6 +298,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *   putIfAbsent does not add the pair if the key is already present
      */
+    @Test
     public void testPutIfAbsent2() {
         CustomEntryConcurrentHashMap map = map5();
         assertEquals("A", map.putIfAbsent(one, "Z"));
@@ -285,6 +307,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *   replace fails when the given key is not present
      */
+    @Test
     public void testReplace() {
         CustomEntryConcurrentHashMap map = map5();
         assertNull(map.replace(six, "Z"));
@@ -294,6 +317,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *   replace succeeds if the key is already present
      */
+    @Test
     public void testReplace2() {
         CustomEntryConcurrentHashMap map = map5();
         assertNotNull(map.replace(one, "Z"));
@@ -304,6 +328,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace value fails when the given key not mapped to expected value
      */
+    @Test
     public void testReplaceValue() {
         CustomEntryConcurrentHashMap map = map5();
         assertEquals("A", map.get(one));
@@ -314,6 +339,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace value succeeds when the given key mapped to expected value
      */
+    @Test
     public void testReplaceValue2() {
         CustomEntryConcurrentHashMap map = map5();
         assertEquals("A", map.get(one));
@@ -325,6 +351,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *   remove removes the correct key-value pair from the map
      */
+    @Test
     public void testRemove() {
         CustomEntryConcurrentHashMap map = map5();
         map.remove(five);
@@ -335,6 +362,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * remove(key,value) removes only if pair present
      */
+    @Test
     public void testRemove2() {
         CustomEntryConcurrentHashMap map = map5();
         map.remove(five, "E");
@@ -349,6 +377,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      *   size returns the correct values
      */
+    @Test
     public void testSize() {
         CustomEntryConcurrentHashMap map = map5();
         CustomEntryConcurrentHashMap empty = new CustomEntryConcurrentHashMap();
@@ -359,6 +388,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * toString contains toString of elements
      */
+    @Test
     public void testToString() {
         CustomEntryConcurrentHashMap map = map5();
         String s = map.toString();
@@ -372,6 +402,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * Cannot create with negative capacity
      */
+    @Test
     public void testConstructor1() {
         try {
             new CustomEntryConcurrentHashMap(-1,0,1);
@@ -382,6 +413,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * Cannot create with negative concurrency level
      */
+    @Test
     public void testConstructor2() {
         try {
             new CustomEntryConcurrentHashMap(1,0,-1);
@@ -392,6 +424,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * Cannot create with only negative capacity
      */
+    @Test
     public void testConstructor3() {
         try {
             new CustomEntryConcurrentHashMap(-1);
@@ -402,6 +435,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * get(null) throws NPE
      */
+    @Test
     public void testGet_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -413,6 +447,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * containsKey(null) throws NPE
      */
+    @Test
     public void testContainsKey_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -424,6 +459,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * containsValue(null) throws NPE
      */
+    @Test
     public void testContainsValue_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -435,6 +471,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * contains(null) throws NPE
      */
+    @Test
     public void testContains_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -446,6 +483,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * put(null,x) throws NPE
      */
+    @Test
     public void testPut1_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -457,6 +495,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * put(x, null) throws NPE
      */
+    @Test
     public void testPut2_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -468,6 +507,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * putIfAbsent(null, x) throws NPE
      */
+    @Test
     public void testPutIfAbsent1_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -479,6 +519,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace(null, x) throws NPE
      */
+    @Test
     public void testReplace_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -490,6 +531,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace(null, x, y) throws NPE
      */
+    @Test
     public void testReplaceValue_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -501,6 +543,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * putIfAbsent(x, null) throws NPE
      */
+    @Test
     public void testPutIfAbsent2_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -513,6 +556,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace(x, null) throws NPE
      */
+    @Test
     public void testReplace2_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -524,6 +568,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace(x, null, y) throws NPE
      */
+    @Test
     public void testReplaceValue2_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -535,6 +580,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * replace(x, y, null) throws NPE
      */
+    @Test
     public void testReplaceValue3_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -547,6 +593,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * remove(null) throws NPE
      */
+    @Test
     public void testRemove1_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -559,6 +606,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * remove(null, x) throws NPE
      */
+    @Test
     public void testRemove2_NullPointerException() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -571,6 +619,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * remove(x, null) returns false
      */
+    @Test
     public void testRemove3() {
         try {
             CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
@@ -584,6 +633,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * A deserialized map equals original
      */
+    @Test
     public void testSerialization() {
         CustomEntryConcurrentHashMap q = map5();
 
@@ -609,6 +659,7 @@ public class ConcurrentHashMapJUnitTest extends JSR166TestCase{
     /**
      * SetValue of an EntrySet entry sets value in the map.
      */
+    @Test
     public void testSetValueWriteThrough() {
         // Adapted from a bug report by Eric Zoerner
         CustomEntryConcurrentHashMap map = new CustomEntryConcurrentHashMap(2, 5.0f, 1);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/CountedMapLoopsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/CountedMapLoopsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/CountedMapLoopsJUnitTest.java
index fed909f..bba6ffb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/CountedMapLoopsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/CountedMapLoopsJUnitTest.java
@@ -37,13 +37,14 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.util.JSR166TestCase;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.JSR166TestCase;
 
 @Category(IntegrationTest.class)
-public class CountedMapLoopsJUnitTest extends JSR166TestCase {
+public class CountedMapLoopsJUnitTest extends JSR166TestCase { // TODO: reformat
 
     static int nkeys       = 100000;
     static int pinsert     = 60;
@@ -55,10 +56,7 @@ public class CountedMapLoopsJUnitTest extends JSR166TestCase {
 
     static final ExecutorService pool = Executors.newCachedThreadPool();
 
-    public CountedMapLoopsJUnitTest(String name) {
-      super(name);
-    }
-
+    @Test
     public void testCountedMapLoops() throws Exception {
       main(new String[0]);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/IntMapCheckJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/IntMapCheckJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/IntMapCheckJUnitTest.java
index 1534f93..c04f724 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/IntMapCheckJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/IntMapCheckJUnitTest.java
@@ -25,22 +25,29 @@
  */
 package com.gemstone.gemfire.internal.util.concurrent.cm;
 
-import java.io.*;
-import java.util.Map;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.Enumeration;
 import java.util.Hashtable;
-import java.util.Set;
+import java.util.IdentityHashMap;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Random;
-import java.util.IdentityHashMap;
-import java.util.Enumeration;
+import java.util.Set;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.util.JSR166TestCase;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.JSR166TestCase;
 
 @Category(IntegrationTest.class)
-public class IntMapCheckJUnitTest extends JSR166TestCase {
+public class IntMapCheckJUnitTest extends JSR166TestCase { // TODO: reformat
 
     static int absentSize;
     static int absentMask;
@@ -52,10 +59,7 @@ public class IntMapCheckJUnitTest extends JSR166TestCase {
         if (!b) throw new Error("Failed Assertion");
     }
 
-    public IntMapCheckJUnitTest(String name) {
-      super(name);
-    }
-
+    @Test
     public void testIntMapCheck() throws Exception {
       main(new String[0]);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/MapCheckJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/MapCheckJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/MapCheckJUnitTest.java
index e1330c3..db2c63a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/MapCheckJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/MapCheckJUnitTest.java
@@ -25,22 +25,29 @@
  */
 package com.gemstone.gemfire.internal.util.concurrent.cm;
 
-import java.io.*;
-import java.util.Map;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.Enumeration;
 import java.util.Hashtable;
+import java.util.IdentityHashMap;
 import java.util.Iterator;
-import java.util.Set;
+import java.util.Map;
 import java.util.Random;
-import java.util.IdentityHashMap;
-import java.util.Enumeration;
+import java.util.Set;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.util.JSR166TestCase;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.JSR166TestCase;
 
 @Category(IntegrationTest.class)
-public class MapCheckJUnitTest extends JSR166TestCase {
+public class MapCheckJUnitTest extends JSR166TestCase { // TODO: reformat
 
     static final int absentSize = 1 << 17;
     static final int absentMask = absentSize - 1;
@@ -54,10 +61,7 @@ public class MapCheckJUnitTest extends JSR166TestCase {
         if (!b) throw new Error("Failed Assertion");
     }
 
-    public MapCheckJUnitTest(String name) {
-      super(name);
-    }
-
+    @Test
     public void testMapCheck() throws Exception {
       main(new String[0]);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/MapLoopsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/MapLoopsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/MapLoopsJUnitTest.java
index 58f4647..39baedb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/MapLoopsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/MapLoopsJUnitTest.java
@@ -28,7 +28,6 @@
  * Expert Group and released to the public domain. Use, modify, and
  * redistribute this code in any way without acknowledgement.
  */
-
 package com.gemstone.gemfire.internal.util.concurrent.cm;
 
 import java.util.Map;
@@ -37,13 +36,15 @@ import java.util.concurrent.CyclicBarrier;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.util.JSR166TestCase;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.JSR166TestCase;
 
 @Category(IntegrationTest.class)
-public class MapLoopsJUnitTest extends JSR166TestCase {
+public class MapLoopsJUnitTest extends JSR166TestCase { // TODO: reformat
+
     static int nkeys       = 1000;
     static int pinsert     = 60;
     static int premove     = 2;
@@ -54,10 +55,7 @@ public class MapLoopsJUnitTest extends JSR166TestCase {
 
     static final ExecutorService pool = Executors.newCachedThreadPool();
 
-    public MapLoopsJUnitTest(String name) {
-      super(name);
-    }
-
+  @Test
     public void testMapLoops() throws Exception {
       main(new String[0]);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/RLJBarJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/RLJBarJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/RLJBarJUnitTest.java
index 2de98f3..077c8be 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/RLJBarJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/RLJBarJUnitTest.java
@@ -23,16 +23,16 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.util.JSR166TestCase;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.JSR166TestCase;
 
 @Category(IntegrationTest.class)
-public class RLJBarJUnitTest extends JSR166TestCase
-{
+public class RLJBarJUnitTest extends JSR166TestCase { // TODO: reformat
 
-    public static final int ITERS = 10;
+  public static final int ITERS = 10;
   public static boolean OneKey = false ; 			// alloc once or once per iteration
 
   public static boolean UseBar = false ;
@@ -47,10 +47,7 @@ public class RLJBarJUnitTest extends JSR166TestCase
   public static int quiesce = 0 ;
   public static Condition EndCondition = End.newCondition();
 
-  public RLJBarJUnitTest(String name) {
-    super(name);
-  }
-
+  @Test
   public void testRLJBar() throws Exception {
     main(new String[0]);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/StringMapLoopsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/StringMapLoopsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/StringMapLoopsJUnitTest.java
index b8d3462..2945ee6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/StringMapLoopsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/cm/StringMapLoopsJUnitTest.java
@@ -36,13 +36,14 @@ import java.util.concurrent.CyclicBarrier;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.util.JSR166TestCase;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.JSR166TestCase;
 
 @Category(IntegrationTest.class)
-public class StringMapLoopsJUnitTest extends JSR166TestCase {
+public class StringMapLoopsJUnitTest extends JSR166TestCase { // TODO: reformat
 
     static int nkeys       = 1000;
     static int pinsert     = 60;
@@ -54,10 +55,7 @@ public class StringMapLoopsJUnitTest extends JSR166TestCase {
 
     static final ExecutorService pool = Executors.newCachedThreadPool();
 
-    public StringMapLoopsJUnitTest(String name) {
-      super(name);
-    }
-
+    @Test
     public void testStringMapLoops() throws Exception {
       main(new String[0]);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
index 58daf7e..b9eb71e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
@@ -16,32 +16,22 @@
  */
 package com.gemstone.gemfire.memcached;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
-import java.io.IOException;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
 import java.util.concurrent.Future;
 import java.util.logging.Logger;
-import java.util.logging.StreamHandler;
 
+import net.spy.memcached.MemcachedClient;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-import net.spy.memcached.MemcachedClient;
-import junit.framework.TestCase;
-
 @Category(IntegrationTest.class)
 public class DomainObjectsAsValuesJUnitTest {
 
@@ -65,7 +55,7 @@ public class DomainObjectsAsValuesJUnitTest {
     System.getProperties().remove("gemfire.mcast-port");
   }
 
-  public static class Customer implements java.io.Serializable {
+  private static class Customer implements java.io.Serializable {
     private static final long serialVersionUID = 4238572216598708877L;
     private String name;
     private String address;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
index afd386b..ecea7db 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
@@ -16,33 +16,23 @@
  */
 package com.gemstone.gemfire.memcached;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.util.Properties;
 import java.util.concurrent.Future;
 
+import net.spy.memcached.MemcachedClient;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import net.spy.memcached.MemcachedClient;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-import junit.framework.TestCase;
-
-/**
- * 
- */
 @Category(IntegrationTest.class)
 public class IntegrationJUnitTest {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableJUnitTest.java
index adde942..5d18525 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableJUnitTest.java
@@ -16,11 +16,7 @@
  */
 package com.gemstone.gemfire.pdx;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -28,7 +24,6 @@ import java.io.DataInput;
 import java.io.DataInputStream;
 import java.io.File;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.NotSerializableException;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
@@ -45,15 +40,12 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.CopyHelper;
 import com.gemstone.gemfire.DataSerializable;
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.DeltaTestImpl;
 import com.gemstone.gemfire.ToDataException;
 import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DiskStore;
 import com.gemstone.gemfire.cache.DiskStoreFactory;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionShortcut;
@@ -65,7 +57,6 @@ import com.gemstone.gemfire.internal.PdxSerializerObject;
 import com.gemstone.gemfire.internal.SystemAdmin;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSourceFactory;
 import com.gemstone.gemfire.internal.util.ArrayUtils;
 import com.gemstone.gemfire.pdx.internal.DataSize;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxStringJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxStringJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxStringJUnitTest.java
index 5ff0db0..c2c652b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxStringJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxStringJUnitTest.java
@@ -16,16 +16,13 @@
  */
 package com.gemstone.gemfire.pdx;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
+import static org.junit.Assert.*;
 
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
+import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -38,10 +35,9 @@ import com.gemstone.gemfire.pdx.internal.PdxInstanceImpl;
 import com.gemstone.gemfire.pdx.internal.PdxString;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-import junit.framework.TestCase;
-
 @Category(IntegrationTest.class)
 public class PdxStringJUnitTest {
+
   private GemFireCacheImpl c;
 
   @Before

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-core/src/test/java/com/gemstone/gemfire/util/JSR166TestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/util/JSR166TestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/util/JSR166TestCase.java
index a4d8c1a..8098e9a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/util/JSR166TestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/util/JSR166TestCase.java
@@ -23,13 +23,16 @@
  */
 package com.gemstone.gemfire.util;
 
+import static org.junit.Assert.*;
+
 import java.security.CodeSource;
 import java.security.Permission;
 import java.security.PermissionCollection;
 import java.security.Permissions;
 import java.security.ProtectionDomain;
 
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
 
 /**
  * Base class for JSR166 Junit TCK tests.  Defines some constants,
@@ -49,7 +52,7 @@ import junit.framework.TestCase;
  * Only the most typically used JUnit assertion methods are defined
  * this way, but enough to live with.</li>
  *
- * <li> If you override {@link junit.framework.TestCase#setUp} or {@link junit.framework.TestCase#tearDown}, make sure
+ * <li> If you override {@link #setUp} or {@link #tearDown}, make sure
  * to invoke <tt>super.setUp</tt> and <tt>super.tearDown</tt> within
  * them. These methods are used to clear and check for thread
  * assertion failures.</li>
@@ -107,19 +110,15 @@ import junit.framework.TestCase;
  *
  * @version Based on JSR166 TCK version 1.8
  */
-public class JSR166TestCase extends TestCase {
+public class JSR166TestCase { // TODO: reformat
+
     public static long SHORT_DELAY_MS;
     public static long SMALL_DELAY_MS;
     public static long MEDIUM_DELAY_MS;
     public static long LONG_DELAY_MS;
 
-    public static Class<?> MAP_CLASS =
-        com.gemstone.gemfire.internal.util.concurrent.CustomEntryConcurrentHashMap.class;
+    public static Class<?> MAP_CLASS = com.gemstone.gemfire.internal.util.concurrent.CustomEntryConcurrentHashMap.class;
 
-    public JSR166TestCase(String name) {
-      super(name);
-    } 
-    
     /**
      * Return the shortest timed delay. This could
      * be reimplmented to use for example a Property.
@@ -147,7 +146,8 @@ public class JSR166TestCase extends TestCase {
     /**
      * Initialize test to indicate that no thread assertions have failed
      */
-    protected void setUp() throws Exception { 
+    @Before
+    public void setUp() throws Exception {
         setDelays();
         threadFailed = false;  
     }
@@ -155,7 +155,8 @@ public class JSR166TestCase extends TestCase {
     /**
      * Trigger test case failure if any thread assertions have failed
      */
-    protected void tearDown() throws Exception { 
+    @After
+    public void tearDown() throws Exception {
         assertFalse(threadFailed);  
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
index 606d8aa..0ee24cc 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
@@ -16,17 +16,19 @@
  */
 package com.gemstone.gemfire.cache.query.cq;
 
+import static org.junit.Assert.*;
+
 import java.util.Properties;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.query.CacheUtils;
 import com.gemstone.gemfire.cache.query.CqAttributes;
 import com.gemstone.gemfire.cache.query.CqAttributesFactory;
 import com.gemstone.gemfire.cache.query.QueryInvalidException;
@@ -35,7 +37,8 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 @Category(IntegrationTest.class)
-public class CQJUnitTest extends TestCase {
+public class CQJUnitTest {
+
   private DistributedSystem ds;
   private Cache cache;
   private QueryService qs;
@@ -43,11 +46,8 @@ public class CQJUnitTest extends TestCase {
   /////////////////////////////////////
   // Methods for setUp and tearDown
   /////////////////////////////////////
-  
-  public CQJUnitTest(String name) {
-    super(name);
-  }
-  
+
+  @Before
   public void setUp() throws Exception {
     Properties props = new Properties();
     props.setProperty("mcast-port", "0");
@@ -56,7 +56,8 @@ public class CQJUnitTest extends TestCase {
     this.cache = CacheFactory.create(ds);
     this.qs = cache.getQueryService();
   }
-  
+
+  @After
   public void tearDown() throws Exception {
     this.cache.close();
     this.ds.disconnect();
@@ -66,12 +67,12 @@ public class CQJUnitTest extends TestCase {
   // Test Methods
   /////////////////////////////////////
   
-  
   /**
    * Test to make sure CQs that have invalid syntax
    * throw QueryInvalidException, and CQs that have unsupported
    * CQ features throw UnsupportedOperationException
    */
+  @Test
   public void testValidateCQ() throws Exception {
    
     AttributesFactory attributesFactory = new AttributesFactory();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7e9d4a62/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
index 9ef8a43..2d50bf0 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
@@ -16,17 +16,14 @@
  */
 package com.gemstone.gemfire.cache.query.cq.dunit;
 
-import org.junit.experimental.categories.Category;
-import org.junit.Test;
-
 import static org.junit.Assert.*;
 
-import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
-import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
-import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
 import java.util.Properties;
 
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.query.CqQuery;
 import com.gemstone.gemfire.cache.query.dunit.CloseCacheAuthorization;
 import com.gemstone.gemfire.cache.query.dunit.HelperTestCase;
@@ -42,23 +39,16 @@ import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 @Category(DistributedTest.class)
 public class CqStateDUnitTest extends HelperTestCase {
 
-  
-  public CqStateDUnitTest() {
-    super();
-  }
-  
-  @Test
-  public void testNothingBecauseBug51953() {
-    // remove when bug #51953 is fixed
-  }
-  
   // this test is disabled due to a 25% failure rate in
   // CI testing.  See internal ticket #52229
-  public void disabledtestBug51222() throws Exception {
+  @Ignore("TODO: test is disabled due to flickering")
+  @Test
+  public void testBug51222() throws Exception {
     //The client can log this when the server shuts down.
     IgnoredException.addIgnoredException("Could not find any server");
     IgnoredException.addIgnoredException("java.net.ConnectException");


Mime
View raw message