You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by sa...@apache.org on 2016/05/24 18:53:42 UTC

[01/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

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1153 8c6adb71f -> 5fd6ed3dc
  refs/heads/feature/GEODE-93 8694c5582 -> df6209894


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
index c49a131..82c28ee 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
@@ -197,7 +197,7 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase{
 //      TabularResultData tableResultData =
 //        (TabularResultData) cmdResult.getResultData();
 //      List<String> result_Status = tableResultData.retrieveAllValues(CliStrings.RESULT_STATUS);
-//      assertEquals(1, result_Status.size());
+//      assertIndexDetailsEquals(1, result_Status.size());
 //      assertFalse(result_Status.contains(CliStrings.GATEWAY_NOT_RUNNING));
       String strCmdResult = commandResultToString(cmdResult);
       getLogWriter().info("testGatewaySenderStatus_OnMember : " + strCmdResult + ">>>>> ");
@@ -434,7 +434,7 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase{
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       //TabularResultData tableResultData = (TabularResultData) cmdResult.getResultData();
       //List<String> result_Status = tableResultData.retrieveAllValues(CliStrings.RESULT_STATUS);
-      //assertEquals(1, result_Status.size());
+      //assertIndexDetailsEquals(1, result_Status.size());
       //assertFalse(strCmdResult.contains(CliStrings.GATEWAY_NOT_RUNNING));
       TabularResultData tableResultData =
           ((CompositeResultData)cmdResult.getResultData()).retrieveSection(CliStrings.SECTION_GATEWAY_RECEIVER_AVAILABLE).retrieveTable(CliStrings.TABLE_GATEWAY_RECEIVER);
@@ -463,7 +463,7 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase{
 //      TabularResultData tableResultData =
 //        (TabularResultData) cmdResult.getResultData();
 //      List<String> result_Status = tableResultData.retrieveAllValues(CliStrings.RESULT_STATUS);
-//      assertEquals(1, result_Status.size());
+//      assertIndexDetailsEquals(1, result_Status.size());
 //      assertFalse(result_Status.contains(CliStrings.GATEWAY_RUNNING));
       
       TabularResultData tableResultData =

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/ShellCommandsControllerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/ShellCommandsControllerJUnitTest.java b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/ShellCommandsControllerJUnitTest.java
index 196be09..7234161 100644
--- a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/ShellCommandsControllerJUnitTest.java
+++ b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/ShellCommandsControllerJUnitTest.java
@@ -25,13 +25,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
-import com.gemstone.gemfire.management.cli.CliMetaData;
-import com.gemstone.gemfire.management.internal.cli.util.ClasspathScanLoadHelper;
-import com.gemstone.gemfire.management.internal.web.domain.Link;
-import com.gemstone.gemfire.management.internal.web.domain.LinkIndex;
-import com.gemstone.gemfire.management.internal.web.util.UriUtils;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import javax.servlet.http.HttpServletRequest;
 
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -45,7 +39,12 @@ import org.springframework.web.context.request.RequestAttributes;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 
-import javax.servlet.http.HttpServletRequest;
+import com.gemstone.gemfire.management.cli.CliMetaData;
+import com.gemstone.gemfire.management.internal.cli.util.ClasspathScanLoadHelper;
+import com.gemstone.gemfire.management.internal.web.domain.Link;
+import com.gemstone.gemfire.management.internal.web.domain.LinkIndex;
+import com.gemstone.gemfire.management.internal.web.util.UriUtils;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * The ShellCommandsControllerJUnitTest class is a test suite of test cases testing the contract and functionality of the
@@ -74,7 +73,7 @@ public class ShellCommandsControllerJUnitTest {
     controller = null;
   }
 
-  protected List<String> getCliCommands() {
+  private List<String> getCliCommands() {
     try {
       Set<Class<?>> commandClasses = ClasspathScanLoadHelper.loadAndGet(
         "com.gemstone.gemfire.management.internal.cli.commands", CommandMarker.class, true);
@@ -101,7 +100,7 @@ public class ShellCommandsControllerJUnitTest {
     }
   }
 
-  protected List<String> getControllerWebServiceEndpoints() {
+  private List<String> getControllerWebServiceEndpoints() {
     RequestAttributes requestAttrs = RequestContextHolder.getRequestAttributes();
     HttpServletRequest servletRequest = ((ServletRequestAttributes) requestAttrs).getRequest();
     String scheme = servletRequest.getScheme();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/support/LoginHandlerInterceptorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/support/LoginHandlerInterceptorJUnitTest.java b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/support/LoginHandlerInterceptorJUnitTest.java
index ef405db..f9d9d35 100644
--- a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/support/LoginHandlerInterceptorJUnitTest.java
+++ b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/support/LoginHandlerInterceptorJUnitTest.java
@@ -24,11 +24,8 @@ import java.util.Iterator;
 import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
 import edu.umd.cs.mtc.MultithreadedTestCase;
 import edu.umd.cs.mtc.TestFramework;
-
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.lib.concurrent.Synchroniser;
@@ -38,6 +35,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 /**
  * The LoginHandlerInterceptorJUnitTest class is a test suite of test cases to test the contract
  * and functionality of the Spring HandlerInterceptor, LoginHandlerInterceptor class.
@@ -65,11 +64,11 @@ public class LoginHandlerInterceptorJUnitTest {
     mockContext = null;
   }
 
-  protected String createEnvironmentVariable(final String name) {
+  private String createEnvironmentVariable(final String name) {
     return (LoginHandlerInterceptor.ENVIRONMENT_VARIABLE_REQUEST_PARAMETER_PREFIX + name);
   }
 
-  protected <T> Enumeration<T> enumeration(final Iterator<T> iterator) {
+  private <T> Enumeration<T> enumeration(final Iterator<T> iterator) {
     return new Enumeration<T>() {
       public boolean hasMoreElements() {
         return iterator.hasNext();
@@ -128,7 +127,7 @@ public class LoginHandlerInterceptorJUnitTest {
     TestFramework.runOnce(new HandlerInterceptorThreadSafetyMultiThreadedTestCase());
   }
 
-  protected final class HandlerInterceptorThreadSafetyMultiThreadedTestCase extends MultithreadedTestCase {
+  private final class HandlerInterceptorThreadSafetyMultiThreadedTestCase extends MultithreadedTestCase {
 
     private LoginHandlerInterceptor handlerInterceptor;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/http/ClientHttpRequestJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/http/ClientHttpRequestJUnitTest.java b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/http/ClientHttpRequestJUnitTest.java
index 60165d7..0e2cd0c 100644
--- a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/http/ClientHttpRequestJUnitTest.java
+++ b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/http/ClientHttpRequestJUnitTest.java
@@ -25,10 +25,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import com.gemstone.gemfire.management.internal.web.AbstractWebTestCase;
-import com.gemstone.gemfire.management.internal.web.domain.Link;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
 import org.jmock.Mockery;
 import org.jmock.lib.legacy.ClassImposteriser;
 import org.junit.After;
@@ -40,6 +36,10 @@ import org.springframework.http.MediaType;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 
+import com.gemstone.gemfire.management.internal.web.AbstractWebTestCase;
+import com.gemstone.gemfire.management.internal.web.domain.Link;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 /**
  * The ClientHttpRequestJUnitTest class is a test suite of test cases testing the contract and functionality of the
  * ClientHttpRequest class.
@@ -494,12 +494,12 @@ public class ClientHttpRequestJUnitTest extends AbstractWebTestCase {
   }
 
   @SuppressWarnings("unused")
-  protected static interface Library {
+  private static interface Library {
     public String getName();
   }
 
   @SuppressWarnings("unused")
-  protected static interface Book {
+  private static interface Book {
     public String getAuthor();
     public String getIsbn();
     public String getTitle();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/http/converter/SerializableObjectHttpMessageConverterJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/http/converter/SerializableObjectHttpMessageConverterJUnitTest.java b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/http/converter/SerializableObjectHttpMessageConverterJUnitTest.java
index 81f3e31..1b317c2 100644
--- a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/http/converter/SerializableObjectHttpMessageConverterJUnitTest.java
+++ b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/http/converter/SerializableObjectHttpMessageConverterJUnitTest.java
@@ -24,9 +24,6 @@ import java.io.IOException;
 import java.io.Serializable;
 import java.util.Calendar;
 
-import com.gemstone.gemfire.internal.util.IOUtils;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.lib.legacy.ClassImposteriser;
@@ -39,6 +36,9 @@ import org.springframework.http.HttpInputMessage;
 import org.springframework.http.HttpOutputMessage;
 import org.springframework.http.MediaType;
 
+import com.gemstone.gemfire.internal.util.IOUtils;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 /**
  * The SerializableObjectHttpMessageConverterJUnitTest class is a test suite of test cases testing the contract
  * and functionality of the SerializableObjectHttpMessageConverter class.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/shell/RestHttpOperationInvokerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/shell/RestHttpOperationInvokerJUnitTest.java b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/shell/RestHttpOperationInvokerJUnitTest.java
index 15f9a29..bcc3cef 100644
--- a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/shell/RestHttpOperationInvokerJUnitTest.java
+++ b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/shell/RestHttpOperationInvokerJUnitTest.java
@@ -24,15 +24,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
-import com.gemstone.gemfire.internal.lang.StringUtils;
-import com.gemstone.gemfire.management.internal.cli.CommandRequest;
-import com.gemstone.gemfire.management.internal.web.AbstractWebTestCase;
-import com.gemstone.gemfire.management.internal.web.domain.Link;
-import com.gemstone.gemfire.management.internal.web.domain.LinkIndex;
-import com.gemstone.gemfire.management.internal.web.http.ClientHttpRequest;
-import com.gemstone.gemfire.management.internal.web.http.HttpMethod;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -42,6 +33,15 @@ import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.client.ResourceAccessException;
 
+import com.gemstone.gemfire.internal.lang.StringUtils;
+import com.gemstone.gemfire.management.internal.cli.CommandRequest;
+import com.gemstone.gemfire.management.internal.web.AbstractWebTestCase;
+import com.gemstone.gemfire.management.internal.web.domain.Link;
+import com.gemstone.gemfire.management.internal.web.domain.LinkIndex;
+import com.gemstone.gemfire.management.internal.web.http.ClientHttpRequest;
+import com.gemstone.gemfire.management.internal.web.http.HttpMethod;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 /**
  * The RestHttpOperationInvokerJUnitTest class is a test suite of test cases testing the contract and functionality of the
  * RestHttpOperationInvoker class.
@@ -107,28 +107,28 @@ public class RestHttpOperationInvokerJUnitTest extends AbstractWebTestCase {
     operationInvoker = null;
   }
 
-  protected CommandRequest createCommandRequest(final String command, final Map<String, String> options) {
+  private CommandRequest createCommandRequest(final String command, final Map<String, String> options) {
     return new TestCommandRequest(command, options, Collections.<String, String>emptyMap(), null);
   }
 
-  protected CommandRequest createCommandRequest(final String command, final Map<String, String> options, final Map<String, String> environment) {
+  private CommandRequest createCommandRequest(final String command, final Map<String, String> options, final Map<String, String> environment) {
     return new TestCommandRequest(command, options, environment, null);
   }
 
-  protected CommandRequest createCommandRequest(final String command, final Map<String, String> options, final byte[][] fileData) {
+  private CommandRequest createCommandRequest(final String command, final Map<String, String> options, final byte[][] fileData) {
     return new TestCommandRequest(command, options, Collections.<String, String>emptyMap(), fileData);
   }
 
-  protected CommandRequest createCommandRequest(final String command, final Map<String, String> options, final Map<String, String> environment, final byte[][] fileData) {
+  private CommandRequest createCommandRequest(final String command, final Map<String, String> options, final Map<String, String> environment, final byte[][] fileData) {
     return new TestCommandRequest(command, options, environment, fileData);
   }
 
-  protected LinkIndex getLinkIndex() {
+  private LinkIndex getLinkIndex() {
     assertTrue("The LinkIndex was not property initialized!", linkIndex != null);
     return linkIndex;
   }
 
-  protected RestHttpOperationInvoker getOperationInvoker() {
+  private RestHttpOperationInvoker getOperationInvoker() {
     assertTrue("The RestHttpOperationInvoker was not properly initialized!", operationInvoker != null);
     return operationInvoker;
   }
@@ -412,7 +412,7 @@ public class RestHttpOperationInvokerJUnitTest extends AbstractWebTestCase {
     }
   }
 
-  protected static final class TestCommandRequest extends CommandRequest {
+  private static final class TestCommandRequest extends CommandRequest {
 
     private final Map<String, String> commandParameters = new TreeMap<String, String>();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/shell/SimpleHttpOperationInvokerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/shell/SimpleHttpOperationInvokerJUnitTest.java b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/shell/SimpleHttpOperationInvokerJUnitTest.java
index 2e8d118..74ed09e 100644
--- a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/shell/SimpleHttpOperationInvokerJUnitTest.java
+++ b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/shell/SimpleHttpOperationInvokerJUnitTest.java
@@ -64,16 +64,16 @@ public class SimpleHttpOperationInvokerJUnitTest extends AbstractWebTestCase {
     operationInvoker = null;
   }
 
-  protected CommandRequest createCommandRequest(final String command) {
+  private CommandRequest createCommandRequest(final String command) {
     return new TestCommandRequest(command);
   }
 
-  protected String getExpectedHttpRequestUrl(final CommandRequest command) {
+  private String getExpectedHttpRequestUrl(final CommandRequest command) {
     return SimpleHttpOperationInvoker.REST_API_URL.concat(SimpleHttpOperationInvoker.REST_API_MANAGEMENT_COMMANDS_URI)
       .concat("?").concat(SimpleHttpOperationInvoker.CMD_QUERY_PARAMETER).concat("=").concat(command.getInput());
   }
 
-  protected SimpleHttpOperationInvoker getOperationInvoker() {
+  private SimpleHttpOperationInvoker getOperationInvoker() {
     return operationInvoker;
   }
 
@@ -179,7 +179,7 @@ public class SimpleHttpOperationInvokerJUnitTest extends AbstractWebTestCase {
     }
   }
 
-  protected static final class TestCommandRequest extends CommandRequest {
+  private static final class TestCommandRequest extends CommandRequest {
 
     private final String command;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/util/ConvertUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/util/ConvertUtilsJUnitTest.java b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/util/ConvertUtilsJUnitTest.java
index 08314f8..180641c 100644
--- a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/util/ConvertUtilsJUnitTest.java
+++ b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/web/util/ConvertUtilsJUnitTest.java
@@ -45,7 +45,7 @@ import org.springframework.web.multipart.MultipartFile;
 @Category(UnitTest.class)
 public class ConvertUtilsJUnitTest {
 
-  protected MultipartFile createMultipartFile(final String filename, final byte[] content) {
+  private MultipartFile createMultipartFile(final String filename, final byte[] content) {
     return new MultipartFileAdapter() {
       @Override public byte[] getBytes() throws IOException {
         return content;
@@ -65,7 +65,7 @@ public class ConvertUtilsJUnitTest {
     };
   }
 
-  protected Resource createResource(final String filename, final byte[] content) {
+  private Resource createResource(final String filename, final byte[] content) {
     return new ByteArrayResource(content, String.format("Content of file (%1$s).", filename)) {
       @Override public String getFilename() {
         return filename;


[09/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
index 027ae30..a2dafbf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
@@ -85,9 +85,9 @@ public class PartitionedRegionRedundancyZoneDUnitTest extends CacheTestCase {
     //member to bring it's primary count up to two.
     assertTrue(counts, vm0Count >= 2 && vm1Count >=2);
     
-//    assertEquals(counts, 3, vm0Count);
-//    assertEquals(counts, 3, vm1Count);
-//    assertEquals(counts, 6, vm2Count);
+//    assertIndexDetailsEquals(counts, 3, vm0Count);
+//    assertIndexDetailsEquals(counts, 3, vm1Count);
+//    assertIndexDetailsEquals(counts, 6, vm2Count);
   }
   
   protected void checkBucketCount(VM vm0, final int numLocalBuckets) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
index bdd8654..399f1ca 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
@@ -771,7 +771,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       }
     };
     Wait.waitForCriterion(wc, 60000, 1000, true);
-//    assertEquals(4/*numBuckets*/, prMetaData.getBucketServerLocationsMap_TEST_ONLY().size());    
+//    assertIndexDetailsEquals(4/*numBuckets*/, prMetaData.getBucketServerLocationsMap_TEST_ONLY().size());
   }
 
   public void testMetadataFetchOnlyThroughputAll() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleNodeOperationsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleNodeOperationsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleNodeOperationsJUnitTest.java
index beec9c6..b8d75a5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleNodeOperationsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleNodeOperationsJUnitTest.java
@@ -1064,8 +1064,8 @@ public class PartitionedRegionSingleNodeOperationsJUnitTest
         .values().iterator();
     while (buckRegionIterator.hasNext()) {
       Region bucket = (Region)buckRegionIterator.next();
-//      assertEquals(Scope.LOCAL, bucket.getAttributes().getScope());
-//      assertEquals(DataPolicy.NORMAL, bucket.getAttributes().getDataPolicy());
+//      assertIndexDetailsEquals(Scope.LOCAL, bucket.getAttributes().getScope());
+//      assertIndexDetailsEquals(DataPolicy.NORMAL, bucket.getAttributes().getDataPolicy());
       assertEquals(BucketRegion.class, bucket.getClass());
     }
 
@@ -1079,8 +1079,8 @@ public class PartitionedRegionSingleNodeOperationsJUnitTest
      * putSomeValues(pr1); java.util.Iterator buckRegionIterator1 =
      * pr1.getDataStore().localBucket2RegionMap .values().iterator(); while
      * (buckRegionIterator1.hasNext()) { Region bucket =
-     * (Region)buckRegionIterator1.next(); assertEquals(Scope.DISTRIBUTED_ACK,
-     * bucket.getAttributes().getScope()); assertEquals(MirrorType.KEYS_VALUES,
+     * (Region)buckRegionIterator1.next(); assertIndexDetailsEquals(Scope.DISTRIBUTED_ACK,
+     * bucket.getAttributes().getScope()); assertIndexDetailsEquals(MirrorType.KEYS_VALUES,
      * bucket.getAttributes() .getMirrorType()); }
      * 
      * pr1.destroyRegion();
@@ -1093,8 +1093,8 @@ public class PartitionedRegionSingleNodeOperationsJUnitTest
      * pr2.getDataStore().localBucket2RegionMap .values().iterator(); while
      * (buckRegionIterator2.hasNext()) { Region bucket =
      * (Region)buckRegionIterator2.next();
-     * assertEquals(Scope.DISTRIBUTED_NO_ACK,
-     * bucket.getAttributes().getScope()); assertEquals(MirrorType.KEYS_VALUES,
+     * assertIndexDetailsEquals(Scope.DISTRIBUTED_NO_ACK,
+     * bucket.getAttributes().getScope()); assertIndexDetailsEquals(MirrorType.KEYS_VALUES,
      * bucket.getAttributes() .getMirrorType()); } pr2.destroyRegion();
      */
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsJUnitTest.java
index 089d723..167b89b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsJUnitTest.java
@@ -265,8 +265,8 @@ public class PartitionedRegionStatsJUnitTest
      * int minRedundantCopies = stats.get("minRedundantCopies").intValue();
      * int avgRedundantCopies = stats.get("avgRedundantCopies").intValue();
      * 
-     * assertEquals(minRedundantCopies, 2); assertEquals(maxRedundantCopies,
-     * 2); assertEquals(avgRedundantCopies, 2);
+     * assertIndexDetailsEquals(minRedundantCopies, 2); assertIndexDetailsEquals(maxRedundantCopies,
+     * 2); assertIndexDetailsEquals(avgRedundantCopies, 2);
      */
   }
   
@@ -486,8 +486,8 @@ public class PartitionedRegionStatsJUnitTest
     assertEquals(numEntries , stats.getInt("dataStoreEntryCount"));
     assertEquals((numEntries - entriesInMem) * entryOverflowSize, diskStats.getNumOverflowBytesOnDisk());
     //Disabled for GEODE-93. numEntriesInVM and numOVerflowOnDisk are incorrect
-//    assertEquals(entriesInMem , diskStats.getNumEntriesInVM());
-//    assertEquals((numEntries - entriesInMem) , diskStats.getNumOverflowOnDisk());
+//    assertIndexDetailsEquals(entriesInMem , diskStats.getNumEntriesInVM());
+//    assertIndexDetailsEquals((numEntries - entriesInMem) , diskStats.getNumOverflowOnDisk());
       assertEquals(stats.getLong("dataStoreBytesInUse"), getMemBytes(pr));
       assertEquals(diskStats.getNumOverflowBytesOnDisk(), getDiskBytes(pr));
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
index 1daa499..b99024b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
@@ -280,7 +280,7 @@ public class PartitionedRegionTestUtilsDUnitTest extends
 //        p.put(key1, val1);
 //        assertFalse(p.localCacheContainsKey(key1));
 //        assertFalse(p.localCacheContainsKey(key2));
-//        assertEquals(val1, p.get(key1));
+//        assertIndexDetailsEquals(val1, p.get(key1));
 //        assertTrue(p.localCacheContainsKey(key1));
 //        assertFalse(p.localCacheContainsKey(key2));
 //
@@ -290,12 +290,12 @@ public class PartitionedRegionTestUtilsDUnitTest extends
 //        assertFalse(lset.contains(key2));
 //        
 //        // test localCacheGet
-//        assertEquals(val1, p.localCacheGet(key1));
+//        assertIndexDetailsEquals(val1, p.localCacheGet(key1));
 //        assertNull(p.localCacheGet(key2));
 //        p.put(key2, val2);
 //        assertNull(p.localCacheGet(key2));
-//        assertEquals(val2, p.get(key2));
-//        assertEquals(val2, p.localCacheGet(key2));
+//        assertIndexDetailsEquals(val2, p.get(key2));
+//        assertIndexDetailsEquals(val2, p.localCacheGet(key2));
 //      }
 //    });
 
@@ -424,7 +424,7 @@ public class PartitionedRegionTestUtilsDUnitTest extends
       val = new Integer(i);
       p.put(key, val);
       // Integer gottenVal = (Integer) p.get(key);
-      // assertEquals("Value for key: " + key + " val " + gottenVal + " wasn't expected " + val, val, gottenVal);
+      // assertIndexDetailsEquals("Value for key: " + key + " val " + gottenVal + " wasn't expected " + val, val, gottenVal);
     }
     
     // Assert that the proper number of keys are placed in each bucket 
@@ -433,7 +433,7 @@ public class PartitionedRegionTestUtilsDUnitTest extends
       assertEquals(s.size(), 1);
       key = (TestPRKey) s.iterator().next();
       assertEquals(i, key.hashCode());
-      // assertEquals(new Integer(i), p.get(key)); 
+      // assertIndexDetailsEquals(new Integer(i), p.get(key));
     }
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
index 7afd5fa..9b1f29e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
@@ -123,7 +123,7 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
   private final SerializableCallable verifyNoTxState = new SerializableCallable() {
     public Object call() throws Exception {
       //TXManagerImpl mgr = getGemfireCache().getTxManager();
-      //assertEquals(0, mgr.hostedTransactionsInProgressForTest());
+      //assertIndexDetailsEquals(0, mgr.hostedTransactionsInProgressForTest());
       final TXManagerImpl mgr = getGemfireCache().getTxManager();
       Wait.waitForCriterion(new WaitCriterion() {
         @Override
@@ -356,14 +356,14 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
       Region.Entry eR = refRegion.getEntry(custId);
       assertNotNull(eC);
       assertNotNull(eR);
-//      assertEquals(1,custRegion.size());
-  //    assertEquals(1,orderRegion.size());
-    //  assertEquals(1,refRegion.size());
+//      assertIndexDetailsEquals(1,custRegion.size());
+  //    assertIndexDetailsEquals(1,orderRegion.size());
+    //  assertIndexDetailsEquals(1,refRegion.size());
       
     } else {
-      //assertEquals(0,custRegion.size());
-      //assertEquals(0,orderRegion.size());
-      //assertEquals(0,refRegion.size());
+      //assertIndexDetailsEquals(0,custRegion.size());
+      //assertIndexDetailsEquals(0,orderRegion.size());
+      //assertIndexDetailsEquals(0,refRegion.size());
       try {
         Region.Entry eC =  custRegion.getEntry(custId);
         assertNull("should have had an EntryNotFoundException:"+eC,eC);
@@ -415,13 +415,13 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
       assertEquals(expectedCust, custRegion.getEntry(custId).getValue());
       /*
       assertNotNull(orderRegion.getEntry(orderId));
-      assertEquals(expectedOrder, orderRegion.getEntry(orderId).getValue());
+      assertIndexDetailsEquals(expectedOrder, orderRegion.getEntry(orderId).getValue());
       
       assertNotNull(orderRegion.getEntry(orderId2));
-      assertEquals(expectedOrder2, orderRegion.getEntry(orderId2).getValue());
+      assertIndexDetailsEquals(expectedOrder2, orderRegion.getEntry(orderId2).getValue());
       
       assertNotNull(orderRegion.getEntry(orderId3));
-      assertEquals(expectedOrder3, orderRegion.getEntry(orderId3).getValue());
+      assertIndexDetailsEquals(expectedOrder3, orderRegion.getEntry(orderId3).getValue());
       */
       assertNotNull(refRegion.getEntry(custId));
       assertEquals(expectedRef, refRegion.getEntry(custId).getValue());
@@ -2236,7 +2236,7 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
         assertEquals(6, rr.entrySet().size());
         assertNotNull(rr.get(custId));
         TXStateProxy tx = mgr.internalSuspend();
-        //assertEquals(getCustIdSet(5), rr.entrySet());
+        //assertIndexDetailsEquals(getCustIdSet(5), rr.entrySet());
         assertEquals(5, rr.entrySet().size());
         assertNull(rr.get(custId));
         mgr.resume(tx);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessorTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessorTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessorTest.java
index 57aca37..3e51fd9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessorTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessorTest.java
@@ -16,7 +16,6 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SimpleDiskRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SimpleDiskRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SimpleDiskRegionJUnitTest.java
index 0300331..6bac28b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SimpleDiskRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SimpleDiskRegionJUnitTest.java
@@ -230,7 +230,7 @@ public class SimpleDiskRegionJUnitTest extends DiskRegionTestingBase
 //     region = DiskRegionHelperFactory.getSyncPersistOnlyRegion(cache, diskProps);
 //     DiskRegion dr = ((LocalRegion)region).getDiskRegion();
 //     put100Int();
-//     assertEquals(new Integer(1), region.get(new Integer(1)));
+//     assertIndexDetailsEquals(new Integer(1), region.get(new Integer(1)));
 //     Oplog oplog = dr.getChild();
 //     int id = oplog.getOplogId();
 //     StatisticsFactory factory = dr.getOwner().getCache().getDistributedSystem();
@@ -239,7 +239,7 @@ public class SimpleDiskRegionJUnitTest extends DiskRegionTestingBase
 //     dr.setChild(newOplog);
 //     region.clear();
 //     newOplog = dr.getChild();
-//     assertEquals(null, region.get(new Integer(1)));
+//     assertIndexDetailsEquals(null, region.get(new Integer(1)));
 //     try {
 //       dr.addToOplogSet(id, new File(oplog.getOplogFile()
 //           .getPath()), dr.getNextDir());
@@ -254,7 +254,7 @@ public class SimpleDiskRegionJUnitTest extends DiskRegionTestingBase
 //     oplog.close();
 //     dr.setIsRecovering(true);
 //     dr.basicInitializeOwner();
-//     assertEquals(new Integer(1), region.get(new Integer(1)));
+//     assertIndexDetailsEquals(new Integer(1), region.get(new Integer(1)));
 //     closeDown();
 //   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/VLJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/VLJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/VLJUnitTest.java
index 11aaa77..c2b36f8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/VLJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/VLJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInput;
@@ -24,10 +26,9 @@ import java.io.DataOutput;
 import java.io.DataOutputStream;
 import java.io.IOException;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
@@ -36,10 +37,10 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
  * 
  * TODO these tests need some work. I don't think they really represent
  * edge cases for this variable length value.
- *
  */
 @Category(UnitTest.class)
-public class VLJUnitTest extends TestCase {
+public class VLJUnitTest {
+
   private ByteArrayOutputStream baos;
   private DataOutputStream dos;
 
@@ -56,71 +57,85 @@ public class VLJUnitTest extends TestCase {
     return new DataInputStream(bais);
   }
 
+  @Test
   public void testZero() throws IOException {
     InternalDataSerializer.writeUnsignedVL(0, createDOS());
     assertEquals(0, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
-  
+
+  @Test
   public void testOne() throws IOException {
     InternalDataSerializer.writeUnsignedVL(1, createDOS());
     assertEquals(1, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
-  
+
+  @Test
   public void testMinusOne() throws IOException {
     InternalDataSerializer.writeUnsignedVL(-1, createDOS());
     assertEquals(-1, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
 
+  @Test
   public void testMaxByte() throws IOException {
     InternalDataSerializer.writeUnsignedVL(0x7F, createDOS());
     assertEquals(0x7F, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
-  
+
+  @Test
   public void testMaxNegativeByte() throws IOException {
     InternalDataSerializer.writeUnsignedVL(-0x7F, createDOS());
     assertEquals(-0x7F, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
 
+  @Test
   public void testMinShort() throws IOException {
     InternalDataSerializer.writeUnsignedVL(0xFF, createDOS());
     assertEquals(0xFF, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
-  
+
+  @Test
   public void testMinNegativeShort() throws IOException {
     InternalDataSerializer.writeUnsignedVL(-0xFF, createDOS());
     assertEquals(-0xFF, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
 
+  @Test
   public void testMaxShort() throws IOException {
     InternalDataSerializer.writeUnsignedVL(0x7fff, createDOS());
     assertEquals(0x7fff, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
-  
+
+  @Test
   public void testMaxNegativeShort() throws IOException {
     InternalDataSerializer.writeUnsignedVL(-0x7fff, createDOS());
     assertEquals(-0x7fff, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
 
+  @Test
   public void testMin3Byte() throws IOException {
     InternalDataSerializer.writeUnsignedVL(0xffff, createDOS());
     assertEquals(0xffff, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
-  
+
+  @Test
   public void testMin3Negative() throws IOException {
     InternalDataSerializer.writeUnsignedVL(-0xffff, createDOS());
     assertEquals(-0xffff, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
 
+  @Test
   public void testMaxInt() throws IOException {
     InternalDataSerializer.writeUnsignedVL(0x7fffffff, createDOS());
     assertEquals(0x7fffffff, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
 
+  @Test
   public void testMinLong() throws IOException {
     InternalDataSerializer.writeUnsignedVL(0x7fffffffL + 1, createDOS());
     assertEquals(0x7fffffffL + 1, InternalDataSerializer.readUnsignedVL(createDIS()));
   }
 
+  @Test
   public void testMaxLong() throws IOException {
     InternalDataSerializer.writeUnsignedVL(Long.MAX_VALUE, createDOS());
     assertEquals(Long.MAX_VALUE, InternalDataSerializer.readUnsignedVL(createDIS()));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/FilterByPathJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/FilterByPathJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/FilterByPathJUnitTest.java
index 3fa2024..fade291 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/FilterByPathJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/FilterByPathJUnitTest.java
@@ -16,30 +16,31 @@
  */
 package com.gemstone.gemfire.internal.cache.control;
 
+import static org.junit.Assert.*;
+
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.util.HashSet;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- *
- */
 @Category(UnitTest.class)
-public class FilterByPathJUnitTest extends TestCase {
+public class FilterByPathJUnitTest {
+
+  @Test
   public void testDefault() {
     FilterByPath filter = new FilterByPath(null, null);
     assertTrue(filter.include(createRegion("a")));
     assertTrue(filter.include(createRegion("b")));
     assertTrue(filter.include(createRegion("c")));
   }
-  
+
+  @Test
   public void testInclude() {
     HashSet<String> included = new HashSet<String>();
     included.add("a");
@@ -50,6 +51,7 @@ public class FilterByPathJUnitTest extends TestCase {
     assertFalse(filter.include(createRegion("c")));
   }
 
+  @Test
   public void testExclude() {
     HashSet<String> excluded = new HashSet<String>();
     excluded.add("a");
@@ -59,7 +61,8 @@ public class FilterByPathJUnitTest extends TestCase {
     assertFalse(filter.include(createRegion("b")));
     assertTrue(filter.include(createRegion("c")));
   }
-  
+
+  @Test
   public void testBoth() {
     HashSet<String> included = new HashSet<String>();
     included.add("a");
@@ -79,17 +82,18 @@ public class FilterByPathJUnitTest extends TestCase {
     return (Region<?,?>) Proxy.newProxyInstance(contextClassLoader, new Class[] {Region.class}, handler);
   }
 
-  public static class RegionHandler implements InvocationHandler {
+  private static class RegionHandler implements InvocationHandler {
 
     private String name;
     
     public RegionHandler(String name) {
       this.name = "/"+name;
     }
+
+    @Override
     public Object invoke(Object proxy, Method method, Object[] args)
         throws Throwable {
       return name;
     }
-    
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryThresholdsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryThresholdsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryThresholdsJUnitTest.java
index 08b2c80..74dc4fe 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryThresholdsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryThresholdsJUnitTest.java
@@ -16,20 +16,17 @@
  */
 package com.gemstone.gemfire.internal.cache.control;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.*;
 
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import static org.junit.Assert.*;
-
 import com.gemstone.gemfire.internal.cache.control.MemoryThresholds.MemoryState;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class MemoryThresholdsJUnitTest {
+
   @Test
   public void testDefaults() {
     MemoryThresholds thresholds = new MemoryThresholds(1000);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
index 26ebc16..6049e14 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
@@ -309,7 +309,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
           Cache cache = getCache();
           ResourceManager manager = cache.getResourceManager();
           RebalanceResults results = doRebalance(false, manager);
-//          assertEquals(113, results.getTotalBucketCreatesCompleted());
+//          assertIndexDetailsEquals(113, results.getTotalBucketCreatesCompleted());
         }
       });
 
@@ -407,14 +407,14 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         //We actually *will* transfer buckets, because that improves
         //the balance
         assertEquals(3, results.getTotalBucketTransfersCompleted());
-//        assertEquals(0, results.getTotalBucketTransferBytes());
+//        assertIndexDetailsEquals(0, results.getTotalBucketTransferBytes());
         Set<PartitionRebalanceInfo> detailSet = results.getPartitionRebalanceDetails();
         assertEquals(1, detailSet.size());
         PartitionRebalanceInfo details = detailSet.iterator().next();
         assertEquals(0, details.getBucketCreatesCompleted());
         assertEquals(0, details.getPrimaryTransfersCompleted());
         assertEquals(3, details.getBucketTransfersCompleted());
-//        assertEquals(0, details.getBucketTransferBytes());
+//        assertIndexDetailsEquals(0, details.getBucketTransferBytes());
         if(!simulate) {
           verifyStats(manager, results);
         }
@@ -544,7 +544,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
           }
           assertEquals(2, info.getPrimaryCount());
         }
-//        assertEquals(0, details.getBucketTransferBytes());
+//        assertIndexDetailsEquals(0, details.getBucketTransferBytes());
         if(!simulate) {
           verifyStats(manager, results);
         }
@@ -743,7 +743,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
             assertEquals(2, info.getPrimaryCount());
           }
         }
-        //        assertEquals(0, details.getBucketTransferBytes());
+        //        assertIndexDetailsEquals(0, details.getBucketTransferBytes());
         verifyStats(manager, results);
       }
     });
@@ -1695,7 +1695,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         ResourceManager manager = cache.getResourceManager();
         RebalanceResults results = doRebalance(simulate, manager, INCLUDED, EXCLUDED);
         Set<PartitionRebalanceInfo> detailSet = results.getPartitionRebalanceDetails();
-//        assertEquals(3, detailSet.size());
+//        assertIndexDetailsEquals(3, detailSet.size());
         Set<String> names = new HashSet<String>();
         for(PartitionRebalanceInfo details: detailSet) {
           assertEquals(0, details.getBucketCreatesCompleted());
@@ -1825,7 +1825,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         assertEquals(0, results.getTotalBucketCreatesCompleted());
         //We don't know how many primaries will move, it depends on
         //if the move bucket code moves the primary or a redundant bucket
-        //assertEquals(0, results.getTotalPrimaryTransfersCompleted());
+        //assertIndexDetailsEquals(0, results.getTotalPrimaryTransfersCompleted());
         assertEquals(8, results.getTotalBucketTransfersCompleted());
         assertTrue(0 < results.getTotalBucketTransferBytes());
         Set<PartitionRebalanceInfo> detailSet = results.getPartitionRebalanceDetails();
@@ -1970,7 +1970,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         assertEquals(0, results.getTotalBucketCreatesCompleted());
         //We don't know how many primaries will move, it depends on
         //if the move bucket code moves the primary or a redundant bucket
-        //assertEquals(0, results.getTotalPrimaryTransfersCompleted());
+        //assertIndexDetailsEquals(0, results.getTotalPrimaryTransfersCompleted());
         assertEquals(8, results.getTotalBucketTransfersCompleted());
         assertTrue(0 < results.getTotalBucketTransferBytes());
         Set<PartitionRebalanceInfo> detailSet = results.getPartitionRebalanceDetails();
@@ -2017,7 +2017,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
           assertEquals(4, memberDetails.getPrimaryCount());
           afterSize += memberDetails.getSize();
         }
-        //assertEquals(totalSize.longValue(), afterSize);
+        //assertIndexDetailsEquals(totalSize.longValue(), afterSize);
       }
     };
 
@@ -2038,7 +2038,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         assertEquals(0, results.getTotalBucketCreatesCompleted());
         //We don't know how many primaries will move, it depends on
         //if the move bucket code moves the primary or a redundant bucket
-        //assertEquals(0, results.getTotalPrimaryTransfersCompleted());
+        //assertIndexDetailsEquals(0, results.getTotalPrimaryTransfersCompleted());
         assertEquals(6, results.getTotalBucketTransfersCompleted());
         assertTrue(0 < results.getTotalBucketTransferBytes());
         Set<PartitionRebalanceInfo> detailSet = results.getPartitionRebalanceDetails();
@@ -2059,7 +2059,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         assertEquals(4, afterDetails.size());
         for(PartitionMemberInfo memberDetails: afterDetails) {
           assertEquals(6, memberDetails.getBucketCount());
-//          assertEquals(3, memberDetails.getPrimaryCount());
+//          assertIndexDetailsEquals(3, memberDetails.getPrimaryCount());
           afterSize += memberDetails.getSize();
         }
         assertEquals(totalSize, afterSize);
@@ -2083,10 +2083,10 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
           long afterSize = 0;
           for(PartitionMemberInfo memberDetails: details.getPartitionMemberInfo()) {
             assertEquals(6, memberDetails.getBucketCount());
-            //            assertEquals(3, memberDetails.getPrimaryCount());
+            //            assertIndexDetailsEquals(3, memberDetails.getPrimaryCount());
             afterSize += memberDetails.getSize();
           }
-          //assertEquals(totalSize.longValue(), afterSize);
+          //assertIndexDetailsEquals(totalSize.longValue(), afterSize);
         }
       };
 
@@ -2154,7 +2154,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         assertEquals(0, results.getTotalBucketCreatesCompleted());
         //We don't know how many primaries will move, it depends on
         //if the move bucket code moves the primary or a redundant bucket
-        //assertEquals(0, results.getTotalPrimaryTransfersCompleted());
+        //assertIndexDetailsEquals(0, results.getTotalPrimaryTransfersCompleted());
         assertEquals(8, results.getTotalBucketTransfersCompleted());
         assertTrue(0 < results.getTotalBucketTransferBytes());
         Set<PartitionRebalanceInfo> detailSet = results.getPartitionRebalanceDetails();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
index 9d96d9e..e70d260 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
@@ -589,7 +589,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends P
       // resultListForMember.add(resultIterator.next());
       //
       // for (Object result : resultListForMember) {
-      // assertEquals(Boolean.TRUE, result);
+      // assertIndexDetailsEquals(Boolean.TRUE, result);
       // }
       // }
       for (Object result : resultList) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
index 482ab9a..1a83608 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
@@ -551,7 +551,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
       // resultListForMember.add(resultIterator.next());
       //
       // for (Object result : resultListForMember) {
-      // assertEquals(Boolean.TRUE, result);
+      // assertIndexDetailsEquals(Boolean.TRUE, result);
       // }
       // }
       for (Object result : resultList) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
index 1f65ad2..bedead7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
@@ -585,7 +585,7 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
 //          resultListForMember.add(resultIterator.next());
 //
 //          for (Object result : resultListForMember) {
-//            assertEquals(Boolean.TRUE, result);
+//            assertIndexDetailsEquals(Boolean.TRUE, result);
 //          }
 //        }
         for (Object result : resultList) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
index 55ab928..12a143d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
@@ -399,7 +399,7 @@ public class PRCustomPartitioningDUnitTest extends
               PartitionResolver rr = pr.getPartitionResolver();
               Object o = rr.getRoutingObject(eo);
               Integer i = new Integer(o.hashCode()% totalNumBuckets);
-              //assertEquals(bucketId, bucketId);
+              //assertIndexDetailsEquals(bucketId, bucketId);
               assertEquals(bucketId, i);
             }  //getLogWriter().severe("Key " + key + " found in bucket " + b);
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
index a8df3f6..7d2c0ef 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
@@ -1615,10 +1615,10 @@ public class PRFunctionExecutionDUnitTest extends
         ResultCollector rc2 = dataSet.withFilter(testKeysSet).withArgs(testKeysSet)
             .execute(function);
         List l2 = ((List)rc2.getResult());
-        //assertEquals(pr.getTotalNumberOfBuckets(), l2.size());
+        //assertIndexDetailsEquals(pr.getTotalNumberOfBuckets(), l2.size());
         assertEquals(3, l2.size());
         
-        // assertEquals(pr.getTotalNumberOfBuckets(), l.size());
+        // assertIndexDetailsEquals(pr.getTotalNumberOfBuckets(), l.size());
         HashSet foundVals = new HashSet();
         for (Iterator i = l2.iterator(); i.hasNext();) {
           ArrayList subL = (ArrayList)i.next();
@@ -1908,7 +1908,7 @@ public class PRFunctionExecutionDUnitTest extends
         ResultCollector rc1 = dataSet.withFilter(testKeys).withArgs(Boolean.TRUE)
             .execute(function.getId());
         List l = ((List)rc1.getResult());
-        //assertEquals(pr.getTotalNumberOfBuckets(), l.size());
+        //assertIndexDetailsEquals(pr.getTotalNumberOfBuckets(), l.size());
         assertEquals(1, l.size());
         for (Iterator i = l.iterator(); i.hasNext();) {
           assertEquals(Boolean.TRUE, i.next());
@@ -2256,8 +2256,8 @@ public class PRFunctionExecutionDUnitTest extends
         return Boolean.TRUE;
 //        for (int i=0; i<4; i++) {
 //          List l = ((List)rc1.getResult());
-//          assertEquals(4, l.size());
-//          assertEquals(Boolean.TRUE, l.iterator().next());
+//          assertIndexDetailsEquals(4, l.size());
+//          assertIndexDetailsEquals(Boolean.TRUE, l.iterator().next());
 //        }
 //
 //        return Boolean.TRUE;
@@ -2735,7 +2735,7 @@ public class PRFunctionExecutionDUnitTest extends
             try {
               partitionedregion.put(orderId, order);
               //assertTrue(partitionedregion.containsKey(orderId));
-              //assertEquals(order,partitionedregion.get(orderId));
+              //assertIndexDetailsEquals(order,partitionedregion.get(orderId));
               
             }
             catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
index 4643123..6f34acd 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRPerformanceTestDUnitTest.java
@@ -199,7 +199,7 @@ public class PRPerformanceTestDUnitTest extends
                 assertNotNull(pr);
                 //pr.put(key, Integer.toString(i));
                 pr.put(key, valueArray);
-                //assertEquals(valueArray, pr.get(key));
+                //assertIndexDetailsEquals(valueArray, pr.get(key));
   
               }
               entries--;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPointJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPointJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPointJUnitTest.java
index 5d0ee56..4fd7837 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPointJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPointJUnitTest.java
@@ -30,7 +30,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Unit tests for {@link SimpleExtensionPoint}.
- * 
  *
  * @since 8.1
  */
@@ -99,7 +98,6 @@ public class SimpleExtensionPointJUnitTest {
     } catch (NoSuchElementException e) {
       // ignore
     }
-
   }
 
   /**
@@ -183,7 +181,7 @@ public class SimpleExtensionPointJUnitTest {
     public void method1();
   }
 
-  private class MockImpl implements MockInterface, Extensible<MockInterface> {
+  private static class MockImpl implements MockInterface, Extensible<MockInterface> {
 
     private SimpleExtensionPoint<MockInterface> extensionPoint = new SimpleExtensionPoint<SimpleExtensionPointJUnitTest.MockInterface>(this, this);
 
@@ -198,7 +196,7 @@ public class SimpleExtensionPointJUnitTest {
 
   }
 
-  private class MockExtension implements Extension<MockInterface> {
+  private static class MockExtension implements Extension<MockInterface> {
 
     @Override
     public XmlGenerator<MockInterface> getXmlGenerator() {
@@ -209,6 +207,5 @@ public class SimpleExtensionPointJUnitTest {
     public void onCreate(Extensible<MockInterface> source, Extensible<MockInterface> target) {
       throw new UnsupportedOperationException();
     }
-
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationJUnitTest.java
index 2b81cb4..a9cc187 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationJUnitTest.java
@@ -16,12 +16,13 @@
  */
 package com.gemstone.gemfire.internal.cache.ha;
 
+import static org.junit.Assert.*;
+
 import java.nio.ByteBuffer;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.internal.cache.EventID;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
@@ -31,15 +32,13 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
  * For client to server messages, the membership id part of event-id is not need
  * to be sent with each event. Also, the threadId and sequenceId need not be
  * sent as long if their value is small. This is a junit test for testing the
- * methods written in <code>EventID</code> class for the above optmization.
+ * methods written in <code>EventID</code> class for the above optimization.
  * For distributed testing for the same , please refer
  * {@link EventIdOptimizationDUnitTest}.
- * 
- * 
  */
 @Category(UnitTest.class)
-public class EventIdOptimizationJUnitTest extends TestCase
-{
+public class EventIdOptimizationJUnitTest {
+
   /** The long id (threadId or sequenceId) having value equivalent to byte */
   private static final long ID_VALUE_BYTE = Byte.MAX_VALUE;
 
@@ -53,164 +52,144 @@ public class EventIdOptimizationJUnitTest extends TestCase
   private static final long ID_VALUE_LONG = Long.MAX_VALUE;
 
   /**
-   * Constructor
-   * 
-   * @param arg0 -
-   *          name
-   */
-  public EventIdOptimizationJUnitTest(String arg0) {
-    super(arg0);
-  }
-
-  /**
-   * Tests the eventId optmization APIs
+   * Tests the eventId optimization APIs
    * <code>EventID#getOptimizedByteArrayForEventID</code> and
    * <code>EventID#readEventIdPartsFromOptmizedByteArray</code> for byte-byte
    * combination for threadId and sequenceId values.
-   * 
    */
-  public void testOptmizationForByteByte()
-  {
+  @Test
+  public void testOptimizationForByteByte() {
     int expectedLength = 2 + 1 + 1;
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_BYTE, ID_VALUE_BYTE,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_BYTE, ID_VALUE_BYTE,
         expectedLength);
   }
 
   /**
-   * Tests the eventId optmization APIs
+   * Tests the eventId optimization APIs
    * <code>EventID#getOptimizedByteArrayForEventID</code> and
    * <code>EventID#readEventIdPartsFromOptmizedByteArray</code> for
    * short-short combination for threadId and sequenceId values.
-   * 
    */
-  public void testOptmizationForShortShort()
-  {
+  @Test
+  public void testOptimizationForShortShort() {
     int expectedLength = 2 + 2 + 2;
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_SHORT, ID_VALUE_SHORT,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_SHORT, ID_VALUE_SHORT,
         expectedLength);
   }
 
   /**
-   * Tests the eventId optmization APIs
+   * Tests the eventId optimization APIs
    * <code>EventID#getOptimizedByteArrayForEventID</code> and
    * <code>EventID#readEventIdPartsFromOptmizedByteArray</code> for int-int
    * combination for threadId and sequenceId values.
-   * 
    */
-  public void testOptmizationForIntInt()
-  {
+  @Test
+  public void testOptimizationForIntInt() {
     int expectedLength = 2 + 4 + 4;
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_INT, ID_VALUE_INT,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_INT, ID_VALUE_INT,
         expectedLength);
   }
 
   /**
-   * Tests the eventId optmization APIs
+   * Tests the eventId optimization APIs
    * <code>EventID#getOptimizedByteArrayForEventID</code> and
    * <code>EventID#readEventIdPartsFromOptmizedByteArray</code> for long-long
    * combination for threadId and sequenceId values.
-   * 
    */
-  public void testOptmizationForLongLong()
-  {
+  @Test
+  public void testOptimizationForLongLong() {
     int expectedLength = 2 + 8 + 8;
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_LONG, ID_VALUE_LONG,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_LONG, ID_VALUE_LONG,
         expectedLength);
   }
 
   /**
-   * Tests the eventId optmization APIs
+   * Tests the eventId optimization APIs
    * <code>EventID#getOptimizedByteArrayForEventID</code> and
    * <code>EventID#readEventIdPartsFromOptmizedByteArray</code> for byte-short
    * combinations for threadId and sequenceId values.
-   * 
    */
-  public void testOptmizationForByteShort()
-  {
+  @Test
+  public void testOptimizationForByteShort() {
     int expectedLength = 2 + 1 + 2;
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_BYTE, ID_VALUE_SHORT,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_BYTE, ID_VALUE_SHORT,
         expectedLength);
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_SHORT, ID_VALUE_BYTE,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_SHORT, ID_VALUE_BYTE,
         expectedLength);
   }
 
   /**
-   * Tests the eventId optmization APIs
+   * Tests the eventId optimization APIs
    * <code>EventID#getOptimizedByteArrayForEventID</code> and
    * <code>EventID#readEventIdPartsFromOptmizedByteArray</code> for byte-int
    * combinations for threadId and sequenceId values.
-   * 
    */
-  public void testOptmizationForByteInt()
-  {
+  @Test
+  public void testOptimizationForByteInt() {
     int expectedLength = 2 + 1 + 4;
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_BYTE, ID_VALUE_INT,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_BYTE, ID_VALUE_INT,
         expectedLength);
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_INT, ID_VALUE_BYTE,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_INT, ID_VALUE_BYTE,
         expectedLength);
   }
 
   /**
-   * Tests the eventId optmization APIs
+   * Tests the eventId optimization APIs
    * <code>EventID#getOptimizedByteArrayForEventID</code> and
    * <code>EventID#readEventIdPartsFromOptmizedByteArray</code> for byte-long
    * combinations for threadId and sequenceId values.
-   * 
    */
-  public void testOptmizationForByteLong()
-  {
+  @Test
+  public void testOptimizationForByteLong() {
     int expectedLength = 2 + 1 + 8;
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_BYTE, ID_VALUE_LONG,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_BYTE, ID_VALUE_LONG,
         expectedLength);
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_LONG, ID_VALUE_BYTE,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_LONG, ID_VALUE_BYTE,
         expectedLength);
   }
 
   /**
-   * Tests the eventId optmization APIs
+   * Tests the eventId optimization APIs
    * <code>EventID#getOptimizedByteArrayForEventID</code> and
    * <code>EventID#readEventIdPartsFromOptmizedByteArray</code> for short-int
    * combinations for threadId and sequenceId values.
-   * 
    */
-  public void testOptmizationForShortInt()
-  {
+  @Test
+  public void testOptimizationForShortInt() {
     int expectedLength = 2 + 2 + 4;
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_SHORT, ID_VALUE_INT,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_SHORT, ID_VALUE_INT,
         expectedLength);
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_INT, ID_VALUE_SHORT,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_INT, ID_VALUE_SHORT,
         expectedLength);
   }
 
   /**
-   * Tests the eventId optmization APIs
+   * Tests the eventId optimization APIs
    * <code>EventID#getOptimizedByteArrayForEventID</code> and
    * <code>EventID#readEventIdPartsFromOptmizedByteArray</code> for short-long
    * combinations for threadId and sequenceId values.
-   * 
    */
-  public void testOptmizationForShortLong()
-  {
+  @Test
+  public void testOptimizationForShortLong() {
     int expectedLength = 2 + 2 + 8;
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_SHORT, ID_VALUE_LONG,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_SHORT, ID_VALUE_LONG,
         expectedLength);
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_LONG, ID_VALUE_SHORT,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_LONG, ID_VALUE_SHORT,
         expectedLength);
   }
 
   /**
-   * Tests the eventId optmization APIs
+   * Tests the eventId optimization APIs
    * <code>EventID#getOptimizedByteArrayForEventID</code> and
    * <code>EventID#readEventIdPartsFromOptmizedByteArray</code> for int-long
    * combinations for threadId and sequenceId values.
-   * 
    */
-  public void testOptmizationForIntLong()
-  {
+  @Test
+  public void testOptimizationForIntLong() {
     int expectedLength = 2 + 4 + 8;
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_INT, ID_VALUE_LONG,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_INT, ID_VALUE_LONG,
         expectedLength);
-    writeReadAndVerifyOpmitizedByteArray(ID_VALUE_LONG, ID_VALUE_INT,
+    writeReadAndVerifyOptimizedByteArray(ID_VALUE_LONG, ID_VALUE_INT,
         expectedLength);
   }
 
@@ -229,9 +208,7 @@ public class EventIdOptimizationJUnitTest extends TestCase
    * @param expectedArrayLength
    *          expected length of the optimized byte-array
    */
-  private void writeReadAndVerifyOpmitizedByteArray(long threadId,
-      long sequenceId, int expectedArrayLength)
-  {
+  private void writeReadAndVerifyOptimizedByteArray(long threadId, long sequenceId, int expectedArrayLength) {
     byte[] array = EventID
         .getOptimizedByteArrayForEventID(threadId, sequenceId);
     assertEquals("optimized byte-array length not as expected",

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
index c7497c3..ba1cd61 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
@@ -314,7 +314,7 @@ public class HAGIIDUnitTest extends DistributedTestCase
           return null;
         }
       };
-      // assertEquals( "key-1",r.getEntry("key-1").getValue());
+      // assertIndexDetailsEquals( "key-1",r.getEntry("key-1").getValue());
       // wait until we
       // have a dead
       // server
@@ -327,7 +327,7 @@ public class HAGIIDUnitTest extends DistributedTestCase
         }
       };
       Wait.waitForCriterion(ev, 60 * 1000, 200, true);
-      // assertEquals( "key-2",r.getEntry("key-2").getValue());
+      // assertIndexDetailsEquals( "key-2",r.getEntry("key-2").getValue());
       
       // wait until we
       // have a dead
@@ -341,7 +341,7 @@ public class HAGIIDUnitTest extends DistributedTestCase
         }
       };
       Wait.waitForCriterion(ev, 60 * 1000, 200, true);
-      // assertEquals( "key-3",r.getEntry("key-3").getValue());
+      // assertIndexDetailsEquals( "key-3",r.getEntry("key-3").getValue());
     }
     catch (Exception ex) {
       Assert.fail("failed while verifyEntries()", ex);
@@ -414,7 +414,7 @@ public class HAGIIDUnitTest extends DistributedTestCase
         }
       };
       Wait.waitForCriterion(ev, 60 * 1000, 200, true);
-      // assertEquals( "key-2",r.getEntry("key-2").getValue());
+      // assertIndexDetailsEquals( "key-2",r.getEntry("key-2").getValue());
 
 
       // wait until
@@ -431,8 +431,8 @@ public class HAGIIDUnitTest extends DistributedTestCase
       Wait.waitForCriterion(ev, 60 * 1000, 200, true);
       
       /*
-       * assertEquals( "value-1",r.getEntry("key-1").getValue()); assertEquals(
-       * "value-2",r.getEntry("key-2").getValue()); assertEquals(
+       * assertIndexDetailsEquals( "value-1",r.getEntry("key-1").getValue()); assertIndexDetailsEquals(
+       * "value-2",r.getEntry("key-2").getValue()); assertIndexDetailsEquals(
        * "value-3",r.getEntry("key-3").getValue());
        */
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQAddOperationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQAddOperationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQAddOperationJUnitTest.java
index 00a906c..1c7b0d0 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQAddOperationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQAddOperationJUnitTest.java
@@ -788,7 +788,7 @@ public class HARQAddOperationJUnitTest
     regionqueue.remove();
 
     for (int i = 0; i < numOfThreads; i++) {
-      // assertEquals(numOfPuts,
+      // assertIndexDetailsEquals(numOfPuts,
       // regionqueue.getLastDispatchedSequenceId(new EventID(
       // new byte[] { (byte)i }, i, 1)));
       assertEquals(0, regionqueue.getCurrentCounterSet(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
index 83919f4..ea1ed4a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
@@ -1095,7 +1095,7 @@ public class HARegionQueueDUnitTest extends DistributedTestCase {
       }
     };
     Wait.waitForCriterion(ev, 60 * 1000, 200, true);
-    // assertEquals(0, hrq.getAvalaibleIds().size());
+    // assertIndexDetailsEquals(0, hrq.getAvalaibleIds().size());
   }
 
   public void testForDuplicateEvents()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/ThreadIdentifierJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/ThreadIdentifierJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/ThreadIdentifierJUnitTest.java
index 9e280fc..66ee622 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/ThreadIdentifierJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/ThreadIdentifierJUnitTest.java
@@ -16,6 +16,9 @@
  */
 package com.gemstone.gemfire.internal.cache.ha;
 
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.cache.ha.ThreadIdentifier.WanType;
@@ -24,8 +27,9 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 import junit.framework.TestCase;
 
 @Category(UnitTest.class)
-public class ThreadIdentifierJUnitTest extends TestCase {
+public class ThreadIdentifierJUnitTest {
 
+  @Test
   public void testPutAllId() {
     int id = 42;
     int bucketNumber = 113;
@@ -35,7 +39,8 @@ public class ThreadIdentifierJUnitTest extends TestCase {
     assertTrue(ThreadIdentifier.isPutAllFakeThreadID(putAll));
     assertEquals(42, ThreadIdentifier.getRealThreadID(putAll));
   }
-  
+
+  @Test
   public void testWanId() {
     int id = 42;
     
@@ -69,7 +74,8 @@ public class ThreadIdentifierJUnitTest extends TestCase {
       assertTrue(WanType.PARALLEL.matches(real_tid_with_wan));
     }
   }
-  
+
+  @Test
   public void testWanAndPutAllId() {
     int id = 42;
     int bucketNumber = 113;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
index 867c214..8f556dc 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
@@ -672,7 +672,7 @@ public class TXLockServiceDUnitTest extends DistributedTestCase {
 //    if (this.lockGrantor == null) {
 //      this.lockGrantor = id;
 //    } else {
-//      assertEquals("assertGrantorIsConsistent failed", lockGrantor, id);
+//      assertIndexDetailsEquals("assertGrantorIsConsistent failed", lockGrantor, id);
 //    }
 //  }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessageJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessageJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessageJUnitTest.java
index 39bb5ea..e08a268 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessageJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessageJUnitTest.java
@@ -16,11 +16,11 @@
  */
 package com.gemstone.gemfire.internal.cache.partitioned;
 
+import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
 import java.io.IOException;
 
-import org.apache.logging.log4j.Logger;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -34,16 +34,13 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.partitioned.FetchEntriesMessage.FetchEntriesReplyMessage;
 import com.gemstone.gemfire.internal.cache.partitioned.FetchEntriesMessage.FetchEntriesResponse;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
-import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.test.fake.Fakes;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 @Category(UnitTest.class)
-public class FetchEntriesMessageJUnitTest extends TestCase {
-  protected static final Logger logger = LogService.getLogger();
-  GemFireCacheImpl cache;
+public class FetchEntriesMessageJUnitTest {
+
+  private GemFireCacheImpl cache;
   
   private VersionTag createVersionTag(boolean validVersionTag) throws ClassNotFoundException, IOException {
     VersionTag tag = VersionTag.create(cache.getMyId());
@@ -72,7 +69,7 @@ public class FetchEntriesMessageJUnitTest extends TestCase {
   }
   
   @Test
-  public void testProcessChunk() throws IOException, ClassNotFoundException {
+  public void testProcessChunk() throws Exception {
     cache = Fakes.cache();
     PartitionedRegion pr = mock(PartitionedRegion.class);
     InternalDistributedSystem system = cache.getDistributedSystem();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/OfflineMembersDetailsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/OfflineMembersDetailsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/OfflineMembersDetailsJUnitTest.java
index b752d9c..9710c63 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/OfflineMembersDetailsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/OfflineMembersDetailsJUnitTest.java
@@ -25,20 +25,17 @@ import java.net.InetAddress;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID;
 import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberID;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- *
- */
 @Category(UnitTest.class)
-public class OfflineMembersDetailsJUnitTest extends TestCase {
-  
+public class OfflineMembersDetailsJUnitTest {
+
+  @Test
   public void testSerialization() throws Exception {
     Set<PersistentMemberID>[] offlineMembers = new Set[5];
     for(int i =0; i < offlineMembers.length; i++) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionLoadModelJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionLoadModelJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionLoadModelJUnitTest.java
index 35e48bc..97a5fd8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionLoadModelJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionLoadModelJUnitTest.java
@@ -42,7 +42,6 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.partition.PartitionMemberInfo;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
 import com.gemstone.gemfire.internal.cache.partitioned.rebalance.BucketOperator.Completion;
 import com.gemstone.gemfire.internal.cache.partitioned.rebalance.CompositeDirector;
 import com.gemstone.gemfire.internal.cache.partitioned.rebalance.PartitionedRegionLoadModel;
@@ -52,12 +51,9 @@ import com.gemstone.gemfire.internal.cache.partitioned.rebalance.SimulatedBucket
 import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberID;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- *
- */
-@SuppressWarnings("synthetic-access")
 @Category(UnitTest.class)
 public class PartitionedRegionLoadModelJUnitTest {
+
   private static final int MAX_MOVES = 5000;
   private static final boolean DEBUG = true;
   
@@ -72,7 +68,6 @@ public class PartitionedRegionLoadModelJUnitTest {
    * This test checks basic redundancy satisfaction. It creates two
    * buckets with low redundancy and 1 bucket with full redundancy and excepts
    * copies of the low redundancy buckets to be made. 
-   * @throws Exception
    */
   @Test
   public void testRedundancySatisfaction() throws Exception {
@@ -106,7 +101,6 @@ public class PartitionedRegionLoadModelJUnitTest {
    * This test creates buckets with low redundancy, but only 1 of the buckets
    * is small enough to be copied. The other bucket should be rejected because
    * it is too big..
-   * @throws Exception
    */
   @Test
   public void testRedundancySatisfactionWithSizeLimit() throws Exception {
@@ -152,7 +146,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   
   /**
    * This test makes sure we ignore the size limit if requested
-   * @throws Exception
    */
   @Test
   public void testRedundancySatisfactionDoNotEnforceLocalMaxMemory() throws Exception {
@@ -188,7 +181,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Tests to make sure that redundancy satisfaction prefers to
    * make redundant copies on members with remote IP addresses.
-   * @throws Exception
    */
   @Test
   public void testRedundancySatisfactionPreferRemoteIp() throws Exception {
@@ -256,7 +248,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Tests to make sure that redundancy satisfaction balances
    * between nodes to ensure an even load.
-   * @throws Exception
    */
   @Test
   public void testRedundancySatisfactionBalanced() throws Exception {
@@ -286,7 +277,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Tests to make sure that redundancy satisfaction balances
    * between nodes to ensure an even load.
-   * @throws Exception
    */
   @Test
   public void testColocatedRegions() throws Exception {
@@ -367,7 +357,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Test that we enforce local max memory on a per region basis
    * IE if one of the regions has a low lmm, it will prevent a bucket move
-   * @throws Exception
    */
   @Test
   public void testColocationEnforceLocalMaxMemory() throws Exception {
@@ -404,7 +393,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Test that each region indivually honors it's enforce local max
    * memory flag.
-   * @throws Exception
    */
   @Test
   public void testColocationIgnoreEnforceLocalMaxMemory() throws Exception {
@@ -444,8 +432,7 @@ public class PartitionedRegionLoadModelJUnitTest {
    * Test which illustrates the problem with our greedy algorithm. It doesn't
    * necessarily end up with a balanced result.
    * 
-   *  TODO rebalance - change this test of fix the algorithm?
-   * @throws Exception
+   * TODO rebalance - change this test or fix the algorithm?
    */
   @Ignore
   @Test
@@ -471,13 +458,13 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Tests to make sure that redundancy satisfaction balances
    * between nodes to ensure an even load.
-   * @throws Exception
    */
   @Test
   public void testRedundancySatisfactionWithFailures() throws Exception {
     InternalDistributedMember member1 = new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 1);
     final InternalDistributedMember member2 = new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 2);
     InternalDistributedMember member3 = new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 3);
+
     MyBucketOperator op = new MyBucketOperator() {
       @Override
       public void createRedundantBucket(
@@ -489,7 +476,6 @@ public class PartitionedRegionLoadModelJUnitTest {
           super.createRedundantBucket(targetMember, i, colocatedRegionBytes, completion);
         }
       }
-      
     };
     
     PartitionedRegionLoadModel model = new PartitionedRegionLoadModel(op ,1, 4, getAddressComparor(false), Collections.<InternalDistributedMember>emptySet(), null);
@@ -516,7 +502,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Test that redundancy satisfation can handle asynchronous failures
    * and complete the job correctly. 
-   * @throws Exception
    */
   @Test
   public void testRedundancySatisfactionWithAsyncFailures() throws Exception {
@@ -568,7 +553,6 @@ public class PartitionedRegionLoadModelJUnitTest {
    * Very basic test of moving primaries. Creates two nodes and four buckets, with a copy
    * of each bucket on both nodes. All of the primaries are on one node. It expects half the
    * primaries to move to the other node.
-   * @throws Exception
    */
   @Test
   public void testMovePrimaries() throws Exception {
@@ -596,7 +580,6 @@ public class PartitionedRegionLoadModelJUnitTest {
    * Test that we can move primaries if failures occur during the move.
    * In this case member2 is bad, so primaries should move
    * to member3 instead.
-   * @throws Exception
    */
   @Test
   public void testMovePrimariesWithFailures() throws Exception {
@@ -636,7 +619,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   
   /**
    * Test of moving primaries when nodes are weighted relative to each other
-   * @throws Exception
    */
   @Test
   public void testMovePrimariesWithWeights() throws Exception {
@@ -676,9 +658,6 @@ public class PartitionedRegionLoadModelJUnitTest {
    * Member1   P  P P  P P  P  X  X  X
    * Member2   R  R R R R  R  P  P  R
    * Member3   X  X  X X X  X  R  R  P
-   * 
-   * 
-   * @throws Exception
    */
   @Test
   public void testPrimaryShuffle() throws Exception {
@@ -710,7 +689,6 @@ public class PartitionedRegionLoadModelJUnitTest {
 
   /**
    * Test a case where we seem to get into an infinite loop while balancing primaries.
-   * @throws Exception
    */
   @Test
   public void testBug39953() throws Exception {
@@ -740,7 +718,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   
   /**
    * Very basic test of moving buckets. Creates two nodes and four buckets, with buckets only on one node. Half of the buckets should move to the other node. 
-   * @throws Exception
    */
   @Test
   public void testMoveBuckets() throws Exception {
@@ -768,15 +745,14 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Test that moving buckets will work if there are failures while moving buckets
    * member2 refuses the buckets, so the buckets should move to member3
-   * @throws Exception
    */
   @Test
   public void testMoveBucketsWithFailures() throws Exception {
     InternalDistributedMember member1 = new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 1);
     final InternalDistributedMember member2 = new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 2);
     InternalDistributedMember member3 = new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 3);
+
     MyBucketOperator op = new MyBucketOperator() {
-      
       @Override
       public boolean moveBucket(InternalDistributedMember source,
           InternalDistributedMember target, int id,
@@ -787,6 +763,7 @@ public class PartitionedRegionLoadModelJUnitTest {
         return super.moveBucket(source, target, id, colocatedRegionBytes);
       }
     };
+
     PartitionedRegionLoadModel model = new PartitionedRegionLoadModel(op ,0, 4, getAddressComparor(false), Collections.<InternalDistributedMember>emptySet(), null);
     //Create some imbalanced nodes
     PartitionMemberInfoImpl details1 = buildDetails(member1, 500, 500, new long[] {1,1,1,1}, new long[] {1,1,1,1});
@@ -810,7 +787,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Test to make sure that we honor the weight
    * of a node while moving buckets. 
-   * @throws Exception
    */
   @Test
   public void testMoveBucketsWithWeights() throws Exception {
@@ -841,7 +817,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Test to make sure we honor the size of buckets when
    * choosing which buckets to move.
-   * @throws Exception
    */
   @Test
   public void testMoveBucketsWithSizes() throws Exception {
@@ -872,7 +847,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Test to move buckets with redundancy.
    * Makes sure that buckets and primaries are balanced
-   * @throws Exception
    */
   @Test
   public void testMoveBucketsWithRedundancy() throws Exception {
@@ -914,7 +888,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Test to move buckets with some large buckets (to make sure there are no issues with buffer overflow);
    * Makes sure that buckets and primaries are balanced
-   * @throws Exception
    */
   @Test
   public void testMoveLargeBucketsWithRedundancy() throws Exception {
@@ -958,7 +931,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Test to make sure that moving buckets
    * honors size restrictions for VMs.
-   * @throws Exception
    */
   @Test
   public void testMoveBucketsWithSizeLimits() throws Exception {
@@ -995,7 +967,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * Test to make sure that moving buckets
    * honors size critical members
-   * @throws Exception
    */
   @Test
   public void testMoveBucketsWithCriticalMember() throws Exception {
@@ -1025,7 +996,8 @@ public class PartitionedRegionLoadModelJUnitTest {
     assertEquals(expectedMoves, new HashSet<Move>(bucketOperator.bucketMoves));
   }
 
-  /** Test to make sure two runs with the same information
+  /**
+   * Test to make sure two runs with the same information
    * perform the same moves. 
    */
   @Test
@@ -1069,9 +1041,9 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * This is more of a simulation than a test
    */
-  @Ignore
+  @Ignore("not a real test")
   @Test
-  public void z_testRandom() throws Exception {
+  public void testRandom() throws Exception {
     long seed = System.nanoTime();
     System.out.println("random seed=" + seed);
     try  {
@@ -1130,7 +1102,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   /**
    * This test makes sure that we rebalance correctly
    * with multiple levels of colocation. See bug #40943
-   * @throws Exception
    */
   @Test
   public void testManyColocatedRegions() throws Exception {
@@ -1163,7 +1134,6 @@ public class PartitionedRegionLoadModelJUnitTest {
   
   /**
    * Test to make sure than redundancy satisfaction ignores offline members
-   * @throws Exception
    */
   @Test
   public void testRedundancySatisficationWithOfflineMembers() throws Exception {
@@ -1173,9 +1143,7 @@ public class PartitionedRegionLoadModelJUnitTest {
     
     PartitionMemberInfoImpl details1 = buildDetails(member1, 200, 200, new long[] {30,0,28,30,23}, new long[] {1,0,1,1,1});
     PartitionMemberInfoImpl details2 = buildDetails(member2, 200, 200, new long[] {0,23,0,0,0}, new long[] {0,1,0,0,0});
-    
-    
-    
+
     //Two buckets have an offline members
     Set<PersistentMemberID> o = Collections.singleton(new PersistentMemberID());
     Set<PersistentMemberID> x = Collections.emptySet();
@@ -1201,8 +1169,6 @@ public class PartitionedRegionLoadModelJUnitTest {
     PartitionMemberInfoImpl details1 = buildDetails(member1, 480, 480, new long[] {1,1,1,1,1,1}, new long[] {1,1,1,1,1,1});
     PartitionMemberInfoImpl details2 = buildDetails(member2, 480, 480, new long[] {0,0,0,0,0,0}, new long[] {0,0,0,0,0,0});
     
-    
-    
     //Each bucket has an offline member
     Set<PersistentMemberID> o = Collections.singleton(new PersistentMemberID());
     Set<PersistentMemberID> x = Collections.emptySet();
@@ -1282,20 +1248,24 @@ public class PartitionedRegionLoadModelJUnitTest {
   
   private static AddressComparor getAddressComparor(final boolean enforceUniqueZones) {
     return new AddressComparor() {
+
+      @Override
       public boolean areSameZone(InternalDistributedMember member1,
           InternalDistributedMember member2) {
         return member1.getInetAddress().equals(member2.getInetAddress());
       }
 
+      @Override
       public boolean enforceUniqueZones() {
         return enforceUniqueZones;
       }
     };
   }
  
-  public static class Create {
-    public final InternalDistributedMember targetMember;
-    public final int bucketId;
+  private static class Create {
+
+    private final InternalDistributedMember targetMember;
+    private final int bucketId;
     
     public Create(InternalDistributedMember targetMember, int bucketId) {
       this.targetMember = targetMember;
@@ -1336,15 +1306,17 @@ public class PartitionedRegionLoadModelJUnitTest {
         return false;
       return true;
     }
-    
+
+    @Override
     public String toString() {
       return "Create[member=" + targetMember+",bucketId=" + bucketId +"]";
     }
   }
   
-  public static class Remove {
-    public final InternalDistributedMember targetMember;
-    public final int bucketId;
+  private static class Remove {
+
+    private final InternalDistributedMember targetMember;
+    private final int bucketId;
     
     public Remove(InternalDistributedMember targetMember, int bucketId) {
       this.targetMember = targetMember;
@@ -1385,21 +1357,24 @@ public class PartitionedRegionLoadModelJUnitTest {
         return false;
       return true;
     }
-    
+
+    @Override
     public String toString() {
       return "Remove[member=" + targetMember+",bucketId=" + bucketId +"]";
     }
   }
   
-  public static class Move {
-    public final InternalDistributedMember sourceMember;
-    public final InternalDistributedMember targetMember;
+  private static class Move {
+
+    private final InternalDistributedMember sourceMember;
+    private final InternalDistributedMember targetMember;
 
     public Move(InternalDistributedMember sourceMember,
         InternalDistributedMember targetMember) {
       this.sourceMember = sourceMember;
       this.targetMember = targetMember;
     }
+
     @Override
     public int hashCode() {
       final int prime = 31;
@@ -1410,6 +1385,7 @@ public class PartitionedRegionLoadModelJUnitTest {
           + ((this.targetMember == null) ? 0 : this.targetMember.hashCode());
       return result;
     }
+
     @Override
     public boolean equals(Object obj) {
       if (this == obj)
@@ -1431,19 +1407,20 @@ public class PartitionedRegionLoadModelJUnitTest {
         return false;
       return true;
     }
-    
+
+    @Override
     public String toString() {
       return "Move[source=" + sourceMember+",target=" + targetMember + "]";
     }
   }
   
-  public static class MyBucketOperator extends SimulatedBucketOperator {
-    public List<Create> creates = new ArrayList<Create>();
-    public List<Remove> removes = new ArrayList<Remove>();
-    public List<Move> primaryMoves = new ArrayList<Move>();
-    public List<Move> bucketMoves = new ArrayList<Move>();
+  private static class MyBucketOperator extends SimulatedBucketOperator {
+
+    private List<Create> creates = new ArrayList<Create>();
+    private List<Remove> removes = new ArrayList<Remove>();
+    private List<Move> primaryMoves = new ArrayList<Move>();
+    private List<Move> bucketMoves = new ArrayList<Move>();
     private MoveType lastMove = null;
-    
 
     @Override
     public void createRedundantBucket(
@@ -1489,18 +1466,18 @@ public class PartitionedRegionLoadModelJUnitTest {
       lastMove = MoveType.REMOVE;
       return true;
     }
-    
-    
   }
   
-  public static class BucketOperatorWithFailures extends MyBucketOperator {
-    List<Completion> pendingSuccesses = new ArrayList<Completion>();
-    List<Completion> pendingFailures = new ArrayList<Completion>();
-    Set<InternalDistributedMember> badMembers = new HashSet<InternalDistributedMember> ();
+  private static class BucketOperatorWithFailures extends MyBucketOperator {
+
+    private List<Completion> pendingSuccesses = new ArrayList<Completion>();
+    private List<Completion> pendingFailures = new ArrayList<Completion>();
+    private Set<InternalDistributedMember> badMembers = new HashSet<InternalDistributedMember> ();
 
     public void addBadMember(InternalDistributedMember member) {
       this.badMembers.add(member);
     }
+
     @Override
     public void createRedundantBucket(InternalDistributedMember targetMember,
         int i, Map<String, Long> colocatedRegionBytes, Completion completion) {
@@ -1508,6 +1485,7 @@ public class PartitionedRegionLoadModelJUnitTest {
         pendingFailures.add(completion);
       } else {
         super.createRedundantBucket(targetMember, i, colocatedRegionBytes, new Completion() {
+
           @Override
           public void onSuccess() {
           }
@@ -1518,11 +1496,11 @@ public class PartitionedRegionLoadModelJUnitTest {
         });
         
         pendingSuccesses.add(completion);
-;      }
+      }
     }
   }
   
-  private static enum MoveType {
+  private enum MoveType {
     CREATE,
     MOVE_PRIMARY,
     MOVE_BUCKET,
@@ -1541,15 +1519,18 @@ public class PartitionedRegionLoadModelJUnitTest {
       this.offlineMembers = offlineMembers;
     }
 
+    @Override
     public Set<PersistentMemberID> getOfflineMembers(int bucketId) {
       return this.offlineMembers;
     }
 
+    @Override
     public void fromData(DataInput in) throws IOException,
         ClassNotFoundException {
       offlineMembers = DataSerializer.readObject(in);
     }
 
+    @Override
     public void toData(DataOutput out) throws IOException {
       DataSerializer.writeObject(offlineMembers, out);
       


[11/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/DataSerializableJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/DataSerializableJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/DataSerializableJUnitTest.java
index f1574bc..9249afd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/DataSerializableJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/DataSerializableJUnitTest.java
@@ -16,52 +16,76 @@
  */
 package com.gemstone.gemfire.internal;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.DataOutput;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.InetAddress;
+import java.nio.ByteBuffer;
 import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.Properties;
+import java.util.Random;
+import java.util.Stack;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.UUID;
+import java.util.Vector;
 import java.util.concurrent.TimeUnit;
 
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import com.gemstone.gemfire.CanonicalInstantiator;
 import com.gemstone.gemfire.DataSerializable;
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.Instantiator;
-import com.gemstone.gemfire.CanonicalInstantiator;
 import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.InternalInstantiator;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import java.io.*;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.InetAddress;
-import java.nio.ByteBuffer;
-import java.util.*;
-
-import junit.framework.*;
-
-import org.junit.experimental.categories.Category;
-
 /**
  * Tests the functionality of the {@link DataSerializable} class.
  *
  * @since 3.0
  */
 @Category(UnitTest.class)
-public class DataSerializableJUnitTest extends TestCase
-  implements Serializable {
+public class DataSerializableJUnitTest implements Serializable {
 
   /** A <code>ByteArrayOutputStream</code> that data is serialized to */
   private transient ByteArrayOutputStream baos;
 
-  public DataSerializableJUnitTest(String name) {
-    super(name);
-  }
-
-  ////////  Helper methods
+  @Rule
+  public transient TestName testName = new TestName();
 
   /**
    * Creates a new <code>ByteArrayOutputStream</code> for this test to
    * work with.
    */
+  @Before
   public void setUp() {
     this.baos = new ByteArrayOutputStream();
   }
@@ -73,14 +97,14 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Returns a <code>DataOutput</code> to write to
    */
-  protected DataOutputStream getDataOutput() {
+  private DataOutputStream getDataOutput() {
     return new DataOutputStream(this.baos);
   }
 
   /**
    * Returns a <code>DataInput</code> to read from
    */
-  protected DataInput getDataInput() {
+  private DataInput getDataInput() {
     // changed this to use ByteBufferInputStream to give us better
     // test coverage of this class.
     ByteBuffer bb = ByteBuffer.wrap(this.baos.toByteArray());
@@ -88,7 +112,7 @@ public class DataSerializableJUnitTest extends TestCase
     return bbis;
   }
 
-  protected DataInputStream getDataInputStream() {
+  private DataInputStream getDataInputStream() {
     ByteBuffer bb = ByteBuffer.wrap(this.baos.toByteArray());
     ByteBufferInputStream bbis = new ByteBufferInputStream(bb);
     return new DataInputStream(bbis);
@@ -97,27 +121,17 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Returns a random number generator
    */
-  protected Random getRandom() {
-    long seed =
-      Long.getLong("SEED", System.currentTimeMillis()).longValue();
-    System.out.println("SEED for " + this.getName() + ": " + seed);
+  private Random getRandom() {
+    long seed = Long.getLong("SEED", System.currentTimeMillis()).longValue();
+    System.out.println("SEED for " + this.testName.getMethodName() + ": " + seed);
     return new Random(seed);
   }
 
-  protected static void fail(String s, Throwable t) {
-    StringWriter sw = new StringWriter();
-    PrintWriter pw = new PrintWriter(sw, true);
-    pw.println(s);
-    t.printStackTrace(pw);
-    fail(sw.toString());
-  }
-
-  ////////  Test methods
-
   /**
    * Tests data serializing a {@link Class}
    */
-  public void testClass() throws IOException, ClassNotFoundException {
+  @Test
+  public void testClass() throws Exception {
     Class c = this.getClass();
 
     DataOutputStream out = getDataOutput();
@@ -131,11 +145,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link Class} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testClassObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testClassObject() throws Exception {
     Class c = this.getClass();
 
     DataOutputStream out = getDataOutput();
@@ -147,9 +160,8 @@ public class DataSerializableJUnitTest extends TestCase
     assertEquals(c, c2);
   }
 
-  public void testBigInteger()
-  throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testBigInteger() throws Exception {
     BigInteger o = new BigInteger("12345678901234567890");
 
     DataOutputStream out = getDataOutput();
@@ -160,9 +172,9 @@ public class DataSerializableJUnitTest extends TestCase
     BigInteger o2 = (BigInteger) DataSerializer.readObject(in);
     assertEquals(o, o2);
   }
-  public void testBigDecimal()
-  throws IOException, ClassNotFoundException {
 
+  @Test
+  public void testBigDecimal() throws Exception {
     BigDecimal o = new BigDecimal("1234567890.1234567890");
 
     DataOutputStream out = getDataOutput();
@@ -173,9 +185,9 @@ public class DataSerializableJUnitTest extends TestCase
     BigDecimal o2 = (BigDecimal) DataSerializer.readObject(in);
     assertEquals(o, o2);
   }
-  public void testUUID()
-  throws IOException, ClassNotFoundException {
 
+  @Test
+  public void testUUID() throws Exception {
     UUID o = UUID.randomUUID();
 
     DataOutputStream out = getDataOutput();
@@ -186,9 +198,9 @@ public class DataSerializableJUnitTest extends TestCase
     UUID o2 = (UUID) DataSerializer.readObject(in);
     assertEquals(o, o2);
   }
-  public void testTimestamp()
-  throws IOException, ClassNotFoundException {
 
+  @Test
+  public void testTimestamp() throws Exception {
     Timestamp o = new Timestamp(new Date().getTime() + 79);
 
     DataOutputStream out = getDataOutput();
@@ -203,7 +215,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a {@link Date}
    */
-  public void testDate() throws IOException {
+  @Test
+  public void testDate() throws Exception {
     Date date = new Date();
 
     DataOutputStream out = getDataOutput();
@@ -217,11 +230,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link Date} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testDateObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testDateObject() throws Exception {
     Date date = new Date();
 
     DataOutputStream out = getDataOutput();
@@ -236,7 +248,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a {@link File}
    */
-  public void testFile() throws IOException {
+  @Test
+  public void testFile() throws Exception {
     File file = new File(System.getProperty("user.dir"));
 
     DataOutputStream out = getDataOutput();
@@ -250,11 +263,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link File} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testFileObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testFileObject() throws Exception {
     File file = new File(System.getProperty("user.dir"));
 
     DataOutputStream out = getDataOutput();
@@ -269,7 +281,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a {@link InetAddress}
    */
-  public void testInetAddress() throws IOException {
+  @Test
+  public void testInetAddress() throws Exception {
     InetAddress address = InetAddress.getLocalHost();
 
     DataOutputStream out = getDataOutput();
@@ -277,18 +290,17 @@ public class DataSerializableJUnitTest extends TestCase
     out.flush();
 
     DataInput in = getDataInput();
-    InetAddress address2 = 
+    InetAddress address2 =
       DataSerializer.readInetAddress(in);
     assertEquals(address, address2);
   }
 
   /**
    * Tests data serializing a {@link InetAddress} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testInetAddressObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testInetAddressObject() throws Exception {
     InetAddress address = InetAddress.getLocalHost();
 
     DataOutputStream out = getDataOutput();
@@ -303,11 +315,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing <code>null</code> using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testNullObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testNullObject() throws Exception {
     Object value = null;
 
     DataOutputStream out = getDataOutput();
@@ -320,8 +331,9 @@ public class DataSerializableJUnitTest extends TestCase
   }
 
   /**
-   * Tests data serializing a non-<code>null</code> {@link String} 
+   * Tests data serializing a non-<code>null</code> {@link String}
    */
+  @Test
   public void testString() throws Exception {
     String value = "Hello";
 
@@ -337,6 +349,7 @@ public class DataSerializableJUnitTest extends TestCase
     assertEquals(value, value2);
   }
 
+  @Test
   public void testUtfString() throws Exception {
     String value = "Hello" + Character.MIN_VALUE + Character.MAX_VALUE;
 
@@ -352,7 +365,7 @@ public class DataSerializableJUnitTest extends TestCase
     assertEquals(value, value2);
   }
 
-  
+  @Test
   public void testBigString() throws Exception {
     StringBuffer sb = new StringBuffer(100000);
     for (int i=0; i < 100000; i++) {
@@ -371,10 +384,11 @@ public class DataSerializableJUnitTest extends TestCase
     value2 = (String)DataSerializer.readObject(in);
     assertEquals(value, value2);
   }
-  
+
   /**
-   * * Tests data serializing a non-<code>null</code> {@link String} longer than 64k.
+   * Tests data serializing a non-<code>null</code> {@link String} longer than 64k.
    */
+  @Test
   public void testBigUtfString() throws Exception {
     StringBuffer sb = new StringBuffer(100000);
     for (int i=0; i < 100000; i++) {
@@ -399,9 +413,10 @@ public class DataSerializableJUnitTest extends TestCase
   }
 
   /**
-   * Tests data serializing a non-ascii {@link String} 
-   */   
-  public void testNonAsciiString() throws IOException {
+   * Tests data serializing a non-ascii {@link String}
+   */
+  @Test
+  public void testNonAsciiString() throws Exception {
     basicTestString("Hello1" + '\u0000');
     setUp();
     basicTestString("Hello2" + '\u0080');
@@ -421,16 +436,19 @@ public class DataSerializableJUnitTest extends TestCase
   }
 
   /**
-   * Tests data serializing a <code>null</code> {@link String} 
+   * Tests data serializing a <code>null</code> {@link String}
    */
-//   public void testNullString() throws IOException {
-//     basicTestString(null);
-//   }
+  @Ignore("for unknown reason")
+  @Test
+   public void testNullString() throws Exception {
+     basicTestString(null);
+   }
 
   /**
    * Tests data serializing a {@link Boolean}
    */
-  public void testBoolean() throws IOException {
+  @Test
+  public void testBoolean() throws Exception {
     Boolean value = new Boolean(getRandom().nextInt() % 2 == 0);
 
     DataOutputStream out = getDataOutput();
@@ -444,10 +462,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link Boolean} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testBooleanObject()
-    throws IOException, ClassNotFoundException {
+  @Test
+  public void testBooleanObject() throws Exception {
 
     Boolean value = new Boolean(getRandom().nextInt() % 2 == 0);
 
@@ -460,6 +478,7 @@ public class DataSerializableJUnitTest extends TestCase
     assertEquals(value, value2);
   }
 
+  @Test
   public void testWriteObjectAsByteArray() throws Exception {
     // make sure recursive calls to WriteObjectAsByteArray work to test bug 38194
     Object v = new WOABA();
@@ -479,7 +498,7 @@ public class DataSerializableJUnitTest extends TestCase
     }
   }
 
-  static class WOABA implements DataSerializable {
+  private static class WOABA implements DataSerializable {
     private byte[] deserialized;
     private WOABA2 f = new WOABA2();
     public WOABA() {
@@ -503,7 +522,8 @@ public class DataSerializableJUnitTest extends TestCase
       this.deserialized = DataSerializer.readByteArray(in);
     }
   }
-  static class WOABA2 implements DataSerializable {
+
+  private  static class WOABA2 implements DataSerializable {
     private byte[] deserialized;
     private String f = "foobar";
     public WOABA2() {
@@ -517,11 +537,12 @@ public class DataSerializableJUnitTest extends TestCase
       this.deserialized = DataSerializer.readByteArray(in);
     }
   }
-  
+
   /**
    * Tests data serializing a {@link Character}
    */
-  public void testCharacter() throws IOException {
+  @Test
+  public void testCharacter() throws Exception {
     char c = (char) ('A' + getRandom().nextInt('Z' - 'A'));
     Character value = new Character(c);
 
@@ -536,11 +557,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link Character} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testCharacterObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testCharacterObject() throws Exception {
     char c = (char) ('A' + getRandom().nextInt('Z' - 'A'));
     Character value = new Character(c);
 
@@ -556,7 +576,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a {@link Byte}
    */
-  public void testByte() throws IOException {
+  @Test
+  public void testByte() throws Exception {
     Byte value = new Byte((byte) getRandom().nextInt());
 
     DataOutputStream out = getDataOutput();
@@ -570,11 +591,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link Byte} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testByteObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testByteObject() throws Exception {
     Byte value = new Byte((byte) getRandom().nextInt());
 
     DataOutputStream out = getDataOutput();
@@ -589,6 +609,7 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a {@link Short}
    */
+  @Test
   public void testShort() throws IOException {
     Short value = new Short((short) getRandom().nextInt());
 
@@ -603,8 +624,9 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link Short} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
+  @Test
   public void testShortObject()
     throws IOException, ClassNotFoundException {
 
@@ -622,7 +644,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a {@link Integer}
    */
-  public void testInteger() throws IOException {
+  @Test
+  public void testInteger() throws Exception {
     Integer value = new Integer(getRandom().nextInt());
 
     DataOutputStream out = getDataOutput();
@@ -636,11 +659,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link Integer} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testIntegerObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testIntegerObject() throws Exception {
     Integer value = new Integer(getRandom().nextInt());
 
     DataOutputStream out = getDataOutput();
@@ -655,7 +677,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a {@link Long}
    */
-  public void testLong() throws IOException {
+  @Test
+  public void testLong() throws Exception {
     Long value = new Long(getRandom().nextLong());
 
     DataOutputStream out = getDataOutput();
@@ -669,11 +692,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link Long} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testLongObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testLongObject() throws Exception {
     Long value = new Long(getRandom().nextLong());
 
     DataOutputStream out = getDataOutput();
@@ -688,7 +710,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a {@link Float}
    */
-  public void testFloat() throws IOException {
+  @Test
+  public void testFloat() throws Exception {
     Float value = new Float(getRandom().nextFloat());
 
     DataOutputStream out = getDataOutput();
@@ -702,11 +725,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link Float} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testFloatObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testFloatObject() throws Exception {
     Float value = new Float(getRandom().nextFloat());
 
     DataOutputStream out = getDataOutput();
@@ -721,7 +743,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a {@link Double}
    */
-  public void testDouble() throws IOException {
+  @Test
+  public void testDouble() throws Exception {
     Double value = new Double(getRandom().nextDouble());
 
     DataOutputStream out = getDataOutput();
@@ -735,11 +758,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a {@link Double} using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testDoubleObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testDoubleObject() throws Exception {
     Double value = new Double(getRandom().nextDouble());
 
     DataOutputStream out = getDataOutput();
@@ -754,9 +776,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a <code>byte</code> array
    */
-  public void testByteArray()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testByteArray() throws Exception {
     byte[] array = new byte[] { (byte) 4, (byte) 5, (byte) 6 };
 
     DataOutputStream out = getDataOutput();
@@ -778,11 +799,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a <code>byte</code> array using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testByteArrayObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testByteArrayObject() throws Exception {
     byte[] array = new byte[] { (byte) 4, (byte) 5, (byte) 6 };
 
     DataOutputStream out = getDataOutput();
@@ -801,9 +821,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a <code>short</code> array
    */
-  public void testShortArray()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testShortArray() throws Exception {
     short[] array = new short[] { (short) 4, (short) 5, (short) 6 };
 
     DataOutputStream out = getDataOutput();
@@ -821,11 +840,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a <code>short</code> array using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testShortArrayObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testShortArrayObject() throws Exception {
     short[] array = new short[] { (short) 4, (short) 5, (short) 6 };
 
     DataOutputStream out = getDataOutput();
@@ -844,9 +862,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a <code>String</code> array
    */
-  public void testStringArray()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testStringArray() throws Exception {
     Random random = getRandom();
 
     String[] array =
@@ -871,9 +888,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing a <code>String</code> array that contains
    * a <code>null</code> <code>String</code>.
    */
-  public void testStringArrayWithNull()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testStringArrayWithNull() throws Exception {
     Random random = getRandom();
 
     String[] array =
@@ -896,11 +912,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a <code>String</code> array using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testStringArrayObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testStringArrayObject() throws Exception {
     Random random = getRandom();
 
     String[] array =
@@ -924,9 +939,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a <code>int</code> array
    */
-  public void testIntArray()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testIntArray() throws Exception {
     int[] array = new int[] {  4,  5, 6 };
 
     DataOutputStream out = getDataOutput();
@@ -944,11 +958,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a <code>int</code> array using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testIntArrayObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testIntArrayObject() throws Exception {
     int[] array = new int[] { 4, 5, 6 };
 
     DataOutputStream out = getDataOutput();
@@ -967,9 +980,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a <code>long</code> array
    */
-  public void testLongArray()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testLongArray() throws Exception {
     long[] array = new long[] { 4, 5, 6 };
 
     DataOutputStream out = getDataOutput();
@@ -987,11 +999,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a <code>long</code> array using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testLongArrayObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testLongArrayObject() throws Exception {
     long[] array = new long[] { 4, 5, 6 };
 
     DataOutputStream out = getDataOutput();
@@ -1010,9 +1021,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a <code>float</code> array
    */
-  public void testFloatArray()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testFloatArray() throws Exception {
     float[] array =
       new float[] { (float) 4.0, (float) 5.0, (float) 6.0 };
 
@@ -1031,11 +1041,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a <code>float</code> array using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testFloatArrayObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testFloatArrayObject() throws Exception {
     float[] array =
       new float[] { (float) 4.0, (float) 5.0, (float) 6.0 };
 
@@ -1055,9 +1064,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a <code>double</code> array
    */
-  public void testDoubleArray()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testDoubleArray() throws Exception {
     double[] array =
       new double[] { 4.0, 5.0, 6.0 };
 
@@ -1076,11 +1084,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a <code>double</code> array using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testDoubleArrayObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testDoubleArrayObject() throws Exception {
     double[] array =
       new double[] { 4.0, 5.0, 6.0 };
 
@@ -1100,9 +1107,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing a <code>Object</code> array
    */
-  public void testObjectArray()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testObjectArray() throws Exception {
     Random random = getRandom();
     SerializableImpl[] array = new SerializableImpl[] {
       new SerializableImpl(random), new SerializableImpl(random),
@@ -1125,11 +1131,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a <code>Object</code> array using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testObjectArrayObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testObjectArrayObject() throws Exception {
     Random random = getRandom();
     SerializableImpl[] array = new SerializableImpl[] {
       new SerializableImpl(random), new SerializableImpl(random),
@@ -1154,9 +1159,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests serializing an object that is {@link
    * DataSerializableJUnitTest.SerializableImpl not specially cased}.
    */
-  public void testUnspecialObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testUnspecialObject() throws Exception {
     Object o = new SerializableImpl(getRandom());
 
     DataOutputStream out = getDataOutput();
@@ -1170,11 +1174,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests serializing an object that implements {@link
-   * DataSerializable} 
+   * DataSerializable}
    */
-  public void testDataSerializable()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testDataSerializable() throws Exception {
     DataSerializable ds = new DataSerializableImpl(getRandom());
 
     DataOutputStream out = getDataOutput();
@@ -1189,11 +1192,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests serializing an object that implements {@link
-   * DataSerializable} 
+   * DataSerializable}
    */
-  public void testVersionedDataSerializable()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testVersionedDataSerializable() throws Exception {
     VersionedDataSerializableImpl ds = new VersionedDataSerializableImpl(getRandom());
 
     VersionedDataOutputStream v = new VersionedDataOutputStream(this.baos, Version.GFE_70);
@@ -1213,9 +1215,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests writing a {@link com.gemstone.gemfire.DataSerializable.Replaceable} object
    */
-  public void testReplaceable()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testReplaceable() throws Exception {
     Object o = new ReplaceableImpl();
 
     DataOutputStream out = getDataOutput();
@@ -1230,8 +1231,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link ArrayList}
    */
-  public void testArrayList()
-    throws IOException, ClassNotFoundException {
+  @Test
+  public void testArrayList() throws Exception {
     tryArrayList(-1);
     tryArrayList(50);
     tryArrayList(0x100);
@@ -1261,9 +1262,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing an {@link ArrayList} using {@link
    * DataSerializer#writeObject}.
    */
-  public void testArrayListObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testArrayListObject() throws Exception {
     Random random = getRandom();
     ArrayList list = new ArrayList();
     int size = random.nextInt(50);
@@ -1284,9 +1284,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link HashSet}
    */
-  public void testHashSet()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testHashSet() throws Exception {
     Random random = getRandom();
     HashSet set = new HashSet();
     int size = random.nextInt(50);
@@ -1307,9 +1306,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing an {@link HashSet} using {@link
    * DataSerializer#writeObject}.
    */
-  public void testHashSetObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testHashSetObject() throws Exception {
     Random random = getRandom();
     HashSet set = new HashSet();
     int size = random.nextInt(50);
@@ -1330,9 +1328,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link TreeSet}
    */
-  public void testTreeSet()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testTreeSet() throws Exception {
     Random random = getRandom();
     TreeSet set = new TreeSet();
     int size = random.nextInt(50);
@@ -1356,9 +1353,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link TreeSet}
    */
-  public void testTreeSetWithComparator()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testTreeSetWithComparator() throws Exception {
     Random random = getRandom();
     int size = random.nextInt(50);
     TreeSet set = new TreeSet(new MyComparator(size));
@@ -1384,9 +1380,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing an {@link TreeSet} using {@link
    * DataSerializer#writeObject}.
    */
-  public void testTreeSetObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testTreeSetObject() throws Exception {
     Random random = getRandom();
     TreeSet set = new TreeSet();
     int size = random.nextInt(50);
@@ -1407,9 +1402,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link HashMap}
    */
-  public void testHashMap()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testHashMap() throws Exception {
     Random random = getRandom();
     HashMap map = new HashMap();
     int size = random.nextInt(50);
@@ -1432,9 +1426,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing an {@link HashMap} using {@link
    * DataSerializer#writeObject}.
    */
-  public void testHashMapObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testHashMapObject() throws Exception {
     Random random = getRandom();
     HashMap map = new HashMap();
     int size = random.nextInt(50);
@@ -1457,9 +1450,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link TreeMap}
    */
-  public void testTreeMap()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testTreeMap() throws Exception {
     Random random = getRandom();
     TreeMap map = new TreeMap();
     int size = random.nextInt(50);
@@ -1485,9 +1477,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link TreeMap}
    */
-  public void testTreeMapWithComparator()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testTreeMapWithComparator() throws Exception {
     Random random = getRandom();
     int size = random.nextInt(50);
     TreeMap map = new TreeMap(new MyComparator(size));
@@ -1527,14 +1518,13 @@ public class DataSerializableJUnitTest extends TestCase
       return false;
     }
   }
-  
+
   /**
    * Tests data serializing an {@link TreeMap} using {@link
    * DataSerializer#writeObject}.
    */
-  public void testTreeMapObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testTreeMapObject() throws Exception {
     Random random = getRandom();
     TreeMap map = new TreeMap();
     int size = random.nextInt(50);
@@ -1557,9 +1547,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link LinkedHashSet}
    */
-  public void testLinkedHashSet()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testLinkedHashSet() throws Exception {
     Random random = getRandom();
     LinkedHashSet set = new LinkedHashSet();
     int size = random.nextInt(50);
@@ -1580,9 +1569,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing an {@link LinkedHashSet} using {@link
    * DataSerializer#writeObject}.
    */
-  public void testLinkedHashSetObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testLinkedHashSetObject() throws Exception {
     Random random = getRandom();
     LinkedHashSet set = new LinkedHashSet();
     int size = random.nextInt(50);
@@ -1603,9 +1591,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link Hashtable}
    */
-  public void testHashtable()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testHashtable() throws Exception {
     Random random = getRandom();
     Hashtable map = new Hashtable();
     int size = random.nextInt(50);
@@ -1628,9 +1615,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing an {@link Hashtable} using {@link
    * DataSerializer#writeObject}.
    */
-  public void testHashtableObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testHashtableObject() throws Exception {
     Random random = getRandom();
     Hashtable map = new Hashtable();
     int size = random.nextInt(50);
@@ -1653,9 +1639,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link IdentityHashMap}
    */
-  public void testIdentityHashMap()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testIdentityHashMap() throws Exception {
     Random random = getRandom();
     IdentityHashMap map = new IdentityHashMap();
     int size = random.nextInt(50);
@@ -1678,9 +1663,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing an {@link IdentityHashMap} using {@link
    * DataSerializer#writeObject}.
    */
-  public void testIdentityHashMapObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testIdentityHashMapObject() throws Exception {
     Random random = getRandom();
     IdentityHashMap map = new IdentityHashMap();
     int size = random.nextInt(50);
@@ -1703,9 +1687,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link Vector}
    */
-  public void testVector()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testVector() throws Exception {
     Random random = getRandom();
     Vector list = new Vector();
     int size = random.nextInt(50);
@@ -1726,9 +1709,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing an {@link Vector} using {@link
    * DataSerializer#writeObject}.
    */
-  public void testVectorObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testVectorObject() throws Exception {
     Random random = getRandom();
     Vector list = new Vector();
     int size = random.nextInt(50);
@@ -1749,9 +1731,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests data serializing an {@link Stack}
    */
-  public void testStack()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testStack() throws Exception {
     Random random = getRandom();
     Stack list = new Stack();
     int size = random.nextInt(50);
@@ -1772,9 +1753,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing an {@link Stack} using {@link
    * DataSerializer#writeObject}.
    */
-  public void testStackObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testStackObject() throws Exception {
     Random random = getRandom();
     Stack list = new Stack();
     int size = random.nextInt(50);
@@ -1796,9 +1776,8 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests data serializing {@link TimeUnit}s using {@link
    * DataSerializer#writeObject}.
    */
-  public void testTimeUnitObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testTimeUnitObject() throws Exception {
     DataOutputStream out = getDataOutput();
     for (TimeUnit v: TimeUnit.values()) {
       DataSerializer.writeObject(v, out, false /* no java serialization allowed */);
@@ -1811,9 +1790,8 @@ public class DataSerializableJUnitTest extends TestCase
     }
   }
 
-  public void testProperties()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testProperties() throws Exception {
     DataOutputStream out = getDataOutput();
     DataSerializer.writeProperties(new Properties(), out);
     DataSerializer.writeProperties(null, out);
@@ -1842,6 +1820,7 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests that registering a <code>Serializer</code> with id 0 throws
    * an exception.
    */
+  @Test
   public void testSerializerZero() {
     try {
       DataSerializer.register(DS0.class);
@@ -1851,7 +1830,8 @@ public class DataSerializableJUnitTest extends TestCase
       // pass...
     }
   }
-  static class DS0 extends DataSerializerImpl {
+
+  private static class DS0 extends DataSerializerImpl {
     public int getId() {
       return 0;
     }
@@ -1864,6 +1844,7 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests that registering two <code>Serializer</code>s with the same
    * id throws an exception.
    */
+  @Test
   public void testRegisterTwoSerializers() {
     byte id = (byte) 42;
     DataSerializer.register(DS42.class);
@@ -1891,6 +1872,7 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests that an <code>IOException</code> is thrown when the
    * serializer for an object cannot be found.
    */
+  @Test
   public void testNoDeSerializer() throws Exception {
     Random random = new Random();
 
@@ -1913,13 +1895,14 @@ public class DataSerializableJUnitTest extends TestCase
     } finally {
       InternalDataSerializer.GetMarker.WAIT_MS = savVal;
     }
-     
+
   }
 
   /**
    * Tests that a late-registering <code>DataSerializable</code>
    * indeed causes a waiting readObject() method to be notified.
    */
+  @Test
   public void testLateDeSerializer() throws Exception {
     Random random = new Random();
 
@@ -1972,6 +1955,7 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests that a late-registering <code>Instantiator</code>
    * indeed causes a waiting readObject() method to be notified.
    */
+  @Test
   public void testLateInstantiator() throws Exception {
     Random random = new Random();
 
@@ -2028,6 +2012,7 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Tests that a custom serializer is consulted
    */
+  @Test
   public void testCustomSerializer() throws Exception {
     Random random = new Random();
 
@@ -2051,6 +2036,7 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests that the appropriate exceptions are thrown by {@link
    * Instantiator#register} when given bad input.
    */
+  @Test
   public void testInstantiatorExceptions() {
 
     try {
@@ -2073,21 +2059,6 @@ public class DataSerializableJUnitTest extends TestCase
       // pass...
     }
 
-    // With 1.5's strong typing this code no longer compiles (which is good!)
-//     try {
-//       Instantiator inst = new
-//         Instantiator(SerializableImpl.class, (byte) 42) {
-//           public DataSerializable newInstance() {
-//             return null;
-//           }
-//         };
-//       Instantiator.register(inst);
-//       fail("Should have thrown an IllegalArgumentException");
-
-//     } catch (IllegalArgumentException ex) {
-//       // pass...
-//     }
-
     Instantiator.register(new
                           Instantiator(DataSerializableImpl.class, (byte) 42) {
         public DataSerializable newInstance() {
@@ -2131,6 +2102,7 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests that an <code>Instantiator</code> is invoked at the
    * appropriate times.
    */
+  @Test
   public void testInstantiator() throws Exception {
     final boolean[] wasInvoked = new boolean[] { false };
     Instantiator.register(new
@@ -2158,6 +2130,7 @@ public class DataSerializableJUnitTest extends TestCase
     }
   }
 
+  @Test
   public void testInstantiator2() throws Exception {
     final boolean[] wasInvoked = new boolean[] { false };
     Instantiator.register(new
@@ -2185,6 +2158,7 @@ public class DataSerializableJUnitTest extends TestCase
     }
   }
 
+  @Test
   public void testInstantiator4() throws Exception {
     final boolean[] wasInvoked = new boolean[] { false };
     Instantiator.register(new
@@ -2212,7 +2186,7 @@ public class DataSerializableJUnitTest extends TestCase
     }
   }
 
-  static class Class_testInstantiator extends DataSerializerImpl {
+  private static class Class_testInstantiator extends DataSerializerImpl {
     public static Class supClass;
 
     public int getId() {
@@ -2230,11 +2204,12 @@ public class DataSerializableJUnitTest extends TestCase
       return false;
     }
   }
-  
+
   /**
    * Tests that an <code>CanonicalInstantiator</code> is invoked at the
    * appropriate times.
    */
+  @Test
   public void testCanonicalInstantiator() throws Exception {
     final boolean[] wasInvoked = new boolean[] { false };
     Instantiator.register(new
@@ -2262,11 +2237,13 @@ public class DataSerializableJUnitTest extends TestCase
       InternalInstantiator.unregister(CanonicalDataSerializableImpl.class, (byte) 45);
     }
   }
+
   /**
    * Tests that only one serializer is invoked when a serializer
    * specifies its supported classes.
    * Alos tests UDDS1.
    */
+  @Test
   public void testSupportedClasses() throws Exception {
     DataSerializer ds1 = DataSerializer.register(Class_testSupportedClasses1.class);
     int id = ds1.getId();
@@ -2293,6 +2270,7 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Make sure a user defined ds with an id of 2 bytes works.
    */
+  @Test
   public void testUDDS2() throws Exception {
     DataSerializer ds2 = DataSerializer.register(Class_testSupportedClasses3.class);
     int id2 = ds2.getId();
@@ -2315,6 +2293,7 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * Make sure a user defined ds with an id of42 bytes works.
    */
+  @Test
   public void testUDDS4() throws Exception {
     DataSerializer ds2 = DataSerializer.register(Class_testSupportedClasses4.class);
     int id2 = ds2.getId();
@@ -2334,7 +2313,7 @@ public class DataSerializableJUnitTest extends TestCase
     }
   }
 
-  static class Class_testSupportedClasses1 extends DataSerializerImpl {
+  private static class Class_testSupportedClasses1 extends DataSerializerImpl {
     public int getId() {
       return 29;
     }
@@ -2343,7 +2322,7 @@ public class DataSerializableJUnitTest extends TestCase
     }
     public boolean toData(Object o, DataOutput out)
       throws IOException {
-      
+
       if (o instanceof NonDataSerializable) {
         fail("toData() should not be invoked with a " +
              "NonDataSerializable");
@@ -2351,8 +2330,8 @@ public class DataSerializableJUnitTest extends TestCase
       return false;
     }
   }
-  
-  static class Class_testSupportedClasses2
+
+  private static class Class_testSupportedClasses2
     extends NonDataSerializable.NonDSSerializer {
     public static boolean wasInvoked = false;
     public static boolean toDataInvoked = false;
@@ -2376,7 +2355,7 @@ public class DataSerializableJUnitTest extends TestCase
     }
   }
 
-  static class Class_testSupportedClasses3
+  private static class Class_testSupportedClasses3
     extends NonDataSerializable.NonDSSerializer {
     public static boolean wasInvoked = false;
     public static boolean toDataInvoked = false;
@@ -2399,23 +2378,31 @@ public class DataSerializableJUnitTest extends TestCase
       return super.fromData(in);
     }
   }
-  static class Class_testSupportedClasses4
-    extends NonDataSerializable.NonDSSerializer {
+
+  private static class Class_testSupportedClasses4 extends NonDataSerializable.NonDSSerializer {
+
     public static boolean wasInvoked = false;
     public static boolean toDataInvoked = false;
     public static boolean fromDataInvoked = false;
+
     public int getId() {
       return 1000000;
     }
+
+    @Override
     public Class[] getSupportedClasses() {
       wasInvoked = true;
       return super.getSupportedClasses();
     }
+
+    @Override
     public boolean toData(Object o, DataOutput out)
       throws IOException {
       toDataInvoked = true;
       return super.toData(o, out);
     }
+
+    @Override
     public Object fromData(DataInput in)
       throws IOException, ClassNotFoundException {
       fromDataInvoked = true;
@@ -2429,9 +2416,10 @@ public class DataSerializableJUnitTest extends TestCase
    *
    * This test is disabled due a bug in JaCoCo 0.6.2 agent while
    * handling stackoverflow exceptions during tests.
-   *
    */
-  public void disabled_testCyclicalObjectGraph() throws IOException {
+  @Ignore("disabled due a bug in JaCoCo 0.6.2 agent while handling stackoverflow exceptions")
+  @Test
+  public void testCyclicalObjectGraph() throws Exception {
     Link link1 = new Link(1);
     Link link2 = new Link(2);
     link1.next = link2;
@@ -2458,13 +2446,14 @@ public class DataSerializableJUnitTest extends TestCase
     } finally {
       SystemFailureTestHook.setExpectedFailureClass(null);
     }
-    
+
   }
 
   /**
    * Tests that data serializing the same object through two different
    * reference paths does not preserve referential integrity.
    */
+  @Test
   public void testReferentialIntegrity() throws Exception {
     Link top = new Link(1);
     Link left = new Link(2);
@@ -2499,20 +2488,23 @@ public class DataSerializableJUnitTest extends TestCase
    * Tests that <code>RegistrationListener</code>s are invoked at the
    * proper times.
    */
+  @Test
   public void testRegistrationListeners() {
     final DataSerializer[] array = new DataSerializer[2];
 
     TestRegistrationListener l1 = new TestRegistrationListener() {
+        @Override
         public void newDataSerializer2(DataSerializer ds) {
           array[0] = ds;
         }
       };
     TestRegistrationListener l2 = new TestRegistrationListener() {
+        @Override
         public void newDataSerializer2(DataSerializer ds) {
           array[1] = ds;
         }
       };
-    
+
     InternalDataSerializer.addRegistrationListener(l1);
     InternalDataSerializer.addRegistrationListener(l2);
 
@@ -2535,22 +2527,25 @@ public class DataSerializableJUnitTest extends TestCase
     Class c = DataSerializableImpl.class;
     id = (byte) 100;
     final Instantiator inst0 = new Instantiator(c, id) {
+        @Override
         public DataSerializable newInstance() {
           return new DataSerializableImpl();
         }
       };
 
     TestRegistrationListener l3 = new TestRegistrationListener() {
+        @Override
         public void newInstantiator2(Instantiator inst) {
           assertEquals(inst0, inst);
         }
       };
     TestRegistrationListener l4 = new TestRegistrationListener() {
+        @Override
         public void newInstantiator2(Instantiator inst) {
           assertEquals(inst0, inst);
         }
       };
-    
+
     InternalDataSerializer.addRegistrationListener(l3);
     InternalDataSerializer.addRegistrationListener(l4);
 
@@ -2566,15 +2561,20 @@ public class DataSerializableJUnitTest extends TestCase
     }
   }
 
-  static class DS42 extends DataSerializerImpl {
+  private static class DS42 extends DataSerializerImpl {
+
+    @Override
     public int getId() {
       return 42;
     }
+
+    @Override
     public Class[] getSupportedClasses() {
       return new Class[]{DS42.class};
     }
   }
 
+  @Test
   public void testIllegalSupportedClasses() {
     tryToSupport(String.class);
     tryToSupport(java.net.InetAddress.class);
@@ -2615,6 +2615,7 @@ public class DataSerializableJUnitTest extends TestCase
     tryToSupport(String[].class);
     tryToSupport(Object[].class);
   }
+
   private void tryToSupport(final Class c) {
     illegalClass = c;
     try {
@@ -2630,8 +2631,8 @@ public class DataSerializableJUnitTest extends TestCase
   }
 
   protected static Class illegalClass = null;
-  
-  public static class IllegalDS extends DataSerializerImpl {
+
+  private static class IllegalDS extends DataSerializerImpl {
     public IllegalDS() {
     }
     public int getId() {
@@ -2641,6 +2642,7 @@ public class DataSerializableJUnitTest extends TestCase
       return new Class[]{illegalClass};
     }
   }
+
   /**
    * Data serializes and then data de-serializes the given object and
    * asserts that the class of object the pre- and post- data
@@ -2664,9 +2666,8 @@ public class DataSerializableJUnitTest extends TestCase
    *
    * @since 4.0
    */
-  public void testSubclasses()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testSubclasses() throws Exception {
     checkClass(new Date());
     checkClass(new Date(){ });
 
@@ -2715,7 +2716,8 @@ public class DataSerializableJUnitTest extends TestCase
    * {@link StatArchiveWriter#readCompactValue}. Also added test for
    * ByteBufferInputStream#readUnsigned* methods (bug #41197).
    */
-  public void testStatArchiveCompactValueSerialization() throws IOException {
+  @Test
+  public void testStatArchiveCompactValueSerialization() throws Exception {
     // test all combos of valueToTest and + and -offsets
     long[] valuesToTest = new long[] { 0, Byte.MAX_VALUE, Byte.MIN_VALUE,
         Short.MAX_VALUE, Short.MIN_VALUE, Integer.MAX_VALUE, Integer.MIN_VALUE,
@@ -2778,15 +2780,13 @@ public class DataSerializableJUnitTest extends TestCase
     }
   }
 
-  ///////////////////////  Inner Classes  ///////////////////////
-
   /**
    * A <code>DataSerializer</code> that provides default
    * implementations of its methods.
    */
-  static abstract class DataSerializerImpl extends DataSerializer {
-    public DataSerializerImpl() {
+  private static abstract class DataSerializerImpl extends DataSerializer {
 
+    public DataSerializerImpl() {
     }
 
     public boolean toData(Object o, DataOutput out)
@@ -2806,7 +2806,8 @@ public class DataSerializableJUnitTest extends TestCase
    * A class that implements {@link Serializable} and has fields of
    * each type.
    */
-  public static class SerializableImpl implements Serializable {
+  private static class SerializableImpl implements Serializable {
+
     protected byte byteField;
     protected short shortField;
     protected int intField;
@@ -2830,8 +2831,6 @@ public class DataSerializableJUnitTest extends TestCase
     protected int unsignedByteField;
     protected int unsignedShortField;
 
-    //////////////////////  Constructors  //////////////////////
-
     /**
      * Creates a new <code>SerializableImpl</code> whose contents
      * is randomly generated.
@@ -2857,7 +2856,7 @@ public class DataSerializableJUnitTest extends TestCase
 
       this.unsignedByteField = random.nextInt(256);
       this.unsignedShortField = random.nextInt(65536);
-      
+
       int length = random.nextInt(100);
       StringBuffer sb = new StringBuffer();
       for (int i = 0; i < length; i++) {
@@ -2877,12 +2876,11 @@ public class DataSerializableJUnitTest extends TestCase
 
     }
 
-    //////////////////////  Instance Methods  //////////////////////
-
     /**
      * Two <code>SerializableImpl</code>s are equal if their
      * contents are equal.
      */
+    @Override
     public boolean equals(Object o) {
       if (!(o instanceof SerializableImpl)) {
         return false;
@@ -2908,13 +2906,14 @@ public class DataSerializableJUnitTest extends TestCase
         this.booleanFieldPrim == other.booleanFieldPrim &&
         this.unsignedByteField == other.unsignedByteField &&
         this.unsignedShortField == other.unsignedShortField &&
-        (this.stringField == null || 
+        (this.stringField == null ||
          this.stringField.equals(other.stringField)) &&
         (this.objectField == null ||
          this.objectField.equals(other.objectField)) &&
         true;
     }
 
+    @Override
     public String toString() {
       StringBuffer sb = new StringBuffer();
       sb.append(this.getClass().getName());
@@ -2952,14 +2951,15 @@ public class DataSerializableJUnitTest extends TestCase
       sb.append(this.objectField);
 
       return sb.toString();
-    } 
+    }
   }
 
   /**
    * A class that implements {@link DataSerializable}
+   *
+   * Also used by DataTypeJUnitTest
    */
-  public static class DataSerializableImpl extends SerializableImpl
-    implements DataSerializable {
+  public static class DataSerializableImpl extends SerializableImpl implements DataSerializable {
 
     /**
      * Creates a new <code>DataSerializableImpl</code> whose contents
@@ -2977,6 +2977,7 @@ public class DataSerializableJUnitTest extends TestCase
       super();
     }
 
+    @Override
     public void toData(DataOutput out) throws IOException {
       DataSerializer.writeByte(new Byte(this.byteField), out);
       DataSerializer.writeShort(new Short(this.shortField), out);
@@ -3003,6 +3004,7 @@ public class DataSerializableJUnitTest extends TestCase
       DataSerializer.writeObject(this.objectField, out);
     }
 
+    @Override
     public void fromData(DataInput in)
       throws IOException, ClassNotFoundException {
 
@@ -3032,44 +3034,52 @@ public class DataSerializableJUnitTest extends TestCase
     }
 
   }
-  
-  public static class VersionedDataSerializableImpl extends DataSerializableImpl implements VersionedDataSerializable {
-    public Version[] getSerializationVersions() { return new Version[] { Version.GFE_71 }; }
+
+  private static class VersionedDataSerializableImpl extends DataSerializableImpl implements VersionedDataSerializable {
+
+    @Override
+    public Version[] getSerializationVersions() {
+      return new Version[] { Version.GFE_71 };
+    }
 
     transient boolean preMethodInvoked;
 
-    public VersionedDataSerializableImpl() { }
-    
+    public VersionedDataSerializableImpl() {
+    }
+
     public VersionedDataSerializableImpl(Random random) {
       super(random);
     }
-    
+
     public void toDataPre_GFE_7_1_0_0(DataOutput out) throws IOException {
       this.preMethodInvoked = true;
       toData(out);
     }
-    
+
     public void fromDataPre_GFE_7_1_0_0(DataInput in) throws IOException, ClassNotFoundException {
       this.preMethodInvoked = true;
       fromData(in);
     }
-    
+
     public boolean preMethodInvoked() {
       return this.preMethodInvoked;
     }
   }
 
-  public static class CanonicalDataSerializableImpl extends SerializableImpl
-    implements DataSerializable {
+  private static class CanonicalDataSerializableImpl extends SerializableImpl implements DataSerializable {
+
     private static final byte SINGLETON_BYTE = 23;
     private static final CanonicalDataSerializableImpl singleton = new CanonicalDataSerializableImpl(new Random());
+
     public static CanonicalDataSerializableImpl create() {
         return singleton;
     }
+
     public static CanonicalDataSerializableImpl create(byte b) {
       assertEquals(SINGLETON_BYTE, b);
       return singleton;
     }
+
     /**
      * Creates a new <code>CanonicalDataSerializableImpl</code> whose contents
      * is randomly generated.
@@ -3078,10 +3088,12 @@ public class DataSerializableJUnitTest extends TestCase
       super(random);
     }
 
+    @Override
     public void toData(DataOutput out) throws IOException {
       out.writeByte(SINGLETON_BYTE);
     }
 
+    @Override
     public void fromData(DataInput in)
       throws IOException, ClassNotFoundException {
     }
@@ -3090,11 +3102,11 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * A class that replaces itself with an <code>Integer</code> when
-   * written. 
+   * written.
    */
-  static class ReplaceableImpl
-    implements DataSerializable.Replaceable {
+  private static class ReplaceableImpl implements DataSerializable.Replaceable {
 
+    @Override
     public Object replace() throws IOException {
       return new Integer(42);
     }
@@ -3106,7 +3118,8 @@ public class DataSerializableJUnitTest extends TestCase
    *
    * @since 3.5
    */
-  public static class NonDataSerializable {
+  private static class NonDataSerializable {
+
     protected int intValue;
     protected double doubleValue;
     protected String stringValue;
@@ -3124,7 +3137,6 @@ public class DataSerializableJUnitTest extends TestCase
     }
 
     protected NonDataSerializable() {
-
     }
 
     public boolean equals(Object o) {
@@ -3146,27 +3158,28 @@ public class DataSerializableJUnitTest extends TestCase
         ;
     }
 
-
     /**
      * A <code>Serializer</code> that data serializes instances of
-     * <code>NonDataSerializable</code>. 
+     * <code>NonDataSerializable</code>.
      */
-    public static class NonDSSerializer
-      extends DataSerializer {
+    public static class NonDSSerializer extends DataSerializer {
 
       private static final byte CLASS_ID = (byte) 100;
 
       public NonDSSerializer() {
-
       }
 
+      @Override
       public int getId() {
         return CLASS_ID;
       }
+
+      @Override
       public Class[] getSupportedClasses() {
         return new Class[] {NonDataSerializable.class};
       }
 
+      @Override
       public boolean toData(Object o, DataOutput out)
         throws IOException {
 
@@ -3188,6 +3201,7 @@ public class DataSerializableJUnitTest extends TestCase
         }
       }
 
+      @Override
       public Object fromData(DataInput in)
         throws IOException, ClassNotFoundException {
 
@@ -3209,7 +3223,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * A much more simple class to be data serialized
    */
-  public static class IntWrapper {
+  private static class IntWrapper {
+
     public int intValue;
 
     public static final byte CLASS_ID = (byte) 42;
@@ -3222,6 +3237,7 @@ public class DataSerializableJUnitTest extends TestCase
       this.intValue = intValue;
     }
 
+    @Override
     public boolean equals(Object o) {
       if (o instanceof IntWrapper) {
         IntWrapper other = (IntWrapper) o;
@@ -3236,29 +3252,33 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * A <code>DataSerializable</code> int wrapper
    */
-  public static class DSIntWrapper extends IntWrapper
-    implements DataSerializable {
+  private static class DSIntWrapper extends IntWrapper implements DataSerializable {
 
     public DSIntWrapper(Random random) {
       super(random);
     }
 
+    @Override
     public void toData(DataOutput out) throws IOException {
       out.writeInt(this.intValue);
     }
 
+    @Override
     public void fromData(DataInput in)
       throws IOException, ClassNotFoundException {
 
       this.intValue = in.readInt();
     }
   }
-  
-  public static class SerializableIntWrapper implements Serializable {
+
+  private static class SerializableIntWrapper implements Serializable {
+
     private int data;
+
     public SerializableIntWrapper(int intValue) {
       this.data = intValue;
     }
+
     @Override
     public int hashCode() {
       final int prime = 31;
@@ -3266,6 +3286,7 @@ public class DataSerializableJUnitTest extends TestCase
       result = prime * result + data;
       return result;
     }
+
     @Override
     public boolean equals(Object obj) {
       if (this == obj)
@@ -3284,7 +3305,8 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * A node in an object chain
    */
-  static class Link implements DataSerializable, Serializable {
+  private static class Link implements DataSerializable, Serializable {
+
     private int id;
     Link next;
     Link next2;
@@ -3294,15 +3316,16 @@ public class DataSerializableJUnitTest extends TestCase
     }
 
     public Link() {
-
     }
 
+    @Override
     public void toData(DataOutput out) throws IOException {
       out.writeInt(this.id);
       DataSerializer.writeObject(this.next, out);
       DataSerializer.writeObject(this.next2, out);
     }
 
+    @Override
     public void fromData(DataInput in)
       throws IOException, ClassNotFoundException {
       this.id = in.readInt();
@@ -3314,8 +3337,7 @@ public class DataSerializableJUnitTest extends TestCase
   /**
    * A <code>RegistrationListener</code> used for testing
    */
-  static class TestRegistrationListener
-    implements InternalDataSerializer.RegistrationListener {
+  private static class TestRegistrationListener implements InternalDataSerializer.RegistrationListener {
 
     /** Was this listener invoked? */
     private boolean invoked = false;
@@ -3323,8 +3345,6 @@ public class DataSerializableJUnitTest extends TestCase
     /** An error thrown in a callback */
     private Throwable callbackError = null;
 
-    //////////////////////  Instance Methods  //////////////////////
-
     /**
      * Returns wether or not one of this listener methods was invoked.
      * Before returning, the <code>invoked</code> flag is cleared.
@@ -3335,7 +3355,7 @@ public class DataSerializableJUnitTest extends TestCase
       this.invoked = false;
       return value;
     }
-  
+
     private void checkForError() {
       if (this.callbackError != null) {
         AssertionError error =
@@ -3345,12 +3365,13 @@ public class DataSerializableJUnitTest extends TestCase
       }
     }
 
+    @Override
     public final void newDataSerializer(DataSerializer ds) {
       this.invoked = true;
       try {
         newDataSerializer2(ds);
 
-      } 
+      }
       catch (VirtualMachineError e) {
         SystemFailure.initiateFailure(e);
         throw e;
@@ -3365,12 +3386,13 @@ public class DataSerializableJUnitTest extends TestCase
       throw new UnsupportedOperationException(s);
     }
 
+    @Override
     public final void newInstantiator(Instantiator instantiator) {
       this.invoked = true;
       try {
         newInstantiator2(instantiator);
 
-      } 
+      }
       catch (VirtualMachineError e) {
         SystemFailure.initiateFailure(e);
         throw e;
@@ -3391,11 +3413,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a <code>byte[][]</code> using {@link
-   * DataSerializer#writeObject}. 
+   * DataSerializer#writeObject}.
    */
-  public void testByteArrayArrayObject()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testByteArrayArrayObject() throws Exception {
     byte[] ar0 = new byte[] { (byte) 1, (byte) 2, (byte) 3 };
     byte[] ar1 = new byte[] { (byte) 4, (byte) 5, (byte) 6 };
     byte[] ar2 = new byte[] { (byte) 7, (byte) 8, (byte) 9 };
@@ -3422,11 +3443,10 @@ public class DataSerializableJUnitTest extends TestCase
 
   /**
    * Tests data serializing a <code>byte[][]</code> using {@link
-   * DataSerializer#writeObjectArray}. 
+   * DataSerializer#writeObjectArray}.
    */
-  public void testByteArrayArray()
-    throws IOException, ClassNotFoundException {
-
+  @Test
+  public void testByteArrayArray() throws Exception {
     byte[] ar0 = new byte[] { (byte) 1, (byte) 2, (byte) 3 };
     byte[] ar1 = new byte[] { (byte) 4, (byte) 5, (byte) 6 };
     byte[] ar2 = new byte[] { (byte) 7, (byte) 8, (byte) 9 };
@@ -3452,8 +3472,8 @@ public class DataSerializableJUnitTest extends TestCase
   }
 
   // see bug 41721
-  public void testArrayMinShortLength()
-    throws IOException, ClassNotFoundException {
+  @Test
+  public void testArrayMinShortLength() throws Exception {
     DataOutputStream out = getDataOutput();
     DataSerializer.writeByteArray(new byte[0x8000], out);
     out.flush();
@@ -3462,8 +3482,9 @@ public class DataSerializableJUnitTest extends TestCase
     byte[] array = DataSerializer.readByteArray(in);
     assertEquals(0x8000, array.length);
   }
-  public void testArrayMaxShortLength()
-    throws IOException, ClassNotFoundException {
+
+  @Test
+  public void testArrayMaxShortLength() throws Exception {
     DataOutputStream out = getDataOutput();
     DataSerializer.writeByteArray(new byte[0xFFFF], out);
     out.flush();
@@ -3478,6 +3499,7 @@ public class DataSerializableJUnitTest extends TestCase
    * is > 0xFFFF, but who's utf-8 encoded length is < 0xFFFF
    * See bug 40932.
    */
+  @Test
   public void testStringEncodingLengthCrossesBoundry() throws Exception {
     StringBuffer sb = new StringBuffer(0xFFFF);
     for (int i=0; i < 0xFFFF; i++) {
@@ -3501,16 +3523,18 @@ public class DataSerializableJUnitTest extends TestCase
     assertEquals(value, value2);
   }
 
-  enum DAY_OF_WEEK implements PdxSerializerObject {
+  private enum DAY_OF_WEEK implements PdxSerializerObject {
     MON, TUE, WED, THU, FRI, SAT, SUN
   }
-  enum MONTH implements PdxSerializerObject {
+
+  private enum MONTH implements PdxSerializerObject {
     JAN, FEB, MAR
   }
-  
+
   /**
    * Tests Dataserializing an Enum
    */
+  @Test
   public void testEnum() throws Exception {
     DAY_OF_WEEK e = DAY_OF_WEEK.SUN;
     MONTH m = MONTH.FEB;
@@ -3543,6 +3567,7 @@ public class DataSerializableJUnitTest extends TestCase
     assertEquals(m, m2);
   }
 
+  @Test
   public void testObjectEnum() throws Exception {
     final String propName = "DataSerializer.DEBUG";
     System.setProperty(propName, "true");
@@ -3553,7 +3578,7 @@ public class DataSerializableJUnitTest extends TestCase
       DataSerializer.writeObject(e, out);
       DataSerializer.writeObject(m, out);
       out.flush();
-  
+
       DataInput in = getDataInput();
       DAY_OF_WEEK e2 = (DAY_OF_WEEK)DataSerializer.readObject(in);
       MONTH m2 = (MONTH)DataSerializer.readObject(in);
@@ -3565,14 +3590,15 @@ public class DataSerializableJUnitTest extends TestCase
       System.getProperties().remove(propName);
     }
   }
-  
+
   /**
    * Usually the DataInput instance passed to DataSerializer.readObject is an instance of InputStream.
    * Make sure that an object that uses standard java serialization can be written and read from a
    * DataInput that is not an instance of InputStream.
    * See bug 47249.
    */
-  public void testOddDataInput() throws IOException, ClassNotFoundException {
+  @Test
+  public void testOddDataInput() throws Exception {
     SerializableIntWrapper o = new SerializableIntWrapper(-1);
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataSerializer.writeObject(o, new DataOutputStream(baos));
@@ -3581,7 +3607,8 @@ public class DataSerializableJUnitTest extends TestCase
     assertEquals (o, o2);
   }
   
-  public static class OddDataInput implements DataInput {
+  private static class OddDataInput implements DataInput {
+
     private ByteBufferInputStream bbis;
 
     public OddDataInput(ByteBuffer bb) {
@@ -3664,7 +3691,6 @@ public class DataSerializableJUnitTest extends TestCase
     }
   }
 
-
-  class Foo {
+  private class Foo {
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/FileUtilJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/FileUtilJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/FileUtilJUnitTest.java
index 31211c6..473c180 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/FileUtilJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/FileUtilJUnitTest.java
@@ -30,12 +30,9 @@ import java.io.IOException;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-/**
- *
- */
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class FileUtilJUnitTest {
   
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireVersionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireVersionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireVersionJUnitTest.java
index 60995bb..fc4ab1b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireVersionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireVersionJUnitTest.java
@@ -16,30 +16,32 @@
  */
 package com.gemstone.gemfire.internal;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 /**
  * This test prints out the version information obtained from the
  * {@link GemFireVersion} class.  It provides a record of what version
  * of GemFire (and the JDK) was used to run the unit tests.
  */
 @Category(UnitTest.class)
-public class GemFireVersionJUnitTest extends TestCase {
+public class GemFireVersionJUnitTest {
 
   /**
    * Prints both the GemFire version info and the system properties.
    * We have to print both 
    */
+  @Test
   public void testPrintInfo() {
-	ByteArrayOutputStream baos = new ByteArrayOutputStream();
-	PrintStream ps = new PrintStream(baos);
+	  ByteArrayOutputStream baos = new ByteArrayOutputStream();
+	  PrintStream ps = new PrintStream(baos);
     GemFireVersion.print(ps);
     final String versionOutput = baos.toString();
     System.out.println(versionOutput);
@@ -50,6 +52,7 @@ public class GemFireVersionJUnitTest extends TestCase {
     assertTrue(versionOutput.contains("Running on:"));
   }
 
+  @Test
   public void testMajorMinorVersions() {
     assertEquals(1, GemFireVersion.getMajorVersion("1.0.3"));
     assertEquals(33, GemFireVersion.getMajorVersion("33.0.3"));
@@ -77,7 +80,8 @@ public class GemFireVersionJUnitTest extends TestCase {
     assertTrue("7.0.2.13 should be == 7.0.2.13", GemFireVersion.compareVersions("7.0.2.13", "7.0.2.13", true) == 0);
     assertTrue("7.0.2.15 should be > 7.0.2.13", GemFireVersion.compareVersions("7.0.2.14", "7.0.2.13", true) > 0);
   }
-  
+
+  @Test
   public void testVersionClass() throws Exception {
     compare(Version.GFE_662, Version.GFE_66);
     compare(Version.GFE_6622, Version.GFE_662);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/HeapDataOutputStreamJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/HeapDataOutputStreamJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/HeapDataOutputStreamJUnitTest.java
index 966da83..f723d4c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/HeapDataOutputStreamJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/HeapDataOutputStreamJUnitTest.java
@@ -16,13 +16,14 @@
  */
 package com.gemstone.gemfire.internal;
 
+import static org.junit.Assert.*;
+
 import java.io.DataInputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
-import junit.framework.TestCase;
-
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.DataSerializer;
@@ -35,11 +36,11 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
  * TODO right now this just tests the new
  * write(ByteBuffer) method. We might want
  * to add some unit tests for the existing methods.
- *
  */
 @Category(UnitTest.class)
-public class HeapDataOutputStreamJUnitTest extends TestCase {
-  
+public class HeapDataOutputStreamJUnitTest {
+
+  @Test
   public void testWriteByteBuffer() {
     HeapDataOutputStream out = new HeapDataOutputStream(64, Version.CURRENT);
     
@@ -56,8 +57,8 @@ public class HeapDataOutputStreamJUnitTest extends TestCase {
     
     assertEquals(new String(bytes) , new String(actual));
   }
-  
 
+  @Test
   public void testWriteByteBufferCopyUseBuffer() {
     ByteBuffer buf = ByteBuffer.allocate(32);
     HeapDataOutputStream out = new HeapDataOutputStream(buf, Version.CURRENT, true);
@@ -95,6 +96,7 @@ public class HeapDataOutputStreamJUnitTest extends TestCase {
     assertEquals(expected, tmp);
   }
 
+  @Test
   public void testWriteByteBufferNoCopyUseBuffer() {
     ByteBuffer buf = ByteBuffer.allocate(32);
     HeapDataOutputStream out = new HeapDataOutputStream(buf, Version.CURRENT, true);
@@ -135,7 +137,8 @@ public class HeapDataOutputStreamJUnitTest extends TestCase {
     ByteBuffer expected = ByteBuffer.wrap(expectedBytes);
     assertEquals(expected, tmp);
   }
-  
+
+  @Test
   public void testWriteJavaSerializeNoCopy() throws IOException, ClassNotFoundException {
     byte[] bytes = new byte[2000];
     for (int i = 0; i < bytes.length; i++) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/LineWrapUnitJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/LineWrapUnitJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/LineWrapUnitJUnitTest.java
index 93d55dc..39baa16 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/LineWrapUnitJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/LineWrapUnitJUnitTest.java
@@ -16,21 +16,20 @@
  */
 package com.gemstone.gemfire.internal;
 
+import static org.junit.Assert.*;
+
 import java.util.Arrays;
 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;
-
-/**
- *
- */
 @Category(UnitTest.class)
-public class LineWrapUnitJUnitTest extends TestCase {
-  
+public class LineWrapUnitJUnitTest {
+
+  @Test
   public void test() {
     String test = new String("aaa aaaaa  aaa aaaa");
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/NanoTimerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/NanoTimerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/NanoTimerJUnitTest.java
index 6ecd9f2..b017e25 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/NanoTimerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/NanoTimerJUnitTest.java
@@ -22,7 +22,6 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.NanoTimer.TimeService;
-import com.gemstone.gemfire.internal.util.StopWatch;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
@@ -33,21 +32,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class NanoTimerJUnitTest {
   
-  /**
-   * Simple deterministic clock. Any time you want
-   * your clock to tick call incTime.
-   */
-  private class TestTimeService implements TimeService {
-    private long now;
-    public void incTime() {
-      this.now++;
-    }
-    @Override
-    public long getTime() {
-      return this.now;
-    }
-  }
-
   @Test
   public void testMillisToNanos() {
     assertEquals(0, NanoTimer.millisToNanos(0));
@@ -130,4 +114,19 @@ public class NanoTimerJUnitTest {
     assertTrue(timer.getTimeSinceReset() < timer.getTimeSinceConstruction());
     assertTrue(timer.getTimeSinceReset() <= ts.getTime() - timer.getLastResetTime());
   }
+
+  /**
+   * Simple deterministic clock. Any time you want
+   * your clock to tick call incTime.
+   */
+  private class TestTimeService implements TimeService {
+    private long now;
+    public void incTime() {
+      this.now++;
+    }
+    @Override
+    public long getTime() {
+      return this.now;
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/ObjIdMapJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/ObjIdMapJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/ObjIdMapJUnitTest.java
index 5ce3926..ce9b997 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/ObjIdMapJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/ObjIdMapJUnitTest.java
@@ -16,27 +16,28 @@
  */
 package com.gemstone.gemfire.internal;
 
+import static org.junit.Assert.*;
+
 import java.lang.ref.WeakReference;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.*;
-
 /**
  * This class tests the functionality of the {@link ObjIdMap} class.
  */
 @Category(UnitTest.class)
-public class ObjIdMapJUnitTest extends TestCase {
-
-  public ObjIdMapJUnitTest(String name) {
-    super(name);
-  }
-
-  ////////  Test methods
+public class ObjIdMapJUnitTest {
 
+  @Test
   public void testSimplePut() {
     ObjIdMap map = new ObjIdMap();
     int key = 4;
@@ -45,12 +46,14 @@ public class ObjIdMapJUnitTest extends TestCase {
     assertSame(value, map.get(key));
   }
 
+  @Test
   public void testGetNotThere() {
     ObjIdMap map = new ObjIdMap();
     int key = 4;
     assertSame(null, map.get(key));
   }
 
+  @Test
   public void testSimpleContainsKey() {
     ObjIdMap map = new ObjIdMap();
     int key = 4;
@@ -59,6 +62,7 @@ public class ObjIdMapJUnitTest extends TestCase {
     assertTrue(map.containsKey(key));
   }
 
+  @Test
   public void testSimpleRemove() {
     ObjIdMap map = new ObjIdMap();
     int key = 4;
@@ -67,6 +71,7 @@ public class ObjIdMapJUnitTest extends TestCase {
     assertSame(value, map.remove(key));
   }
 
+  @Test
   public void testSimpleValues() {
     ObjIdMap map = new ObjIdMap();
     for (int i = 0; i < 20; i++) {
@@ -88,6 +93,7 @@ public class ObjIdMapJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testRandomMap() {
     final ObjIdMap map = new ObjIdMap();
     final int size = 1000;
@@ -157,8 +163,8 @@ public class ObjIdMapJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testRandomGrowRemoveRelease() {
-
     ObjIdMap map = new ObjIdMap();
     Random random = new Random(System.currentTimeMillis());
     List saver = new ArrayList();
@@ -229,6 +235,7 @@ public class ObjIdMapJUnitTest extends TestCase {
     );
   }
 
+  @Test
   public void testIterator() {
     int size = 10;
     ObjIdMap map = new ObjIdMap();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/OneTaskOnlyDecoratorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/OneTaskOnlyDecoratorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/OneTaskOnlyDecoratorJUnitTest.java
index dc71a85..f57a8fb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/OneTaskOnlyDecoratorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/OneTaskOnlyDecoratorJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.internal;
 
+import static org.junit.Assert.*;
+
 import java.util.concurrent.Callable;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executors;
@@ -23,24 +25,20 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- *
- */
-@SuppressWarnings("synthetic-access")
 @Category(UnitTest.class)
-public class OneTaskOnlyDecoratorJUnitTest extends TestCase {
+public class OneTaskOnlyDecoratorJUnitTest {
   
   /**
    * Test to make sure we only execute the task once
    * no matter how many times we schedule it. 
    */
-  public void testExecuteOnlyOnce() throws InterruptedException {
+  @Test
+  public void testExecuteOnlyOnce() throws Exception {
     ScheduledExecutorService ex = Executors.newScheduledThreadPool(1);
    
     MyConflationListener listener = new MyConflationListener();
@@ -80,7 +78,8 @@ public class OneTaskOnlyDecoratorJUnitTest extends TestCase {
    * Test to make sure we reschedule the task for execution 
    * if it has already in progress.
    */
-  public void testReschedule() throws InterruptedException {
+  @Test
+  public void testReschedule() throws Exception {
     ScheduledExecutorService ex = Executors.newScheduledThreadPool(1);
     OneTaskOnlyExecutor decorator = new OneTaskOnlyExecutor(ex);
     
@@ -121,7 +120,8 @@ public class OneTaskOnlyDecoratorJUnitTest extends TestCase {
    * Test to make sure we reschedule the task for execution 
    * if the new requested execution is earlier than the previous one
    */
-  public void testRescheduleForEarlierTime() throws InterruptedException {
+  @Test
+  public void testRescheduleForEarlierTime() throws Exception {
     ScheduledExecutorService ex = Executors.newScheduledThreadPool(1);
     MyConflationListener listener = new MyConflationListener();
     OneTaskOnlyExecutor decorator = new OneTaskOnlyExecutor(ex, listener);
@@ -149,10 +149,10 @@ public class OneTaskOnlyDecoratorJUnitTest extends TestCase {
     assertTrue(elapsed < TimeUnit.SECONDS.toNanos(120));
   }
 
-
   private static class MyConflationListener extends OneTaskOnlyExecutor.ConflatedTaskListenerAdapter {
     private int dropCount;
 
+    @Override
     public void taskDropped() {
       dropCount++;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/PutAllOperationContextJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/PutAllOperationContextJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/PutAllOperationContextJUnitTest.java
index 835cada..b2ca5c4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/PutAllOperationContextJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/PutAllOperationContextJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.internal;
 
+import static org.junit.Assert.*;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -24,6 +26,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.operations.PutAllOperationContext;
@@ -32,11 +35,10 @@ import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory;
 import com.gemstone.gemfire.internal.cache.Token;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 @Category(UnitTest.class)
-public class PutAllOperationContextJUnitTest extends TestCase {
-  
+public class PutAllOperationContextJUnitTest {
+
+  @Test
   public void testIllegalMapMods() {
     LinkedHashMap<String, String> m = new LinkedHashMap<>();
     m.put("1", "1");
@@ -91,6 +93,7 @@ public class PutAllOperationContextJUnitTest extends TestCase {
   /**
    * Make sure that we do not expose the internal Token.INVALID to customers
    */
+  @Test
   public void testInvalidToken() {
     LinkedHashMap<String, Object> m = new LinkedHashMap<>();
     m.put("INVALID_TOKEN", Token.INVALID);
@@ -111,9 +114,11 @@ public class PutAllOperationContextJUnitTest extends TestCase {
     assertEquals(null, me.getValue());
     assertEquals(Token.INVALID, m.get("INVALID_TOKEN"));
   }
+
   /**
    * Make sure that we do not expose the internal CachedDeserializable to customers
    */
+  @Test
   public void testCachedDeserializable() {
     LinkedHashMap<String, Object> m = new LinkedHashMap<>();
     Object v = Integer.valueOf(99);
@@ -143,6 +148,7 @@ public class PutAllOperationContextJUnitTest extends TestCase {
     assertEquals(hm.hashCode(), opMap.hashCode());
   }
 
+  @Test
   public void testLegalMapMods() {
     LinkedHashMap<String, String> m = new LinkedHashMap<>();
     m.put("1", "1");


[12/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderJUnitTest.java
deleted file mode 100755
index 2a1db52..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderJUnitTest.java
+++ /dev/null
@@ -1,1261 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Enumeration;
-import java.util.Vector;
-
-import junit.framework.TestCase;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.generic.ClassGen;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-/**
- * Test the {@link ClassPathLoader}.
- * 
- * @since 6.5.1.4
- */
-@Category(UnitTest.class)
-public class ClassPathLoaderJUnitTest extends TestCase {
-
-  private static final int TEMP_FILE_BYTES_COUNT = 256;
-  private static final int GENERATED_CLASS_BYTES_COUNT = 362;
-
-  private static final String ORIGINAL_EXCLUDE_TCCL_VALUE;
-  
-  private boolean deleteExtDir = false;
-  private boolean deleteLibDir = false;
-
-  static {
-    ORIGINAL_EXCLUDE_TCCL_VALUE = System.getProperty(ClassPathLoader.EXCLUDE_TCCL_PROPERTY, Boolean
-        .toString(ClassPathLoader.EXCLUDE_TCCL_DEFAULT_VALUE));
-
-    exploreClassLoaders(); // optional output for developer's convenience
-  }
-
-  private volatile File tempFile;
-  private volatile File tempFile2;
-
-  public ClassPathLoaderJUnitTest(String name) {
-    super(name);
-  }
-
-  @Override
-  public void setUp() throws Exception {
-    System.setProperty(ClassPathLoader.EXCLUDE_TCCL_PROPERTY, "false");
-
-    File workingDir = new File(System.getProperty("user.dir")).getAbsoluteFile();
-    this.tempFile = File.createTempFile("ClassPathLoaderJUnitTest.", null, workingDir);
-    FileOutputStream fos = new FileOutputStream(this.tempFile);
-    fos.write(new byte[TEMP_FILE_BYTES_COUNT]);
-    fos.close();
-
-    this.tempFile2 = File.createTempFile("ClassPathLoaderJUnitTest.", null, workingDir);
-    fos = new FileOutputStream(this.tempFile2);
-    fos.write(new byte[TEMP_FILE_BYTES_COUNT]);
-    fos.close();
-  }
-
-  @Override
-  public void tearDown() throws Exception {
-    System.setProperty(ClassPathLoader.EXCLUDE_TCCL_PROPERTY, ORIGINAL_EXCLUDE_TCCL_VALUE);
-    
-    // these deletions fail on windows
-//    if (this.deleteLibDir) {
-//      FileUtil.delete(ClassPathLoader.EXT_LIB_DIR.getParentFile());
-//    } else {
-//      if (this.deleteExtDir) {
-//        FileUtil.delete(ClassPathLoader.EXT_LIB_DIR);
-//      } else {
-//        FileUtil.delete(new File(ClassPathLoader.EXT_LIB_DIR, "ClassPathLoaderJUnit1.jar"));
-//        FileUtil.delete(new File(ClassPathLoader.EXT_LIB_DIR, "cplju"));
-//      }
-//    }
-    
-    assertTrue(this.tempFile.delete());
-  }
-
-  /**
-   * Verifies that {@link ClassPathLoader#getLatest()} is always initialized and returns a <tt>ClassPathLoader</tt>
-   * instance.
-   */
-  public void testLatestExists() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testLatestExists");
-
-    assertNotNull(ClassPathLoader.getLatest());
-  }
-
-  /**
-   * Verifies that {@link ClassPathLoader#getLatest()} throws <tt>ClassNotFoundException</tt> when class does not exist.
-   */
-  public void testForNameThrowsClassNotFoundException() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testForNameThrowsClassNotFoundException");
-
-    try {
-      String classToLoad = "com.nowhere.DoesNotExist";
-      ClassPathLoader.getLatest().forName(classToLoad);
-      fail();
-    } catch (ClassNotFoundException expected) {
-      // Expected
-    }
-  }
-
-  /**
-   * Verifies that {@link ClassPathLoader#getLatest()} finds and loads class via
-   * <tt>Class.forName(String, boolean, ClassLoader)</tt> when class does exist.
-   */
-  public void testForName() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testForName");
-
-    String classToLoad = "com.gemstone.gemfire.internal.classpathloaderjunittest.DoesExist";
-    Class<?> clazz = ClassPathLoader.getLatest().forName(classToLoad);
-    assertNotNull(clazz);
-  }
-
-  /**
-   * Verifies that {@link ClassPathLoader#getLatest()} can actually <tt>getResource</tt> when it exists.
-   */
-  public void testGetResource() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResource");
-
-    String resourceToGet = "com/gemstone/gemfire/internal/classpathloaderjunittest/DoesExist.class";
-    URL url = ClassPathLoader.getLatest().getResource(resourceToGet);
-    assertNotNull(url);
-
-    InputStream is = url != null ? url.openStream() : null;
-    assertNotNull(is);
-
-    int totalBytesRead = 0;
-    byte[] input = new byte[256];
-
-    BufferedInputStream bis = new BufferedInputStream(is);
-    for (int bytesRead = bis.read(input); bytesRead > -1;) {
-      totalBytesRead += bytesRead;
-      bytesRead = bis.read(input);
-    }
-    bis.close();
-
-    // if the following fails then maybe javac changed and DoesExist.class
-    // contains other than 374 bytes of data... consider updating this test
-    assertEquals(GENERATED_CLASS_BYTES_COUNT, totalBytesRead);
-  }
-
-  /**
-   * Verifies that {@link ClassPathLoader#getLatest()} can actually <tt>getResources</tt> when it exists.
-   */
-  public void testGetResources() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResources");
-
-    String resourceToGet = "com/gemstone/gemfire/internal/classpathloaderjunittest/DoesExist.class";
-    Enumeration<URL> urls = ClassPathLoader.getLatest().getResources(resourceToGet);
-    assertNotNull(urls);
-    assertTrue(urls.hasMoreElements());
-
-    URL url = urls.nextElement();
-    InputStream is = url != null ? url.openStream() : null;
-    assertNotNull(is);
-
-    int totalBytesRead = 0;
-    byte[] input = new byte[256];
-
-    BufferedInputStream bis = new BufferedInputStream(is);
-    for (int bytesRead = bis.read(input); bytesRead > -1;) {
-      totalBytesRead += bytesRead;
-      bytesRead = bis.read(input);
-    }
-    bis.close();
-
-    // if the following fails then maybe javac changed and DoesExist.class
-    // contains other than 374 bytes of data... consider updating this test
-    assertEquals(GENERATED_CLASS_BYTES_COUNT, totalBytesRead);
-  }
-
-  /**
-   * Verifies that {@link ClassPathLoader#getLatest()} can actually <tt>getResourceAsStream</tt> when it exists.
-   */
-  public void testGetResourceAsStream() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceAsStream");
-
-    String resourceToGet = "com/gemstone/gemfire/internal/classpathloaderjunittest/DoesExist.class";
-    InputStream is = ClassPathLoader.getLatest().getResourceAsStream(resourceToGet);
-    assertNotNull(is);
-
-    int totalBytesRead = 0;
-    byte[] input = new byte[256];
-
-    BufferedInputStream bis = new BufferedInputStream(is);
-    for (int bytesRead = bis.read(input); bytesRead > -1;) {
-      totalBytesRead += bytesRead;
-      bytesRead = bis.read(input);
-    }
-    bis.close();
-
-    // if the following fails then maybe javac changed and DoesExist.class
-    // contains other than 374 bytes of data... consider updating this test
-    assertEquals(GENERATED_CLASS_BYTES_COUNT, totalBytesRead);
-  }
-
-  /**
-   * Verifies that the {@link GeneratingClassLoader} works and always generates the named class. This is a control which
-   * ensures that tests depending on <tt>GeneratingClassLoader</tt> are valid.
-   */
-  public void testGeneratingClassLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGeneratingClassLoader");
-
-    ClassLoader gcl = new GeneratingClassLoader();
-    String classToLoad = "com.nowhere.TestGeneratingClassLoader";
-
-    Class<?> clazz = gcl.loadClass(classToLoad);
-    assertNotNull(clazz);
-    assertEquals(classToLoad, clazz.getName());
-
-    Object obj = clazz.newInstance();
-    assertEquals(clazz.getName(), obj.getClass().getName());
-
-    try {
-      Class.forName(classToLoad);
-      fail("Should have thrown ClassNotFoundException");
-    } catch (ClassNotFoundException expected) {
-      // Expected
-    }
-
-    Class<?> clazzForName = Class.forName(classToLoad, true, gcl);
-    assertNotNull(clazzForName);
-    assertEquals(clazz, clazzForName);
-
-    Object objForName = clazzForName.newInstance();
-    assertEquals(classToLoad, objForName.getClass().getName());
-  }
-
-  /**
-   * Verifies that custom loader is used to load class.
-   */
-  public void testForNameWithCustomLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testForNameWithCustomLoader");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    dcl = dcl.addOrReplace(new GeneratingClassLoader());
-
-    String classToLoad = "com.nowhere.TestForNameWithCustomLoader";
-    Class<?> clazz = dcl.forName(classToLoad);
-    assertNotNull(clazz);
-    assertEquals(classToLoad, clazz.getName());
-
-    Object obj = clazz.newInstance();
-    assertEquals(classToLoad, obj.getClass().getName());
-  }
-
-  /**
-   * Verifies that {@link Class#forName(String, boolean, ClassLoader)} used with {@link ClassPathLoader} works as
-   * expected with named object arrays, while {@link ClassLoader#loadClass(String)} throws ClassNotFoundException for
-   * named object arrays.
-   */
-  public void testForNameWithObjectArray() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testForNameWithObjectArray");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-
-    String classToLoad = "[Ljava.lang.String;";
-    Class<?> clazz = null;
-    clazz = dcl.forName(classToLoad);
-    assertEquals(classToLoad, clazz.getName());
-  }
-
-  /**
-   * Verifies that TCCL finds the class when {@link Class#forName(String, boolean, ClassLoader)} uses
-   * {@link ClassPathLoader}.
-   */
-  public void testForNameWithTCCL() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testForNameWithTCCL");
-
-    final ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    final String classToLoad = "com.nowhere.TestForNameWithTCCL";
-
-    try {
-      dcl.forName(classToLoad);
-      fail("Should have thrown ClassNotFoundException");
-    } catch (ClassNotFoundException expected) {
-      // Expected
-    }
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // ensure that TCCL is only CL that can find this class
-      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
-      Class<?> clazz = dcl.forName(classToLoad);
-      assertNotNull(clazz);
-      Object instance = clazz.newInstance();
-      assertNotNull(instance);
-      assertEquals(classToLoad, instance.getClass().getName());
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-
-    try {
-      dcl.forName(classToLoad);
-      fail("Should have thrown ClassNotFoundException");
-    } catch (ClassNotFoundException expected) {
-      // Expected
-    }
-
-  }
-
-  /**
-   * Verifies that the {@link NullClassLoader} works and never finds the named class. This is a control which ensures
-   * that tests depending on <tt>NullClassLoader</tt> are valid.
-   */
-  public void testNullClassLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testNullClassLoader");
-
-    ClassLoader cl = new NullClassLoader();
-    String classToLoad = "java.lang.String";
-
-    try {
-      Class.forName(classToLoad, true, cl);
-      fail();
-    } catch (ClassNotFoundException expected) {
-      // Expected
-    }
-
-    String resourceToGet = "java/lang/String.class";
-
-    URL url = cl.getResource(resourceToGet);
-    assertNull(url);
-
-    InputStream is = cl.getResourceAsStream(resourceToGet);
-    assertNull(is);
-  }
-
-  /**
-   * Verifies that the {@link SimpleClassLoader} works and finds classes that the parent can find. This is a control
-   * which ensures that tests depending on <tt>SimpleClassLoader</tt> are valid.
-   */
-  public void testSimpleClassLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testSimpleClassLoader");
-
-    ClassLoader cl = new SimpleClassLoader(getClass().getClassLoader());
-    String classToLoad = "java.lang.String";
-
-    Class<?> clazz = Class.forName(classToLoad, true, cl);
-    assertNotNull(clazz);
-
-    String resourceToGet = "java/lang/String.class";
-
-    URL url = cl.getResource(resourceToGet);
-    assertNotNull(url);
-
-    InputStream is = cl.getResourceAsStream(resourceToGet);
-    assertNotNull(is);
-  }
-
-  /**
-   * Verifies that the {@link BrokenClassLoader} is broken and always throws errors. This is a control which ensures
-   * that tests depending on <tt>BrokenClassLoader</tt> are valid.
-   */
-  public void testBrokenClassLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testBrokenClassLoader");
-
-    ClassLoader cl = new BrokenClassLoader();
-
-    String classToLoad = "java.lang.String";
-    try {
-      Class.forName(classToLoad, true, cl);
-      fail();
-    } catch (ClassNotFoundException e) {
-      throw e;
-    } catch (BrokenError expected) {
-      // Expected
-    }
-
-    String resourceToGet = "java/lang/String.class";
-    try {
-      cl.getResource(resourceToGet);
-      fail();
-    } catch (BrokenError expected) {
-      // Expected
-    }
-    try {
-      cl.getResourceAsStream(resourceToGet);
-      fail();
-    } catch (BrokenError expected) {
-      // Expected
-    }
-  }
-
-  /**
-   * Verifies that the {@link BrokenClassLoader} is broken and always throws errors even when used as a TCCL from
-   * {@link ClassPathLoader}. This is primarily a control which ensures that tests depending on
-   * <tt>BrokenClassLoader</tt> are valid, but it also verifies that TCCL is included by default by
-   * <tt>ClassPathLoader</tt>.
-   */
-  public void testBrokenTCCLThrowsErrors() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testBrokenTCCLThrowsErrors");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    dcl.addOrReplace(new NullClassLoader());
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // set the TCCL to throw errors
-      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
-
-      String classToLoad = "java.lang.String";
-      try {
-        dcl.forName(classToLoad);
-        fail();
-      } catch (ClassNotFoundException e) {
-        throw e;
-      } catch (BrokenError expected) {
-        // Expected
-      }
-
-      String resourceToGet = "java/lang/String.class";
-      try {
-        dcl.getResource(resourceToGet);
-        fail();
-      } catch (BrokenError expected) {
-        // Expected
-      }
-
-      try {
-        dcl.getResourceAsStream(resourceToGet);
-        fail();
-      } catch (BrokenError expected) {
-        // Expected
-      }
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  /**
-   * Verifies that the class classloader or system classloader will find the class or resource. Parent is a
-   * {@link NullClassLoader} while the TCCL is an excluded {@link BrokenClassLoader}.
-   */
-  public void testEverythingWithDefaultLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testEverythingWithDefaultLoader");
-
-    // create DCL such that parent cannot find anything
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(true);
-    dcl.addOrReplace(new NullClassLoader());
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // set the TCCL to never find anything
-      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
-
-      String classToLoad = "java.lang.String";
-      Class<?> clazz = dcl.forName(classToLoad);
-      assertNotNull(clazz);
-
-      String resourceToGet = "java/lang/String.class";
-      URL url = dcl.getResource(resourceToGet);
-      assertNotNull(url);
-      InputStream is = dcl.getResourceAsStream(resourceToGet);
-      assertNotNull(is);
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  /**
-   * Verifies that the 3rd custom loader will find the class. Parent cannot find it and TCCL is broken. This verifies
-   * that all custom loaders are checked and that the custom loaders are all checked before TCCL.
-   */
-  public void testForNameWithMultipleCustomLoaders() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testForNameWithMultipleCustomLoaders");
-
-    // create DCL such that the 3rd loader should find the class
-    // first custom loader becomes parent which won't find anything
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    final GeneratingClassLoader generatingClassLoader = new GeneratingClassLoader();
-    dcl = dcl.addOrReplace(generatingClassLoader);
-    dcl = dcl.addOrReplace(new SimpleClassLoader(getClass().getClassLoader()));
-    dcl = dcl.addOrReplace(new NullClassLoader());
-
-    String classToLoad = "com.nowhere.TestForNameWithMultipleCustomLoaders";
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // set TCCL to throw errors which makes sure we find before checking TCCL
-      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
-
-      Class<?> clazz = dcl.forName(classToLoad);
-      assertNotNull(clazz);
-      assertEquals(classToLoad, clazz.getName());
-      assertTrue("Class not loaded by a GeneratingClassLoader.", clazz.getClassLoader() instanceof GeneratingClassLoader);
-      assertEquals("Class not loaded by generatingClassLoader.", generatingClassLoader, clazz.getClassLoader());
-
-      Object obj = clazz.newInstance();
-      assertEquals(classToLoad, obj.getClass().getName());
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  /**
-   * Verifies that the 3rd custom loader will get the resource. Parent cannot find it and TCCL is broken. This verifies
-   * that all custom loaders are checked and that the custom loaders are all checked before TCCL.
-   */
-  public void testGetResourceWithMultipleCustomLoaders() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceWithMultipleCustomLoaders");
-
-    // create DCL such that the 3rd loader should find the resource
-    // first custom loader becomes parent which won't find anything
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    dcl = dcl.addOrReplace(new GeneratingClassLoader());
-    dcl = dcl.addOrReplace(new SimpleClassLoader(getClass().getClassLoader()));
-    dcl = dcl.addOrReplace(new NullClassLoader());
-
-    String resourceToGet = "com/nowhere/testGetResourceWithMultipleCustomLoaders.rsc";
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // set TCCL to throw errors which makes sure we find before checking TCCL
-      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
-
-      URL url = dcl.getResource(resourceToGet);
-      assertNotNull(url);
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  /**
-   * Verifies that the 3rd custom loader will get the resources. Parent cannot find it and TCCL is broken. This verifies
-   * that all custom loaders are checked and that the custom loaders are all checked before TCCL.
-   */
-  public void testGetResourcesWithMultipleCustomLoaders() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceWithMultipleCustomLoaders");
-
-    // create DCL such that the 3rd loader should find the resource
-    // first custom loader becomes parent which won't find anything
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    dcl = dcl.addOrReplace(new GeneratingClassLoader());
-    dcl = dcl.addOrReplace(new GeneratingClassLoader2());
-    dcl = dcl.addOrReplace(new SimpleClassLoader(getClass().getClassLoader()));
-    dcl = dcl.addOrReplace(new NullClassLoader());
-
-    String resourceToGet = "com/nowhere/testGetResourceWithMultipleCustomLoaders.rsc";
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // set TCCL to throw errors which makes sure we find before checking TCCL
-      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
-
-      Enumeration<URL> urls = dcl.getResources(resourceToGet);
-      assertNotNull(urls);
-      assertTrue(urls.hasMoreElements());
-      
-      URL url = urls.nextElement();
-      assertNotNull(url);
-      
-      // Should find two with unique URLs
-      assertTrue("Did not find all resources.", urls.hasMoreElements());
-      URL url2 = urls.nextElement();
-      assertNotNull(url2);
-      assertTrue("Resource URLs should be unique.", !url.equals(url2));
-      
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  /**
-   * Verifies that the 3rd custom loader will get the resource. Parent cannot find it and TCCL is broken. This verifies
-   * that all custom loaders are checked and that the custom loaders are all checked before TCCL.
-   */
-  public void testGetResourceAsStreamWithMultipleCustomLoaders() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceAsStreamWithMultipleCustomLoaders");
-
-    // create DCL such that the 3rd loader should find the resource
-    // first custom loader becomes parent which won't find anything
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    dcl = dcl.addOrReplace(new GeneratingClassLoader());
-    dcl = dcl.addOrReplace(new SimpleClassLoader(getClass().getClassLoader()));
-    dcl = dcl.addOrReplace(new NullClassLoader());
-
-    String resourceToGet = "com/nowhere/testGetResourceAsStreamWithMultipleCustomLoaders.rsc";
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // set TCCL to throw errors which makes sure we find before checking TCCL
-      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
-
-      InputStream is = dcl.getResourceAsStream(resourceToGet);
-      assertNotNull(is);
-      is.close();
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  /**
-   * Verifies that setting <tt>excludeThreadContextClassLoader</tt> to true will indeed exclude the TCCL.
-   */
-  public void testExcludeTCCL() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testExcludeTCCL");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(true);
-
-    String classToLoad = "com.nowhere.TestExcludeTCCL";
-
-    try {
-      dcl.forName(classToLoad);
-      fail("Should have thrown ClassNotFoundException");
-    } catch (ClassNotFoundException expected) {
-      // Expected
-    }
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // ensure that TCCL is only CL that can find this class
-      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
-      dcl.forName(classToLoad);
-      fail("Should have thrown ClassNotFoundException");
-    } catch (ClassNotFoundException expected) {
-      // Expected
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-
-  }
-
-  /**
-   * Verifies that <tt>getResource</tt> works with custom loader from {@link ClassPathLoader}.
-   */
-  public void testGetResourceWithCustomLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceWithCustomLoader");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    dcl = dcl.addOrReplace(new GeneratingClassLoader());
-
-    String resourceToGet = "com/nowhere/testGetResourceWithCustomLoader.rsc";
-    URL url = dcl.getResource(resourceToGet);
-    assertNotNull(url);
-
-    InputStream is = url != null ? url.openStream() : null;
-    assertNotNull(is);
-
-    int totalBytesRead = 0;
-    byte[] input = new byte[128];
-
-    BufferedInputStream bis = new BufferedInputStream(is);
-    for (int bytesRead = bis.read(input); bytesRead > -1;) {
-      totalBytesRead += bytesRead;
-      bytesRead = bis.read(input);
-    }
-    bis.close();
-
-    assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
-  }
-
-  /**
-   * Verifies that <tt>getResources</tt> works with custom loader from {@link ClassPathLoader}.
-   */
-  public void testGetResourcesWithCustomLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceWithCustomLoader");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    dcl = dcl.addOrReplace(new GeneratingClassLoader());
-
-    String resourceToGet = "com/nowhere/testGetResourceWithCustomLoader.rsc";
-    Enumeration<URL> urls = dcl.getResources(resourceToGet);
-    assertNotNull(urls);
-    assertTrue(urls.hasMoreElements());
-
-    URL url = urls.nextElement();
-    InputStream is = url != null ? url.openStream() : null;
-    assertNotNull(is);
-
-    int totalBytesRead = 0;
-    byte[] input = new byte[128];
-
-    BufferedInputStream bis = new BufferedInputStream(is);
-    for (int bytesRead = bis.read(input); bytesRead > -1;) {
-      totalBytesRead += bytesRead;
-      bytesRead = bis.read(input);
-    }
-    bis.close();
-
-    assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
-  }
-
-  /**
-   * Verifies that <tt>getResourceAsStream</tt> works with custom loader from {@link ClassPathLoader}.
-   */
-  public void testGetResourceAsStreamWithCustomLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceAsStreamWithCustomLoader");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    dcl = dcl.addOrReplace(new GeneratingClassLoader());
-
-    String resourceToGet = "com/nowhere/testGetResourceAsStreamWithCustomLoader.rsc";
-    InputStream is = dcl.getResourceAsStream(resourceToGet);
-    assertNotNull(is);
-
-    int totalBytesRead = 0;
-    byte[] input = new byte[128];
-
-    BufferedInputStream bis = new BufferedInputStream(is);
-    for (int bytesRead = bis.read(input); bytesRead > -1;) {
-      totalBytesRead += bytesRead;
-      bytesRead = bis.read(input);
-    }
-    bis.close();
-
-    assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
-  }
-
-  /**
-   * Verifies that <tt>getResource</tt> works with TCCL from {@link ClassPathLoader}.
-   */
-  public void testGetResourceWithTCCL() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceWithTCCL");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-
-    String resourceToGet = "com/nowhere/testGetResourceWithTCCL.rsc";
-    assertNull(dcl.getResource(resourceToGet));
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
-      URL url = dcl.getResource(resourceToGet);
-      assertNotNull(url);
-
-      InputStream is = url.openStream();
-      assertNotNull(is);
-
-      int totalBytesRead = 0;
-      byte[] input = new byte[128];
-
-      BufferedInputStream bis = new BufferedInputStream(is);
-      for (int bytesRead = bis.read(input); bytesRead > -1;) {
-        totalBytesRead += bytesRead;
-        bytesRead = bis.read(input);
-      }
-      bis.close();
-
-      assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  /**
-   * Verifies that <tt>getResources</tt> works with TCCL from {@link ClassPathLoader}.
-   */
-  public void testGetResourcesWithTCCL() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceWithTCCL");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-
-    String resourceToGet = "com/nowhere/testGetResourceWithTCCL.rsc";
-    Enumeration<URL> urls = dcl.getResources(resourceToGet);
-    assertNotNull(urls);
-    assertFalse(urls.hasMoreElements());
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
-      urls = dcl.getResources(resourceToGet);
-      assertNotNull(urls);
-
-      URL url = urls.nextElement();
-      InputStream is = url.openStream();
-      assertNotNull(is);
-
-      int totalBytesRead = 0;
-      byte[] input = new byte[128];
-
-      BufferedInputStream bis = new BufferedInputStream(is);
-      for (int bytesRead = bis.read(input); bytesRead > -1;) {
-        totalBytesRead += bytesRead;
-        bytesRead = bis.read(input);
-      }
-      bis.close();
-
-      assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  /**
-   * Verifies that <tt>getResourceAsStream</tt> works with TCCL from {@link ClassPathLoader}.
-   */
-  public void testGetResourceAsStreamWithTCCL() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceAsStreamWithTCCL");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-
-    String resourceToGet = "com/nowhere/testGetResourceAsStreamWithTCCL.rsc";
-    assertNull(dcl.getResourceAsStream(resourceToGet));
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // ensure that TCCL is only CL that can find this resource
-      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
-      InputStream is = dcl.getResourceAsStream(resourceToGet);
-      assertNotNull(is);
-
-      int totalBytesRead = 0;
-      byte[] input = new byte[128];
-
-      BufferedInputStream bis = new BufferedInputStream(is);
-      for (int bytesRead = bis.read(input); bytesRead > -1;) {
-        totalBytesRead += bytesRead;
-        bytesRead = bis.read(input);
-      }
-      bis.close();
-
-      assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  /**
-   * Verifies that <tt>getResource</tt> will skip TCCL if <tt>excludeThreadContextClassLoader</tt> has been set to true.
-   */
-  public void testGetResourceExcludeTCCL() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceExcludeTCCL");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(true);
-
-    String resourceToGet = "com/nowhere/testGetResourceExcludeTCCL.rsc";
-    assertNull(dcl.getResource(resourceToGet));
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // ensure that TCCL is only CL that can find this resource
-      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
-      assertNull(dcl.getResource(resourceToGet));
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  /**
-   * Verifies that <tt>getResourceAsStream</tt> will skip TCCL if <tt>excludeThreadContextClassLoader</tt> has been set
-   * to true.
-   */
-  public void testGetResourceAsStreamExcludeTCCL() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testGetResourceAsStreamExcludeTCCL");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(true);
-
-    String resourceToGet = "com/nowhere/testGetResourceAsStreamExcludeTCCL.rsc";
-    assertNull(dcl.getResourceAsStream(resourceToGet));
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // ensure that TCCL is only CL that can find this resource
-      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
-      assertNull(dcl.getResourceAsStream(resourceToGet));
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  public void testAddFindsLatestClassLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testAddFindsLatestClassLoader");
-
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    dcl = dcl.addOrReplace(new GeneratingClassLoader());
-
-    String classToLoad = "com.nowhere.TestAddFindsLatestClassLoader";
-    Class<?> clazz = dcl.forName(classToLoad);
-    assertNotNull(clazz);
-
-    dcl = dcl.addOrReplace(new BrokenClassLoader());
-
-    try {
-      dcl.forName(classToLoad);
-      fail();
-    } catch (BrokenError expected) {
-      // Expected
-    }
-  }
-
-  /**
-   * Verifies removing a ClassLoader.
-   */
-  public void testRemoveClassLoader() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testRemoveClassLoader");
-
-    GeneratingClassLoader genClassLoader = new GeneratingClassLoader();
-    ClassPathLoader cpl = ClassPathLoader.createWithDefaults(false);
-    cpl = cpl.addOrReplace(genClassLoader);
-
-    String classToLoad = "com.nowhere.TestRemoveClassLoader";
-    Class<?> clazz = cpl.forName(classToLoad);
-    assertNotNull(clazz);
-
-    cpl = cpl.remove(genClassLoader);
-
-    try {
-      clazz = cpl.forName(classToLoad);
-      fail();
-    } catch (ClassNotFoundException expected) {
-      // Expected
-    }
-  }
-
-  /**
-   * Verifies that a ClassLoader will be replaced when added more than once.
-   */
-  public void testClassLoaderReplace() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testClassLoaderReplace");
-
-    String class1ToLoad = "ClassA";
-    String class2ToLoad = "ClassB";
-
-    ClassPathLoader cpl = ClassPathLoader.createWithDefaults(false);
-    cpl = cpl.addOrReplace(new OneClassClassLoader(class1ToLoad));
-
-    try {
-      @SuppressWarnings("unused")
-      Class<?> clazz = cpl.forName(class1ToLoad);
-    } catch (ClassNotFoundException unexpected) {
-      fail();
-    }
-
-    try {
-      @SuppressWarnings("unused")
-      Class<?> clazz = cpl.forName(class2ToLoad);
-      fail();
-    } catch (ClassNotFoundException expected) {
-      // Expected
-    }
-
-    cpl = cpl.addOrReplace(new OneClassClassLoader(class2ToLoad));
-    try {
-      @SuppressWarnings("unused")
-      Class<?> clazz = cpl.forName(class2ToLoad);
-    } catch (ClassNotFoundException unexpected) {
-      fail();
-    }
-
-    try {
-      @SuppressWarnings("unused")
-      Class<?> clazz = cpl.forName(class1ToLoad);
-      fail();
-    } catch (ClassNotFoundException expected) {
-      // Expected
-    }
-  }
-
-  /**
-   * Verifies that JAR files found in the extlib directory will be correctly
-   * added to the {@link ClassPathLoader}.
-   */
-  public void testJarsInExtLib() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testJarsInExtLib");
-
-    this.deleteLibDir = ClassPathLoader.EXT_LIB_DIR.getParentFile().mkdirs();
-    this.deleteExtDir = ClassPathLoader.EXT_LIB_DIR.mkdirs();
-    
-    File subdir = new File(ClassPathLoader.EXT_LIB_DIR, "cplju");
-    subdir.mkdir();
-    
-    final ClassBuilder classBuilder = new ClassBuilder();
-    
-    writeJarBytesToFile(new File(ClassPathLoader.EXT_LIB_DIR, "ClassPathLoaderJUnit1.jar"),
-        classBuilder.createJarFromClassContent("com/cpljunit1/ClassPathLoaderJUnit1", "package com.cpljunit1; public class ClassPathLoaderJUnit1 {}"));
-    writeJarBytesToFile(new File(subdir, "ClassPathLoaderJUnit2.jar"),
-        classBuilder.createJarFromClassContent("com/cpljunit2/ClassPathLoaderJUnit2", "package com.cpljunit2; public class ClassPathLoaderJUnit2 {}"));
-    
-    ClassPathLoader classPathLoader = ClassPathLoader.createWithDefaults(false);
-    try {
-      classPathLoader.forName("com.cpljunit1.ClassPathLoaderJUnit1");
-    } catch (ClassNotFoundException cnfex) {
-      fail("JAR file not correctly added to Classpath");
-    }
-    
-    try {
-      classPathLoader.forName("com.cpljunit2.ClassPathLoaderJUnit2");
-    } catch (ClassNotFoundException cnfex) {
-      fail("JAR file not correctly added to Classpath");
-    }
-    
-    assertNotNull(classPathLoader.getResource("com/cpljunit2/ClassPathLoaderJUnit2.class"));
-    
-    Enumeration<URL> urls = classPathLoader.getResources("com/cpljunit1");
-    if  (!urls.hasMoreElements()) {
-      fail("Resources should return one element");
-    }
-  }
-  
-  @Test
-  public void testAsClassLoaderLoadClassWithMultipleCustomLoaders() throws Exception {
-    System.out.println("\nStarting ClassPathLoaderJUnitTest#testAsClassLoaderLoadClassWithMultipleCustomLoaders");
-
-    // create DCL such that the 3rd loader should find the class
-    // first custom loader becomes parent which won't find anything
-    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
-    final GeneratingClassLoader generatingClassLoader = new GeneratingClassLoader();
-    dcl = dcl.addOrReplace(generatingClassLoader);
-    dcl = dcl.addOrReplace(new SimpleClassLoader(getClass().getClassLoader()));
-    dcl = dcl.addOrReplace(new NullClassLoader());
-
-    final String classToLoad = "com.nowhere.TestForNameWithMultipleCustomLoaders";
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    try {
-      // set TCCL to throw errors which makes sure we find before checking TCCL
-      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
-
-      final ClassLoader classLoader = dcl.asClassLoader();
-      final Class<?> clazz = classLoader.loadClass(classToLoad);
-      assertNotNull(clazz);
-      assertEquals(classToLoad, clazz.getName());
-      assertTrue(clazz.getClassLoader() instanceof GeneratingClassLoader);
-      assertEquals(generatingClassLoader, clazz.getClassLoader());
-
-      final Object obj = clazz.newInstance();
-      assertEquals(classToLoad, obj.getClass().getName());
-      
-      final Class<?> clazz2 = dcl.forName(classToLoad);
-      assertSame("Should load same class as calling classLoader.", clazz, clazz2);
-
-      final Class<?> clazz3 = Class.forName(classToLoad, true, classLoader);
-      assertSame("Should load same class as calling classLoader.", clazz, clazz3);
-
-    } finally {
-      Thread.currentThread().setContextClassLoader(cl);
-    }
-  }
-
-  private void writeJarBytesToFile(File jarFile, byte[] jarBytes) throws IOException {
-    final OutputStream outStream = new FileOutputStream(jarFile);
-    outStream.write(jarBytes);
-    outStream.close();
-  }
-  
-  private static void exploreClassLoaders() {
-    System.out.println("Thread.currentThread().getContextClassLoader()...");
-    exploreClassLoader(Thread.currentThread().getContextClassLoader(), 1);
-
-    System.out.println("class.getClassLoader()...");
-    exploreClassLoader(ClassPathLoaderJUnitTest.class.getClassLoader(), 1);
-
-    System.out.println("ClassLoader.getSystemClassLoader()...");
-    exploreClassLoader(ClassLoader.getSystemClassLoader(), 1);
-  }
-
-  private static void exploreClassLoader(ClassLoader cl, int indent) {
-    String prefix = "";
-    for (int i = 0; i < indent; i++) {
-      prefix += "\t";
-    }
-    System.out.println(prefix + "ClassLoader toString() = " + cl);
-
-    Class<?> clazz = cl.getClass();
-    System.out.println(prefix + "ClassLoader getClass().getName() = " + clazz.getName());
-    exploreClassLoaderSuperClass(prefix, clazz);
-
-    try {
-      URL[] urls = ((URLClassLoader) cl).getURLs();
-      StringBuilder sb = new StringBuilder(prefix).append("ClassLoader getURLs = [");
-      for (int i = 0; i < urls.length; i++) {
-        if (i > 0)
-          sb.append(", ");
-        sb.append(urls[i].toString());
-      }
-      sb.append("]");
-      System.out.println(sb.toString());
-    } catch (Exception e) {
-      System.out.println(prefix + "ClassLoader is not a URLClassLoader");
-    }
-
-    ClassLoader parent = cl.getParent();
-    if (parent != null) {
-      System.out.println(prefix + "ClassLoader has parent...");
-      exploreClassLoader(parent, ++indent);
-    }
-  }
-
-  private static void exploreClassLoaderSuperClass(String prefix, Class<?> clazz) {
-    Class<?> superClazz = clazz.getSuperclass();
-    if (superClazz != null) {
-      System.out.println(prefix + "                       getSuperclass().getName() = " + superClazz.getName());
-      exploreClassLoaderSuperClass(prefix, superClazz);
-    }
-  }
-  
-  /**
-   * Custom class loader which uses BCEL to always dynamically generate a class for any class name it tries to load.
-   */
-  private class GeneratingClassLoader extends ClassLoader {
-
-    /**
-     * Currently unused but potentially useful for some future test. This causes this loader to only generate a class
-     * that the parent could not find.
-     * 
-     * @param parent
-     *          the parent class loader to check with first
-     */
-    @SuppressWarnings("unused")
-    public GeneratingClassLoader(ClassLoader parent) {
-      super(parent);
-    }
-
-    /**
-     * Specifies no parent to ensure that this loader generates the named class.
-     */
-    public GeneratingClassLoader() {
-      super(null); // no parent!!
-    }
-
-    @Override
-    protected Class<?> findClass(String name) throws ClassNotFoundException {
-      ClassGen cg = new ClassGen(name, "java.lang.Object", "<generated>", Constants.ACC_PUBLIC | Constants.ACC_SUPER, null);
-      cg.addEmptyConstructor(Constants.ACC_PUBLIC);
-      JavaClass jClazz = cg.getJavaClass();
-      byte[] bytes = jClazz.getBytes();
-      return defineClass(jClazz.getClassName(), bytes, 0, bytes.length);
-    }
-
-    @Override
-    protected URL findResource(String name) {
-      URL url = null;
-      try {
-        url = getTempFile().getAbsoluteFile().toURI().toURL();
-        System.out.println("GeneratingClassLoader#findResource returning " + url);
-      } catch (IOException e) {
-      }
-      return url;
-    }
-
-    @Override
-    protected Enumeration<URL> findResources(String name) throws IOException {
-      URL url = null;
-      try {
-        url = getTempFile().getAbsoluteFile().toURI().toURL();
-        System.out.println("GeneratingClassLoader#findResources returning " + url);
-      } catch (IOException e) {
-      }
-      Vector<URL> urls = new Vector<URL>();
-      urls.add(url);
-      return urls.elements();
-    }
-
-    protected File getTempFile() {
-      return ClassPathLoaderJUnitTest.this.tempFile;
-    }
-  }
-
-  /**
-   * Custom class loader which uses BCEL to always dynamically generate a class for any class name it tries to load.
-   */
-  private class GeneratingClassLoader2 extends GeneratingClassLoader {
-    @Override
-    protected File getTempFile() {
-      return ClassPathLoaderJUnitTest.this.tempFile2;
-    }
-  }
-  
-  /**
-   * Custom class loader which will never find any class or resource.
-   */
-  private class NullClassLoader extends ClassLoader {
-    public NullClassLoader() {
-      super(null); // no parent!!
-    }
-
-    @Override
-    public Class<?> loadClass(String name) throws ClassNotFoundException {
-      throw new ClassNotFoundException(name);
-    }
-
-    @Override
-    public URL getResource(String name) {
-      return null;
-    }
-  }
-
-  /**
-   * Custom class loader which will find anything the parent can find.
-   */
-  private class SimpleClassLoader extends ClassLoader {
-    public SimpleClassLoader(ClassLoader parent) {
-      super(parent);
-    }
-  }
-
-  private class OneClassClassLoader extends ClassLoader {
-    private final GeneratingClassLoader genClassLoader = new GeneratingClassLoader();
-    private String className;
-
-    public OneClassClassLoader(final String className) {
-      super(null); // no parent!!
-      this.className = className;
-    }
-    
-    @Override
-    public Class<?> findClass(String name) throws ClassNotFoundException {
-      if (!name.equals(className))
-        throw new ClassNotFoundException();
-
-      else
-        return this.genClassLoader.findClass(name);
-    }
-    
-    @Override
-    public boolean equals(final Object other) {
-      return (other instanceof OneClassClassLoader);
-    }
-  }
-  
-  /**
-   * Custom class loader which is broken and always throws errors.
-   */
-  private class BrokenClassLoader extends ClassLoader {
-    public BrokenClassLoader() {
-      super(null); // no parent!!
-    }
-
-    @Override
-    public Class<?> loadClass(String name) throws ClassNotFoundException {
-      throw new BrokenError();
-    }
-
-    @Override
-    public URL getResource(String name) {
-      throw new BrokenError();
-    }
-  }
-
-  @SuppressWarnings("serial")
-  private class BrokenError extends Error {
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderTest.java
new file mode 100755
index 0000000..d9ad65a
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderTest.java
@@ -0,0 +1,890 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal;
+
+import static org.junit.Assert.*;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import org.apache.bcel.Constants;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.generic.ClassGen;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+/**
+ * Unit tests for {@link ClassPathLoader}.
+ * 
+ * @since 6.5.1.4
+ */
+@Category(UnitTest.class)
+public class ClassPathLoaderTest {
+
+  private static final int GENERATED_CLASS_BYTES_COUNT = 362;
+
+  @Rule
+  public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
+
+  @Before
+  public void setUp() throws Exception {
+    System.setProperty(ClassPathLoader.EXCLUDE_TCCL_PROPERTY, "false");
+  }
+
+  /**
+   * Verifies that {@link ClassPathLoader#getLatest()} is always initialized and returns a <tt>ClassPathLoader</tt>
+   * instance.
+   */
+  @Test
+  public void testLatestExists() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testLatestExists");
+
+    assertNotNull(ClassPathLoader.getLatest());
+  }
+
+  /**
+   * Verifies that {@link ClassPathLoader#getLatest()} throws <tt>ClassNotFoundException</tt> when class does not exist.
+   */
+  @Test
+  public void testForNameThrowsClassNotFoundException() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testForNameThrowsClassNotFoundException");
+
+    try {
+      String classToLoad = "com.nowhere.DoesNotExist";
+      ClassPathLoader.getLatest().forName(classToLoad);
+      fail();
+    } catch (ClassNotFoundException expected) {
+      // Expected
+    }
+  }
+
+  /**
+   * Verifies that {@link ClassPathLoader#getLatest()} finds and loads class via
+   * <tt>Class.forName(String, boolean, ClassLoader)</tt> when class does exist.
+   */
+  @Test
+  public void testForName() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testForName");
+
+    String classToLoad = "com.gemstone.gemfire.internal.classpathloaderjunittest.DoesExist";
+    Class<?> clazz = ClassPathLoader.getLatest().forName(classToLoad);
+    assertNotNull(clazz);
+  }
+
+  /**
+   * Verifies that {@link ClassPathLoader#getLatest()} can actually <tt>getResource</tt> when it exists.
+   */
+  @Test
+  public void testGetResource() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResource");
+
+    String resourceToGet = "com/gemstone/gemfire/internal/classpathloaderjunittest/DoesExist.class";
+    URL url = ClassPathLoader.getLatest().getResource(resourceToGet);
+    assertNotNull(url);
+
+    InputStream is = url != null ? url.openStream() : null;
+    assertNotNull(is);
+
+    int totalBytesRead = 0;
+    byte[] input = new byte[256];
+
+    BufferedInputStream bis = new BufferedInputStream(is);
+    for (int bytesRead = bis.read(input); bytesRead > -1;) {
+      totalBytesRead += bytesRead;
+      bytesRead = bis.read(input);
+    }
+    bis.close();
+
+    // if the following fails then maybe javac changed and DoesExist.class
+    // contains other than 374 bytes of data... consider updating this test
+    assertEquals(GENERATED_CLASS_BYTES_COUNT, totalBytesRead);
+  }
+
+  /**
+   * Verifies that {@link ClassPathLoader#getLatest()} can actually <tt>getResources</tt> when it exists.
+   */
+  @Test
+  public void testGetResources() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResources");
+
+    String resourceToGet = "com/gemstone/gemfire/internal/classpathloaderjunittest/DoesExist.class";
+    Enumeration<URL> urls = ClassPathLoader.getLatest().getResources(resourceToGet);
+    assertNotNull(urls);
+    assertTrue(urls.hasMoreElements());
+
+    URL url = urls.nextElement();
+    InputStream is = url != null ? url.openStream() : null;
+    assertNotNull(is);
+
+    int totalBytesRead = 0;
+    byte[] input = new byte[256];
+
+    BufferedInputStream bis = new BufferedInputStream(is);
+    for (int bytesRead = bis.read(input); bytesRead > -1;) {
+      totalBytesRead += bytesRead;
+      bytesRead = bis.read(input);
+    }
+    bis.close();
+
+    // if the following fails then maybe javac changed and DoesExist.class
+    // contains other than 374 bytes of data... consider updating this test
+    assertEquals(GENERATED_CLASS_BYTES_COUNT, totalBytesRead);
+  }
+
+  /**
+   * Verifies that {@link ClassPathLoader#getLatest()} can actually <tt>getResourceAsStream</tt> when it exists.
+   */
+  @Test
+  public void testGetResourceAsStream() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceAsStream");
+
+    String resourceToGet = "com/gemstone/gemfire/internal/classpathloaderjunittest/DoesExist.class";
+    InputStream is = ClassPathLoader.getLatest().getResourceAsStream(resourceToGet);
+    assertNotNull(is);
+
+    int totalBytesRead = 0;
+    byte[] input = new byte[256];
+
+    BufferedInputStream bis = new BufferedInputStream(is);
+    for (int bytesRead = bis.read(input); bytesRead > -1;) {
+      totalBytesRead += bytesRead;
+      bytesRead = bis.read(input);
+    }
+    bis.close();
+
+    // if the following fails then maybe javac changed and DoesExist.class
+    // contains other than 374 bytes of data... consider updating this test
+    assertEquals(GENERATED_CLASS_BYTES_COUNT, totalBytesRead);
+  }
+
+  /**
+   * Verifies that the {@link GeneratingClassLoader} works and always generates the named class. This is a control which
+   * ensures that tests depending on <tt>GeneratingClassLoader</tt> are valid.
+   */
+  @Test
+  public void testGeneratingClassLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGeneratingClassLoader");
+
+    ClassLoader gcl = new GeneratingClassLoader();
+    String classToLoad = "com.nowhere.TestGeneratingClassLoader";
+
+    Class<?> clazz = gcl.loadClass(classToLoad);
+    assertNotNull(clazz);
+    assertEquals(classToLoad, clazz.getName());
+
+    Object obj = clazz.newInstance();
+    assertEquals(clazz.getName(), obj.getClass().getName());
+
+    try {
+      Class.forName(classToLoad);
+      fail("Should have thrown ClassNotFoundException");
+    } catch (ClassNotFoundException expected) {
+      // Expected
+    }
+
+    Class<?> clazzForName = Class.forName(classToLoad, true, gcl);
+    assertNotNull(clazzForName);
+    assertEquals(clazz, clazzForName);
+
+    Object objForName = clazzForName.newInstance();
+    assertEquals(classToLoad, objForName.getClass().getName());
+  }
+
+  /**
+   * Verifies that custom loader is used to load class.
+   */
+  @Test
+  public void testForNameWithCustomLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testForNameWithCustomLoader");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    dcl = dcl.addOrReplace(new GeneratingClassLoader());
+
+    String classToLoad = "com.nowhere.TestForNameWithCustomLoader";
+    Class<?> clazz = dcl.forName(classToLoad);
+    assertNotNull(clazz);
+    assertEquals(classToLoad, clazz.getName());
+
+    Object obj = clazz.newInstance();
+    assertEquals(classToLoad, obj.getClass().getName());
+  }
+
+  /**
+   * Verifies that {@link Class#forName(String, boolean, ClassLoader)} used with {@link ClassPathLoader} works as
+   * expected with named object arrays, while {@link ClassLoader#loadClass(String)} throws ClassNotFoundException for
+   * named object arrays.
+   */
+  @Test
+  public void testForNameWithObjectArray() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testForNameWithObjectArray");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+
+    String classToLoad = "[Ljava.lang.String;";
+    Class<?> clazz = null;
+    clazz = dcl.forName(classToLoad);
+    assertEquals(classToLoad, clazz.getName());
+  }
+
+  /**
+   * Verifies that TCCL finds the class when {@link Class#forName(String, boolean, ClassLoader)} uses
+   * {@link ClassPathLoader}.
+   */
+  @Test
+  public void testForNameWithTCCL() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testForNameWithTCCL");
+
+    final ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    final String classToLoad = "com.nowhere.TestForNameWithTCCL";
+
+    try {
+      dcl.forName(classToLoad);
+      fail("Should have thrown ClassNotFoundException");
+    } catch (ClassNotFoundException expected) {
+      // Expected
+    }
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // ensure that TCCL is only CL that can find this class
+      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
+      Class<?> clazz = dcl.forName(classToLoad);
+      assertNotNull(clazz);
+      Object instance = clazz.newInstance();
+      assertNotNull(instance);
+      assertEquals(classToLoad, instance.getClass().getName());
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+
+    try {
+      dcl.forName(classToLoad);
+      fail("Should have thrown ClassNotFoundException");
+    } catch (ClassNotFoundException expected) {
+      // Expected
+    }
+
+  }
+
+  /**
+   * Verifies that the {@link NullClassLoader} works and never finds the named class. This is a control which ensures
+   * that tests depending on <tt>NullClassLoader</tt> are valid.
+   */
+  @Test
+  public void testNullClassLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testNullClassLoader");
+
+    ClassLoader cl = new NullClassLoader();
+    String classToLoad = "java.lang.String";
+
+    try {
+      Class.forName(classToLoad, true, cl);
+      fail();
+    } catch (ClassNotFoundException expected) {
+      // Expected
+    }
+
+    String resourceToGet = "java/lang/String.class";
+
+    URL url = cl.getResource(resourceToGet);
+    assertNull(url);
+
+    InputStream is = cl.getResourceAsStream(resourceToGet);
+    assertNull(is);
+  }
+
+  /**
+   * Verifies that the {@link SimpleClassLoader} works and finds classes that the parent can find. This is a control
+   * which ensures that tests depending on <tt>SimpleClassLoader</tt> are valid.
+   */
+  @Test
+  public void testSimpleClassLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testSimpleClassLoader");
+
+    ClassLoader cl = new SimpleClassLoader(getClass().getClassLoader());
+    String classToLoad = "java.lang.String";
+
+    Class<?> clazz = Class.forName(classToLoad, true, cl);
+    assertNotNull(clazz);
+
+    String resourceToGet = "java/lang/String.class";
+
+    URL url = cl.getResource(resourceToGet);
+    assertNotNull(url);
+
+    InputStream is = cl.getResourceAsStream(resourceToGet);
+    assertNotNull(is);
+  }
+
+  /**
+   * Verifies that the {@link BrokenClassLoader} is broken and always throws errors. This is a control which ensures
+   * that tests depending on <tt>BrokenClassLoader</tt> are valid.
+   */
+  @Test
+  public void testBrokenClassLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testBrokenClassLoader");
+
+    ClassLoader cl = new BrokenClassLoader();
+
+    String classToLoad = "java.lang.String";
+    try {
+      Class.forName(classToLoad, true, cl);
+      fail();
+    } catch (ClassNotFoundException e) {
+      throw e;
+    } catch (BrokenError expected) {
+      // Expected
+    }
+
+    String resourceToGet = "java/lang/String.class";
+    try {
+      cl.getResource(resourceToGet);
+      fail();
+    } catch (BrokenError expected) {
+      // Expected
+    }
+    try {
+      cl.getResourceAsStream(resourceToGet);
+      fail();
+    } catch (BrokenError expected) {
+      // Expected
+    }
+  }
+
+  /**
+   * Verifies that the {@link BrokenClassLoader} is broken and always throws errors even when used as a TCCL from
+   * {@link ClassPathLoader}. This is primarily a control which ensures that tests depending on
+   * <tt>BrokenClassLoader</tt> are valid, but it also verifies that TCCL is included by default by
+   * <tt>ClassPathLoader</tt>.
+   */
+  @Test
+  public void testBrokenTCCLThrowsErrors() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testBrokenTCCLThrowsErrors");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    dcl.addOrReplace(new NullClassLoader());
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // set the TCCL to throw errors
+      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
+
+      String classToLoad = "java.lang.String";
+      try {
+        dcl.forName(classToLoad);
+        fail();
+      } catch (ClassNotFoundException e) {
+        throw e;
+      } catch (BrokenError expected) {
+        // Expected
+      }
+
+      String resourceToGet = "java/lang/String.class";
+      try {
+        dcl.getResource(resourceToGet);
+        fail();
+      } catch (BrokenError expected) {
+        // Expected
+      }
+
+      try {
+        dcl.getResourceAsStream(resourceToGet);
+        fail();
+      } catch (BrokenError expected) {
+        // Expected
+      }
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  /**
+   * Verifies that the class classloader or system classloader will find the class or resource. Parent is a
+   * {@link NullClassLoader} while the TCCL is an excluded {@link BrokenClassLoader}.
+   */
+  @Test
+  public void testEverythingWithDefaultLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testEverythingWithDefaultLoader");
+
+    // create DCL such that parent cannot find anything
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(true);
+    dcl.addOrReplace(new NullClassLoader());
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // set the TCCL to never find anything
+      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
+
+      String classToLoad = "java.lang.String";
+      Class<?> clazz = dcl.forName(classToLoad);
+      assertNotNull(clazz);
+
+      String resourceToGet = "java/lang/String.class";
+      URL url = dcl.getResource(resourceToGet);
+      assertNotNull(url);
+      InputStream is = dcl.getResourceAsStream(resourceToGet);
+      assertNotNull(is);
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  /**
+   * Verifies that the 3rd custom loader will find the class. Parent cannot find it and TCCL is broken. This verifies
+   * that all custom loaders are checked and that the custom loaders are all checked before TCCL.
+   */
+  @Test
+  public void testForNameWithMultipleCustomLoaders() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testForNameWithMultipleCustomLoaders");
+
+    // create DCL such that the 3rd loader should find the class
+    // first custom loader becomes parent which won't find anything
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    final GeneratingClassLoader generatingClassLoader = new GeneratingClassLoader();
+    dcl = dcl.addOrReplace(generatingClassLoader);
+    dcl = dcl.addOrReplace(new SimpleClassLoader(getClass().getClassLoader()));
+    dcl = dcl.addOrReplace(new NullClassLoader());
+
+    String classToLoad = "com.nowhere.TestForNameWithMultipleCustomLoaders";
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // set TCCL to throw errors which makes sure we find before checking TCCL
+      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
+
+      Class<?> clazz = dcl.forName(classToLoad);
+      assertNotNull(clazz);
+      assertEquals(classToLoad, clazz.getName());
+      assertTrue("Class not loaded by a GeneratingClassLoader.", clazz.getClassLoader() instanceof GeneratingClassLoader);
+      assertEquals("Class not loaded by generatingClassLoader.", generatingClassLoader, clazz.getClassLoader());
+
+      Object obj = clazz.newInstance();
+      assertEquals(classToLoad, obj.getClass().getName());
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  /**
+   * Verifies that setting <tt>excludeThreadContextClassLoader</tt> to true will indeed exclude the TCCL.
+   */
+  @Test
+  public void testExcludeTCCL() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testExcludeTCCL");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(true);
+
+    String classToLoad = "com.nowhere.TestExcludeTCCL";
+
+    try {
+      dcl.forName(classToLoad);
+      fail("Should have thrown ClassNotFoundException");
+    } catch (ClassNotFoundException expected) {
+      // Expected
+    }
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // ensure that TCCL is only CL that can find this class
+      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
+      dcl.forName(classToLoad);
+      fail("Should have thrown ClassNotFoundException");
+    } catch (ClassNotFoundException expected) {
+      // Expected
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+
+  }
+
+
+  /**
+   * Verifies that <tt>getResource</tt> will skip TCCL if <tt>excludeThreadContextClassLoader</tt> has been set to true.
+   */
+  @Test
+  public void testGetResourceExcludeTCCL() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceExcludeTCCL");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(true);
+
+    String resourceToGet = "com/nowhere/testGetResourceExcludeTCCL.rsc";
+    assertNull(dcl.getResource(resourceToGet));
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // ensure that TCCL is only CL that can find this resource
+      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
+      assertNull(dcl.getResource(resourceToGet));
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  /**
+   * Verifies that <tt>getResourceAsStream</tt> will skip TCCL if <tt>excludeThreadContextClassLoader</tt> has been set
+   * to true.
+   */
+  @Test
+  public void testGetResourceAsStreamExcludeTCCL() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceAsStreamExcludeTCCL");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(true);
+
+    String resourceToGet = "com/nowhere/testGetResourceAsStreamExcludeTCCL.rsc";
+    assertNull(dcl.getResourceAsStream(resourceToGet));
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // ensure that TCCL is only CL that can find this resource
+      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
+      assertNull(dcl.getResourceAsStream(resourceToGet));
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  @Test
+  public void testAddFindsLatestClassLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testAddFindsLatestClassLoader");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    dcl = dcl.addOrReplace(new GeneratingClassLoader());
+
+    String classToLoad = "com.nowhere.TestAddFindsLatestClassLoader";
+    Class<?> clazz = dcl.forName(classToLoad);
+    assertNotNull(clazz);
+
+    dcl = dcl.addOrReplace(new BrokenClassLoader());
+
+    try {
+      dcl.forName(classToLoad);
+      fail();
+    } catch (BrokenError expected) {
+      // Expected
+    }
+  }
+
+  /**
+   * Verifies removing a ClassLoader.
+   */
+  @Test
+  public void testRemoveClassLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testRemoveClassLoader");
+
+    GeneratingClassLoader genClassLoader = new GeneratingClassLoader();
+    ClassPathLoader cpl = ClassPathLoader.createWithDefaults(false);
+    cpl = cpl.addOrReplace(genClassLoader);
+
+    String classToLoad = "com.nowhere.TestRemoveClassLoader";
+    Class<?> clazz = cpl.forName(classToLoad);
+    assertNotNull(clazz);
+
+    cpl = cpl.remove(genClassLoader);
+
+    try {
+      clazz = cpl.forName(classToLoad);
+      fail();
+    } catch (ClassNotFoundException expected) {
+      // Expected
+    }
+  }
+
+  /**
+   * Verifies that a ClassLoader will be replaced when added more than once.
+   */
+  @Test
+  public void testClassLoaderReplace() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testClassLoaderReplace");
+
+    String class1ToLoad = "ClassA";
+    String class2ToLoad = "ClassB";
+
+    ClassPathLoader cpl = ClassPathLoader.createWithDefaults(false);
+    cpl = cpl.addOrReplace(new OneClassClassLoader(class1ToLoad));
+
+    try {
+      @SuppressWarnings("unused")
+      Class<?> clazz = cpl.forName(class1ToLoad);
+    } catch (ClassNotFoundException unexpected) {
+      fail();
+    }
+
+    try {
+      @SuppressWarnings("unused")
+      Class<?> clazz = cpl.forName(class2ToLoad);
+      fail();
+    } catch (ClassNotFoundException expected) {
+      // Expected
+    }
+
+    cpl = cpl.addOrReplace(new OneClassClassLoader(class2ToLoad));
+    try {
+      @SuppressWarnings("unused")
+      Class<?> clazz = cpl.forName(class2ToLoad);
+    } catch (ClassNotFoundException unexpected) {
+      fail();
+    }
+
+    try {
+      @SuppressWarnings("unused")
+      Class<?> clazz = cpl.forName(class1ToLoad);
+      fail();
+    } catch (ClassNotFoundException expected) {
+      // Expected
+    }
+  }
+
+  @Test
+  public void testAsClassLoaderLoadClassWithMultipleCustomLoaders() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testAsClassLoaderLoadClassWithMultipleCustomLoaders");
+
+    // create DCL such that the 3rd loader should find the class
+    // first custom loader becomes parent which won't find anything
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    final GeneratingClassLoader generatingClassLoader = new GeneratingClassLoader();
+    dcl = dcl.addOrReplace(generatingClassLoader);
+    dcl = dcl.addOrReplace(new SimpleClassLoader(getClass().getClassLoader()));
+    dcl = dcl.addOrReplace(new NullClassLoader());
+
+    final String classToLoad = "com.nowhere.TestForNameWithMultipleCustomLoaders";
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // set TCCL to throw errors which makes sure we find before checking TCCL
+      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
+
+      final ClassLoader classLoader = dcl.asClassLoader();
+      final Class<?> clazz = classLoader.loadClass(classToLoad);
+      assertNotNull(clazz);
+      assertEquals(classToLoad, clazz.getName());
+      assertTrue(clazz.getClassLoader() instanceof GeneratingClassLoader);
+      assertEquals(generatingClassLoader, clazz.getClassLoader());
+
+      final Object obj = clazz.newInstance();
+      assertEquals(classToLoad, obj.getClass().getName());
+      
+      final Class<?> clazz2 = dcl.forName(classToLoad);
+      assertSame("Should load same class as calling classLoader.", clazz, clazz2);
+
+      final Class<?> clazz3 = Class.forName(classToLoad, true, classLoader);
+      assertSame("Should load same class as calling classLoader.", clazz, clazz3);
+
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  private static void exploreClassLoaders() {
+    System.out.println("Thread.currentThread().getContextClassLoader()...");
+    exploreClassLoader(Thread.currentThread().getContextClassLoader(), 1);
+
+    System.out.println("class.getClassLoader()...");
+    exploreClassLoader(ClassPathLoaderTest.class.getClassLoader(), 1);
+
+    System.out.println("ClassLoader.getSystemClassLoader()...");
+    exploreClassLoader(ClassLoader.getSystemClassLoader(), 1);
+  }
+
+  private static void exploreClassLoader(ClassLoader cl, int indent) {
+    String prefix = "";
+    for (int i = 0; i < indent; i++) {
+      prefix += "\t";
+    }
+    System.out.println(prefix + "ClassLoader toString() = " + cl);
+
+    Class<?> clazz = cl.getClass();
+    System.out.println(prefix + "ClassLoader getClass().getName() = " + clazz.getName());
+    exploreClassLoaderSuperClass(prefix, clazz);
+
+    try {
+      URL[] urls = ((URLClassLoader) cl).getURLs();
+      StringBuilder sb = new StringBuilder(prefix).append("ClassLoader getURLs = [");
+      for (int i = 0; i < urls.length; i++) {
+        if (i > 0)
+          sb.append(", ");
+        sb.append(urls[i].toString());
+      }
+      sb.append("]");
+      System.out.println(sb.toString());
+    } catch (Exception e) {
+      System.out.println(prefix + "ClassLoader is not a URLClassLoader");
+    }
+
+    ClassLoader parent = cl.getParent();
+    if (parent != null) {
+      System.out.println(prefix + "ClassLoader has parent...");
+      exploreClassLoader(parent, ++indent);
+    }
+  }
+
+  private static void exploreClassLoaderSuperClass(String prefix, Class<?> clazz) {
+    Class<?> superClazz = clazz.getSuperclass();
+    if (superClazz != null) {
+      System.out.println(prefix + "                       getSuperclass().getName() = " + superClazz.getName());
+      exploreClassLoaderSuperClass(prefix, superClazz);
+    }
+  }
+
+  /**
+   * Custom class loader which will never find any class or resource.
+   */
+  static class NullClassLoader extends ClassLoader {
+    public NullClassLoader() {
+      super(null); // no parent!!
+    }
+
+    @Override
+    public Class<?> loadClass(String name) throws ClassNotFoundException {
+      throw new ClassNotFoundException(name);
+    }
+
+    @Override
+    public URL getResource(String name) {
+      return null;
+    }
+  }
+
+  /**
+   * Custom class loader which will find anything the parent can find.
+   */
+  static class SimpleClassLoader extends ClassLoader {
+    public SimpleClassLoader(ClassLoader parent) {
+      super(parent);
+    }
+  }
+
+  /**
+   * Custom class loader which is broken and always throws errors.
+   */
+  static class BrokenClassLoader extends ClassLoader {
+    public BrokenClassLoader() {
+      super(null); // no parent!!
+    }
+
+    @Override
+    public Class<?> loadClass(String name) throws ClassNotFoundException {
+      throw new BrokenError();
+    }
+
+    @Override
+    public URL getResource(String name) {
+      throw new BrokenError();
+    }
+  }
+
+  /**
+   * Custom class loader which uses BCEL to always dynamically generate a class for any class name it tries to load.
+   */
+  static class GeneratingClassLoader extends ClassLoader {
+
+    /**
+     * Currently unused but potentially useful for some future test. This causes this loader to only generate a class
+     * that the parent could not find.
+     *
+     * @param parent
+     *          the parent class loader to check with first
+     */
+    @SuppressWarnings("unused")
+    public GeneratingClassLoader(ClassLoader parent) {
+      super(parent);
+    }
+
+    /**
+     * Specifies no parent to ensure that this loader generates the named class.
+     */
+    public GeneratingClassLoader() {
+      super(null); // no parent!!
+    }
+
+    @Override
+    protected Class<?> findClass(String name) throws ClassNotFoundException {
+      ClassGen cg = new ClassGen(name, "java.lang.Object", "<generated>", Constants.ACC_PUBLIC | Constants.ACC_SUPER, null);
+      cg.addEmptyConstructor(Constants.ACC_PUBLIC);
+      JavaClass jClazz = cg.getJavaClass();
+      byte[] bytes = jClazz.getBytes();
+      return defineClass(jClazz.getClassName(), bytes, 0, bytes.length);
+    }
+
+    @Override
+    protected URL findResource(String name) {
+      URL url = null;
+      try {
+        url = getTempFile().getAbsoluteFile().toURI().toURL();
+        System.out.println("GeneratingClassLoader#findResource returning " + url);
+      } catch (IOException e) {
+      }
+      return url;
+    }
+
+    @Override
+    protected Enumeration<URL> findResources(String name) throws IOException {
+      URL url = null;
+      try {
+        url = getTempFile().getAbsoluteFile().toURI().toURL();
+        System.out.println("GeneratingClassLoader#findResources returning " + url);
+      } catch (IOException e) {
+      }
+      Vector<URL> urls = new Vector<URL>();
+      urls.add(url);
+      return urls.elements();
+    }
+
+    protected File getTempFile() {
+      return null;
+    }
+  }
+
+  static class OneClassClassLoader extends ClassLoader {
+
+    private final GeneratingClassLoader genClassLoader = new GeneratingClassLoader();
+    private String className;
+
+    public OneClassClassLoader(final String className) {
+      super(null); // no parent!!
+      this.className = className;
+    }
+    
+    @Override
+    public Class<?> findClass(String name) throws ClassNotFoundException {
+      if (!name.equals(className)) {
+        throw new ClassNotFoundException();
+      } else {
+        return this.genClassLoader.findClass(name);
+      }
+    }
+    
+    @Override
+    public boolean equals(final Object other) {
+      return (other instanceof OneClassClassLoader);
+    }
+  }
+  
+  @SuppressWarnings("serial")
+  static class BrokenError extends Error {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/ConfigSourceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/ConfigSourceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/ConfigSourceJUnitTest.java
index a6c6435..360fc8b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/ConfigSourceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/ConfigSourceJUnitTest.java
@@ -18,13 +18,14 @@ package com.gemstone.gemfire.internal;
 
 import static org.junit.Assert.*;
 
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 @Category(UnitTest.class)
 public class ConfigSourceJUnitTest {
+
   @Test
   public void testDescriptions() {
     ConfigSource cs = ConfigSource.api();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/CopyOnWriteHashSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/CopyOnWriteHashSetJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/CopyOnWriteHashSetJUnitTest.java
index 09df931..39e2058 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/CopyOnWriteHashSetJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/CopyOnWriteHashSetJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.internal;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
@@ -25,18 +27,15 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- *
- */
 @Category(UnitTest.class)
-public class CopyOnWriteHashSetJUnitTest extends TestCase {
-  
+public class CopyOnWriteHashSetJUnitTest {
+
+  @Test
   public void testSnapshot() {
     CopyOnWriteHashSet<String> set = new CopyOnWriteHashSet<String>();
     set.add("a");
@@ -46,9 +45,9 @@ public class CopyOnWriteHashSetJUnitTest extends TestCase {
     
     assertEquals(copy, snap);
   }
-  
+
+  @Test
   public void testAllMethods() throws Exception {
-    
     CopyOnWriteHashSet<String> set = new CopyOnWriteHashSet<String>();
     assertTrue(set.add("a"));
     assertFalse(set.add("a"));


[46/55] [abbrv] incubator-geode git commit: GEODE-1370: restore name of destroySharedConfiguration_forTestsOnly

Posted by sa...@apache.org.
GEODE-1370: restore name of destroySharedConfiguration_forTestsOnly


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/9d28009f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/9d28009f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/9d28009f

Branch: refs/heads/feature/GEODE-1153
Commit: 9d28009f1018bba74dab671c64ee42e8b4a25899
Parents: fe69f0a
Author: Kirk Lund <kl...@apache.org>
Authored: Wed May 11 09:56:07 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed May 11 09:56:07 2016 -0700

----------------------------------------------------------------------
 .../gemfire/distributed/internal/SharedConfiguration.java         | 2 +-
 .../internal/configuration/SharedConfigurationDUnitTest.java      | 2 +-
 .../internal/configuration/SharedConfigurationTestUtils.java      | 2 +-
 .../configuration/SharedConfigurationUsingDirDUnitTest.java       | 3 +--
 4 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9d28009f/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
index 0f349e9..ba9c7dc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
@@ -406,7 +406,7 @@ public class SharedConfiguration {
    * <p/>
    * Throws {@code AssertionError} wrapping any exception thrown by operation.
    */
-  public void destroySharedConfiguration_forTestsOnly() {
+  public void destroySharedConfiguration() {
     try {
       Region<String, Configuration> configRegion = getConfigurationRegion();
       if (configRegion != null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9d28009f/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
index c07eab7..f0c685b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
@@ -187,7 +187,7 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
       public Object call() {
         InternalLocator locator = (InternalLocator) Locator.getLocator();
         SharedConfiguration sharedConfig = locator.getSharedConfiguration();
-        sharedConfig.destroySharedConfiguration_forTestsOnly();
+        sharedConfig.destroySharedConfiguration();
         locator.stop();
         return null;
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9d28009f/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationTestUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationTestUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationTestUtils.java
index 235f02e..1174c7d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationTestUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationTestUtils.java
@@ -30,7 +30,7 @@ public class SharedConfigurationTestUtils {
       if (locator != null) {
         SharedConfiguration sharedConfig = locator.getSharedConfiguration();
         if (sharedConfig != null) {
-          sharedConfig.destroySharedConfiguration_forTestsOnly();
+          sharedConfig.destroySharedConfiguration();
         }
         locator.stop();
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9d28009f/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
index 9cbb12c..8f80877 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
@@ -33,7 +33,6 @@ import java.util.Arrays;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
-import org.junit.After;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -62,7 +61,7 @@ public class SharedConfigurationUsingDirDUnitTest extends JUnit4CacheTestCase {
 
         SharedConfiguration sharedConfig = locator.getSharedConfiguration();
         if (sharedConfig != null) {
-          sharedConfig.destroySharedConfiguration_forTestsOnly();
+          sharedConfig.destroySharedConfiguration();
         }
       });
     }


[15/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexStatisticsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexStatisticsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexStatisticsJUnitTest.java
index 58d966e..8275af7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexStatisticsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexStatisticsJUnitTest.java
@@ -728,7 +728,7 @@ public class IndexStatisticsJUnitTest {
     region.put(1, obj1);
     assertEquals(1, stats.getNumberOfValues());
     assertEquals(1, stats.getNumberOfKeys());
-    // assertEquals(1, stats.getNumberOfValues(20f));
+    // assertIndexDetailsEquals(1, stats.getNumberOfValues(20f));
     assertEquals(1, stats.getNumUpdates());
 
     // add a second object with the same index key
@@ -737,21 +737,21 @@ public class IndexStatisticsJUnitTest {
     region.put(2, obj2);
     assertEquals(2, stats.getNumberOfValues());
     assertEquals(1, stats.getNumberOfKeys());
-    // assertEquals(2, stats.getNumberOfValues(20f));
+    // assertIndexDetailsEquals(2, stats.getNumberOfValues(20f));
     assertEquals(2, stats.getNumUpdates());
 
     // remove the second object and check that keys are 1
     region.remove(2);
     assertEquals(1, stats.getNumberOfValues());
     assertEquals(1, stats.getNumberOfKeys());
-    // assertEquals(1, stats.getNumberOfValues(20f));
+    // assertIndexDetailsEquals(1, stats.getNumberOfValues(20f));
     assertEquals(3, stats.getNumUpdates());
 
     // remove the first object and check that keys are 0
     region.remove(1);
     assertEquals(0, stats.getNumberOfValues());
     assertEquals(0, stats.getNumberOfKeys());
-    // assertEquals(0, stats.getNumberOfValues(20f));
+    // assertIndexDetailsEquals(0, stats.getNumberOfValues(20f));
     assertEquals(4, stats.getNumUpdates());
 
     // add object with a different key and check results
@@ -759,7 +759,7 @@ public class IndexStatisticsJUnitTest {
     region.put(3, obj2);
     assertEquals(1, stats.getNumberOfValues());
     assertEquals(1, stats.getNumberOfKeys());
-    // assertEquals(0, stats.getNumberOfValues(20f));
+    // assertIndexDetailsEquals(0, stats.getNumberOfValues(20f));
     assertEquals(5, stats.getNumUpdates());
 
     // add object with original key and check that num keys are 2
@@ -767,7 +767,7 @@ public class IndexStatisticsJUnitTest {
     region.put(1, obj1);
     assertEquals(2, stats.getNumberOfValues());
     assertEquals(2, stats.getNumberOfKeys());
-    // assertEquals(1, stats.getNumberOfValues(20f));
+    // assertIndexDetailsEquals(1, stats.getNumberOfValues(20f));
     assertEquals(6, stats.getNumUpdates());
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MemoryIndexStoreJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MemoryIndexStoreJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MemoryIndexStoreJUnitTest.java
index 0a4a13e..88324d1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MemoryIndexStoreJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MemoryIndexStoreJUnitTest.java
@@ -16,13 +16,9 @@
  */
 package com.gemstone.gemfire.cache.query.internal.index;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
 import java.util.HashSet;
 import java.util.Iterator;
@@ -45,352 +41,350 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class MemoryIndexStoreJUnitTest {
 
-	Region region;
-	GemFireCacheImpl cache;
-	InternalIndexStatistics mockStats;
-	MemoryIndexStore store;
-	RegionEntry[] mockEntries;
-	int numMockEntries = 10;
+  Region region;
+  GemFireCacheImpl cache;
+  InternalIndexStatistics mockStats;
+  MemoryIndexStore store;
+  RegionEntry[] mockEntries;
+  int numMockEntries = 10;
   GemFireCacheImpl actualInstance;
   
-	public void subclassPreSetup() {
-		
-	}
-	
-	protected Region createRegion() {
-		return mock(LocalRegion.class);
-	}
-	
-	@Before
-	public void setup() {
-		subclassPreSetup();
-		region = createRegion();
-		cache = mock(GemFireCacheImpl.class);
-		actualInstance = GemFireCacheImpl.setInstanceForTests(cache);
-		mockStats = mock(AbstractIndex.InternalIndexStatistics.class);
-		
-		store = new MemoryIndexStore(region, mockStats);
-		store.setIndexOnValues(true);
-		mockEntries = new RegionEntry[numMockEntries];
-		IntStream.range(0, numMockEntries).forEach(i-> {
-			mockEntries[i] = createRegionEntry(i, new Object());
-		});
-	}
-	
-	@After
-	public void teardown() {
-	  GemFireCacheImpl.setInstanceForTests(actualInstance);
-	}
-	
-	@Test
-	public void testSizeOfStoreReturnsNumberOfKeysAndNotActualNumberOfValues() {
-		IntStream.range(0, 150).forEach(i -> {
-			try {
-				store.addMapping(i % 3, createRegionEntry(i, new Object()));
-			}
-			catch (Exception e) {
-				fail();
-			}
-		});
-		assertEquals(150, numObjectsInStore(store));
-	}
-	
-	@Test
-	public void testAddEnoughEntriesToCreateAConcurrentHashSet() {
-		IntStream.range(0, 150).forEach(i -> {
-			try {
-				store.addMapping(1, createRegionEntry(i, new Object()));
-			}
-			catch (Exception e) {
-				fail();
-			}
-		});
-		assertEquals(150, numObjectsInStore(store));
-	}
-	
-	@Test
-	public void testUpdateAgainstAConcurrentHashSet() throws Exception{
-		IntStream.range(0, 150).forEach(i -> {
-			try {
-				store.addMapping(1, createRegionEntry(1, new Object()));
-			}
-			catch (Exception e) {
-				fail();
-			}
-		});
-		RegionEntry entry = createRegionEntry(1, new Object());	
-		store.addMapping(1, entry);
-		store.updateMapping(2, 1, entry, entry.getValue(null));
-		assertEquals(151, numObjectsInStore(store));
-	}
-	
-	@Test
-	public void testCanAddObjectWithUndefinedKey() throws Exception {
-		store.addMapping(QueryService.UNDEFINED, mockEntries[0]);
-		assertEquals(1, numObjectsIterated(store.get(QueryService.UNDEFINED)));
-		assertEquals(0, numObjectsInStore(store));
-	}
-	
-	@Test
-	public void testCanAddManyObjectsWithUndefinedKey() throws Exception {
-		for (int i = 0; i < mockEntries.length; i++) {
-			store.addMapping(QueryService.UNDEFINED, mockEntries[i]);
-		}
-		assertEquals(mockEntries.length, numObjectsIterated(store.get(QueryService.UNDEFINED)));
-		//Undefined will not return without an explicit get for UNDEFINED);
-		assertEquals(0, numObjectsInStore(store));
-	}
-	
-	@Test
-	public void testIteratorWithStartInclusiveAndNoKeysToRemoveReturnsCorrectNumberOfResults() throws Exception {
-		addMockedEntries(numMockEntries);
-		assertEquals(2, numObjectsIterated(store.iterator(numMockEntries - 2, true, null)));
-	}
-	
-	@Test
-	public void testIteratorWithStartExclusiveAndNoKeysToRemoveReturnsCorrectNumberOfResults() throws Exception {
-		addMockedEntries(numMockEntries);
-		assertEquals(1, numObjectsIterated(store.iterator(numMockEntries - 2, false, null)));
-	}
-	
-	
-	@Test
-	public void testIteratorWithStartInclusiveAndKeyToRemoveReturnsCorrectNumberOfResults() throws Exception {
-		addMockedEntries(numMockEntries);
-		Set keysToRemove = new HashSet();
-		keysToRemove.add("1");
-		assertEquals(9, numObjectsIterated(store.iterator(1, true, keysToRemove)));
-	}
-	
-	@Test
-	public void testIteratorWithStartExclusiveAndKeyToRemoveReturnsCorrectNumberOfResults() throws Exception {
-		addMockedEntries(numMockEntries);
-		Set keysToRemove = new HashSet();
-		keysToRemove.add("1");
-		assertEquals(8, numObjectsIterated(store.iterator(1, false, keysToRemove)));
-	}
-	
-	@Test
-	public void testStartAndEndInclusiveReturnsCorrectResults() throws Exception {
-		addMockedEntries(numMockEntries);
-		assertEquals(6, numObjectsIterated(store.iterator(1, true, 6, true, null)));
-	}
-	
-	@Test
-	public void testStartInclusiveAndEndExclusiveReturnsCorrectResults() throws Exception {
-		addMockedEntries(numMockEntries);
-		assertEquals(5, numObjectsIterated(store.iterator(1, true, 6, false, null)));
-	}
-	
-	@Test
-	public void testStartExclusiveAndEndExclusiveReturnsCorrectResults() throws Exception {
-		addMockedEntries(numMockEntries);
-		assertEquals(4, numObjectsIterated(store.iterator(1, false, 6, false, null)));
-	}
-	
-	@Test
-	public void testStartExclusiveAndEndInclusiveReturnsCorrectResults() throws Exception {
-		addMockedEntries(numMockEntries);
-		assertEquals(5, numObjectsIterated(store.iterator(1, false, 6, true, null)));
-	}
-	
-	@Test
-	public void testStartIsNull() throws Exception {
-		addMockedEntries(numMockEntries);
-		assertEquals(6, numObjectsIterated(store.iterator(null, false, 6, false, null)));
-	}
-	
-	@Test
-	public void testDescendingIteratorReturnsExpectedOrderOfEntries() throws Exception {
-		RegionEntry mockEntry1 = mockEntries[0];
-		RegionEntry mockEntry2 = mockEntries[1];
-		store.addMapping("1", mockEntry1);
-		store.addMapping("2", mockEntry2);
-		Iterator iteratorFirst = store.descendingIterator(null);
-		assertEquals(2, numObjectsIterated(iteratorFirst));
-		
-		Iterator iterator = store.descendingIterator(null);
-		iterator.hasNext();
-		assertEquals(mockEntry2, ((MemoryIndexStore.MemoryIndexStoreEntry)iterator.next()).getRegionEntry());
-		iterator.hasNext();
-		assertEquals(mockEntry1, ((MemoryIndexStore.MemoryIndexStoreEntry)iterator.next()).getRegionEntry());
-	}
-	
-	@Test
-	public void testDescendingIteratorWithRemovedKeysReturnsExpectedOrderOfEntries() throws Exception {
-		RegionEntry mockEntry1 = mockEntries[0];
-		RegionEntry mockEntry2 = mockEntries[1];
-		RegionEntry mockEntry3 = mockEntries[2];
-		store.addMapping("1", mockEntry1);
-		store.addMapping("2", mockEntry2);
-		store.addMapping("3", mockEntry3);
-		Set keysToRemove = new HashSet();
-		keysToRemove.add("2");
-		Iterator iteratorFirst = store.descendingIterator(keysToRemove);
-		assertEquals(2, numObjectsIterated(iteratorFirst));
-		
-		//keysToRemove has been modified by the store, we need to readd the key to remove
-		keysToRemove.add("2");
-		Iterator iterator = store.descendingIterator(keysToRemove);
-		iterator.hasNext();
-		assertEquals(mockEntry3, ((MemoryIndexStore.MemoryIndexStoreEntry)iterator.next()).getRegionEntry());
-		iterator.hasNext();
-		assertEquals(mockEntry1, ((MemoryIndexStore.MemoryIndexStoreEntry)iterator.next()).getRegionEntry());
-		assertFalse(iterator.hasNext());
-	}
-	
-	@Test
-	public void testDescendingIteratorWithMultipleRemovedKeysReturnsExpectedOrderOfEntries() throws Exception {
-		RegionEntry mockEntry1 = mockEntries[0];
-		RegionEntry mockEntry2 = mockEntries[1];
-		RegionEntry mockEntry3 = mockEntries[2];
-		store.addMapping("1", mockEntry1);
-		store.addMapping("2", mockEntry2);
-		store.addMapping("3", mockEntry3);
-		Set keysToRemove = new HashSet();
-		keysToRemove.add("2");
-		keysToRemove.add("1");
-		Iterator iteratorFirst = store.descendingIterator(keysToRemove);
-		assertEquals(1, numObjectsIterated(iteratorFirst));
-		
-		//keysToRemove has been modified by the store, we need to readd the key to remove
-		keysToRemove.add("2");
-		keysToRemove.add("1");
-		Iterator iterator = store.descendingIterator(keysToRemove);
-		iterator.hasNext();
-		assertEquals(mockEntry3, ((MemoryIndexStore.MemoryIndexStoreEntry)iterator.next()).getRegionEntry());
-		assertFalse(iterator.hasNext());
-	}
-	
-	@Test
-	public void testSizeWithKeyArgumentReturnsCorrectSize() throws Exception {
-		RegionEntry mockEntry1 = mockEntries[0];
-		RegionEntry mockEntry2 = mockEntries[1];
-		store.addMapping("1", mockEntry1);
-		store.addMapping("2", mockEntry2);
-		assertEquals(1, store.size("1"));
-	}
-	
-	 @Test
-	  public void testGetReturnsExpectedIteratorValue() throws Exception {
-	    RegionEntry mockEntry1 = mockEntries[0];
-	    RegionEntry mockEntry2 = mockEntries[1];
-	    store.addMapping("1", mockEntry1);
-	    store.addMapping("2", mockEntry2);
-	    assertEquals(1, numObjectsIterated(store.get("1")));
-	  }
-	
-	@Test
-	public void testGetReturnsExpectedIteratorWithMultipleValues() throws Exception {
-		RegionEntry mockEntry1 = mockEntries[0];
-		RegionEntry mockEntry2 = mockEntries[1];
-		RegionEntry mockEntry3 = mockEntries[2];
-		RegionEntry mockEntry4 = mockEntries[3];
-		store.addMapping("1", mockEntry1);
-		store.addMapping("1", mockEntry2);
-		store.addMapping("1", mockEntry3);
-		store.addMapping("2", mockEntry4);
-		assertEquals(3, numObjectsIterated(store.get("1")));
-		assertEquals(4, numObjectsInStore(store));
-	}
-	
-	@Test
-	public void testGetWithIndexOnKeysReturnsExpectedIteratorValues() throws Exception {
-		RegionEntry mockEntry1 = mockEntries[0];
-		RegionEntry mockEntry2 = mockEntries[1];
-		store.setIndexOnValues(false);
-		store.setIndexOnRegionKeys(true);
-		store.addMapping("1", mockEntry1);
-		store.addMapping("2", mockEntry2);
-		assertEquals(1, numObjectsIterated(store.get("1")));
-	}
-
-	@Test
-	public void testCorrectlyRemovesEntryProvidedTheWrongKey() throws Exception {
-		RegionEntry mockEntry1 = mockEntries[0];
-		RegionEntry mockEntry2 = mockEntries[1];
-		store.addMapping("1", mockEntry1);
-		store.addMapping("2", mockEntry2);
-		store.removeMapping("1", mockEntry2);
-		assertEquals(1, numObjectsInStore(store));
-		assertTrue(objectContainedIn(store, mockEntry1));
-	}
-
-	@Test
-	public void testRemoveMappingRemovesFromBackingMap() throws Exception {
-		RegionEntry mockEntry1 = mockEntries[0];
-		RegionEntry mockEntry2 = mockEntries[1];
-		store.addMapping("1", mockEntry1);
-		store.addMapping("2", mockEntry2);
-		store.removeMapping("1", mockEntry1);
-		assertEquals(1, numObjectsInStore(store));
-		assertTrue(objectContainedIn(store, mockEntry2));
-	}
-
-	@Test
-	public void testAddMappingAddsToBackingMap() throws Exception {
-		RegionEntry mockEntry1 = mockEntries[0];
-		RegionEntry mockEntry2 = mockEntries[1];
-		store.addMapping("1", mockEntry1);
-		store.addMapping("2", mockEntry2);
-		assertEquals(2, numObjectsInStore(store));
-		assertTrue(objectContainedIn(store, mockEntry1));
-		assertTrue(objectContainedIn(store, mockEntry2));
-	}
-	
-	@Test
-	public void testClear() throws Exception {
-		RegionEntry mockEntry1 = mockEntries[0];
-		RegionEntry mockEntry2 = mockEntries[1];
-		store.addMapping("1", mockEntry1);
-		store.addMapping("1", mockEntry2);
-		store.clear();
-		assertEquals(0, numObjectsInStore(store));
-	}
-
-	private int numObjectsInStore(MemoryIndexStore store) {
-		Iterator iterator = store.iterator(null);
-		return numObjectsIterated(iterator);
-	}
-
-	private int numObjectsIterated(Iterator iterator) {
-		int count = 0;
-		while (iterator.hasNext()) {
-			iterator.next();
-			count++;
-		}
-		return count;
-	}
-
-	private boolean objectContainedIn(MemoryIndexStore store, Object o) {
-		Iterator iterator = store.valueToEntriesMap.values().iterator();
-		return objectContainedIn(iterator, o);
-	}
-	
-	private boolean objectContainedIn(Iterator iterator, Object o) {
-		while (iterator.hasNext()) {
-			if (iterator.next().equals(o)) {
-				return true;
-			}
-		}
-		return false;
-	}
-	
-	private void addMockedEntries(int numEntriesToAdd) {
-		IntStream.range(0, numEntriesToAdd).forEach(i -> {
-			try {
-				store.addMapping(mockEntries[i].getKey(), mockEntries[i]);
-			}
-			catch (Exception e) {
-				fail();
-			}
-		});
-	}
-	
-	private RegionEntry createRegionEntry(Object key, Object value) {
-		RegionEntry mockEntry = mock(RegionEntry.class);
-		when(mockEntry.getValue(any())).thenReturn(value);
-		when(mockEntry.getKey()).thenReturn(key);
-		return mockEntry;
-	}
+  protected void subclassPreSetup() {
+  }
+
+  protected Region createRegion() {
+    return mock(LocalRegion.class);
+  }
+
+  @Before
+  public void setup() {
+    subclassPreSetup();
+    region = createRegion();
+    cache = mock(GemFireCacheImpl.class);
+    actualInstance = GemFireCacheImpl.setInstanceForTests(cache);
+    mockStats = mock(AbstractIndex.InternalIndexStatistics.class);
+
+    store = new MemoryIndexStore(region, mockStats);
+    store.setIndexOnValues(true);
+    mockEntries = new RegionEntry[numMockEntries];
+    IntStream.range(0, numMockEntries).forEach(i-> {
+      mockEntries[i] = createRegionEntry(i, new Object());
+    });
+  }
+
+  @After
+  public void teardown() {
+    GemFireCacheImpl.setInstanceForTests(actualInstance);
+  }
+
+  @Test
+  public void testSizeOfStoreReturnsNumberOfKeysAndNotActualNumberOfValues() {
+    IntStream.range(0, 150).forEach(i -> {
+      try {
+        store.addMapping(i % 3, createRegionEntry(i, new Object()));
+      }
+      catch (Exception e) {
+        throw new AssertionError(e);
+      }
+    });
+    assertEquals(150, numObjectsInStore(store));
+  }
+
+  @Test
+  public void testAddEnoughEntriesToCreateAConcurrentHashSet() {
+    IntStream.range(0, 150).forEach(i -> {
+      try {
+        store.addMapping(1, createRegionEntry(i, new Object()));
+      }
+      catch (Exception e) {
+        throw new AssertionError(e);
+      }
+    });
+    assertEquals(150, numObjectsInStore(store));
+  }
+
+  @Test
+  public void testUpdateAgainstAConcurrentHashSet() throws Exception{
+    IntStream.range(0, 150).forEach(i -> {
+      try {
+        store.addMapping(1, createRegionEntry(1, new Object()));
+      }
+      catch (Exception e) {
+        throw new AssertionError(e);
+      }
+    });
+    RegionEntry entry = createRegionEntry(1, new Object());
+    store.addMapping(1, entry);
+    store.updateMapping(2, 1, entry, entry.getValue(null));
+    assertEquals(151, numObjectsInStore(store));
+  }
+
+  @Test
+  public void testCanAddObjectWithUndefinedKey() throws Exception {
+    store.addMapping(QueryService.UNDEFINED, mockEntries[0]);
+    assertEquals(1, numObjectsIterated(store.get(QueryService.UNDEFINED)));
+    assertEquals(0, numObjectsInStore(store));
+  }
+
+  @Test
+  public void testCanAddManyObjectsWithUndefinedKey() throws Exception {
+    for (int i = 0; i < mockEntries.length; i++) {
+      store.addMapping(QueryService.UNDEFINED, mockEntries[i]);
+    }
+    assertEquals(mockEntries.length, numObjectsIterated(store.get(QueryService.UNDEFINED)));
+    //Undefined will not return without an explicit get for UNDEFINED);
+    assertEquals(0, numObjectsInStore(store));
+  }
+
+  @Test
+  public void testIteratorWithStartInclusiveAndNoKeysToRemoveReturnsCorrectNumberOfResults() throws Exception {
+    addMockedEntries(numMockEntries);
+    assertEquals(2, numObjectsIterated(store.iterator(numMockEntries - 2, true, null)));
+  }
+
+  @Test
+  public void testIteratorWithStartExclusiveAndNoKeysToRemoveReturnsCorrectNumberOfResults() throws Exception {
+    addMockedEntries(numMockEntries);
+    assertEquals(1, numObjectsIterated(store.iterator(numMockEntries - 2, false, null)));
+  }
+
+  @Test
+  public void testIteratorWithStartInclusiveAndKeyToRemoveReturnsCorrectNumberOfResults() throws Exception {
+    addMockedEntries(numMockEntries);
+    Set keysToRemove = new HashSet();
+    keysToRemove.add("1");
+    assertEquals(9, numObjectsIterated(store.iterator(1, true, keysToRemove)));
+  }
+
+  @Test
+  public void testIteratorWithStartExclusiveAndKeyToRemoveReturnsCorrectNumberOfResults() throws Exception {
+    addMockedEntries(numMockEntries);
+    Set keysToRemove = new HashSet();
+    keysToRemove.add("1");
+    assertEquals(8, numObjectsIterated(store.iterator(1, false, keysToRemove)));
+  }
+
+  @Test
+  public void testStartAndEndInclusiveReturnsCorrectResults() throws Exception {
+    addMockedEntries(numMockEntries);
+    assertEquals(6, numObjectsIterated(store.iterator(1, true, 6, true, null)));
+  }
+
+  @Test
+  public void testStartInclusiveAndEndExclusiveReturnsCorrectResults() throws Exception {
+    addMockedEntries(numMockEntries);
+    assertEquals(5, numObjectsIterated(store.iterator(1, true, 6, false, null)));
+  }
+
+  @Test
+  public void testStartExclusiveAndEndExclusiveReturnsCorrectResults() throws Exception {
+    addMockedEntries(numMockEntries);
+    assertEquals(4, numObjectsIterated(store.iterator(1, false, 6, false, null)));
+  }
+
+  @Test
+  public void testStartExclusiveAndEndInclusiveReturnsCorrectResults() throws Exception {
+    addMockedEntries(numMockEntries);
+    assertEquals(5, numObjectsIterated(store.iterator(1, false, 6, true, null)));
+  }
+
+  @Test
+  public void testStartIsNull() throws Exception {
+    addMockedEntries(numMockEntries);
+    assertEquals(6, numObjectsIterated(store.iterator(null, false, 6, false, null)));
+  }
+
+  @Test
+  public void testDescendingIteratorReturnsExpectedOrderOfEntries() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    store.addMapping("1", mockEntry1);
+    store.addMapping("2", mockEntry2);
+    Iterator iteratorFirst = store.descendingIterator(null);
+    assertEquals(2, numObjectsIterated(iteratorFirst));
+
+    Iterator iterator = store.descendingIterator(null);
+    iterator.hasNext();
+    assertEquals(mockEntry2, ((MemoryIndexStore.MemoryIndexStoreEntry)iterator.next()).getRegionEntry());
+    iterator.hasNext();
+    assertEquals(mockEntry1, ((MemoryIndexStore.MemoryIndexStoreEntry)iterator.next()).getRegionEntry());
+  }
+
+  @Test
+  public void testDescendingIteratorWithRemovedKeysReturnsExpectedOrderOfEntries() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    RegionEntry mockEntry3 = mockEntries[2];
+    store.addMapping("1", mockEntry1);
+    store.addMapping("2", mockEntry2);
+    store.addMapping("3", mockEntry3);
+    Set keysToRemove = new HashSet();
+    keysToRemove.add("2");
+    Iterator iteratorFirst = store.descendingIterator(keysToRemove);
+    assertEquals(2, numObjectsIterated(iteratorFirst));
+
+    //keysToRemove has been modified by the store, we need to readd the key to remove
+    keysToRemove.add("2");
+    Iterator iterator = store.descendingIterator(keysToRemove);
+    iterator.hasNext();
+    assertEquals(mockEntry3, ((MemoryIndexStore.MemoryIndexStoreEntry)iterator.next()).getRegionEntry());
+    iterator.hasNext();
+    assertEquals(mockEntry1, ((MemoryIndexStore.MemoryIndexStoreEntry)iterator.next()).getRegionEntry());
+    assertFalse(iterator.hasNext());
+  }
+
+  @Test
+  public void testDescendingIteratorWithMultipleRemovedKeysReturnsExpectedOrderOfEntries() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    RegionEntry mockEntry3 = mockEntries[2];
+    store.addMapping("1", mockEntry1);
+    store.addMapping("2", mockEntry2);
+    store.addMapping("3", mockEntry3);
+    Set keysToRemove = new HashSet();
+    keysToRemove.add("2");
+    keysToRemove.add("1");
+    Iterator iteratorFirst = store.descendingIterator(keysToRemove);
+    assertEquals(1, numObjectsIterated(iteratorFirst));
+
+    //keysToRemove has been modified by the store, we need to readd the key to remove
+    keysToRemove.add("2");
+    keysToRemove.add("1");
+    Iterator iterator = store.descendingIterator(keysToRemove);
+    iterator.hasNext();
+    assertEquals(mockEntry3, ((MemoryIndexStore.MemoryIndexStoreEntry)iterator.next()).getRegionEntry());
+    assertFalse(iterator.hasNext());
+  }
+
+  @Test
+  public void testSizeWithKeyArgumentReturnsCorrectSize() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    store.addMapping("1", mockEntry1);
+    store.addMapping("2", mockEntry2);
+    assertEquals(1, store.size("1"));
+  }
+
+  @Test
+  public void testGetReturnsExpectedIteratorValue() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    store.addMapping("1", mockEntry1);
+    store.addMapping("2", mockEntry2);
+    assertEquals(1, numObjectsIterated(store.get("1")));
+  }
+
+  @Test
+  public void testGetReturnsExpectedIteratorWithMultipleValues() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    RegionEntry mockEntry3 = mockEntries[2];
+    RegionEntry mockEntry4 = mockEntries[3];
+    store.addMapping("1", mockEntry1);
+    store.addMapping("1", mockEntry2);
+    store.addMapping("1", mockEntry3);
+    store.addMapping("2", mockEntry4);
+    assertEquals(3, numObjectsIterated(store.get("1")));
+    assertEquals(4, numObjectsInStore(store));
+  }
+
+  @Test
+  public void testGetWithIndexOnKeysReturnsExpectedIteratorValues() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    store.setIndexOnValues(false);
+    store.setIndexOnRegionKeys(true);
+    store.addMapping("1", mockEntry1);
+    store.addMapping("2", mockEntry2);
+    assertEquals(1, numObjectsIterated(store.get("1")));
+  }
+
+  @Test
+  public void testCorrectlyRemovesEntryProvidedTheWrongKey() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    store.addMapping("1", mockEntry1);
+    store.addMapping("2", mockEntry2);
+    store.removeMapping("1", mockEntry2);
+    assertEquals(1, numObjectsInStore(store));
+    assertTrue(objectContainedIn(store, mockEntry1));
+  }
+
+  @Test
+  public void testRemoveMappingRemovesFromBackingMap() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    store.addMapping("1", mockEntry1);
+    store.addMapping("2", mockEntry2);
+    store.removeMapping("1", mockEntry1);
+    assertEquals(1, numObjectsInStore(store));
+    assertTrue(objectContainedIn(store, mockEntry2));
+  }
+
+  @Test
+  public void testAddMappingAddsToBackingMap() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    store.addMapping("1", mockEntry1);
+    store.addMapping("2", mockEntry2);
+    assertEquals(2, numObjectsInStore(store));
+    assertTrue(objectContainedIn(store, mockEntry1));
+    assertTrue(objectContainedIn(store, mockEntry2));
+  }
+
+  @Test
+  public void testClear() throws Exception {
+    RegionEntry mockEntry1 = mockEntries[0];
+    RegionEntry mockEntry2 = mockEntries[1];
+    store.addMapping("1", mockEntry1);
+    store.addMapping("1", mockEntry2);
+    store.clear();
+    assertEquals(0, numObjectsInStore(store));
+  }
+
+  private int numObjectsInStore(MemoryIndexStore store) {
+    Iterator iterator = store.iterator(null);
+    return numObjectsIterated(iterator);
+  }
+
+  private int numObjectsIterated(Iterator iterator) {
+    int count = 0;
+    while (iterator.hasNext()) {
+      iterator.next();
+      count++;
+    }
+    return count;
+  }
+
+  private boolean objectContainedIn(MemoryIndexStore store, Object o) {
+    Iterator iterator = store.valueToEntriesMap.values().iterator();
+    return objectContainedIn(iterator, o);
+  }
+
+  private boolean objectContainedIn(Iterator iterator, Object o) {
+    while (iterator.hasNext()) {
+      if (iterator.next().equals(o)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  private void addMockedEntries(int numEntriesToAdd) {
+    IntStream.range(0, numEntriesToAdd).forEach(i -> {
+      try {
+        store.addMapping(mockEntries[i].getKey(), mockEntries[i]);
+      }
+      catch (Exception e) {
+        throw new AssertionError(e);
+      }
+    });
+  }
+
+  private RegionEntry createRegionEntry(Object key, Object value) {
+    RegionEntry mockEntry = mock(RegionEntry.class);
+    when(mockEntry.getValue(any())).thenReturn(value);
+    when(mockEntry.getKey()).thenReturn(key);
+    return mockEntry;
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MemoryIndexStoreWithInplaceModificationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MemoryIndexStoreWithInplaceModificationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MemoryIndexStoreWithInplaceModificationJUnitTest.java
index 79f8616..82505de 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MemoryIndexStoreWithInplaceModificationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/MemoryIndexStoreWithInplaceModificationJUnitTest.java
@@ -16,9 +16,7 @@
  */
 package com.gemstone.gemfire.cache.query.internal.index;
 
-import static org.mockito.Mockito.mock;
-
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
 import org.junit.After;
 import org.junit.experimental.categories.Category;
@@ -30,25 +28,24 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class MemoryIndexStoreWithInplaceModificationJUnitTest extends MemoryIndexStoreJUnitTest {
-	
-	public void subclassPreSetup() {
-		IndexManager.INPLACE_OBJECT_MODIFICATION_FOR_TEST = true;
-	}
-	
-	protected Region createRegion() {
-		Region region = mock(LocalRegion.class);
-		RegionAttributes ra = mock(RegionAttributes.class);
-		when(region.getAttributes()).thenReturn(ra);
-		when(ra.getInitialCapacity()).thenReturn(16);
-		when(ra.getLoadFactor()).thenReturn(.75f);
-		when(ra.getConcurrencyLevel()).thenReturn(16);
-		return region;
-	}
-	
-	@After
-	public void resetInplaceModification() {
-		IndexManager.INPLACE_OBJECT_MODIFICATION_FOR_TEST = false;
-	}
-	
-	
+
+  public void subclassPreSetup() {
+    IndexManager.INPLACE_OBJECT_MODIFICATION_FOR_TEST = true;
+  }
+
+  protected Region createRegion() {
+    Region region = mock(LocalRegion.class);
+    RegionAttributes ra = mock(RegionAttributes.class);
+    when(region.getAttributes()).thenReturn(ra);
+    when(ra.getInitialCapacity()).thenReturn(16);
+    when(ra.getLoadFactor()).thenReturn(.75f);
+    when(ra.getConcurrencyLevel()).thenReturn(16);
+    return region;
+  }
+
+  @After
+  public void resetInPlaceModification() {
+    IndexManager.INPLACE_OBJECT_MODIFICATION_FOR_TEST = false;
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java
index 2cf8c3c..bc901f4 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicIndexCreationDUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.cache.query.partitioned;
 
 import static com.gemstone.gemfire.cache.query.Utils.*;
 
-
 import java.util.Collection;
 
 import com.gemstone.gemfire.cache.Cache;
@@ -39,18 +38,7 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
-/**
- * 
- */
-public class PRBasicIndexCreationDUnitTest extends
-    PartitionedRegionDUnitTestCase
-
-{
-  /**
-   * constructor
-   * 
-   * @param name
-   */
+public class PRBasicIndexCreationDUnitTest extends PartitionedRegionDUnitTestCase {
 
   public PRBasicIndexCreationDUnitTest(String name) {
     super(name);
@@ -400,6 +388,7 @@ public class PRBasicIndexCreationDUnitTest extends
         cnt, cntDest));
     vm1.invoke(PRQHelp.getCacheSerializableRunnableForPRIndexCreate(name,
         "PrIndexOnStatus", "status",null, ""));
+
     vm0.invoke(PRQHelp.getCacheSerializableRunnableForIndexCreationCheck(name));
     vm1.invoke(PRQHelp.getCacheSerializableRunnableForIndexCreationCheck(name));
     vm3.invoke(PRQHelp.getCacheSerializableRunnableForIndexCreationCheck(name));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicMultiIndexCreationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicMultiIndexCreationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicMultiIndexCreationDUnitTest.java
index 7b93734..fcc5c49 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicMultiIndexCreationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRBasicMultiIndexCreationDUnitTest.java
@@ -34,25 +34,18 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
-
-public class PRBasicMultiIndexCreationDUnitTest extends
-    PartitionedRegionDUnitTestCase
-
-{
-  /**
-   * constructor
-   * 
-   * @param name
-   */
+public class PRBasicMultiIndexCreationDUnitTest extends PartitionedRegionDUnitTestCase {
 
   public PRBasicMultiIndexCreationDUnitTest(String name) {
     super(name);
   }
+
   public void setCacheInVMs(VM... vms) {
     for (VM vm : vms) {
       vm.invoke(() -> PRQueryDUnitHelper.setCache(getCache()));
     }
   }
+
   PRQueryDUnitHelper PRQHelp = new PRQueryDUnitHelper();
 
   final String name = "PartionedPortfolios";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
index 84ef866..241aeb6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
@@ -18,10 +18,7 @@ package com.gemstone.gemfire.cache.query.partitioned;
 
 import static org.junit.Assert.*;
 
-import java.io.BufferedWriter;
 import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -32,6 +29,8 @@ import java.util.Random;
 import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 
+import util.TestException;
+
 import com.gemstone.gemfire.CancelException;
 import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.cache.AttributesFactory;
@@ -85,8 +84,6 @@ import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
 import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 import com.gemstone.gemfire.util.test.TestUtil;
 
-import util.TestException;
-
 /**
  * This is a helper class for the various Partitioned Query DUnit Test Cases
  * 
@@ -1040,6 +1037,9 @@ public class PRQueryDUnitHelper implements Serializable
                 if(srr.size() > l*l) {
                   fail("The resultset size exceeds limit size. Limit size="+ l*l+", result size ="+ srr.asList().size());
                 }
+                //assertIndexDetailsEquals("The resultset size is not same as limit size.", l*l, srr.asList().size());
+
+//                getCache().getLogger().info("Finished executing PR query: " + qStr);
               }
             }
             StructSetOrResultsSet ssORrs = new  StructSetOrResultsSet();
@@ -1232,6 +1232,41 @@ public class PRQueryDUnitHelper implements Serializable
           Iterator it = indexes.iterator();
           while(it.hasNext()) {
             PartitionedIndex ind = (PartitionedIndex)it.next();
+            /*List bucketIndex = ind.getBucketIndexes();
+            int k = 0;
+            logger.info("Total number of bucket index : "+bucketIndex.size());
+            while ( k < bucketIndex.size() ){
+              Index bukInd = (Index)bucketIndex.get(k);
+              logger.info("Buket Index "+bukInd+"  usage : "+bukInd.getStatistics().getTotalUses());
+              // if number of quries on pr change in getCacheSerializableRunnableForPRQueryAndCompareResults
+              // literal 6  should change.
+              //Asif :  With the optmization of Range Queries a where clause
+              // containing something like ID > 4 AND ID < 9 will be evaluated 
+              //using a single index lookup, so accordingly modifying the 
+              //assert value from 7 to 6
+              // Anil : With aquiringReadLock during Index.getSizeEstimate(), the
+              // Index usage in case of "ID = 0 OR ID = 1" is increased by 3.
+              int indexUsageWithSizeEstimation = 3;
+              int expectedUse = 6;
+              long indexUse = bukInd.getStatistics().getTotalUses();
+              // Anil : With chnages to use single index for PR query evaluation, once the index
+              // is identified the same index is used on other PR buckets, the sieEstimation is
+              // done only once, which adds additional index use for only one bucket index.
+              if (!(indexUse == expectedUse || indexUse == (expectedUse + indexUsageWithSizeEstimation))){
+                fail ("Index usage is not as expected, expected it to be either " + 
+                    expectedUse + " or " + (expectedUse + indexUsageWithSizeEstimation) + 
+                    " it is: " + indexUse);
+                //assertIndexDetailsEquals(6 + indexUsageWithSizeEstimation, bukInd.getStatistics().getTotalUses());
+              }
+              k++;
+            }*/
+            //Shobhit: Now we dont need to check stats per bucket index,
+            //stats are accumulated in single pr index stats.
+            
+            // Anil : With aquiringReadLock during Index.getSizeEstimate(), the
+            // Index usage in case of "ID = 0 OR ID = 1" is increased by 3.
+            int indexUsageWithSizeEstimation = 3;
+            
             logger.info("index uses for "+ind.getNumberOfIndexedBuckets()+" index "+ind.getName()+": "+ind.getStatistics().getTotalUses());
             assertEquals(6, ind.getStatistics().getTotalUses());
           }
@@ -1614,6 +1649,13 @@ public class PRQueryDUnitHelper implements Serializable
                   + " and remote buckets indexed : "
                   + ((PartitionedIndex)parIndex).getNumRemoteBucketsIndexed());
           }
+          /*
+           * assertIndexDetailsEquals("Max num of buckets in the partiotion regions and
+           * the " + "buckets indexed should be equal",
+           * ((PartitionedRegion)region).getTotalNumberOfBuckets(),
+           * (((PartionedIndex)parIndex).getNumberOfIndexedBucket()+((PartionedIndex)parIndex).getNumRemtoeBucketsIndexed()));
+           * should put all the assetion in a seperate function.
+           */
         }
         catch (Exception ex) {
           Assert.fail("Creating Index in this vm failed : ", ex);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitTest.java
index 548d998..c5ec4b7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitTest.java
@@ -714,7 +714,7 @@ public class PRQueryDUnitTest extends PartitionedRegionDUnitTestCase
           assertTrue(false);
         } catch (QueryException expected) {
         }
-//        assertEquals(1, results.size());
+//        assertIndexDetailsEquals(1, results.size());
 //        getLogWriter().info("Select results are: " + results);
         return Boolean.TRUE;
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/server/internal/ConnectionCountProbeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/server/internal/ConnectionCountProbeJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/server/internal/ConnectionCountProbeJUnitTest.java
index 5522ae5..91e82f3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/server/internal/ConnectionCountProbeJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/server/internal/ConnectionCountProbeJUnitTest.java
@@ -16,35 +16,33 @@
  */
 package com.gemstone.gemfire.cache.server.internal;
 
-import org.junit.experimental.categories.Category;
+import static org.junit.Assert.*;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.server.ServerLoad;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- *
- */
 @Category(UnitTest.class)
-public class ConnectionCountProbeJUnitTest extends TestCase {
+public class ConnectionCountProbeJUnitTest {
   
+  @Test
   public void test() {
     ConnectionCountProbe probe = new ConnectionCountProbe();
     ServerMetricsImpl metrics = new ServerMetricsImpl(800);
     ServerLoad load = probe.getLoad(metrics);
-    Assert.assertEquals(0f, load.getConnectionLoad(), .0001f);
-    Assert.assertEquals(0f, load.getSubscriptionConnectionLoad(), .0001f);
-    Assert.assertEquals(1/800f, load.getLoadPerConnection(), .0001f);
-    Assert.assertEquals(1f, load.getLoadPerSubscriptionConnection(), .0001f);
+    assertEquals(0f, load.getConnectionLoad(), .0001f);
+    assertEquals(0f, load.getSubscriptionConnectionLoad(), .0001f);
+    assertEquals(1/800f, load.getLoadPerConnection(), .0001f);
+    assertEquals(1f, load.getLoadPerSubscriptionConnection(), .0001f);
 
     for(int i = 0; i < 100; i++) {
       metrics.incConnectionCount();
     }
     
     load = probe.getLoad(metrics);
-    Assert.assertEquals(0.125, load.getConnectionLoad(), .0001f);
+    assertEquals(0.125, load.getConnectionLoad(), .0001f);
   }
     
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/util/PasswordUtilJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/util/PasswordUtilJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/util/PasswordUtilJUnitTest.java
index 883f733..2b631cd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/util/PasswordUtilJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/util/PasswordUtilJUnitTest.java
@@ -16,16 +16,19 @@
  */
 package com.gemstone.gemfire.cache.util;
 
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.util.PasswordUtil;
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
+@Category({ UnitTest.class, SecurityTest.class })
+public class PasswordUtilJUnitTest {
 
-@Category(UnitTest.class)
-public class PasswordUtilJUnitTest extends TestCase {
+  @Test
   public void testPasswordUtil() {
     String x = "password";
     String z = null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java
index bb8bc5e..21e7a7e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java
@@ -119,15 +119,15 @@ public abstract class CacheLoaderTestCase
 //        public Object load2(LoaderHelper helper)
 //          throws CacheLoaderException {
 //
-//          assertEquals(key, helper.getKey());
-//          assertEquals(name, helper.getRegion().getName());
+//          assertIndexDetailsEquals(key, helper.getKey());
+//          assertIndexDetailsEquals(name, helper.getRegion().getName());
 //
 //          try {
 //            RegionAttributes attrs =
 //              helper.getRegion().getAttributes();
 //            if (attrs.getScope().isDistributed()) {
 //              Object result = helper.netSearch(false);
-//              assertEquals(value, result);
+//              assertIndexDetailsEquals(value, result);
 //              return result;
 //            }
 //
@@ -158,8 +158,8 @@ public abstract class CacheLoaderTestCase
 ////            public Object load2(LoaderHelper helper)
 ////              throws CacheLoaderException {
 ////
-////              assertEquals(key, helper.getKey());
-////              assertEquals(name, helper.getRegion().getName());
+////              assertIndexDetailsEquals(key, helper.getKey());
+////              assertIndexDetailsEquals(name, helper.getRegion().getName());
 ////              return value;
 ////            }
 ////          };
@@ -174,9 +174,9 @@ public abstract class CacheLoaderTestCase
 //    });
 //
 //
-//    assertEquals(value, region.get(key));
+//    assertIndexDetailsEquals(value, region.get(key));
 //    assertTrue(loader.wasInvoked());
-//    assertEquals(value, region.getEntry(key).getValue());
+//    assertIndexDetailsEquals(value, region.getEntry(key).getValue());
 //  }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
index 0be86e2..56f0261 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
@@ -288,7 +288,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
             
             //test containsValue
             boolean flag = region.containsValue(new String("first"));
-            //assertEquals(true, flag);
+            //assertIndexDetailsEquals(true, flag);
             
             //test remove
             region.put(""+i[2], "second");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
index ff635b0..18bb79f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
@@ -48,7 +48,7 @@ public class CacheStatisticsDUnitTest extends CacheTestCase {
    * Asserts that two <code>long</code>s are equal concerning a
    * delta.
    */
-//   public static void assertEquals(long expected, long actual,
+//   public static void assertIndexDetailsEquals(long expected, long actual,
 //                                   long delta) {
 //     long difference = Math.abs(expected - actual);
 //     assertTrue("Expected: " + expected
@@ -472,7 +472,7 @@ public class CacheStatisticsDUnitTest extends CacheTestCase {
           // lastAccessed var contains stat from an Entry, which may be
           // up to 100 ms off from stat in Region because Entry has
           // less precision
-          //assertEquals(lastAccessed, stats.getLastAccessedTime(), 100);
+          //assertIndexDetailsEquals(lastAccessed, stats.getLastAccessedTime(), 100);
           assertEquals(0, stats.getHitCount());
           assertEquals(0, stats.getMissCount());
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java
index 4835691..ad851ad 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java
@@ -523,12 +523,12 @@ public class CacheXml41DUnitTest extends CacheXml40DUnitTest
   //  Region r = getRootRegion().getSubregion(name);
   //  
   //  HeapLRUCapacityController hlcc = (HeapLRUCapacityController) r.getAttributes().getCapacityController();
-  //  assertEquals(hlcc.getEvictionAction(), LRUAlgorithm.OVERFLOW_TO_DISK);
+  //  assertIndexDetailsEquals(hlcc.getEvictionAction(), LRUAlgorithm.OVERFLOW_TO_DISK);
   //  
   //  Properties p = hlcc.getProperties();
-  //  assertEquals(42, Integer.parseInt(p.getProperty(HeapLRUCapacityController.HEAP_PERCENTAGE)));
-  //  assertEquals(32, Long.parseLong(p.getProperty(HeapLRUCapacityController.EVICTOR_INTERVAL)));
-  //  assertEquals(LRUAlgorithm.OVERFLOW_TO_DISK, p.getProperty(HeapLRUCapacityController.EVICTION_ACTION));
+  //  assertIndexDetailsEquals(42, Integer.parseInt(p.getProperty(HeapLRUCapacityController.HEAP_PERCENTAGE)));
+  //  assertIndexDetailsEquals(32, Long.parseLong(p.getProperty(HeapLRUCapacityController.EVICTOR_INTERVAL)));
+  //  assertIndexDetailsEquals(LRUAlgorithm.OVERFLOW_TO_DISK, p.getProperty(HeapLRUCapacityController.EVICTION_ACTION));
   //}
   /**
    * Test Publisher region attribute
@@ -542,7 +542,7 @@ public class CacheXml41DUnitTest extends CacheXml40DUnitTest
 //    attrs.setPublisher(true);
 //    cache.createRegion("root", attrs);
 //    testXml(cache);
-//    assertEquals(true, cache.getRegion("root").getAttributes().getPublisher());
+//    assertIndexDetailsEquals(true, cache.getRegion("root").getAttributes().getPublisher());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml57DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml57DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml57DUnitTest.java
index 6b37acc..5cda16b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml57DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml57DUnitTest.java
@@ -234,7 +234,7 @@ public class CacheXml57DUnitTest extends CacheXml55DUnitTest
     assertEquals(12351, cp.getStatisticInterval());
     assertEquals("mygroup", cp.getServerGroup());
       // commented this out until queues are implemented
-    //    assertEquals(true, cp.getQueueEnabled());
+    //    assertIndexDetailsEquals(true, cp.getQueueEnabled());
     assertEquals(12345, cp.getSubscriptionRedundancy());
     assertEquals(12345, cp.getSubscriptionMessageTrackingTimeout());
     assertEquals(333, cp.getSubscriptionAckInterval());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml58DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml58DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml58DUnitTest.java
index c56b6ed..d5123e7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml58DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml58DUnitTest.java
@@ -304,7 +304,7 @@ public class CacheXml58DUnitTest extends CacheXml57DUnitTest
     assertEquals(regionAttrs.getEntryTimeToLive().getTimeout(), expiration.getTimeout());    
 //  TODO mthomas 01/20/09 Move test back to using LRUHeap when config issues have settled
 //    if (getGemFireVersion().equals(CacheXml.GEMFIRE_6_0)) {
-//      assertEquals(ea.getAlgorithm(),EvictionAlgorithm.LRU_HEAP);
+//      assertIndexDetailsEquals(ea.getAlgorithm(),EvictionAlgorithm.LRU_HEAP);
 //    } else {
     assertEquals(ea.getAlgorithm(),EvictionAlgorithm.LRU_MEMORY);
 //    }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml65DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml65DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml65DUnitTest.java
index c50d6d6..56376e0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml65DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml65DUnitTest.java
@@ -275,7 +275,7 @@ public class CacheXml65DUnitTest extends CacheXml61DUnitTest {
     assertEquals(12351, cp.getStatisticInterval());
     assertEquals("mygroup", cp.getServerGroup());
     // commented this out until queues are implemented
-    // assertEquals(true, cp.getQueueEnabled());
+    // assertIndexDetailsEquals(true, cp.getQueueEnabled());
     assertEquals(12345, cp.getSubscriptionRedundancy());
     assertEquals(12345, cp.getSubscriptionMessageTrackingTimeout());
     assertEquals(333, cp.getSubscriptionAckInterval());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
index 4652e74..8530c0f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -1539,7 +1539,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       totalClientCounts += clientCounts[i];
     }
     // this assertion fails because the count is 4
-    //assertEquals(1, totalClientCounts);
+    //assertIndexDetailsEquals(1, totalClientCounts);
   }
 
   protected static int testGetNotifiedClients_port;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
index d7e1255..aa327f8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
@@ -1481,7 +1481,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
 //         for (int i = 0; i < NB1_NUM_ENTRIES; i++) {
 //           rgn.put(new Integer(i), values[i]);
 //         }
-//         assertEquals(NB1_NUM_ENTRIES, rgn.keys().size());
+//         assertIndexDetailsEquals(NB1_NUM_ENTRIES, rgn.keys().size());
 //         //close and create to ensure that all data will go to htree 
 //         //TODO: Mitul : remove this later to fine tune test to also take oplogs recovery into account
 //         rgn.close();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
index 20051f7..8555a07 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
@@ -583,7 +583,7 @@ public class DistAckMapMethodsDUnitTest extends DistributedTestCase{
             
             //test args for containsKey method
             boolean val2 = region.containsValue(new String("second"));
-            //assertEquals(true, val2);
+            //assertIndexDetailsEquals(true, val2);
             
             //test args for remove method
             try{

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
index 6050e3d..0acd2aa 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
@@ -172,10 +172,10 @@ public class DistributedAckPersistentRegionCCEDUnitTest extends DistributedAckRe
 //
 //    VersionTag tag0 = getVersionTag(vm0, key);
 //    VersionTag tag1 = getVersionTag(vm1, key);
-//    assertEquals(3, tag0.getRegionVersion());
-//    assertEquals(3, tag0.getEntryVersion());
-//    assertEquals(3, tag1.getRegionVersion());
-//    assertEquals(3, tag1.getEntryVersion());
+//    assertIndexDetailsEquals(3, tag0.getRegionVersion());
+//    assertIndexDetailsEquals(3, tag0.getEntryVersion());
+//    assertIndexDetailsEquals(3, tag1.getRegionVersion());
+//    assertIndexDetailsEquals(3, tag1.getEntryVersion());
 //
 //    // shutdown and recover
 //    vm0.invoke(disconnect);
@@ -185,10 +185,10 @@ public class DistributedAckPersistentRegionCCEDUnitTest extends DistributedAckRe
 //
 //    tag0 = getVersionTag(vm0, key);
 //    tag1 = getVersionTag(vm1, key);
-//    assertEquals(3, tag0.getRegionVersion());
-//    assertEquals(3, tag0.getEntryVersion());
-//    assertEquals(3, tag1.getRegionVersion());
-//    assertEquals(3, tag1.getEntryVersion());
+//    assertIndexDetailsEquals(3, tag0.getRegionVersion());
+//    assertIndexDetailsEquals(3, tag0.getEntryVersion());
+//    assertIndexDetailsEquals(3, tag1.getRegionVersion());
+//    assertIndexDetailsEquals(3, tag1.getEntryVersion());
 //
 //    vm0.invoke(new SerializableRunnable("put with version 1, value vm1") {
 //      public void run() {
@@ -202,20 +202,20 @@ public class DistributedAckPersistentRegionCCEDUnitTest extends DistributedAckRe
 //          DistributedRegion.LOCALCLEAR_TESTHOOK = false;
 //        }
 //        CCRegion.put(key, "vm0");
-//        Assert.assertEquals("vm0", CCRegion.get(key));
+//        Assert.assertIndexDetailsEquals("vm0", CCRegion.get(key));
 //      }
 //    });
 //    vm1.invoke(new SerializableRunnable("verify that value has not been updated") {
 //      public void run() {
-//        Assert.assertEquals("dummy", CCRegion.get(key));
+//        Assert.assertIndexDetailsEquals("dummy", CCRegion.get(key));
 //      }
 //    });
 //
 //    tag0 = getVersionTag(vm0, key);
 //    tag1 = getVersionTag(vm1, key);
-//    assertEquals(4, tag0.getRegionVersion());
-//    assertEquals(1, tag0.getEntryVersion());
-//    assertEquals(3, tag1.getRegionVersion());
-//    assertEquals(3, tag1.getEntryVersion());
+//    assertIndexDetailsEquals(4, tag0.getRegionVersion());
+//    assertIndexDetailsEquals(1, tag0.getEntryVersion());
+//    assertIndexDetailsEquals(3, tag1.getRegionVersion());
+//    assertIndexDetailsEquals(3, tag1.getEntryVersion());
 //  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
index 04662ca..9ad102d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
@@ -1729,8 +1729,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 //            public Object load2(LoaderHelper helper)
 //              throws CacheLoaderException {
 //
-//              assertEquals(key, helper.getKey());
-//              assertEquals(name, helper.getRegion().getName());
+//              assertIndexDetailsEquals(key, helper.getKey());
+//              assertIndexDetailsEquals(name, helper.getRegion().getName());
 //              return value;
 //            }
 //          };
@@ -2844,15 +2844,15 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 //           // longer optimize updates based on size.
 //           Region.Entry entry1 = region.getEntry(key1);
 //           assertNotNull(entry1);
-//           assertEquals(value1, entry1.getValue());
+//           assertIndexDetailsEquals(value1, entry1.getValue());
 
 //           Region.Entry entry2 = region.getEntry(key2);
 //           assertNotNull(entry2);
-//           assertEquals(value2, entry2.getValue());
+//           assertIndexDetailsEquals(value2, entry2.getValue());
 
 //           Region.Entry entry3 = region.getEntry(key3);
 //           assertNotNull(entry3);
-//           assertEquals(value3, entry3.getValue());
+//           assertIndexDetailsEquals(value3, entry3.getValue());
 //         }
 //       });
 //   }
@@ -4395,7 +4395,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 //               if (getRegionAttributes().getScope().isDistributedAck()) {
 //                 // do a nonblocking netSearch
 //                 region.localInvalidate(key);
-//                 assertEquals(value, region.get(key));
+//                 assertIndexDetailsEquals(value, region.get(key));
 //               }
               break;
             case 3: // INVALIDATE
@@ -4720,7 +4720,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 //               if (getRegionAttributes().getScope().isDistributedAck()) {
 //                 // do a nonblocking netSearch
 //                 region.localInvalidate(key);
-//                 assertEquals(value, region.get(key));
+//                 assertIndexDetailsEquals(value, region.get(key));
 //               }
               break;
             case 3: // INVALIDATE
@@ -5037,7 +5037,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 //               if (getRegionAttributes().getScope().isDistributedAck()) {
 //                 // do a nonblocking netSearch
 //                 region.localInvalidate(key);
-//                 assertEquals(value, region.get(key));
+//                 assertIndexDetailsEquals(value, region.get(key));
 //               }
               break;
             case 3: // INVALIDATE
@@ -5333,7 +5333,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 //               if (getRegionAttributes().getScope().isDistributedAck()) {
 //                 // do a nonblocking netSearch
 //                 region.localInvalidate(key);
-//                 assertEquals(value, region.get(key));
+//                 assertIndexDetailsEquals(value, region.get(key));
 //               }
               break;
             case 3: // INVALIDATE
@@ -6716,7 +6716,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
           ev = (EntryEvent)it.next();
           assertSame(rgn1, ev.getRegion());
-          //assertEquals(tl.expectedTxId, ev.getTransactionId());
+          //assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
           assertEquals("key", ev.getKey());
           assertEquals("value1", ev.getNewValue());
           assertEquals(null, ev.getOldValue());
@@ -6732,7 +6732,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
           ev = (EntryEvent)it.next();
           assertSame(rgn3, ev.getRegion());
-          //assertEquals(tl.expectedTxId, ev.getTransactionId());
+          //assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
           assertEquals("key", ev.getKey());
           assertEquals("value3", ev.getNewValue());
           assertEquals(null, ev.getOldValue());
@@ -6791,7 +6791,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
           ev = (EntryEvent)it.next();
           assertSame(rgn2, ev.getRegion());
-          //assertEquals(tl.expectedTxId, ev.getTransactionId());
+          //assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
           assertEquals("key", ev.getKey());
           assertEquals("value2", ev.getNewValue());
           assertEquals(null, ev.getOldValue());
@@ -6807,7 +6807,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 
           ev = (EntryEvent)it.next();
           assertSame(rgn3, ev.getRegion());
-          //assertEquals(tl.expectedTxId, ev.getTransactionId());
+          //assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
           assertEquals("key", ev.getKey());
           assertEquals("value3", ev.getNewValue());
           assertEquals(null, ev.getOldValue());
@@ -6847,7 +6847,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             }
             assertEquals(1, events.size());
             EntryEvent ev = (EntryEvent)events.iterator().next();
-            //assertEquals(tl.expectedTxId, ev.getTransactionId());
+            //assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
             assertTrue(ev.getRegion() == rgn);
             assertEquals("key", ev.getKey());
             assertEquals("value1", ev.getNewValue());
@@ -6887,7 +6887,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             }
             assertEquals(1, events.size());
             EntryEvent ev = (EntryEvent)events.iterator().next();
-            //assertEquals(tl.expectedTxId, ev.getTransactionId());
+            //assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
             assertTrue(ev.getRegion() == rgn);
             assertEquals("key", ev.getKey());
             assertEquals("value2", ev.getNewValue());
@@ -6927,7 +6927,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             }
             assertEquals(1, events.size());
             EntryEvent ev = (EntryEvent)events.iterator().next();
-            //assertEquals(tl.expectedTxId, ev.getTransactionId());
+            //assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
             assertTrue(ev.getRegion() == rgn);
             assertEquals("key", ev.getKey());
             assertEquals("value3", ev.getNewValue());
@@ -7379,7 +7379,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           Collection events = tl.lastEvent.getCreateEvents();
           assertEquals(1, events.size());
           EntryEvent ev = (EntryEvent)events.iterator().next();
-          //assertEquals(tl.expectedTxId, ev.getTransactionId());
+          //assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
           assertTrue(ev.getRegion() == rgn);
           assertEquals("key", ev.getKey());
           assertEquals("value", ev.getNewValue());
@@ -7530,7 +7530,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
               }
               assertEquals(1, events.size());
               EntryEvent ev = (EntryEvent)events.iterator().next();
-              // assertEquals(tl.expectedTxId, ev.getTransactionId());
+              // assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
               assertTrue(ev.getRegion() == rgn1);
               assertEquals("key", ev.getKey());
               assertEquals("value2", ev.getNewValue());
@@ -7608,7 +7608,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
               }
               assertEquals(1, events.size());
               EntryEvent ev = (EntryEvent)events.iterator().next();
-              // assertEquals(tl.expectedTxId, ev.getTransactionId());
+              // assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
               assertTrue(ev.getRegion() == rgn1);
               assertEquals("key", ev.getKey());
               assertNull(ev.getNewValue());
@@ -7753,7 +7753,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
               Collection events = tl.lastEvent.getDestroyEvents();
               assertEquals(1, events.size());
               EntryEvent ev = (EntryEvent)events.iterator().next();
-              // assertEquals(tl.expectedTxId, ev.getTransactionId());
+              // assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
               assertTrue(ev.getRegion() == rgn1);
               assertNull(ev.getKey());
               assertNull(ev.getNewValue());
@@ -7817,7 +7817,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
               }
               assertEquals(1, events.size());
               EntryEvent ev = (EntryEvent)events.iterator().next();
-              // assertEquals(tl.expectedTxId, ev.getTransactionId());
+              // assertIndexDetailsEquals(tl.expectedTxId, ev.getTransactionId());
               assertTrue(ev.getRegion() == rgn1);
               assertEquals("key", ev.getKey());
               assertEquals("value1", ev.getNewValue());
@@ -8404,13 +8404,13 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       // that they originate that maybe should have been elided.  For this reason we can't
       // guarantee their consistency and don't check for it here.
 //      if (r1Contents.containsKey(key)) {
-//        assertEquals("region contents are not consistent", r1Contents.get(key), r2Contents.get(key));
+//        assertIndexDetailsEquals("region contents are not consistent", r1Contents.get(key), r2Contents.get(key));
 //      }
       assertEquals("region contents are not consistent for " + key, r2Contents.get(key), r3Contents.get(key));
       for (int subi=1; subi<3; subi++) {
         String subkey = key + "-" + subi;
         if (r2Contents.containsKey(subkey)) {
-//          assertEquals("region contents are not consistent for " + subkey, r1Contents.get(subkey), r2Contents.get(subkey));
+//          assertIndexDetailsEquals("region contents are not consistent for " + subkey, r1Contents.get(subkey), r2Contents.get(subkey));
           assertEquals("region contents are not consistent for " + subkey, r2Contents.get(subkey), r3Contents.get(subkey));
         } else {
           // can't assert this because a clear() op will cause non-replicated to start rejecting
@@ -8628,8 +8628,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
 //            fail("sleep was interrupted");
 //          }
 //          count = CCRegion.getTombstoneCount();
-//          assertEquals("expected zero tombstones", 0, count);
-//          assertEquals(numEntries, CCRegion.size());
+//          assertIndexDetailsEquals("expected zero tombstones", 0, count);
+//          assertIndexDetailsEquals(numEntries, CCRegion.size());
         }
       });
 
@@ -8921,7 +8921,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
       assertEquals("region contents are not consistent", r1Contents.get(key), r2Contents.get(key));
       assertEquals("region contents are not consistent", r2Contents.get(key), r3Contents.get(key));
 //      if (r0Contents.containsKey(key)) {
-//        assertEquals("region contents are not consistent", r1Contents.get(key), r0Contents.get(key));
+//        assertIndexDetailsEquals("region contents are not consistent", r1Contents.get(key), r0Contents.get(key));
 //      }
       for (int subi=1; subi<3; subi++) {
         String subkey = key + "-" + subi;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/PutAllMultiVmDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/PutAllMultiVmDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/PutAllMultiVmDUnitTest.java
index 2baeb52..cee7263 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/PutAllMultiVmDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/PutAllMultiVmDUnitTest.java
@@ -174,7 +174,7 @@ public class PutAllMultiVmDUnitTest extends DistributedTestCase{
         
         vm0.invoke(new CacheSerializableRunnable("testSimplePutAll2"){
             public void run2() throws CacheException {
-                //assertEquals(0, region.size());
+                //assertIndexDetailsEquals(0, region.size());
                 createMirroredRegion();
                 cacheTxnMgr = cache.getCacheTransactionManager();
                 int cntr = 0;
@@ -276,7 +276,7 @@ public class PutAllMultiVmDUnitTest extends DistributedTestCase{
         
         vm0.invoke(new CacheSerializableRunnable("testPutAllExceptions2"){
             public void run2() throws CacheException {
-                //assertEquals(0, region.size());
+                //assertIndexDetailsEquals(0, region.size());
                 createMirroredRegion();
                 
                 for(int i=1; i<6; i++) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
index ae0c3f2..76c1b03 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
@@ -135,7 +135,7 @@ public class QueueMsgDUnitTest extends ReliabilityTestCase {
         public void run2() throws CacheException {
           Region r = getRootRegion();
           assertEquals(null, r.getEntry("createKey"));
-          //assertEquals("putValue", r.getEntry("createKey").getValue());
+          //assertIndexDetailsEquals("putValue", r.getEntry("createKey").getValue());
           {
             int evIdx = 0;
             TestCacheListener cl = (TestCacheListener)r.getAttributes().getCacheListener();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionMembershipListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionMembershipListenerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionMembershipListenerDUnitTest.java
index 1a8d126..2f6b7a5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionMembershipListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionMembershipListenerDUnitTest.java
@@ -194,7 +194,7 @@ public class RegionMembershipListenerDUnitTest extends CacheTestCase {
     // test new methods added for #43098
     if (expectedId != null) {
       Cache cache = (Cache)this.r.getRegionService();
-      //assertEquals(l, new ArrayList(cache.getMembers()));
+      //assertIndexDetailsEquals(l, new ArrayList(cache.getMembers()));
       assertEquals(l, new ArrayList(cache.getMembers(this.r)));
       assertEquals(l, new ArrayList(cache.getMembers(this.sr)));
     }
@@ -219,7 +219,7 @@ public class RegionMembershipListenerDUnitTest extends CacheTestCase {
       assertEquals(this.r, e.getRegion());
       // the test now uses a hook to get the member's DistributionAdvisor profile in the callback argument
       assertTrue(e.getCallbackArgument() instanceof Profile);
-//      assertEquals(null, e.getCallbackArgument());
+//      assertIndexDetailsEquals(null, e.getCallbackArgument());
     }
     assertTrue(this.mySRListener.lastOpWasCreate());
     {
@@ -231,7 +231,7 @@ public class RegionMembershipListenerDUnitTest extends CacheTestCase {
       assertEquals(this.sr, e.getRegion());
       // the test now uses a hook to get the member's DistributionAdvisor profile in the callback argument
       assertTrue(e.getCallbackArgument() instanceof Profile);
-//      assertEquals(null, e.getCallbackArgument());
+//      assertIndexDetailsEquals(null, e.getCallbackArgument());
     }
   }
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
index e2e270c..45cb8a5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
@@ -421,7 +421,7 @@ public abstract class RegionTestCase extends CacheTestCase {
     Region subregion = region.createSubregion(name, attrs);
     assertTrue(attrs != subregion.getAttributes());
     /* @todo compare each individual attribute for equality?
-    assertEquals(attrs, subregion.getAttributes());
+    assertIndexDetailsEquals(attrs, subregion.getAttributes());
      */
     
     Set subregions = region.subregions(false);
@@ -1607,7 +1607,7 @@ public abstract class RegionTestCase extends CacheTestCase {
       // assert that if this is a disk region, the disk dirs are empty
       // to make sure we start with a clean slate
       getCache().getLogger().info("list="+Arrays.toString(diskDir.list()));
-//       assertEquals("list="+Arrays.toString(diskDir.list()),
+//       assertIndexDetailsEquals("list="+Arrays.toString(diskDir.list()),
 //                    0, diskDir.list().length);
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
index 3b6034a..2441256 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
@@ -194,7 +194,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
               };
               Wait.waitForCriterion(ev, 50 * 1000, 200, true);
 //              assertNotNull(re);
-//              assertEquals(null, value);
+//              assertIndexDetailsEquals(null, value);
             }
           } else {
             {
@@ -1451,7 +1451,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
               continue;
             }
             assertEquals(new Integer(expectedArgs[i]), arg);
-            //assertEquals(CALLBACK_UPDATE_INTEGER, type);
+            //assertIndexDetailsEquals(CALLBACK_UPDATE_INTEGER, type);
             i++;
           }
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherServiceStatusTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherServiceStatusTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherServiceStatusTest.java
index c741def..940802f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherServiceStatusTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherServiceStatusTest.java
@@ -22,17 +22,15 @@ import java.io.File;
 import java.io.IOException;
 import java.lang.management.ManagementFactory;
 import java.net.InetAddress;
-import java.net.UnknownHostException;
 import java.util.Arrays;
 import java.util.List;
 
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.distributed.AbstractLauncherServiceStatusTest.TestLauncher.TestState;
 import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.process.PidUnavailableException;
 import com.gemstone.gemfire.internal.process.ProcessUtils;
 import com.gemstone.gemfire.management.internal.cli.json.GfJsonArray;
 import com.gemstone.gemfire.management.internal.cli.json.GfJsonException;
@@ -47,34 +45,58 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class AbstractLauncherServiceStatusTest {
 
-  private static final String SERVICE_NAME = "Test";
-  private static final InetAddress HOST = getLocalHost();
-  private static final int PORT = 12345;
-  private static final String NAME = AbstractLauncherServiceStatusTest.class.getSimpleName();
-  private static final int PID = identifyPid();
-  private static final long UPTIME = 123456789;
-  private static final String WORKING_DIRECTORY = identifyWorkingDirectory();
-  private static final List<String> JVM_ARGUMENTS = ManagementFactory.getRuntimeMXBean().getInputArguments();
-  private static final String CLASSPATH = ManagementFactory.getRuntimeMXBean().getClassPath();
-  private static final String GEMFIRE_VERSION = GemFireVersion.getGemFireVersion();
-  private static final String JAVA_VERSION = System.getProperty("java.version");
+  private static String serviceName;
+  private static InetAddress host;
+  private static int port;
+  private static String name;
+  private static int pid;
+  private static long uptime;
+  private static String workingDirectory;
+  private static List<String> jvmArguments;
+  private static String classpath;
+  private static String gemfireVersion;
+  private static String javaVersion;
 
   private TestLauncher launcher;
 
   @Before
-  public void setUp() {
-    this.launcher = new TestLauncher(HOST, PORT, NAME);
+  public void setUp() throws Exception {
+    serviceName = "Test";
+    port = 12345;
+    host = InetAddress.getLocalHost();
+    pid = ProcessUtils.identifyPid();
+    uptime = 123456789;
+    name = AbstractLauncherServiceStatusTest.class.getSimpleName();
+    workingDirectory = new File(System.getProperty("user.dir")).getAbsolutePath();
+    jvmArguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
+    classpath = ManagementFactory.getRuntimeMXBean().getClassPath();
+    gemfireVersion = GemFireVersion.getGemFireVersion();
+    javaVersion = System.getProperty("java.version");
+
+    this.launcher = new TestLauncher(host, port, name);
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    serviceName = null;
+    host = null;
+    name = null;
+    workingDirectory = null;
+    jvmArguments = null;
+    classpath = null;
+    gemfireVersion = null;
+    javaVersion = null;
   }
 
   @Test
   public void testMarshallingTestStatusToAndFromJson() {
-    final TestState status = this.launcher.status();
+    final TestLauncher.TestState status = this.launcher.status();
     final String json = status.toJson();
     validateJson(status, json);
-    validateStatus(status, TestState.fromJson(json));
+    validateStatus(status, TestLauncher.TestState.fromJson(json));
   }
 
-  private void validateStatus(final TestState expected, final TestState actual) {
+  private void validateStatus(final TestLauncher.TestState expected, final TestLauncher.TestState actual) {
     assertEquals(expected.getClasspath(), actual.getClasspath());
     assertEquals(expected.getGemFireVersion(), actual.getGemFireVersion());
     assertEquals(expected.getJavaVersion(), actual.getJavaVersion());
@@ -89,39 +111,12 @@ public class AbstractLauncherServiceStatusTest {
     assertEquals(expected.getMemberName(), actual.getMemberName());
   }
 
-  private void validateJson(final TestState expected, final String json) {
-    final TestState actual = TestState.fromJson(json);
+  private void validateJson(final TestLauncher.TestState expected, final String json) {
+    final TestLauncher.TestState actual = TestLauncher.TestState.fromJson(json);
     validateStatus(expected, actual);
   }
 
-  private static int identifyPid() {
-    try {
-      return ProcessUtils.identifyPid();
-    }
-    catch (PidUnavailableException e) {
-      return 0;
-    }
-  }
-
-  private static String identifyWorkingDirectory() {
-    try {
-      return new File(System.getProperty("user.dir")).getCanonicalPath();
-    }
-    catch (IOException e) {
-      return new File(System.getProperty("user.dir")).getAbsolutePath();
-    }
-  }
-
-  private static InetAddress getLocalHost() {
-    try {
-      return InetAddress.getLocalHost();
-    }
-    catch (UnknownHostException e) {
-      return null;
-    }
-  }
-  
-  static class TestLauncher extends AbstractLauncher<String> {
+  private static class TestLauncher extends AbstractLauncher<String> {
 
     private final InetAddress bindAddress;
     private final int port;
@@ -142,17 +137,17 @@ public class AbstractLauncherServiceStatusTest {
         null,
         System.currentTimeMillis(),
         getId(),
-        PID,
-        UPTIME,
-        WORKING_DIRECTORY,
-        JVM_ARGUMENTS,
-        CLASSPATH,
-        GEMFIRE_VERSION,
-        JAVA_VERSION,
+              pid,
+              uptime,
+              workingDirectory,
+              jvmArguments,
+              classpath,
+              gemfireVersion,
+              javaVersion,
         getLogFileName(),
         getBindAddressAsString(),
         getPortAsString(),
-        NAME);
+              name);
     }
 
     @Override
@@ -185,7 +180,7 @@ public class AbstractLauncherServiceStatusTest {
 
     @Override
     public String getServiceName() {
-      return SERVICE_NAME;
+      return serviceName;
     }
 
     InetAddress getBindAddress() {
@@ -204,7 +199,7 @@ public class AbstractLauncherServiceStatusTest {
       return String.valueOf(getPort());
     }
 
-    public static class TestState extends ServiceState<String> {
+    private static class TestState extends ServiceState<String> {
 
       protected static TestState fromJson(final String json) {
         try {
@@ -256,7 +251,7 @@ public class AbstractLauncherServiceStatusTest {
 
       @Override
       protected String getServiceName() {
-        return SERVICE_NAME;
+        return serviceName;
       }
     }
   }



[43/55] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-1153

Posted by sa...@apache.org.
Merge branch 'develop' into feature/GEODE-1153


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/603e6f56
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/603e6f56
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/603e6f56

Branch: refs/heads/feature/GEODE-1153
Commit: 603e6f562abce89d2dd0851a38ded4eec974b418
Parents: 37db604 3222b05
Author: Sai Boorlagadda <sb...@pivotal.io>
Authored: Tue May 10 21:52:35 2016 -0700
Committer: Sai Boorlagadda <sb...@pivotal.io>
Committed: Tue May 10 21:52:35 2016 -0700

----------------------------------------------------------------------
 .../gemfire/cache/AttributesFactory.java        |   1 +
 .../gemfire/cache/AttributesMutator.java        |   1 +
 .../gemstone/gemfire/cache/RegionFactory.java   |   1 +
 .../cache/client/ClientRegionFactory.java       |   1 +
 .../query/internal/index/AbstractIndex.java     |  12 +-
 .../cache/util/BoundedLinkedHashMap.java        |  88 ----
 .../internal/SharedConfiguration.java           |   2 +-
 .../internal/cache/AbstractRegionEntry.java     |  14 +-
 .../internal/cache/AbstractRegionMap.java       |  26 +-
 .../gemfire/internal/cache/RegionEntry.java     |   2 -
 .../parallel/ParallelQueueRemovalMessage.java   |   1 +
 .../offheap/OffHeapRegionEntryHelper.java       |   4 +-
 .../PartitionedRegionSingleHopDUnitTest.java    | 441 ++++++-------------
 ...tentColocatedPartitionedRegionDUnitTest.java |   3 +-
 .../OffHeapRegionEntryHelperJUnitTest.java      |   4 +-
 .../SharedConfigurationDUnitTest.java           |   2 +-
 .../SharedConfigurationTestUtils.java           |   2 +-
 .../SharedConfigurationUsingDirDUnitTest.java   |   3 +-
 .../gemfire/test/golden/log4j2-test.xml         |  18 -
 .../codeAnalysis/sanctionedSerializables.txt    |   1 -
 .../LuceneIndexForPartitionedRegion.java        |  38 +-
 .../LuceneIndexForReplicatedRegion.java         |   1 +
 .../cache/lucene/internal/LuceneIndexImpl.java  |  29 ++
 .../LuceneIndexCreationIntegrationTest.java     |  74 ++++
 .../LuceneIndexForPartitionedRegionTest.java    |  82 ++--
 .../lucene/internal/LuceneIntegrationTest.java  |  47 ++
 26 files changed, 380 insertions(+), 518 deletions(-)
----------------------------------------------------------------------



[37/55] [abbrv] incubator-geode git commit: GEODE-1369: change ConfigCommandsDUnitTest to use TemporaryFolder

Posted by sa...@apache.org.
GEODE-1369: change ConfigCommandsDUnitTest to use TemporaryFolder

* use TemporaryFolder for all disk files
* re-enable testAlterUpdatesSharedConfig (might be a FlakyTest) -- was disabled for TRAC #52204 but it passes
* use static imports


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f93c87f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f93c87f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f93c87f1

Branch: refs/heads/feature/GEODE-1153
Commit: f93c87f13b4bf1bda67d994587d1299163694772
Parents: c8ca8a0
Author: Kirk Lund <kl...@apache.org>
Authored: Tue May 10 11:03:09 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Tue May 10 11:03:09 2016 -0700

----------------------------------------------------------------------
 .../cli/commands/ConfigCommandsDUnitTest.java   | 319 ++++++++++---------
 1 file changed, 171 insertions(+), 148 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f93c87f1/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
index c342142..1d861c6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
@@ -16,10 +16,13 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
+import static com.gemstone.gemfire.internal.AvailablePort.*;
+import static com.gemstone.gemfire.internal.AvailablePortHelper.*;
 import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Invoke.*;
 import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
 import static com.gemstone.gemfire.test.dunit.Wait.*;
+import static org.apache.commons.io.FileUtils.*;
 
 import java.io.File;
 import java.io.FileReader;
@@ -32,6 +35,9 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Properties;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.distributed.Locator;
@@ -39,9 +45,6 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalLocator;
 import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.FileUtil;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
@@ -58,10 +61,6 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
-import org.apache.commons.io.FileUtils;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 /**
  * Dunit class for testing GemFire config commands : export config
  *
@@ -71,110 +70,113 @@ import org.junit.experimental.categories.Category;
 @SuppressWarnings("serial")
 public class ConfigCommandsDUnitTest extends CliCommandTestBase {
 
-  File managerConfigFile = new File("Manager-cache.xml");
-  File managerPropsFile = new File("Manager-gf.properties");
-  File vm1ConfigFile = new File("VM1-cache.xml");
-  File vm1PropsFile = new File("VM1-gf.properties");
-  File vm2ConfigFile = new File("VM2-cache.xml");
-  File vm2PropsFile = new File("VM2-gf.properties");
-  File shellConfigFile = new File("Shell-cache.xml");
-  File shellPropsFile = new File("Shell-gf.properties");
-  File subDir = new File("ConfigCommandsDUnitTestSubDir");
-  File subManagerConfigFile = new File(subDir, managerConfigFile.getName());
+  private File managerConfigFile;
+  private File managerPropsFile;
+  private File vm1ConfigFile;
+  private File vm1PropsFile;
+  private File vm2ConfigFile;
+  private File vm2PropsFile;
+  private File shellConfigFile;
+  private File shellPropsFile;
+  private File subDir;
+  private File subManagerConfigFile;
 
   @Override
-  protected void preTearDownCliCommandTestBase() throws Exception {
-    deleteTestFiles();
-    invokeInEveryVM(new SerializableRunnable() {
-
-      @Override
-      public void run() {
-        try {
-          deleteTestFiles();
-        } catch (IOException e) {
-          fail("error", e);
-        }
-      }
-    });
+  protected final void postSetUpCliCommandTestBase() throws Exception {
+    this.managerConfigFile = this.temporaryFolder.newFile("Manager-cache.xml");
+    this.managerPropsFile = this.temporaryFolder.newFile("Manager-gf.properties");
+    this.vm1ConfigFile = this.temporaryFolder.newFile("VM1-cache.xml");
+    this.vm1PropsFile = this.temporaryFolder.newFile("VM1-gf.properties");
+    this.vm2ConfigFile = this.temporaryFolder.newFile("VM2-cache.xml");
+    this.vm2PropsFile = this.temporaryFolder.newFile("VM2-gf.properties");
+    this.shellConfigFile = this.temporaryFolder.newFile("Shell-cache.xml");
+    this.shellPropsFile = this.temporaryFolder.newFile("Shell-gf.properties");
+    this.subDir = this.temporaryFolder.newFolder(getName());
+    this.subManagerConfigFile = new File(this.subDir, this.managerConfigFile.getName());
   }
 
   @Test
-  public void testDescribeConfig() throws ClassNotFoundException, IOException {
+  public void testDescribeConfig() throws Exception {
     setUpJmxManagerOnVm0ThenConnect(null);
     final String controllerName = "Member2";
 
-    /***
+    /*
      * Create properties for the controller VM
      */
     final Properties localProps = new Properties();
-    localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-    localProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
-    localProps.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
-    localProps.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
-    localProps.setProperty(DistributionConfig.NAME_NAME, controllerName);
-    localProps.setProperty(DistributionConfig.GROUPS_NAME, "G1");
+    localProps.setProperty(MCAST_PORT_NAME, "0");
+    localProps.setProperty(LOG_LEVEL_NAME, "info");
+    localProps.setProperty(STATISTIC_SAMPLING_ENABLED_NAME, "true");
+    localProps.setProperty(ENABLE_TIME_STATISTICS_NAME, "true");
+    localProps.setProperty(NAME_NAME, controllerName);
+    localProps.setProperty(GROUPS_NAME, "G1");
     getSystem(localProps);
     Cache cache = getCache();
-    int ports[] = AvailablePortHelper.getRandomAvailableTCPPorts(1);
+
+    int ports[] = getRandomAvailableTCPPorts(1);
     CacheServer cs = getCache().addCacheServer();
     cs.setPort(ports[0]);
     cs.setMaxThreads(10);
     cs.setMaxConnections(9);
     cs.start();
+    try {
 
-    RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
-    List<String> jvmArgs = runtimeBean.getInputArguments();
+      RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
+      List<String> jvmArgs = runtimeBean.getInputArguments();
 
-    getLogWriter().info("#SB Actual JVM Args : ");
+      getLogWriter().info("#SB Actual JVM Args : ");
 
-    for (String jvmArg : jvmArgs) {
-      getLogWriter().info("#SB JVM " + jvmArg);
-    }
+      for (String jvmArg : jvmArgs) {
+        getLogWriter().info("#SB JVM " + jvmArg);
+      }
 
-    InternalDistributedSystem system = (InternalDistributedSystem) cache.getDistributedSystem();
-    DistributionConfig config = system.getConfig();
-    config.setArchiveFileSizeLimit(1000);
+      InternalDistributedSystem system = (InternalDistributedSystem) cache.getDistributedSystem();
+      DistributionConfig config = system.getConfig();
+      config.setArchiveFileSizeLimit(1000);
 
-    String command = CliStrings.DESCRIBE_CONFIG + " --member=" + controllerName;
-    CommandProcessor cmdProcessor = new CommandProcessor();
-    cmdProcessor.createCommandStatement(command, Collections.EMPTY_MAP).process();
+      String command = CliStrings.DESCRIBE_CONFIG + " --member=" + controllerName;
+      CommandProcessor cmdProcessor = new CommandProcessor();
+      cmdProcessor.createCommandStatement(command, Collections.EMPTY_MAP).process();
 
-    CommandResult cmdResult = executeCommand(command);
+      CommandResult cmdResult = executeCommand(command);
 
-    String resultStr = commandResultToString(cmdResult);
-    getLogWriter().info("#SB Hiding the defaults\n" + resultStr);
+      String resultStr = commandResultToString(cmdResult);
+      getLogWriter().info("#SB Hiding the defaults\n" + resultStr);
 
-    assertEquals(true, cmdResult.getStatus().equals(Status.OK));
-    assertEquals(true, resultStr.contains("G1"));
-    assertEquals(true, resultStr.contains(controllerName));
-    assertEquals(true, resultStr.contains("archive-file-size-limit"));
-    assertEquals(true, !resultStr.contains("copy-on-read"));
+      assertEquals(true, cmdResult.getStatus().equals(Status.OK));
+      assertEquals(true, resultStr.contains("G1"));
+      assertEquals(true, resultStr.contains(controllerName));
+      assertEquals(true, resultStr.contains("archive-file-size-limit"));
+      assertEquals(true, !resultStr.contains("copy-on-read"));
 
-    cmdResult = executeCommand(command + " --" + CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS + "=false");
-    resultStr = commandResultToString(cmdResult);
-    getLogWriter().info("#SB No hiding of defaults\n" + resultStr);
+      cmdResult = executeCommand(command + " --" + CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS + "=false");
+      resultStr = commandResultToString(cmdResult);
 
-    assertEquals(true, cmdResult.getStatus().equals(Status.OK));
-    assertEquals(true, resultStr.contains("is-server"));
-    assertEquals(true, resultStr.contains(controllerName));
-    assertEquals(true, resultStr.contains("copy-on-read"));
+      getLogWriter().info("#SB No hiding of defaults\n" + resultStr);
+
+      assertEquals(true, cmdResult.getStatus().equals(Status.OK));
+      assertEquals(true, resultStr.contains("is-server"));
+      assertEquals(true, resultStr.contains(controllerName));
+      assertEquals(true, resultStr.contains("copy-on-read"));
 
-    cs.stop();
+    } finally {
+      cs.stop();
+    }
   }
 
   @Test
-  public void testExportConfig() throws IOException {
+  public void testExportConfig() throws Exception {
     Properties localProps = new Properties();
-    localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
-    localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+    localProps.setProperty(NAME_NAME, "Manager");
+    localProps.setProperty(GROUPS_NAME, "Group1");
     setUpJmxManagerOnVm0ThenConnect(localProps);
 
     // Create a cache in another VM (VM1)
     Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
       public void run() {
         Properties localProps = new Properties();
-        localProps.setProperty(DistributionConfig.NAME_NAME, "VM1");
-        localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+        localProps.setProperty(NAME_NAME, "VM1");
+        localProps.setProperty(GROUPS_NAME, "Group2");
         getSystem(localProps);
         getCache();
       }
@@ -184,8 +186,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     Host.getHost(0).getVM(2).invoke(new SerializableRunnable() {
       public void run() {
         Properties localProps = new Properties();
-        localProps.setProperty(DistributionConfig.NAME_NAME, "VM2");
-        localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+        localProps.setProperty(NAME_NAME, "VM2");
+        localProps.setProperty(GROUPS_NAME, "Group2");
         getSystem(localProps);
         getCache();
       }
@@ -193,47 +195,47 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
 
     // Create a cache in the local VM
     localProps = new Properties();
-    localProps.setProperty(DistributionConfig.NAME_NAME, "Shell");
+    localProps.setProperty(NAME_NAME, "Shell");
     getSystem(localProps);
     Cache cache = getCache();
 
     // Test export config for all members
     deleteTestFiles();
-    CommandResult cmdResult = executeCommand("export config");
+    CommandResult cmdResult = executeCommand("export config --dir=" + this.temporaryFolder.getRoot().getAbsolutePath());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
-    assertTrue(this.managerConfigFile.exists());
-    assertTrue(this.managerPropsFile.exists());
-    assertTrue(this.vm1ConfigFile.exists());
-    assertTrue(this.vm1PropsFile.exists());
-    assertTrue(this.vm2ConfigFile.exists());
-    assertTrue(this.vm2PropsFile.exists());
-    assertTrue(this.shellConfigFile.exists());
-    assertTrue(this.shellPropsFile.exists());
+    assertTrue(this.managerConfigFile + " should exist", this.managerConfigFile.exists());
+    assertTrue(this.managerPropsFile + " should exist", this.managerPropsFile.exists());
+    assertTrue(this.vm1ConfigFile + " should exist", this.vm1ConfigFile.exists());
+    assertTrue(this.vm1PropsFile + " should exist", this.vm1PropsFile.exists());
+    assertTrue(this.vm2ConfigFile + " should exist", this.vm2ConfigFile.exists());
+    assertTrue(this.vm2PropsFile + " should exist", this.vm2PropsFile.exists());
+    assertTrue(this.shellConfigFile + " should exist", this.shellConfigFile.exists());
+    assertTrue(this.shellPropsFile + " should exist", this.shellPropsFile.exists());
 
     // Test exporting member
     deleteTestFiles();
-    cmdResult = executeCommand("export config --member=Manager");
+    cmdResult = executeCommand("export config --member=Manager --dir=" + this.temporaryFolder.getRoot().getAbsolutePath());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
-    assertTrue(this.managerConfigFile.exists());
-    assertFalse(this.vm1ConfigFile.exists());
-    assertFalse(this.vm2ConfigFile.exists());
-    assertFalse(this.shellConfigFile.exists());
+    assertTrue(this.managerConfigFile + " should exist", this.managerConfigFile.exists());
+    assertFalse(this.vm1ConfigFile + " should not exist", this.vm1ConfigFile.exists());
+    assertFalse(this.vm2ConfigFile + " should not exist", this.vm2ConfigFile.exists());
+    assertFalse(this.shellConfigFile + " should not exist", this.shellConfigFile.exists());
 
     // Test exporting group
     deleteTestFiles();
-    cmdResult = executeCommand("export config --group=Group2");
+    cmdResult = executeCommand("export config --group=Group2 --dir=" + this.temporaryFolder.getRoot().getAbsolutePath());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
-    assertFalse(this.managerConfigFile.exists());
-    assertTrue(this.vm1ConfigFile.exists());
-    assertTrue(this.vm2ConfigFile.exists());
-    assertFalse(this.shellConfigFile.exists());
+    assertFalse(this.managerConfigFile + " should not exist", this.managerConfigFile.exists());
+    assertTrue(this.vm1ConfigFile + " should exist", this.vm1ConfigFile.exists());
+    assertTrue(this.vm2ConfigFile + " should exist", this.vm2ConfigFile.exists());
+    assertFalse(this.shellConfigFile + " should not exist", this.shellConfigFile.exists());
 
     // Test export to directory
     deleteTestFiles();
-    cmdResult = executeCommand("export config --dir=" + subDir.getAbsolutePath());
+    cmdResult = executeCommand("export config --dir=" + this.subDir.getAbsolutePath());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     assertFalse(this.managerConfigFile.exists());
@@ -246,30 +248,32 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     String configToMatch = stringWriter.toString();
 
     deleteTestFiles();
-    cmdResult = executeCommand("export config --member=Shell");
+    cmdResult = executeCommand("export config --member=Shell --dir=" + this.temporaryFolder.getRoot().getAbsolutePath());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     char[] fileContents = new char[configToMatch.length()];
-    try {
-      FileReader reader = new FileReader(shellConfigFile);
-      reader.read(fileContents);
-    } catch (Exception ex) {
-      fail("Unable to read file contents for comparison", ex);
-    }
+    FileReader reader = new FileReader(this.shellConfigFile);
+    reader.read(fileContents);
 
     assertEquals(configToMatch, new String(fileContents));
   }
 
   @Test
-  public void testAlterRuntimeConfig() throws ClassNotFoundException, IOException {
+  public void testAlterRuntimeConfig() throws Exception {
     final String controller = "controller";
+    String directory = this.temporaryFolder.newFolder(controller).getAbsolutePath();
+    String statFilePath = new File(directory, "stat.gfs").getAbsolutePath();
+
     setUpJmxManagerOnVm0ThenConnect(null);
+
     Properties localProps = new Properties();
-    localProps.setProperty(DistributionConfig.NAME_NAME, controller);
-    localProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "error");
+    localProps.setProperty(NAME_NAME, controller);
+    localProps.setProperty(LOG_LEVEL_NAME, "error");
     getSystem(localProps);
+
     final GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
     final DistributionConfig config = cache.getSystem().getConfig();
+
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG);
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__MEMBER, controller);
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__LEVEL, "info");
@@ -277,13 +281,16 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__DISK__SPACE__LIMIT, "32");
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__FILE__SIZE__LIMIT, "49");
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLE__RATE, "2000");
-    csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__ARCHIVE__FILE, "stat.gfs");
+    csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__ARCHIVE__FILE, statFilePath);
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLING__ENABLED, "true");
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "10");
+
     CommandResult cmdResult = executeCommand(csb.getCommandString());
     String resultString = commandResultToString(cmdResult);
+
     getLogWriter().info("Result\n");
     getLogWriter().info(resultString);
+
     assertEquals(true, cmdResult.getStatus().equals(Status.OK));
     assertEquals(LogWriterImpl.INFO_LEVEL, config.getLogLevel());
     assertEquals(50, config.getLogFileSizeLimit());
@@ -293,27 +300,29 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     assertEquals(true, config.getStatisticSamplingEnabled());
     assertEquals(10, config.getLogDiskSpaceLimit());
 
-
     CommandProcessor commandProcessor = new CommandProcessor();
     Result result = commandProcessor.createCommandStatement("alter runtime", Collections.EMPTY_MAP).process();
   }
 
   @Test
-  public void testAlterRuntimeConfigRandom() {
+  public void testAlterRuntimeConfigRandom() throws Exception {
     final String member1 = "VM1";
     final String controller = "controller";
+
     setUpJmxManagerOnVm0ThenConnect(null);
+
     Properties localProps = new Properties();
-    localProps.setProperty(DistributionConfig.NAME_NAME, controller);
-    localProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "error");
+    localProps.setProperty(NAME_NAME, controller);
+    localProps.setProperty(LOG_LEVEL_NAME, "error");
     getSystem(localProps);
+
     final GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
     final DistributionConfig config = cache.getSystem().getConfig();
 
     Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
       public void run() {
         Properties localProps = new Properties();
-        localProps.setProperty(DistributionConfig.NAME_NAME, member1);
+        localProps.setProperty(NAME_NAME, member1);
         getSystem(localProps);
         Cache cache = getCache();
       }
@@ -322,8 +331,10 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG);
     CommandResult cmdResult = executeCommand(csb.getCommandString());
     String resultAsString = commandResultToString(cmdResult);
+
     getLogWriter().info("#SB Result\n");
     getLogWriter().info(resultAsString);
+
     assertEquals(true, cmdResult.getStatus().equals(Status.ERROR));
     assertTrue(resultAsString.contains(CliStrings.ALTER_RUNTIME_CONFIG__RELEVANT__OPTION__MESSAGE));
 
@@ -331,45 +342,56 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "2000000000");
     cmdResult = executeCommand(csb.getCommandString());
     resultAsString = commandResultToString(cmdResult);
+
     getLogWriter().info("#SB Result\n");
     getLogWriter().info(resultAsString);
-    assertEquals(true, cmdResult.getStatus().equals(Status.ERROR));
 
+    assertEquals(true, cmdResult.getStatus().equals(Status.ERROR));
   }
 
   @Test
-  public void testAlterRuntimeConfigOnAllMembers() {
+  public void testAlterRuntimeConfigOnAllMembers() throws Exception {
     final String member1 = "VM1";
     final String controller = "controller";
+
+    String controllerDirectory = this.temporaryFolder.newFolder(controller).getAbsolutePath();
+    String controllerStatFilePath = new File(controllerDirectory, "stat.gfs").getAbsolutePath();
+
     setUpJmxManagerOnVm0ThenConnect(null);
+
     Properties localProps = new Properties();
-    localProps.setProperty(DistributionConfig.NAME_NAME, controller);
-    localProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "error");
+    localProps.setProperty(NAME_NAME, controller);
+    localProps.setProperty(LOG_LEVEL_NAME, "error");
     getSystem(localProps);
+
     final GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
     final DistributionConfig config = cache.getSystem().getConfig();
 
     Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
       public void run() {
         Properties localProps = new Properties();
-        localProps.setProperty(DistributionConfig.NAME_NAME, member1);
+        localProps.setProperty(NAME_NAME, member1);
         getSystem(localProps);
         Cache cache = getCache();
       }
     });
+
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG);
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__LEVEL, "info");
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__FILE__SIZE__LIMIT, "50");
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__DISK__SPACE__LIMIT, "32");
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__FILE__SIZE__LIMIT, "49");
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLE__RATE, "2000");
-    csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__ARCHIVE__FILE, "stat.gfs");
+    csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__ARCHIVE__FILE, controllerStatFilePath);
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLING__ENABLED, "true");
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, "10");
+
     CommandResult cmdResult = executeCommand(csb.getCommandString());
     String resultString = commandResultToString(cmdResult);
+
     getLogWriter().info("#SB Result\n");
     getLogWriter().info(resultString);
+
     assertEquals(true, cmdResult.getStatus().equals(Status.OK));
     assertEquals(LogWriterImpl.INFO_LEVEL, config.getLogLevel());
     assertEquals(50, config.getLogFileSizeLimit());
@@ -384,7 +406,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
       public void run() {
         GemFireCacheImpl cacheVM1 = (GemFireCacheImpl) getCache();
-        final DistributionConfig configVM1 = cacheVM1.getSystem().getConfig();
+        DistributionConfig configVM1 = cacheVM1.getSystem().getConfig();
+
         assertEquals(LogWriterImpl.INFO_LEVEL, configVM1.getLogLevel());
         assertEquals(50, configVM1.getLogFileSizeLimit());
         assertEquals(49, configVM1.getArchiveFileSizeLimit());
@@ -399,51 +422,51 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
 
   /**
    * Asserts that altering the runtime config correctly updates the shared configuration.
-   * <p>
-   * Disabled: this test frequently fails during unit test runs. See ticket #52204
    */
-  public void disabledtestAlterUpdatesSharedConfig() {
-    disconnectAllFromDS();
-
-    final String groupName = "testAlterRuntimeConfigSharedConfigGroup";
+  @Test
+  public void testAlterUpdatesSharedConfig() throws Exception {
+    final String groupName = getName();
 
     // Start the Locator and wait for shared configuration to be available
-    final int locatorPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    final int locatorPort = getRandomAvailablePort(SOCKET);
+    final String locatorDirectory = this.temporaryFolder.newFolder("Locator").getAbsolutePath();
+
     Host.getHost(0).getVM(3).invoke(new SerializableRunnable() {
       @Override
       public void run() {
+        final File locatorLogFile = new File(locatorDirectory, "locator-" + locatorPort + ".log");
 
-        final File locatorLogFile = new File("locator-" + locatorPort + ".log");
         final Properties locatorProps = new Properties();
-        locatorProps.setProperty(DistributionConfig.NAME_NAME, "Locator");
-        locatorProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-        locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+        locatorProps.setProperty(NAME_NAME, "Locator");
+        locatorProps.setProperty(MCAST_PORT_NAME, "0");
+        locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+        locatorProps.setProperty(CLUSTER_CONFIGURATION_DIR, locatorDirectory);
+
         try {
-          final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
-              locatorProps);
+          final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null, locatorProps);
 
           WaitCriterion wc = new WaitCriterion() {
             @Override
             public boolean done() {
               return locator.isSharedConfigurationRunning();
             }
-
             @Override
             public String description() {
               return "Waiting for shared configuration to be started";
             }
           };
           waitForCriterion(wc, 5000, 500, true);
-        } catch (IOException ioex) {
-          fail("Unable to create a locator with a shared configuration");
+
+        } catch (IOException e) {
+          fail("Unable to create a locator with a shared configuration", e);
         }
       }
     });
 
     // Start the default manager
     Properties managerProps = new Properties();
-    managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-    managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+    managerProps.setProperty(MCAST_PORT_NAME, "0");
+    managerProps.setProperty(LOCATORS_NAME, "localhost:" + locatorPort);
     setUpJmxManagerOnVm0ThenConnect(managerProps);
 
     // Create a cache in VM 1
@@ -451,18 +474,15 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     vm.invoke(new SerializableCallable() {
       @Override
       public Object call() throws Exception {
-        //Make sure no previous shared config is screwing up this test.
-        FileUtil.delete(new File("ConfigDiskDir_Locator"));
-        FileUtil.delete(new File("cluster_config"));
         Properties localProps = new Properties();
-        localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-        localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
-        localProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "error");
-        localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+        localProps.setProperty(MCAST_PORT_NAME, "0");
+        localProps.setProperty(LOCATORS_NAME, "localhost:" + locatorPort);
+        localProps.setProperty(LOG_LEVEL_NAME, "error");
+        localProps.setProperty(GROUPS_NAME, groupName);
         getSystem(localProps);
 
         assertNotNull(getCache());
-        assertEquals("error", basicGetSystem().getConfig().getAttribute(DistributionConfig.LOG_LEVEL_NAME));
+        assertEquals("error", basicGetSystem().getConfig().getAttribute(LOG_LEVEL_NAME));
         return null;
       }
     });
@@ -472,6 +492,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     commandStringBuilder.addOption(CliStrings.ALTER_RUNTIME_CONFIG__GROUP, groupName);
     commandStringBuilder.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__LEVEL, "fine");
     CommandResult cmdResult = executeCommand(commandStringBuilder.toString());
+
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     // Make sure the shared config was updated
@@ -479,13 +500,15 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
       @Override
       public void run() {
         SharedConfiguration sharedConfig = ((InternalLocator) Locator.getLocator()).getSharedConfiguration();
-        Properties gemfireProperties;
+        Properties gemfireProperties = null;
+
         try {
           gemfireProperties = sharedConfig.getConfiguration(groupName).getGemfireProperties();
-          assertEquals("fine", gemfireProperties.get(DistributionConfig.LOG_LEVEL_NAME));
         } catch (Exception e) {
           fail("Error occurred in cluster configuration service", e);
         }
+
+        assertEquals("fine", gemfireProperties.get(LOG_LEVEL_NAME));
       }
     });
   }
@@ -500,6 +523,6 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     this.shellConfigFile.delete();
     this.shellPropsFile.delete();
 
-    FileUtils.deleteDirectory(this.subDir);
+    deleteDirectory(this.subDir);
   }
 }


[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

Posted by sa...@apache.org.
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);
-    
   }
 
 }


[31/55] [abbrv] incubator-geode git commit: adding the required license header to a generated test class

Posted by sa...@apache.org.
adding the required license header to a generated test class


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/3fe55d4a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3fe55d4a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3fe55d4a

Branch: refs/heads/feature/GEODE-1153
Commit: 3fe55d4ad0701ede358c87629f3f13d4de965cfa
Parents: 625d491
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon May 9 16:13:38 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon May 9 16:14:33 2016 -0700

----------------------------------------------------------------------
 .../distributed/DistributedLockBlackboard.java     | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3fe55d4a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboard.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboard.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboard.java
index de8809c..e475bcc 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboard.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboard.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package com.gemstone.gemfire.distributed;
 
 import java.io.Serializable;


[10/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest.java
new file mode 100644
index 0000000..aaa6a3c
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest.java
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal;
+
+import static org.junit.Assert.fail;
+
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+/**
+ * See bug 52093.
+ * Make sure that the contents of arrays are
+ * used to test equality on regions ops.
+ */
+@Category(IntegrationTest.class)
+public class RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest {
+
+  private GemFireCacheImpl createCache() {
+    Properties props = new Properties();
+    props.setProperty("locators", "");
+    props.setProperty("mcast-port", "0");
+    GemFireCacheImpl result = (GemFireCacheImpl) new CacheFactory(props).create();
+    return result;
+  }
+
+  private void closeCache(GemFireCacheImpl gfc) {
+    gfc.close();
+  }
+  
+  private void doOps(Region r) {
+    {
+      byte[] bytesValue = new byte[]{1,2,3,4};
+      r.put("bytesValue", bytesValue.clone());
+      if (r.replace("bytesValue", "", "")) fail("expected replace to fail");
+      if (!r.replace("bytesValue", bytesValue, "")) {
+        fail("expected replace to happen");
+      }
+      r.put("bytesValue", bytesValue.clone());
+      if (r.remove("bytesValue", "")) fail("expected remove to fail");
+      if (!r.remove("bytesValue", bytesValue)) {
+        fail("expected remove to happen");
+      }
+    }
+    {
+      boolean[] booleanValue = new boolean[]{true,false,true,false};
+      r.put("booleanValue", booleanValue.clone());
+      if (r.replace("booleanValue", "", "")) fail("expected replace to fail");
+      if (!r.replace("booleanValue", booleanValue, "")) {
+        fail("expected replace to happen");
+      }
+      r.put("booleanValue", booleanValue.clone());
+      if (r.remove("booleanValue", "")) fail("expected remove to fail");
+      if (!r.remove("booleanValue", booleanValue)) {
+        fail("expected remove to happen");
+      }
+    }
+    {
+      short[] shortValue = new short[]{1,2,3,4};
+      r.put("shortValue", shortValue.clone());
+      if (r.replace("shortValue", "", "")) fail("expected replace to fail");
+      if (!r.replace("shortValue", shortValue, "")) {
+        fail("expected replace to happen");
+      }
+      r.put("shortValue", shortValue.clone());
+      if (r.remove("shortValue", "")) fail("expected remove to fail");
+      if (!r.remove("shortValue", shortValue)) {
+        fail("expected remove to happen");
+      }
+    }
+    {
+      char[] charValue = new char[]{1,2,3,4};
+      r.put("charValue", charValue.clone());
+      if (r.replace("charValue", "", "")) fail("expected replace to fail");
+      if (!r.replace("charValue", charValue, "")) {
+        fail("expected replace to happen");
+      }
+      r.put("charValue", charValue.clone());
+      if (r.remove("charValue", "")) fail("expected remove to fail");
+      if (!r.remove("charValue", charValue)) {
+        fail("expected remove to happen");
+      }
+    }
+    {
+      int[] intValue = new int[]{1,2,3,4};
+      r.put("intValue", intValue.clone());
+      if (r.replace("intValue", "", "")) fail("expected replace to fail");
+      if (!r.replace("intValue", intValue, "")) {
+        fail("expected replace to happen");
+      }
+      r.put("intValue", intValue.clone());
+      if (r.remove("intValue", "")) fail("expected remove to fail");
+      if (!r.remove("intValue", intValue)) {
+        fail("expected remove to happen");
+      }
+    }
+    {
+      long[] longValue = new long[]{1,2,3,4};
+      r.put("longValue", longValue.clone());
+      if (r.replace("longValue", "", "")) fail("expected replace to fail");
+      if (!r.replace("longValue", longValue, "")) {
+        fail("expected replace to happen");
+      }
+      r.put("longValue", longValue.clone());
+      if (r.remove("longValue", "")) fail("expected remove to fail");
+      if (!r.remove("longValue", longValue)) {
+        fail("expected remove to happen");
+      }
+    }
+    {
+      float[] floatValue = new float[]{1,2,3,4};
+      r.put("floatValue", floatValue.clone());
+      if (r.replace("floatValue", "", "")) fail("expected replace to fail");
+      if (!r.replace("floatValue", floatValue, "")) {
+        fail("expected replace to happen");
+      }
+      r.put("floatValue", floatValue.clone());
+      if (r.remove("floatValue", "")) fail("expected remove to fail");
+      if (!r.remove("floatValue", floatValue)) {
+        fail("expected remove to happen");
+      }
+    }
+    {
+      double[] doubleValue = new double[]{1,2,3,4};
+      r.put("doubleValue", doubleValue.clone());
+      if (r.replace("doubleValue", "", "")) fail("expected replace to fail");
+      if (!r.replace("doubleValue", doubleValue, "")) {
+        fail("expected replace to happen");
+      }
+      r.put("doubleValue", doubleValue.clone());
+      if (r.remove("doubleValue", "")) fail("expected remove to fail");
+      if (!r.remove("doubleValue", doubleValue)) {
+        fail("expected remove to happen");
+      }
+    }
+    {
+      Object[] oaValue = new Object[]{new byte[]{1,2,3,4},new short[]{1,2,3,4},new int[]{1,2,3,4}, "hello sweet world!"};
+      r.put("oaValue", oaValue);
+      Object[] deepCloneOaValue = new Object[]{new byte[]{1,2,3,4},new short[]{1,2,3,4},new int[]{1,2,3,4}, "hello sweet world!"};
+      if (r.replace("oaValue", "", "")) fail("expected replace to fail");
+      if (!r.replace("oaValue", deepCloneOaValue, "")) {
+        fail("expected replace to happen");
+      }
+      r.put("oaValue", oaValue);
+      if (r.remove("oaValue", "")) fail("expected remove to fail");
+      if (!r.remove("oaValue", deepCloneOaValue)) {
+        fail("expected remove to happen");
+      }
+    }
+  }
+  
+  @Test
+  public void testPartition() {
+    GemFireCacheImpl gfc = createCache();
+    try {
+      Region r = gfc.createRegionFactory(RegionShortcut.PARTITION).create("ArrayEqualsJUnitTestPartitionRegion");
+      doOps(r);
+    } finally {
+      closeCache(gfc);
+    }
+  }
+  @Test
+  public void testLocal() {
+    GemFireCacheImpl gfc = createCache();
+    try {
+      Region r = gfc.createRegionFactory(RegionShortcut.LOCAL).create("ArrayEqualsJUnitTestLocalRegion");
+      doOps(r);
+    } finally {
+      closeCache(gfc);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/SocketCloserJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/SocketCloserJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/SocketCloserJUnitTest.java
index 83f4a08..cc71738 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/SocketCloserJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/SocketCloserJUnitTest.java
@@ -16,15 +16,13 @@
  */
 package com.gemstone.gemfire.internal;
 
+import static org.junit.Assert.*;
 
-import java.io.IOException;
 import java.net.Socket;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import static org.junit.Assert.*;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -150,7 +148,7 @@ public class SocketCloserJUnitTest {
    * closed socket is a noop.
    */
   @Test
-  public void testClosedSocket() throws IOException {
+  public void testClosedSocket() throws Exception {
     final AtomicBoolean runnableCalled = new AtomicBoolean();
     Runnable r = new Runnable() {
       @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/SocketCloserWithWaitJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/SocketCloserWithWaitJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/SocketCloserWithWaitJUnitTest.java
index 52a367d..0ba41ba 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/SocketCloserWithWaitJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/SocketCloserWithWaitJUnitTest.java
@@ -28,6 +28,7 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
  */
 @Category(UnitTest.class)
 public class SocketCloserWithWaitJUnitTest extends SocketCloserJUnitTest {
+
   @Override
   protected SocketCloser createSocketCloser() {
     return new SocketCloser(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/StatSamplerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/StatSamplerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/StatSamplerJUnitTest.java
index b35c851..f0ea81a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/StatSamplerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/StatSamplerJUnitTest.java
@@ -29,7 +29,9 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestName;
 
 import com.gemstone.gemfire.CancelCriterion;
@@ -39,21 +41,28 @@ import com.gemstone.gemfire.StatisticsType;
 import com.gemstone.gemfire.internal.StatArchiveReader.StatValue;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.util.StopWatch;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
  * @since 7.0
  */
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class StatSamplerJUnitTest {
+
   private static final Logger logger = LogService.getLogger();
-  
-  @Rule
-  public TestName testName = new TestName();
 
   private Map<String,String> statisticTypes;
   private Map<String,Map<String,Number>> allStatistics;
 
+  @Rule
+  public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
+
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  @Rule
+  public TestName testName = new TestName();
+
   @Before
   public void setUp() {
     this.statisticTypes = new HashMap<String,String>();
@@ -62,27 +71,27 @@ public class StatSamplerJUnitTest {
   
   @After
   public void tearDown() {
-    System.clearProperty("stats.log-level");
-    System.clearProperty("stats.disable");
-    System.clearProperty("stats.name");
-    System.clearProperty("stats.archive-file");
-    System.clearProperty("stats.file-size-limit");
-    System.clearProperty("stats.disk-space-limit");
-    System.clearProperty("stats.sample-rate");
     this.statisticTypes = null;
     this.allStatistics = null;
     StatisticsTypeFactoryImpl.clear();
     StatArchiveWriter.clearTraceFilter();
   }
+
+  private String getName() {
+    return getClass().getSimpleName() + "_" + testName.getMethodName();
+  }
   
   @Test
   public void testStatSampler() throws Exception {
     StatArchiveWriter.setTraceFilter("st1_1", "ST1");
-    
+
+    File folder = temporaryFolder.newFolder();
+    String archiveFileName = folder.getAbsolutePath() + File.separator + getName() + ".gfs";
+
     System.setProperty("stats.log-level", "config");
     System.setProperty("stats.disable", "false");
-    System.setProperty("stats.name", getClass().getSimpleName() + "_" + testName.getMethodName());
-    System.setProperty("stats.archive-file", getClass().getSimpleName() + "_" + testName.getMethodName() + ".gfs");
+    System.setProperty("stats.name", getName());
+    System.setProperty("stats.archive-file", archiveFileName);
     System.setProperty("stats.file-size-limit", "0");
     System.setProperty("stats.disk-space-limit", "0");
     System.setProperty("stats.sample-rate", "100");
@@ -114,18 +123,16 @@ public class StatSamplerJUnitTest {
     final Statistics st1_1 = factory.createAtomicStatistics(ST1, "st1_1", 1);
     
     boolean done = false;
-    try {
-      Statistics[] samplerStatsInstances = factory.findStatisticsByTextId("statSampler");
-      for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 4000; done = (samplerStatsInstances != null && samplerStatsInstances.length > 0)) {
-        Thread.sleep(10);
-        samplerStatsInstances = factory.findStatisticsByTextId("statSampler");
-      }
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
+
+    Statistics[] samplerStatsInstances = factory.findStatisticsByTextId("statSampler");
+    for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 4000; done = (samplerStatsInstances != null && samplerStatsInstances.length > 0)) {
+      Thread.sleep(10);
+      samplerStatsInstances = factory.findStatisticsByTextId("statSampler");
     }
+
     assertTrue("Waiting for statSampler stats", done);
 
-    Statistics[] samplerStatsInstances = factory.findStatisticsByTextId("statSampler");
+    samplerStatsInstances = factory.findStatisticsByTextId("statSampler");
     assertNotNull(samplerStatsInstances);
     assertEquals(1, samplerStatsInstances.length);
     final Statistics samplerStats = samplerStatsInstances[0];
@@ -265,10 +272,8 @@ public class StatSamplerJUnitTest {
     final StatArchiveReader reader = new StatArchiveReader(
         new File[]{archiveFile}, null, false);
 
-    @SuppressWarnings("rawtypes")
     List resources = reader.getResourceInstList();
-    for (@SuppressWarnings("rawtypes")
-    Iterator iter = resources.iterator(); iter.hasNext();) {
+    for (Iterator iter = resources.iterator(); iter.hasNext();) {
       StatArchiveReader.ResourceInst ri = (StatArchiveReader.ResourceInst) iter.next();
       String resourceName = ri.getName();
       assertNotNull(resourceName);
@@ -303,15 +308,11 @@ public class StatSamplerJUnitTest {
     }
   }
   
-  private void waitForStatSample(final Statistics samplerStats) {
+  private void waitForStatSample(final Statistics samplerStats) throws InterruptedException {
     int startSampleCount = samplerStats.getInt("sampleCount");
     boolean done = false;
-    try {
-      for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 3000; done = (samplerStats.getInt("sampleCount") > startSampleCount)) {
-        Thread.sleep(10);
-      }
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
+    for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 3000; done = (samplerStats.getInt("sampleCount") > startSampleCount)) {
+      Thread.sleep(10);
     }
     assertTrue("Waiting for statSampler sampleCount to increment", done);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/UniqueIdGeneratorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/UniqueIdGeneratorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/UniqueIdGeneratorJUnitTest.java
index 16bf32c..222d46a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/UniqueIdGeneratorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/UniqueIdGeneratorJUnitTest.java
@@ -16,11 +16,11 @@
  */
 package com.gemstone.gemfire.internal;
 
-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.internal.UniqueIdGenerator;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
@@ -28,17 +28,9 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
  * @since 5.0.2 (cbb5x_PerfScale)
  */
 @Category(UnitTest.class)
-public class UniqueIdGeneratorJUnitTest extends TestCase {
-  
-  public UniqueIdGeneratorJUnitTest() {
-  }
-  
-  public void setup() {
-  }
-  
-  public void tearDown() {
-  }
+public class UniqueIdGeneratorJUnitTest {
   
+  @Test
   public void testBasics() throws Exception {
     UniqueIdGenerator uig = new UniqueIdGenerator(1);
     assertEquals(0, uig.obtain());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractDistributedRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractDistributedRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractDistributedRegionJUnitTest.java
index 8eaeeb5..ac060eb 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractDistributedRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractDistributedRegionJUnitTest.java
@@ -16,10 +16,9 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
+import static org.junit.Assert.*;
 import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.*;
 
 import org.apache.logging.log4j.Logger;
 import org.junit.Test;
@@ -34,9 +33,8 @@ import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.test.fake.Fakes;
 
-import junit.framework.TestCase;
+public abstract class AbstractDistributedRegionJUnitTest {
 
-public abstract class AbstractDistributedRegionJUnitTest extends TestCase {
   protected static final Logger logger = LogService.getLogger();
   
   private RegionAttributes createRegionAttributes(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionJUnitTest.java
index ca486cd..f17b6c5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionJUnitTest.java
@@ -54,7 +54,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Unit tests for {@link AbstractRegion}.
- * 
  *
  * @since 8.1
  */
@@ -66,7 +65,6 @@ public class AbstractRegionJUnitTest {
    * 
    * Assert that method returns a {@link SimpleExtensionPoint} instance and
    * assume that {@link com.gemstone.gemfire.internal.cache.extension.SimpleExtensionPointJUnitTest} has covered the rest.
-   * 
    */
   @Test
   public void testGetExtensionPoint() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionMapTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionMapTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionMapTest.java
index b54bbe2..e8591e4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionMapTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/AbstractRegionMapTest.java
@@ -19,10 +19,6 @@ package com.gemstone.gemfire.internal.cache;
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -34,22 +30,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class AbstractRegionMapTest {
 
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception {
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception {
-  }
-
-  @Before
-  public void setUp() throws Exception {
-  }
-
-  @After
-  public void tearDown() throws Exception {
-  }
-
   @Test
   public void invalidateOfNonExistentRegionThrowsEntryNotFound() {
     TestableAbstractRegionMap arm = new TestableAbstractRegionMap();
@@ -172,7 +152,8 @@ public class AbstractRegionMapTest {
     }
   }
 
-  public static class TestableAbstractRegionMap extends AbstractRegionMap {
+  private static class TestableAbstractRegionMap extends AbstractRegionMap {
+
     public LocalRegion owner;
 
     protected TestableAbstractRegionMap() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BucketRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BucketRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BucketRegionJUnitTest.java
index a5a3cc0..bb14b22 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BucketRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BucketRegionJUnitTest.java
@@ -16,26 +16,25 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import org.junit.experimental.categories.Category;
-import org.mockito.Mockito;
-
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
+import static org.junit.Assert.*;
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.anyLong;
 import static org.mockito.Mockito.*;
 
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
-/**
- *
- */
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 @Category(UnitTest.class)
 public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
 
+  @Override
   protected void setInternalRegionArguments(InternalRegionArguments ira) {
     // PR specific
     PartitionedRegion pr = mock(PartitionedRegion.class);
@@ -49,13 +48,14 @@ public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
       .setPartitionedRegionBucketRedundancy(1)
       .setBucketAdvisor(ba);
   }
-  
+
+  @Override
   protected DistributedRegion createAndDefineRegion(boolean isConcurrencyChecksEnabled,
       RegionAttributes ra, InternalRegionArguments ira, GemFireCacheImpl cache) {
     BucketRegion br = new BucketRegion("testRegion", ra, null, cache, ira);
 
     // since br is a real bucket region object, we need to tell mockito to monitor it
-    br = Mockito.spy(br);
+    br = spy(br);
 
 //    doNothing().when(dm).addMembershipListener(any());
     doNothing().when(br).distributeUpdateOperation(any(), anyLong());
@@ -69,6 +69,7 @@ public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
     return br;
   }
 
+  @Override
   protected void verifyDistributeUpdate(DistributedRegion region, EntryEventImpl event, int cnt) {
     assertTrue(region instanceof BucketRegion);
     BucketRegion br = (BucketRegion)region;
@@ -80,7 +81,8 @@ public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
       verify(br, never()).distributeUpdateOperation(eq(event), eq(12345L));
     }
   }
-  
+
+  @Override
   protected void verifyDistributeDestroy(DistributedRegion region, EntryEventImpl event, int cnt) {
     assertTrue(region instanceof BucketRegion);
     BucketRegion br = (BucketRegion)region;
@@ -92,7 +94,8 @@ public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
       verify(br, never()).distributeDestroyOperation(eq(event));
     }
   }
-  
+
+  @Override
   protected void verifyDistributeInvalidate(DistributedRegion region, EntryEventImpl event, int cnt) {
     assertTrue(region instanceof BucketRegion);
     BucketRegion br = (BucketRegion)region;
@@ -104,7 +107,8 @@ public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
       verify(br, never()).distributeInvalidateOperation(eq(event));
     }
   }
-    
+
+  @Override
   protected void verifyDistributeUpdateEntryVersion(DistributedRegion region, EntryEventImpl event, int cnt) {
     assertTrue(region instanceof BucketRegion);
     BucketRegion br = (BucketRegion)region;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaFaultInDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaFaultInDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaFaultInDUnitTest.java
index a1fca4c..78855fd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaFaultInDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaFaultInDUnitTest.java
@@ -119,7 +119,7 @@ public class DeltaFaultInDUnitTest extends CacheTestCase {
         
         long entriesEvicted = ((AbstractLRURegionMap)((PartitionedRegion)region).entries)._getLruList().stats()
         .getEvictions();
-//        assertEquals(1, entriesEvicted);
+//        assertIndexDetailsEquals(1, entriesEvicted);
         
         TestDelta result = region.get(new Integer(0));
         assertEquals("initial_plus_some_more_data", result.info);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaSizingDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaSizingDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaSizingDUnitTest.java
index 94aeccd..7d53098 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaSizingDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaSizingDUnitTest.java
@@ -155,7 +155,7 @@ public class DeltaSizingDUnitTest extends CacheTestCase {
 //              throws CacheWriterException {
 //            assertTrue(event.getOldValue() instanceof MyClass);
 //            assertTrue(event.getNewValue() instanceof MyClass);
-//            assertEquals(event.getOldValue(), event.getNewValue());
+//            assertIndexDetailsEquals(event.getOldValue(), event.getNewValue());
 //          }
 //          
 //        });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskIdJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskIdJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskIdJUnitTest.java
index 14c25ef..4a11280 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskIdJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskIdJUnitTest.java
@@ -16,29 +16,24 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 /**
- * 
- * Test verifies the setting and getting of disk id values are correctly 
- * 
- *
+ * Test verifies the setting and getting of disk id values are correctly
  */
 @Category(UnitTest.class)
-public class DiskIdJUnitTest extends TestCase
-{
+public class DiskIdJUnitTest {
 
   /**
    * Test the getOplogId returns what has been set
-   * 
-   * @throws Exception
    */
-  public void testGetSetOplogId() throws Exception
-  {
+  @Test
+  public void testGetSetOplogId() throws Exception {
     DiskId did = getDiskId();
     did.setOplogId(-1);
     assertEquals(-1, did.getOplogId());
@@ -52,12 +47,9 @@ public class DiskIdJUnitTest extends TestCase
 
   /**
    * Test the getUserbits returns what has been set
-   * 
-   * @throws Exception
    */
- 
-  public void testGetSetUserBits() throws Exception
-  {
+  @Test
+  public void testGetSetUserBits() throws Exception {
     DiskId did = getDiskId();
     byte userBits = 0;
     userBits = EntryBits.setSerialized(userBits, true);
@@ -119,9 +111,8 @@ public class DiskIdJUnitTest extends TestCase
   /**
    * Test the whether setting of one set of values does not affect another set of values
    */
- 
-  public void testAllOperationsValidatingResult1()
-  {
+  @Test
+  public void testAllOperationsValidatingResult1() {
     DiskId did = getDiskId();
     for (int i = -16777215; i < 16777215; i++) {
       boolean boolValuePerIteration = false;
@@ -168,15 +159,14 @@ public class DiskIdJUnitTest extends TestCase
         break;
       }
     }
-
   }
   
   /**
    * Tests that an instance of 'PersistenceIntOplogOffsetDiskId' is created when
    * max-oplog-size (in bytes) passed is smaller than Integer.MAX_VALUE
    */
-  public void testPersistIntDiskIdInstance()
-  {
+  @Test
+  public void testPersistIntDiskIdInstance() {
     int maxOplogSizeinMB = 2;
 
     DiskId diskId = DiskId.createDiskId(maxOplogSizeinMB, true /*is persistence type*/, true);
@@ -189,8 +179,8 @@ public class DiskIdJUnitTest extends TestCase
    * Tests that an instance of 'LongOplogOffsetDiskId' is created when
    * max-oplog-size (in bytes) passed is greater than Integer.MAX_VALUE
    */
-  public void testPersistLongDiskIdInstance()
-  {
+  @Test
+  public void testPersistLongDiskIdInstance() {
     long maxOplogSizeInBytes = (long)Integer.MAX_VALUE + 1;
     int maxOplogSizeinMB = (int)(maxOplogSizeInBytes / (1024 * 1024));
 
@@ -204,8 +194,8 @@ public class DiskIdJUnitTest extends TestCase
    * Tests that an instance of 'PersistenceIntOplogOffsetDiskId' is created when
    * max-oplog-size (in bytes) passed is smaller than Integer.MAX_VALUE
    */
-  public void testOverflowIntDiskIdInstance()
-  {
+  @Test
+  public void testOverflowIntDiskIdInstance() {
     int maxOplogSizeinMB = 2;
 
     DiskId diskId = DiskId.createDiskId(maxOplogSizeinMB, false /*is overflow type*/, true);
@@ -218,8 +208,8 @@ public class DiskIdJUnitTest extends TestCase
    * Tests that an instance of 'LongOplogOffsetDiskId' is created when
    * max-oplog-size (in bytes) passed is greater than Integer.MAX_VALUE
    */
-  public void testOverflowLongDiskIdInstance()
-  {
+  @Test
+  public void testOverflowLongDiskIdInstance() {
     long maxOplogSizeInBytes = (long)Integer.MAX_VALUE + 1;
     int maxOplogSizeinMB = (int)(maxOplogSizeInBytes / (1024 * 1024));
 
@@ -229,8 +219,7 @@ public class DiskIdJUnitTest extends TestCase
         DiskId.isInstanceofOverflowOnlyWithLongOffset(diskId));
   }
 
-  private DiskId getDiskId()
-  {
+  private DiskId getDiskId() {
     return DiskId.createDiskId(1024, true /* is persistence type*/, true);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskInitFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskInitFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskInitFileJUnitTest.java
index c9f3961..5a4e622 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskInitFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskInitFileJUnitTest.java
@@ -16,43 +16,44 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import java.io.File;
+import static org.junit.Assert.*;
 
-import junit.framework.TestCase;
+import java.io.File;
+import java.util.Collections;
 
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.lib.legacy.ClassImposteriser;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
-
-import java.util.Collections;
+import org.junit.rules.TemporaryFolder;
 
 import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.internal.FileUtil;
 import com.gemstone.gemfire.internal.cache.persistence.DiskRegionView;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-@Category(UnitTest.class)
-public class DiskInitFileJUnitTest extends TestCase {
+@Category(IntegrationTest.class)
+public class DiskInitFileJUnitTest {
   
   private File testDirectory;
   private Mockery context = new Mockery() {{
     setImposteriser(ClassImposteriser.INSTANCE);
   }};
-  
+
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  @Before
   public void setUp() throws Exception {
-    testDirectory = new File("_DiskInitFileJUnitTest");
-    FileUtil.delete(testDirectory);
-    FileUtil.mkdirs(testDirectory);
-  }
-  
-  public void tearDown() throws Exception {
-    FileUtil.delete(testDirectory);
+    testDirectory = temporaryFolder.newFolder("_" + getClass().getSimpleName());
   }
-  
+
   /**
    * Test the behavior of canonical ids in the init file.
    */
+  @Test
   public void testCanonicalIds() {
     //create a mock statistics factory for creating directory holders
     final StatisticsFactory sf = context.mock(StatisticsFactory.class);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesJUnitTest.java
index d7d07f9..4c6710c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesJUnitTest.java
@@ -16,136 +16,117 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.DiskWriteAttributes;
 import com.gemstone.gemfire.cache.DiskWriteAttributesFactory;
-import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 /**
  * Tests if DiskWriteAttributeFactory returns the correct DWA object with the
  * desired values
- * 
- *  
  */
 @Category(UnitTest.class)
-public class DiskWriteAttributesJUnitTest extends TestCase
-{
+public class DiskWriteAttributesJUnitTest {
 
-  public DiskWriteAttributesJUnitTest(String arg0) {
-    super(arg0);
-  }
-
-  protected void setUp() throws Exception
-  {
-    super.setUp();
-  }
-
-  protected void tearDown() throws Exception
-  {
-    super.tearDown();
-  }
-
-  /*
+  /**
    * Test method for
    * 'com.gemstone.gemfire.cache.DiskWriteAttributes.getDefaultInstance()'
    */
-  public void testGetDefaultInstance()
-  {
+  @Test
+  public void testGetDefaultInstance() {
     DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
     DiskWriteAttributes dwa = dwaf.create();
-    Assert.assertTrue(!dwa.isSynchronous());
-    Assert.assertTrue(dwa.isRollOplogs());
+    assertTrue(!dwa.isSynchronous());
+    assertTrue(dwa.isRollOplogs());
   }
 
-  /*
+  /**
    * Test method for
    * 'com.gemstone.gemfire.cache.DiskWriteAttributes.getDefaultSync()'
    */
-  public void testGetDefaultSync()
-  {
+  @Test
+  public void testGetDefaultSync() {
     DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
     dwaf.setSynchronous(true);
     DiskWriteAttributes dwa = dwaf.create();
-    Assert.assertTrue(dwa.isSynchronous());
-    Assert.assertTrue(dwa.isRollOplogs());
+    assertTrue(dwa.isSynchronous());
+    assertTrue(dwa.isRollOplogs());
   }
 
-  /*
+  /**
    * Test method for
    * 'com.gemstone.gemfire.cache.DiskWriteAttributes.getDefaultAsync()'
    */
-  public void testGetDefaultAsync()
-  {
+  @Test
+  public void testGetDefaultAsync() {
     DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
     DiskWriteAttributes dwa = dwaf.create();
-    Assert.assertTrue(!dwa.isSynchronous());
-    Assert.assertTrue(dwa.isRollOplogs());
+    assertTrue(!dwa.isSynchronous());
+    assertTrue(dwa.isRollOplogs());
   }
 
-  /*
+  /**
    * Test method for
    * 'com.gemstone.gemfire.cache.DiskWriteAttributes.getDefaultRollingSync()'
    */
-  public void testGetDefaultRollingSync()
-  {
+  @Test
+  public void testGetDefaultRollingSync() {
     DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
     dwaf.setSynchronous(true);
     DiskWriteAttributes dwa = dwaf.create();
 
-    Assert.assertTrue(dwa.isSynchronous());
-    Assert.assertTrue(dwa.isRollOplogs());
+    assertTrue(dwa.isSynchronous());
+    assertTrue(dwa.isRollOplogs());
   }
 
-  /*
+  /**
    * Test method for
    * 'com.gemstone.gemfire.cache.DiskWriteAttributes.getDefaultRollingAsync()'
    */
-  public void testGetDefaultRollingAsync()
-  {
+  @Test
+  public void testGetDefaultRollingAsync() {
     DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
     DiskWriteAttributes dwa = dwaf.create();
-    Assert.assertTrue(!dwa.isSynchronous());
-    Assert.assertTrue(dwa.isRollOplogs());
-
+    assertTrue(!dwa.isSynchronous());
+    assertTrue(dwa.isRollOplogs());
   }
 
-  /*
+  /**
    * Test method for
    * 'com.gemstone.gemfire.cache.DiskWriteAttributes.getDefaultNonRollingSync()'
    */
-  public void testGetDefaultNonRollingSync()
-  {
-
+  @Test
+  public void testGetDefaultNonRollingSync() {
     DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
     dwaf.setRollOplogs(false);
     dwaf.setSynchronous(true);
     DiskWriteAttributes dwa = dwaf.create();
-    Assert.assertTrue(dwa.isSynchronous());
-    Assert.assertTrue(!dwa.isRollOplogs());
-
+    assertTrue(dwa.isSynchronous());
+    assertTrue(!dwa.isRollOplogs());
   }
 
-  /*
+  /**
    * Test method for
    * 'com.gemstone.gemfire.cache.DiskWriteAttributes.getDefaultNonRollingAsync()'
    */
-  public void testGetDefaultNonRollingAsync()
-  {
+  @Test
+  public void testGetDefaultNonRollingAsync() {
     DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
     dwaf.setRollOplogs(false);
     DiskWriteAttributes dwa = dwaf.create();
-    Assert.assertTrue(!dwa.isSynchronous());
-    Assert.assertTrue(!dwa.isRollOplogs());
+    assertTrue(!dwa.isSynchronous());
+    assertTrue(!dwa.isRollOplogs());
   }
   
   /**
    * Tests the behaviour of DiskWriteAttributesFactory & DiskWritesAttrbutes with
    * various combinations of  time interval & buffer size.
    */
+  @Test
   public void testDiskWriteAttributesCreation() {
     DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
     dwaf.setSynchronous(true);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistributedRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistributedRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistributedRegionJUnitTest.java
index cf2525a..d5e1b9a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistributedRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistributedRegionJUnitTest.java
@@ -16,28 +16,25 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import org.junit.experimental.categories.Category;
-import org.mockito.Mockito;
-
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-import junit.framework.TestCase;
-
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyLong;
 import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.anyBoolean;
 import static org.mockito.Mockito.*;
 
-/**
- *
- */
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 @Category(UnitTest.class)
 public class DistributedRegionJUnitTest extends AbstractDistributedRegionJUnitTest {
 
+  @Override
   protected void setInternalRegionArguments(InternalRegionArguments ira) {
   }
-  
+
+  @Override
   protected DistributedRegion createAndDefineRegion(boolean isConcurrencyChecksEnabled,
       RegionAttributes ra, InternalRegionArguments ira, GemFireCacheImpl cache) {
     DistributedRegion region = new DistributedRegion("testRegion", ra, null, cache, ira);
@@ -46,7 +43,7 @@ public class DistributedRegionJUnitTest extends AbstractDistributedRegionJUnitTe
     }
     
     // since it is a real region object, we need to tell mockito to monitor it
-    region = Mockito.spy(region);
+    region = spy(region);
 
     doNothing().when(region).distributeUpdate(any(), anyLong(), anyBoolean(), anyBoolean(), any(), anyBoolean());
     doNothing().when(region).distributeDestroy(any(), any());
@@ -55,7 +52,8 @@ public class DistributedRegionJUnitTest extends AbstractDistributedRegionJUnitTe
     
     return region;
   }
-  
+
+  @Override
   protected void verifyDistributeUpdate(DistributedRegion region, EntryEventImpl event, int cnt) {
     region.virtualPut(event, false, false, null, false, 12345L, false);
     // verify the result
@@ -66,6 +64,7 @@ public class DistributedRegionJUnitTest extends AbstractDistributedRegionJUnitTe
     }
   }
 
+  @Override
   protected void verifyDistributeDestroy(DistributedRegion region, EntryEventImpl event, int cnt) {
     region.basicDestroy(event, false, null);
     // verify the result
@@ -76,6 +75,7 @@ public class DistributedRegionJUnitTest extends AbstractDistributedRegionJUnitTe
     }
   }
 
+  @Override
   protected void verifyDistributeInvalidate(DistributedRegion region, EntryEventImpl event, int cnt) {
     region.basicInvalidate(event);
     // verify the result
@@ -86,6 +86,7 @@ public class DistributedRegionJUnitTest extends AbstractDistributedRegionJUnitTe
     }
   }
 
+  @Override
   protected void verifyDistributeUpdateEntryVersion(DistributedRegion region, EntryEventImpl event, int cnt) {
     region.basicUpdateEntryVersion(event);
     // verify the result

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EntryEventImplTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EntryEventImplTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EntryEventImplTest.java
index c3e057c..800527f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EntryEventImplTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EntryEventImplTest.java
@@ -17,23 +17,30 @@
 package com.gemstone.gemfire.internal.cache;
 
 import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
-import org.mockito.Mockito;
 
 import com.gemstone.gemfire.cache.Operation;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import static org.mockito.Mockito.*;
-
 @Category(UnitTest.class)
 public class EntryEventImplTest {
 
-  String expectedRegionName = "ExpectedFullRegionPathName";
-  String key = "key1";
-  String value = "value1";
-  KeyInfo keyInfo = new KeyInfo(key, value, null);
+  private String expectedRegionName;
+  private String key;
+  private String value;
+  private KeyInfo keyInfo;
+
+  @Before
+  public void setUp() throws Exception {
+    expectedRegionName = "ExpectedFullRegionPathName";
+    key = "key1";
+    value = "value1";
+    keyInfo = new KeyInfo(key, value, null);
+  }
 
   @Test
   public void verifyToStringOutputHasRegionName() {
@@ -50,7 +57,7 @@ public class EntryEventImplTest {
     assertTrue("String " + expectedRegionName + " was not in toString text: " + toStringValue, toStringValue.indexOf(expectedRegionName) > 0);
 
     // verify that toString called getFullPath method of region object
-    verify(region, Mockito.times(1)).getFullPath();
+    verify(region, times(1)).getFullPath();
   }
 
   private EntryEventImpl createEntryEvent(LocalRegion l) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EnumListenerEventJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EnumListenerEventJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EnumListenerEventJUnitTest.java
index 1687db7..9a58987 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EnumListenerEventJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EnumListenerEventJUnitTest.java
@@ -16,26 +16,22 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-/**
- * 
- */
 @Category(UnitTest.class)
-public class EnumListenerEventJUnitTest extends TestCase
-{
+public class EnumListenerEventJUnitTest {
+
   /**
    * tests whether EnumListenerEvent.getEnumListenerEvent(int cCode) returns the
    * right result
-   * 
    */
-  public void testGetEnumListEvent()
-  {
+  @Test
+  public void testGetEnumListEvent() {
     checkAndAssert(0,  null);
     checkAndAssert(1,  EnumListenerEvent.AFTER_CREATE);
     checkAndAssert(2,  EnumListenerEvent.AFTER_UPDATE);
@@ -63,9 +59,9 @@ public class EnumListenerEventJUnitTest extends TestCase
   // check that the code and object both match
   private void checkAndAssert(int code, EnumListenerEvent event) {
     EnumListenerEvent localEvent = EnumListenerEvent.getEnumListenerEvent(code); 
-    Assert.assertTrue( localEvent == event);
+    assertTrue( localEvent == event);
     if (localEvent != null) {
-      Assert.assertTrue( localEvent.getEventCode() == code);
+      assertTrue( localEvent.getEventCode() == code);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapValueWrapperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapValueWrapperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapValueWrapperJUnitTest.java
index 550d133..362962d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapValueWrapperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapValueWrapperJUnitTest.java
@@ -16,8 +16,7 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -27,11 +26,11 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.internal.cache.DiskEntry.Helper.OffHeapValueWrapper;
 import com.gemstone.gemfire.internal.cache.DiskEntry.Helper.Flushable;
+import com.gemstone.gemfire.internal.cache.DiskEntry.Helper.OffHeapValueWrapper;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
-import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.SlabImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
@@ -39,7 +38,7 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class OffHeapValueWrapperJUnitTest {
 
-  private static OffHeapValueWrapper createChunkValueWrapper(byte[] bytes, boolean isSerialized) {
+  private OffHeapValueWrapper createChunkValueWrapper(byte[] bytes, boolean isSerialized) {
     StoredObject c = MemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, isSerialized, false);
     return new OffHeapValueWrapper(c);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldVLJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldVLJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldVLJUnitTest.java
index 9841ec5..3f919ed 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldVLJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldVLJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInput;
@@ -24,15 +26,15 @@ import java.io.DataOutput;
 import java.io.DataOutputStream;
 import java.io.IOException;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
-public class OldVLJUnitTest extends TestCase {
+public class OldVLJUnitTest {
+
   private ByteArrayOutputStream baos;
   private DataOutputStream dos;
 
@@ -44,46 +46,53 @@ public class OldVLJUnitTest extends TestCase {
 
   private DataInput createDIS() throws IOException {
     this.dos.close();
-    ByteArrayInputStream bais = new ByteArrayInputStream(this.baos
-        .toByteArray());
+    ByteArrayInputStream bais = new ByteArrayInputStream(this.baos.toByteArray());
     return new DataInputStream(bais);
   }
 
+  @Test
   public void testMinByte() throws IOException {
     InternalDataSerializer.writeVLOld(1, createDOS());
     assertEquals(1, InternalDataSerializer.readVLOld(createDIS()));
   }
 
+  @Test
   public void testMaxByte() throws IOException {
     InternalDataSerializer.writeVLOld(125, createDOS());
     assertEquals(125, InternalDataSerializer.readVLOld(createDIS()));
   }
 
+  @Test
   public void testMinShort() throws IOException {
     InternalDataSerializer.writeVLOld(126, createDOS());
     assertEquals(126, InternalDataSerializer.readVLOld(createDIS()));
   }
 
+  @Test
   public void testMaxShort() throws IOException {
     InternalDataSerializer.writeVLOld(0x7fff, createDOS());
     assertEquals(0x7fff, InternalDataSerializer.readVLOld(createDIS()));
   }
 
+  @Test
   public void testMinInt() throws IOException {
     InternalDataSerializer.writeVLOld(0x7fff + 1, createDOS());
     assertEquals(0x7fff + 1, InternalDataSerializer.readVLOld(createDIS()));
   }
 
+  @Test
   public void testMaxInt() throws IOException {
     InternalDataSerializer.writeVLOld(0x7fffffff, createDOS());
     assertEquals(0x7fffffff, InternalDataSerializer.readVLOld(createDIS()));
   }
 
+  @Test
   public void testMinLong() throws IOException {
     InternalDataSerializer.writeVLOld(0x7fffffffL + 1, createDOS());
     assertEquals(0x7fffffffL + 1, InternalDataSerializer.readVLOld(createDIS()));
   }
 
+  @Test
   public void testMaxLong() throws IOException {
     InternalDataSerializer.writeVLOld(Long.MAX_VALUE, createDOS());
     assertEquals(Long.MAX_VALUE, InternalDataSerializer.readVLOld(createDIS()));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
index 6dbe100..7c8beec 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
@@ -20,36 +20,27 @@ import static org.junit.Assert.*;
 
 import java.io.IOException;
 
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.cache.EntryEventImpl.OldValueImporter;
-import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
-import com.gemstone.gemfire.internal.offheap.TinyStoredObject;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
-import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
 import com.gemstone.gemfire.internal.offheap.SlabImpl;
+import com.gemstone.gemfire.internal.offheap.TinyStoredObject;
 import com.gemstone.gemfire.internal.util.BlobHelper;
 
 public abstract class OldValueImporterTestBase {
-  @Before
-  public void setUp() throws Exception {
-  }
 
-  @After
-  public void tearDown() throws Exception {
-  }
-  
   protected abstract OldValueImporter createImporter();
   protected abstract Object getOldValueFromImporter(OldValueImporter ovi);
   protected abstract void toData(OldValueImporter ovi, HeapDataOutputStream hdos) throws IOException;
   protected abstract void fromData(OldValueImporter ovi, byte[] bytes) throws IOException, ClassNotFoundException;
 
   @Test
-  public void testValueSerialization() throws IOException, ClassNotFoundException {
+  public void testValueSerialization() throws Exception {
     byte[] bytes = new byte[1024];
     HeapDataOutputStream hdos = new HeapDataOutputStream(bytes);
     OldValueImporter imsg = createImporter();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogEntryIdMapJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogEntryIdMapJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogEntryIdMapJUnitTest.java
index 9cd0cf7..9e76edf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogEntryIdMapJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogEntryIdMapJUnitTest.java
@@ -16,8 +16,9 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.*;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.cache.Oplog.OplogEntryIdMap;
@@ -25,16 +26,11 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Tests DiskStoreImpl.OplogEntryIdMap
- * 
- *  
  */
 @Category(UnitTest.class)
-public class OplogEntryIdMapJUnitTest extends TestCase
-{
-  public OplogEntryIdMapJUnitTest(String arg0) {
-    super(arg0);
-  }
+public class OplogEntryIdMapJUnitTest {
 
+  @Test
   public void testBasics() {
     OplogEntryIdMap m = new OplogEntryIdMap();
     for (long i=1; i <= 777777; i++) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogEntryIdSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogEntryIdSetJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogEntryIdSetJUnitTest.java
index 9413c3b..12e5a3d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogEntryIdSetJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogEntryIdSetJUnitTest.java
@@ -16,8 +16,9 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.*;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.cache.DiskStoreImpl.OplogEntryIdSet;
@@ -25,16 +26,11 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Tests DiskStoreImpl.OplogEntryIdSet
- * 
- *  
  */
 @Category(UnitTest.class)
-public class OplogEntryIdSetJUnitTest extends TestCase
-{
-  public OplogEntryIdSetJUnitTest(String arg0) {
-    super(arg0);
-  }
+public class OplogEntryIdSetJUnitTest {
 
+  @Test
   public void testBasics() {
     OplogEntryIdSet s = new OplogEntryIdSet();
     for (long i=1; i < 777777; i++) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java
index f4f652e..d1be04d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java
@@ -609,8 +609,8 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //     region.remove(new Integer(2));
 //     assertNull(writer
 //         .getAsynchOpForEntryFromPendingFlushMap(entry2.getDiskId()));
-//     assertEquals(opSizeBeforeCreateRemove, dr.getChild().getOplogSize());
-//     assertEquals(pendingFlushSize, dr.getChild().getAsynchWriter()
+//     assertIndexDetailsEquals(opSizeBeforeCreateRemove, dr.getChild().getOplogSize());
+//     assertIndexDetailsEquals(pendingFlushSize, dr.getChild().getAsynchWriter()
 //         .getCurrentBufferedBytesSize());
 
 //     closeDown();
@@ -1111,7 +1111,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //       fail("exception not expected" + e);
 //       fail("The test failed as the oplog could not eb synched to disk");
 //     }
-//     assertEquals((this.numCreate + this.numDel + this.numModify),
+//     assertIndexDetailsEquals((this.numCreate + this.numDel + this.numModify),
 //         this.totalSuccessfulOperations);
 //     assertTrue(" The expected oplog size =" + inMemOplogSize
 //         + " Actual Oplog file size =" + actFileSize,
@@ -1296,7 +1296,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 // //       if (j < currentOplogID) {
 // //         // oplogs are now closed to save memory and file descriptors
 // //         // once they are no longer needed
-// //         assertEquals(null, oplog);
+// //         assertIndexDetailsEquals(null, oplog);
 // //       } else {
 //         inMemOplogSize += oplog.getOplogSize();
 //         logWriter.info(" Oplog size="+ oplog.getOplogSize() + " Max Oplog size acceptable="+MAX_OPLOG_SIZE );
@@ -1319,7 +1319,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //         assertTrue(
 //                    " The max Oplog Size limit is violated when taken the actual file size",
 //                    oplog.getActualFileLength() <= MAX_OPLOG_SIZE);
-//         assertEquals(oplog.getOplogSize(), oplog.getActualFileLength());
+//         assertIndexDetailsEquals(oplog.getOplogSize(), oplog.getActualFileLength());
 // //       }
 //     }
 
@@ -1329,7 +1329,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //         + this.expectedOplogSize + " Actual sizes of all oplogs ="
 //         + inMemOplogSize, this.expectedOplogSize == inMemOplogSize);
 
-//     assertEquals((this.numCreate + this.numDel + this.numModify),
+//     assertIndexDetailsEquals((this.numCreate + this.numDel + this.numModify),
 //         this.totalSuccessfulOperations);
 //     closeDown();
 
@@ -1412,7 +1412,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 // //       if (j < currentOplogID) {
 // //         // oplogs are now closed to save memory and file descriptors
 // //         // once they are no longer needed
-// //         assertEquals(null, oplog);
+// //         assertIndexDetailsEquals(null, oplog);
 // //       } else {
 //         inMemOplogSize += oplog.getOplogSize();
 //         //oplog.forceFlush();
@@ -1433,7 +1433,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //         assertTrue(
 //                    " The max Oplog Size limit is violated when taken the actual file size",
 //                    oplog.getActualFileLength() <= MAX_OPLOG_SIZE);
-//         assertEquals(oplog.getOplogSize(), oplog.getActualFileLength());
+//         assertIndexDetailsEquals(oplog.getOplogSize(), oplog.getActualFileLength());
 // //       }
 //     }
 
@@ -1442,7 +1442,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //     assertTrue(" The sum of all oplogs size as expected  ="
 //         + this.expectedOplogSize + " Actual sizes of all oplogs ="
 //         + inMemOplogSize, this.expectedOplogSize == inMemOplogSize);
-//     assertEquals((this.numCreate + this.numDel + this.numModify),
+//     assertIndexDetailsEquals((this.numCreate + this.numDel + this.numModify),
 //         this.totalSuccessfulOperations);
 //     assertFalse(failureCause, testFailed);
 //     closeDown();
@@ -1575,7 +1575,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //     long currentOplogID = currOplog.getOplogId();
 //     long expectedSize = currOplog.getOplogSize();
 //     // Ensure that now switching has happned during the operations
-//     assertEquals(1, currentOplogID);
+//     assertIndexDetailsEquals(1, currentOplogID);
 //     assertTrue(
 //         "The number of operations did not cause asynch writer to run atleast once , the expected file size = "
 //             + expectedSize, expectedSize > 1000);
@@ -2174,11 +2174,11 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //     Oplog.ByteBufferPool pool = (Oplog.ByteBufferPool)bbPools.get(1);
 //     ByteBuffer bb1 = pool.getBufferFromPool();
 //     ByteBuffer bb2 = pool.getBufferFromPool();
-//     assertEquals(2, pool.getTotalBuffers());
-//     assertEquals(2, pool.getBuffersInUse());
+//     assertIndexDetailsEquals(2, pool.getTotalBuffers());
+//     assertIndexDetailsEquals(2, pool.getBuffersInUse());
 //     ((LocalRegion)region).getDiskRegion().getChild().releaseBuffer(bb1);
 //     ((LocalRegion)region).getDiskRegion().getChild().releaseBuffer(bb2);
-//     assertEquals(0, pool.getBuffersInUse());
+//     assertIndexDetailsEquals(0, pool.getBuffersInUse());
 //     region.close();
 
 //     System.setProperty("/testRegion_MAX_POOL_SIZE", "1");
@@ -2191,11 +2191,11 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //     pool = (Oplog.ByteBufferPool)bbPools.get(1);
 //     bb1 = pool.getBufferFromPool();
 //     bb2 = pool.getBufferFromPool();
-//     assertEquals(1, pool.getTotalBuffers());
-//     assertEquals(1, pool.getBuffersInUse());
+//     assertIndexDetailsEquals(1, pool.getTotalBuffers());
+//     assertIndexDetailsEquals(1, pool.getBuffersInUse());
 //     ((LocalRegion)region).getDiskRegion().getChild().releaseBuffer(bb1);
 //     ((LocalRegion)region).getDiskRegion().getChild().releaseBuffer(bb2);
-//     assertEquals(0, pool.getBuffersInUse());
+//     assertIndexDetailsEquals(0, pool.getBuffersInUse());
 //     closeDown();
 
 //   }
@@ -2553,7 +2553,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
     //((LocalRegion)region).getDiskRegion().getChild().forceFlush();
 //     int x = ((LocalRegion)region).getDiskRegion().getChild().getAsynchWriter()
 //         .getApproxFreeBuffers();
-//     assertEquals(10, x);
+//     assertIndexDetailsEquals(10, x);
   }
 
   // we no longer have a pendingFlushMap
@@ -2621,7 +2621,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //         if (!proceedForValidation) {
 //           try {
 //             OplogJUnitTest.class.wait(9000);
-//             assertEquals(true, proceedForValidation);
+//             assertIndexDetailsEquals(true, proceedForValidation);
 //           }
 //           catch (InterruptedException e) {
 //             fail("interrupted");
@@ -2631,7 +2631,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //     }
 
 //     cache.getLogger().info("valueRead : " + valueRead);
-//     assertEquals("valueRead is stale, doesnt match with latest PUT", NEW_VALUE,
+//     assertIndexDetailsEquals("valueRead is stale, doesnt match with latest PUT", NEW_VALUE,
 //         valueRead);
 //     LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = false;
 //     CacheObserverHolder.setInstance(old);
@@ -3631,7 +3631,7 @@ public class OplogJUnitTest extends DiskRegionTestingBase {
 //         size2 += dh.getDirStatsDiskSpaceUsage();
 //       }
 //       System.out.println("Size after recreation= "+ size2);
-//       assertEquals(size1, size2);
+//       assertIndexDetailsEquals(size1, size2);
 //       region.close();
       
 //     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogRVVJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogRVVJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogRVVJUnitTest.java
index b08efbf..404a1c9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogRVVJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogRVVJUnitTest.java
@@ -23,12 +23,15 @@ import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.lib.legacy.ClassImposteriser;
+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.TemporaryFolder;
 
 import com.gemstone.gemfire.StatisticsFactory;
 import com.gemstone.gemfire.i18n.LogWriterI18n;
@@ -38,27 +41,31 @@ import com.gemstone.gemfire.internal.cache.DiskStoreImpl.OplogEntryIdSet;
 import com.gemstone.gemfire.internal.cache.persistence.DiskRecoveryStore;
 import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID;
 import com.gemstone.gemfire.internal.cache.versions.DiskRegionVersionVector;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+@Category(IntegrationTest.class)
+public class OplogRVVJUnitTest {
 
-@Category(UnitTest.class)
-public class OplogRVVJUnitTest extends TestCase {
   private File testDirectory;
   private Mockery context = new Mockery() {{
     setImposteriser(ClassImposteriser.INSTANCE);
   }};
-  
+
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  @Before
   public void setUp() throws Exception {
-    testDirectory = new File("_DiskStoreImplJUnitTest");
-    FileUtil.delete(testDirectory);
-    FileUtil.mkdirs(testDirectory);
+    testDirectory = temporaryFolder.newFolder("_" + getClass().getSimpleName());
     DiskStoreImpl.SET_IGNORE_PREALLOCATE = true;
   }
-  
+
+  @After
   public void tearDown() throws Exception {
-    super.tearDown();
     DiskStoreImpl.SET_IGNORE_PREALLOCATE = false;
   }
-  
+
+  @Test
   public void testRecoverRVV() throws UnknownHostException {
     final DiskInitFile df = context.mock(DiskInitFile.class);
     final LogWriterI18n logger = context.mock(LogWriterI18n.class);
@@ -149,7 +156,6 @@ public class OplogRVVJUnitTest extends TestCase {
     Oplog oplog = new Oplog(1, oplogSet, dirHolder);
     oplog.close();
     
-    
     context.checking(new Expectations() {{
       one(drs).recordRecoveredGCVersion(m1, 1);
       one(drs).recordRecoveredGCVersion(m2, 0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OrderedTombstoneMapJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OrderedTombstoneMapJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OrderedTombstoneMapJUnitTest.java
index bd50d05..29e26e1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OrderedTombstoneMapJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OrderedTombstoneMapJUnitTest.java
@@ -16,17 +16,19 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 @Category(UnitTest.class)
-public class OrderedTombstoneMapJUnitTest extends TestCase {
-  
+public class OrderedTombstoneMapJUnitTest {
+
+  @Test
   public void test() {
     OrderedTombstoneMap<String> map = new OrderedTombstoneMap<String>();
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionAttributesImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionAttributesImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionAttributesImplJUnitTest.java
index e75e17f..a8d8720 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionAttributesImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionAttributesImplJUnitTest.java
@@ -16,11 +16,7 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.util.Properties;
 
@@ -38,7 +34,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Unit test suite for PartitionAttributesImpl.
- * 
  */
 @Category(UnitTest.class)
 public class PartitionAttributesImplJUnitTest {
@@ -153,8 +148,8 @@ public class PartitionAttributesImplJUnitTest {
     destination.merge(instance);
     
     assertEquals(this.colocatedRegionFullPath, destination.getColocatedWith());
-    //assertEquals(this.globalProps, destination.getGlobalProperties());
-    //assertEquals(this.localProps, destination.getLocalProperties());
+    //assertIndexDetailsEquals(this.globalProps, destination.getGlobalProperties());
+    //assertIndexDetailsEquals(this.localProps, destination.getLocalProperties());
     assertEquals(this.partitionResolver, destination.getPartitionResolver());
     assertEquals(this.recoveryDelay, destination.getRecoveryDelay());
     assertEquals(this.redundancy, destination.getRedundancy());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheCloseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheCloseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheCloseDUnitTest.java
index 43252a2..17085c7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheCloseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheCloseDUnitTest.java
@@ -237,7 +237,7 @@ public class PartitionedRegionCacheCloseDUnitTest extends
 //            VersionedArrayList nodeList = (VersionedArrayList)itr.next();
 //            logger.info("Size of nodeList for b2n entries for region = "
 //                + regionName + " = " + nodeList.size());
-//            assertEquals("Node list: " + nodeList, 1, nodeList.size());
+//            assertIndexDetailsEquals("Node list: " + nodeList, 1, nodeList.size());
 //          }
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDUnitTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDUnitTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDUnitTestCase.java
index f401e0d..d964e5d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDUnitTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDUnitTestCase.java
@@ -235,7 +235,7 @@ public class PartitionedRegionDUnitTestCase extends CacheTestCase
           rootRegion.size());
 //        Region allPR = rootRegion.getSubregion(PartitionedRegionHelper.PARTITIONED_REGION_CONFIG_NAME);
 //        assertNotNull(allPR);
-//        assertEquals("allPR size is not correct", innerEndIndexForRegion,
+//        assertIndexDetailsEquals("allPR size is not correct", innerEndIndexForRegion,
 //      allPR.size());
         assertEquals("prIdToPR size is not correct", innerEndIndexForRegion,
             PartitionedRegion.prIdToPR.size());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDestroyDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDestroyDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDestroyDUnitTest.java
index 498203d..abfb7d2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDestroyDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDestroyDUnitTest.java
@@ -239,7 +239,7 @@ public class PartitionedRegionDestroyDUnitTest extends
         while (itr.hasNext()) {
           Region rg = (Region)itr.next();
           LogWriterUtils.getLogWriter().info("Root Region SubRegionName = " + rg.getName());
-//          assertEquals("REGION NAME FOUND:"+rg.getName(),-1, rg.getName().indexOf(
+//          assertIndexDetailsEquals("REGION NAME FOUND:"+rg.getName(),-1, rg.getName().indexOf(
 //              PartitionedRegionHelper.BUCKET_2_NODE_TABLE_PREFIX));
           assertEquals("regionFound that should be gone!:"+rg.getName(),-1, rg.getName().indexOf(
               PartitionedRegionHelper.BUCKET_REGION_PREFIX));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionEvictionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionEvictionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionEvictionDUnitTest.java
index 0319171..ce10abb 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionEvictionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionEvictionDUnitTest.java
@@ -1109,7 +1109,7 @@ public class PartitionedRegionEvictionDUnitTest extends CacheTestCase {
 //          factory.setEvictionAttributes(okHeapLRUea);
 //          final Region pr = createRootRegion(name, factory.create());
 //          assertNotNull(pr);
-//          assertEquals(okHeapLRUea, pr.getAttributes().getEvictionAttributes());
+//          assertIndexDetailsEquals(okHeapLRUea, pr.getAttributes().getEvictionAttributes());
 //          pr.localDestroyRegion();
 //        }
 
@@ -1123,7 +1123,7 @@ public class PartitionedRegionEvictionDUnitTest extends CacheTestCase {
 //          factory.setEvictionAttributes(okHeapLRUea);
 //          final Region pr = createRootRegion(name, factory.create());
 //          assertNotNull(pr);
-//          assertEquals(okHeapLRUea, pr.getAttributes().getEvictionAttributes());
+//          assertIndexDetailsEquals(okHeapLRUea, pr.getAttributes().getEvictionAttributes());
 //          pr.localDestroyRegion();
 //        }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHelperJUnitTest.java
index a904478..c1dbd78 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHelperJUnitTest.java
@@ -16,18 +16,17 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- *
- */
 @Category(UnitTest.class)
-public class PartitionedRegionHelperJUnitTest extends TestCase {
-  
+public class PartitionedRegionHelperJUnitTest {
+
+  @Test
   public void testEscapeUnescape() {
     {
       String bucketName = PartitionedRegionHelper.getBucketName("/root/region", 5);
@@ -41,7 +40,5 @@ public class PartitionedRegionHelperJUnitTest extends TestCase {
       assertEquals("/root/region_one" , PartitionedRegionHelper.getPRPath(bucketName));
     }
   }
-  
-  
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryEvaluatorTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryEvaluatorTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryEvaluatorTest.java
index fa4a26a..e3e8d4e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryEvaluatorTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryEvaluatorTest.java
@@ -16,12 +16,9 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -54,19 +51,19 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class PartitionedRegionQueryEvaluatorTest {
 
-  InternalDistributedMember localNode;
-  InternalDistributedMember remoteNodeA;
-  InternalDistributedMember remoteNodeB;
-  GemFireCacheImpl cache;
-  InternalDistributedSystem system;
-  PartitionedRegion pr;
-  DefaultQuery query;
+  private InternalDistributedMember localNode;
+  private InternalDistributedMember remoteNodeA;
+  private InternalDistributedMember remoteNodeB;
+  private GemFireCacheImpl cache;
+  private InternalDistributedSystem system;
+  private PartitionedRegion pr;
+  private DefaultQuery query;
   //Needed to help mock out certain scenarios
-  ExtendedPartitionedRegionDataStore dataStore;
+  private ExtendedPartitionedRegionDataStore dataStore;
   //This is the set of nodes that remain after a failure
-  ArrayList allNodes = new ArrayList();
+  private ArrayList allNodes = new ArrayList();
   //convenience list for empty set
-  Set<InternalDistributedMember> noFailingMembers = new HashSet<>();
+  private Set<InternalDistributedMember> noFailingMembers = new HashSet<>();
     
   @Before
   public void setup() throws Exception {
@@ -196,7 +193,7 @@ public class PartitionedRegionQueryEvaluatorTest {
     
   }
   
-  private  Map<InternalDistributedMember, List<Integer>> createFakeBucketMap() {
+  private Map<InternalDistributedMember, List<Integer>> createFakeBucketMap() {
     Map<InternalDistributedMember, List<Integer>> bucketToNodeMap = new HashMap<>();
     bucketToNodeMap.put(localNode, createBucketList(1, 2, 3));
     bucketToNodeMap.put(remoteNodeA, createBucketList(4, 5, 6));
@@ -205,7 +202,7 @@ public class PartitionedRegionQueryEvaluatorTest {
   }
   
   //fake bucket map to use after we fake a node failure
-  private  Map<InternalDistributedMember, List<Integer>> createFakeBucketMapFailedNodesToLocalMember() {
+  private Map<InternalDistributedMember, List<Integer>> createFakeBucketMapFailedNodesToLocalMember() {
     Map<InternalDistributedMember, List<Integer>> bucketToNodeMap = new HashMap<>();
     bucketToNodeMap.put(localNode, createBucketList(1, 2, 3, 7, 8, 9));
     bucketToNodeMap.put(remoteNodeA, createBucketList(4, 5, 6));
@@ -227,8 +224,16 @@ public class PartitionedRegionQueryEvaluatorTest {
     }
     return results;
   }
-  
-  class ExtendedPartitionedRegionDataStore extends PartitionedRegionDataStore {
+
+  private Queue<PartitionedQueryScenario> createScenariosQueue(PartitionedQueryScenario... scenarios) {
+    Queue<PartitionedQueryScenario> queue = new LinkedList<>();
+    for (PartitionedQueryScenario scenario: scenarios) {
+      queue.add(scenario);
+    }
+    return queue;
+  }
+
+  private static class ExtendedPartitionedRegionDataStore extends PartitionedRegionDataStore {
     //Must be the same referenced queue as that used by the ExtendedPartitionedRegionQueryEvaluator
     //That way they will be synched to the same scenario;
     Queue<PartitionedQueryScenario> scenarios;
@@ -243,8 +248,10 @@ public class PartitionedRegionQueryEvaluatorTest {
     }
   }
 
-  class ExtendedPartitionedRegionQueryEvaluator extends PartitionedRegionQueryEvaluator {
+  private static class ExtendedPartitionedRegionQueryEvaluator extends PartitionedRegionQueryEvaluator {
+
     Queue<PartitionedQueryScenario> scenarios;
+
     //pass through so we can fake out the executeQuery locally
     PRQueryProcessor extendedPRQueryProcessor;
     
@@ -260,8 +267,8 @@ public class PartitionedRegionQueryEvaluatorTest {
     }
 
     // (package access for unit test purposes)
-    Map<InternalDistributedMember, List<Integer>> buildNodeToBucketMap() throws QueryException
-    {
+    @Override
+    Map<InternalDistributedMember, List<Integer>> buildNodeToBucketMap() throws QueryException {
       return currentScenario().bucketMap;
     }
 
@@ -291,8 +298,8 @@ public class PartitionedRegionQueryEvaluatorTest {
     protected Set<InternalDistributedMember> getBucketOwners(Integer bid) {
       return currentScenario().getBucketOwners(bid);
     }
-    
-    class ExtendedPRQueryProcessor extends PRQueryProcessor {
+
+    private class ExtendedPRQueryProcessor extends PRQueryProcessor {
 
       public ExtendedPRQueryProcessor(PartitionedRegion pr, DefaultQuery query, Object[] parameters, List buckets) {
         super(pr, query, parameters, buckets);
@@ -309,7 +316,7 @@ public class PartitionedRegionQueryEvaluatorTest {
       }
     }
 
-    class FakeNumFailStreamingQueryPartitionResponse extends StreamingQueryPartitionResponse {
+    private class FakeNumFailStreamingQueryPartitionResponse extends StreamingQueryPartitionResponse {
       private PartitionedRegionQueryEvaluator processor;
       Queue<PartitionedQueryScenario> scenarios;
       
@@ -336,13 +343,13 @@ public class PartitionedRegionQueryEvaluatorTest {
     }
   }
   
-  interface ProcessDataFaker {
+  private interface ProcessDataFaker {
     void processData(PartitionedRegionQueryEvaluator processor);
     void executeQueryLocally(Collection resultsCollector);
   }
   
   //holds information on how the PRQE is to behave and what responses are "returned"
-  private class PartitionedQueryScenario {
+  private static class PartitionedQueryScenario {
     private InternalDistributedMember localNode;
     private ArrayList allNodes;
     private Set<InternalDistributedMember> failingNodes;
@@ -378,12 +385,4 @@ public class PartitionedRegionQueryEvaluatorTest {
     }
   }
   
-  private Queue<PartitionedQueryScenario> createScenariosQueue(PartitionedQueryScenario... scenarios) {
-    Queue<PartitionedQueryScenario> queue = new LinkedList<>();
-    for (PartitionedQueryScenario scenario: scenarios) {
-      queue.add(scenario);
-    }
-    return queue;
-    
-  }
 }



[41/55] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-1153

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/37db6040/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
----------------------------------------------------------------------


[27/55] [abbrv] incubator-geode git commit: Moving a distributed lock service unit test to open-source.

Posted by sa...@apache.org.
Moving a distributed lock service unit test to open-source.

There are still a few distributed unit tests that haven't been ported to
Geode.  This one covers a lot of the functionality of the distributed lock
service.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/2c148caa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/2c148caa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/2c148caa

Branch: refs/heads/feature/GEODE-1153
Commit: 2c148caaf6a484bce065843d4d6ba8e916bd9ad2
Parents: 717ba5c
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon May 9 15:08:31 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon May 9 15:09:47 2016 -0700

----------------------------------------------------------------------
 .../distributed/DistributedLockBlackboard.java  |   20 +
 .../DistributedLockBlackboardImpl.java          |   97 +
 .../DistributedLockServiceDUnitTest.java        | 3246 ++++++++++++++++++
 .../test/dunit/standalone/DUnitLauncher.java    |    3 +-
 4 files changed, 3365 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2c148caa/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboard.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboard.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboard.java
new file mode 100755
index 0000000..de8809c
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboard.java
@@ -0,0 +1,20 @@
+package com.gemstone.gemfire.distributed;
+
+import java.io.Serializable;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * Created by bschuchardt on 5/9/2016.
+ */
+public interface DistributedLockBlackboard extends Remote, Serializable {
+  void initCount() throws RemoteException;
+
+  void incCount() throws RemoteException;
+
+  long getCount() throws RemoteException;
+
+  void setIsLocked(boolean isLocked) throws RemoteException;
+
+  boolean getIsLocked() throws RemoteException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2c148caa/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboardImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboardImpl.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboardImpl.java
new file mode 100755
index 0000000..6525cd1
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockBlackboardImpl.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed;
+
+import com.gemstone.gemfire.internal.Assert;
+import com.gemstone.gemfire.test.dunit.standalone.DUnitLauncher;
+
+import java.rmi.Naming;
+import java.rmi.NotBoundException;
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+
+
+public class DistributedLockBlackboardImpl extends UnicastRemoteObject implements DistributedLockBlackboard {
+  public static int Count;
+  public static int IsLocked;
+
+  public static DistributedLockBlackboard blackboard;
+
+  /**
+   *  Zero-arg constructor for remote method invocations.
+   */
+  public DistributedLockBlackboardImpl() throws RemoteException {
+    super();
+  }
+
+  /**
+   *  Creates a singleton event listeners blackboard.
+   */
+  public static DistributedLockBlackboard getInstance() throws Exception {
+    if ( blackboard == null )
+      initialize();
+    return blackboard;
+  }
+  private static synchronized void initialize() throws Exception {
+    if ( blackboard == null ) {
+      System.out.println(DUnitLauncher.RMI_PORT_PARAM + "=" + System.getProperty(DUnitLauncher.RMI_PORT_PARAM));
+      int namingPort = Integer.getInteger(DUnitLauncher.RMI_PORT_PARAM).intValue();
+      String name = "//localhost:" + namingPort + "/" + "DistributedLockBlackboard";
+      try {
+        blackboard = (DistributedLockBlackboard)Naming.lookup(name);
+      } catch (NotBoundException e) {
+        // create the master blackboard in this VM
+        blackboard = new DistributedLockBlackboardImpl();
+        Naming.bind(name, blackboard);
+      }
+    }
+  }
+  
+  @Override
+  public synchronized void initCount() {
+    Count = 0;
+  }
+
+  @Override
+  public synchronized void incCount() {
+    Count = Count + 1;
+  }
+  
+  
+  @Override
+  public synchronized long getCount() {
+    return Count;
+  }
+  
+  @Override
+  public synchronized void setIsLocked(boolean isLocked) {
+    if (isLocked) {
+      if (IsLocked < 1) IsLocked = 1;
+    } else {
+      if (IsLocked > 0) IsLocked = 0;
+    }
+  }
+  
+  @Override
+  public synchronized boolean getIsLocked() {
+    long isLocked = IsLocked;
+    Assert.assertTrue(isLocked == 0 || isLocked == 1, 
+      "DistributedLockBlackboard internal error - IsLocked is " + isLocked);
+    return isLocked == 1;
+  }
+  
+}


[18/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

Posted by sa...@apache.org.
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 useful name

* convert UnitTests to use JUnit 4 syntax
* convert UnitTests to use Rules
* remove empty javadoc blocks and lines
* separate some UnitTests from IntegrationTests (ie split one test into two tests)
* fix up formatting problems
* improve testability of ClassPathLoader
* rename some tests from old TRAC #s to meaningful names
* remove empty unnecessary methods and deadcode
* add @Override annotations
* reduce scope of variables and methods where possible


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/bf258f62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/bf258f62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/bf258f62

Branch: refs/heads/feature/GEODE-1153
Commit: bf258f62bd528ec024910292f41533b01edfeeae
Parents: 4ad4d63
Author: Kirk Lund <kl...@pivotal.io>
Authored: Fri May 6 16:42:13 2016 -0700
Committer: Kirk Lund <kl...@pivotal.io>
Committed: Fri May 6 16:42:13 2016 -0700

----------------------------------------------------------------------
 .../SessionReplicationIntegrationJUnitTest.java |    2 +-
 .../session/Tomcat7SessionsJUnitTest.java       |    2 -
 .../modules/session/TestSessionsBase.java       |    8 +-
 .../session/Tomcat6SessionsJUnitTest.java       |    2 -
 .../gemstone/gemfire/BundledJarsJUnitTest.java  |    4 +-
 .../LauncherLifecycleCommandsDUnitTest.java     |    4 +-
 ...auncherLifecycleCommandsIntegrationTest.java |  165 +++
 .../LauncherLifecycleCommandsJUnitTest.java     |  194 +--
 .../annotations/ExperimentalJUnitTest.java      |    1 -
 .../gemfire/internal/ClassPathLoader.java       |    8 +-
 .../gemfire/SystemFailureJUnitTest.java         |    1 +
 .../java/com/gemstone/gemfire/TXJUnitTest.java  |   38 +-
 .../cache/AttributesFactoryJUnitTest.java       |   25 +-
 .../gemfire/cache/Bug36619JUnitTest.java        |   77 --
 .../gemfire/cache/Bug52289JUnitTest.java        |   88 --
 .../gemfire/cache/ConnectionPoolDUnitTest.java  |   18 +-
 ...alStaticArrayShouldNotCauseSegFaultTest.java |   86 ++
 ...MembershipAttributesAreSerializableTest.java |   74 +
 .../gemfire/cache/OperationJUnitTest.java       |   96 +-
 .../gemfire/cache/RoleExceptionJUnitTest.java   |   26 +-
 .../internal/OpExecutorImplJUnitTest.java       |  175 ++-
 .../internal/ServerBlackListJUnitTest.java      |   25 +-
 .../locator/LocatorStatusResponseJUnitTest.java |    1 -
 .../pooling/ConnectionManagerJUnitTest.java     |    8 +-
 .../management/ResourceManagerDUnitTest.java    |    2 +-
 .../PutOperationContextJUnitTest.java           |   34 +-
 .../GetOperationContextImplJUnitTest.java       |   37 +-
 .../PartitionRegionHelperDUnitTest.java         |    2 +-
 .../gemfire/cache/query/CacheUtils.java         |    2 +-
 .../query/dunit/PdxStringQueryDUnitTest.java    |  148 +-
 .../query/dunit/QueryUsingPoolDUnitTest.java    |    2 +-
 .../cache/query/dunit/RemoteQueryDUnitTest.java |    4 +-
 .../query/functional/CountStarJUnitTest.java    |   18 +-
 .../IUMRMultiIndexesMultiRegionJUnitTest.java   |   12 +-
 .../IndexMaintenanceAsynchJUnitTest.java        |    2 +-
 .../functional/JavaSerializationJUnitTest.java  |   17 +-
 .../query/functional/LimitClauseJUnitTest.java  |    8 +-
 .../cache/query/functional/MiscJUnitTest.java   |   32 +-
 .../MultiRegionIndexUsageJUnitTest.java         |   32 +-
 .../NonDistinctOrderByReplicatedJUnitTest.java  |    4 +-
 .../NonDistinctOrderByTestImplementation.java   |   16 +-
 .../functional/OrderByReplicatedJUnitTest.java  |    4 +-
 .../functional/OrderByTestImplementation.java   |   16 +-
 .../query/functional/PdxOrderByJUnitTest.java   |    2 +-
 .../CompiledAggregateFunctionJUnitTest.java     |   28 +-
 .../query/internal/CompiledInJUnitTest.java     |   72 +-
 .../internal/NWayMergeResultsJUnitTest.java     |   37 +-
 ...ueryFromClauseCanonicalizationJUnitTest.java |    6 +-
 .../QueryObjectSerializationJUnitTest.java      |   46 +-
 .../query/internal/ResultsBagJUnitTest.java     |   52 +-
 .../ResultsBagLimitBehaviourJUnitTest.java      |   38 +-
 .../ResultsCollectionWrapperLimitJUnitTest.java |   29 +-
 .../SelectResultsComparatorJUnitTest.java       |   24 +-
 .../StructBagLimitBehaviourJUnitTest.java       |   23 +-
 .../query/internal/StructSetJUnitTest.java      |   15 +-
 .../internal/aggregate/AggregatorJUnitTest.java |   23 +-
 .../index/AsynchIndexMaintenanceJUnitTest.java  |    8 +-
 .../internal/index/HashIndexSetJUnitTest.java   |  192 +--
 .../internal/index/IndexElemArrayJUnitTest.java |   24 +-
 .../index/IndexMaintenanceJUnitTest.java        |   16 +-
 .../index/IndexStatisticsJUnitTest.java         |   12 +-
 .../index/MemoryIndexStoreJUnitTest.java        |  698 +++++-----
 ...exStoreWithInplaceModificationJUnitTest.java |   45 +-
 .../PRBasicIndexCreationDUnitTest.java          |   15 +-
 .../PRBasicMultiIndexCreationDUnitTest.java     |   13 +-
 .../query/partitioned/PRQueryDUnitHelper.java   |   52 +-
 .../query/partitioned/PRQueryDUnitTest.java     |    2 +-
 .../internal/ConnectionCountProbeJUnitTest.java |   22 +-
 .../cache/util/PasswordUtilJUnitTest.java       |   11 +-
 .../gemfire/cache30/CacheLoaderTestCase.java    |   14 +-
 .../gemfire/cache30/CacheMapTxnDUnitTest.java   |    2 +-
 .../cache30/CacheStatisticsDUnitTest.java       |    4 +-
 .../gemfire/cache30/CacheXml41DUnitTest.java    |   10 +-
 .../gemfire/cache30/CacheXml57DUnitTest.java    |    2 +-
 .../gemfire/cache30/CacheXml58DUnitTest.java    |    2 +-
 .../gemfire/cache30/CacheXml65DUnitTest.java    |    2 +-
 .../cache30/ClientMembershipDUnitTest.java      |    2 +-
 .../gemfire/cache30/DiskRegionDUnitTest.java    |    2 +-
 .../cache30/DistAckMapMethodsDUnitTest.java     |    2 +-
 ...tributedAckPersistentRegionCCEDUnitTest.java |   28 +-
 .../gemfire/cache30/MultiVMRegionTestCase.java  |   52 +-
 .../gemfire/cache30/PutAllMultiVmDUnitTest.java |    4 +-
 .../gemfire/cache30/QueueMsgDUnitTest.java      |    2 +-
 .../RegionMembershipListenerDUnitTest.java      |    6 +-
 .../gemfire/cache30/RegionTestCase.java         |    4 +-
 .../gemfire/cache30/SlowRecDUnitTest.java       |    4 +-
 .../AbstractLauncherServiceStatusTest.java      |  115 +-
 .../distributed/AbstractLauncherTest.java       |    4 +-
 .../LocatorLauncherLocalIntegrationTest.java    |    6 +-
 .../LocatorLauncherRemoteIntegrationTest.java   |    8 +-
 .../gemfire/distributed/LocatorStateTest.java   |   46 +-
 .../ServerLauncherLocalIntegrationTest.java     |    4 +-
 .../ServerLauncherRemoteIntegrationTest.java    |    4 +-
 .../gemfire/distributed/ServerLauncherTest.java |   10 +-
 .../AtomicLongWithTerminalStateJUnitTest.java   |   13 +-
 .../internal/DistributionConfigJUnitTest.java   |   62 +-
 .../InternalDistributedSystemJUnitTest.java     |    6 +-
 .../LocatorLoadSnapshotIntegrationTest.java     |  122 ++
 .../internal/LocatorLoadSnapshotJUnitTest.java  |  104 +-
 .../internal/ProductUseLogJUnitTest.java        |  105 +-
 .../internal/ServerLocatorJUnitTest.java        |   21 +-
 .../internal/SharedConfigurationJUnitTest.java  |    1 -
 .../internal/StartupMessageDataJUnitTest.java   |   34 +-
 .../DeadlockDetectorIntegrationTest.java        |  299 +++++
 .../deadlock/DeadlockDetectorJUnitTest.java     |  331 -----
 .../internal/deadlock/DeadlockDetectorTest.java |  140 ++
 .../deadlock/DependencyGraphJUnitTest.java      |   24 +-
 .../deadlock/UnsafeThreadLocalJUnitTest.java    |   47 +-
 .../internal/membership/NetViewJUnitTest.java   |   51 +-
 .../membership/gms/GMSMemberJUnitTest.java      |   51 +-
 .../gms/auth/GMSAuthenticatorJUnitTest.java     |  123 +-
 .../locator/GMSLocatorRecoveryJUnitTest.java    |   34 +-
 .../gms/membership/StatRecorderJUnitTest.java   |   57 +-
 .../messenger/GMSQuorumCheckerJUnitTest.java    |  172 ++-
 .../gms/mgr/GMSMembershipManagerJUnitTest.java  |   71 +-
 .../TcpServerBackwardCompatDUnitTest.java       |    8 +-
 .../internal/tcpserver/TcpServerJUnitTest.java  |    6 +-
 .../internal/AbstractConfigJUnitTest.java       |  125 +-
 .../gemfire/internal/ArrayEqualsJUnitTest.java  |  193 ---
 .../internal/AvailablePortJUnitTest.java        |   12 +-
 .../ClassPathLoaderIntegrationTest.java         |  503 +++++++
 .../internal/ClassPathLoaderJUnitTest.java      | 1261 ------------------
 .../gemfire/internal/ClassPathLoaderTest.java   |  890 ++++++++++++
 .../gemfire/internal/ConfigSourceJUnitTest.java |    5 +-
 .../internal/CopyOnWriteHashSetJUnitTest.java   |   17 +-
 .../internal/DataSerializableJUnitTest.java     |  772 +++++------
 .../gemfire/internal/FileUtilJUnitTest.java     |    7 +-
 .../internal/GemFireVersionJUnitTest.java       |   16 +-
 .../internal/HeapDataOutputStreamJUnitTest.java |   17 +-
 .../gemfire/internal/LineWrapUnitJUnitTest.java |   13 +-
 .../gemfire/internal/NanoTimerJUnitTest.java    |   31 +-
 .../gemfire/internal/ObjIdMapJUnitTest.java     |   29 +-
 .../internal/OneTaskOnlyDecoratorJUnitTest.java |   22 +-
 .../PutAllOperationContextJUnitTest.java        |   14 +-
 ...lityShouldUseArrayEqualsIntegrationTest.java |  194 +++
 .../gemfire/internal/SocketCloserJUnitTest.java |    6 +-
 .../internal/SocketCloserWithWaitJUnitTest.java |    1 +
 .../gemfire/internal/StatSamplerJUnitTest.java  |   69 +-
 .../internal/UniqueIdGeneratorJUnitTest.java    |   18 +-
 .../AbstractDistributedRegionJUnitTest.java     |    8 +-
 .../internal/cache/AbstractRegionJUnitTest.java |    2 -
 .../internal/cache/AbstractRegionMapTest.java   |   23 +-
 .../internal/cache/BucketRegionJUnitTest.java   |   32 +-
 .../internal/cache/DeltaFaultInDUnitTest.java   |    2 +-
 .../internal/cache/DeltaSizingDUnitTest.java    |    2 +-
 .../gemfire/internal/cache/DiskIdJUnitTest.java |   51 +-
 .../internal/cache/DiskInitFileJUnitTest.java   |   35 +-
 .../cache/DiskWriteAttributesJUnitTest.java     |   99 +-
 .../cache/DistributedRegionJUnitTest.java       |   29 +-
 .../internal/cache/EntryEventImplTest.java      |   23 +-
 .../cache/EnumListenerEventJUnitTest.java       |   22 +-
 .../cache/OffHeapValueWrapperJUnitTest.java     |    9 +-
 .../gemfire/internal/cache/OldVLJUnitTest.java  |   19 +-
 .../cache/OldValueImporterTestBase.java         |   17 +-
 .../cache/OplogEntryIdMapJUnitTest.java         |   12 +-
 .../cache/OplogEntryIdSetJUnitTest.java         |   12 +-
 .../gemfire/internal/cache/OplogJUnitTest.java  |   40 +-
 .../internal/cache/OplogRVVJUnitTest.java       |   32 +-
 .../cache/OrderedTombstoneMapJUnitTest.java     |   10 +-
 .../cache/PartitionAttributesImplJUnitTest.java |   11 +-
 .../PartitionedRegionCacheCloseDUnitTest.java   |    2 +-
 .../cache/PartitionedRegionDUnitTestCase.java   |    2 +-
 .../PartitionedRegionDestroyDUnitTest.java      |    2 +-
 .../PartitionedRegionEvictionDUnitTest.java     |    4 +-
 .../cache/PartitionedRegionHelperJUnitTest.java |   15 +-
 .../PartitionedRegionQueryEvaluatorTest.java    |   69 +-
 ...artitionedRegionRedundancyZoneDUnitTest.java |    6 +-
 .../PartitionedRegionSingleHopDUnitTest.java    |    2 +-
 ...onedRegionSingleNodeOperationsJUnitTest.java |   12 +-
 .../cache/PartitionedRegionStatsJUnitTest.java  |    8 +-
 .../PartitionedRegionTestUtilsDUnitTest.java    |   12 +-
 .../cache/RemoteTransactionDUnitTest.java       |   22 +-
 .../cache/SearchLoadAndWriteProcessorTest.java  |    1 -
 .../cache/SimpleDiskRegionJUnitTest.java        |    6 +-
 .../gemfire/internal/cache/VLJUnitTest.java     |   35 +-
 .../cache/control/FilterByPathJUnitTest.java    |   24 +-
 .../control/MemoryThresholdsJUnitTest.java      |    7 +-
 .../control/RebalanceOperationDUnitTest.java    |   28 +-
 ...onFunctionExecutionNoSingleHopDUnitTest.java |    2 +-
 ...onExecutionSelectorNoSingleHopDUnitTest.java |    2 +-
 ...gionFunctionExecutionSingleHopDUnitTest.java |    2 +-
 .../execute/PRCustomPartitioningDUnitTest.java  |    2 +-
 .../execute/PRFunctionExecutionDUnitTest.java   |   12 +-
 .../execute/PRPerformanceTestDUnitTest.java     |    2 +-
 .../SimpleExtensionPointJUnitTest.java          |    7 +-
 .../cache/ha/EventIdOptimizationJUnitTest.java  |  129 +-
 .../internal/cache/ha/HAGIIDUnitTest.java       |   12 +-
 .../cache/ha/HARQAddOperationJUnitTest.java     |    2 +-
 .../cache/ha/HARegionQueueDUnitTest.java        |    2 +-
 .../cache/ha/ThreadIdentifierJUnitTest.java     |   12 +-
 .../cache/locks/TXLockServiceDUnitTest.java     |    2 +-
 .../FetchEntriesMessageJUnitTest.java           |   13 +-
 .../OfflineMembersDetailsJUnitTest.java         |   11 +-
 .../PartitionedRegionLoadModelJUnitTest.java    |  121 +-
 .../persistence/BackupInspectorJUnitTest.java   |   52 +-
 .../TemporaryResultSetFactoryJUnitTest.java     |   44 +-
 .../RegionEntryFactoryBuilderJUnitTest.java     |   11 +-
 .../cache/tier/sockets/Bug37805DUnitTest.java   |    2 +-
 .../CacheServerTransactionsDUnitTest.java       |    8 +-
 .../sockets/ClientHealthMonitorJUnitTest.java   |    8 +-
 .../tier/sockets/ClientServerMiscDUnitTest.java |   22 +-
 .../cache/tier/sockets/ConflationDUnitTest.java |    4 +-
 .../DurableClientReconnectDUnitTest.java        |    2 +-
 .../tier/sockets/FilterProfileJUnitTest.java    |   20 +-
 .../sockets/HAStartupAndFailoverDUnitTest.java  |    4 +-
 .../sockets/InterestListFailoverDUnitTest.java  |    2 +-
 .../cache/tier/sockets/MessageJUnitTest.java    |   20 +-
 .../tier/sockets/ObjectPartListJUnitTest.java   |   27 +-
 .../sockets/RedundancyLevelPart1DUnitTest.java  |   88 +-
 .../sockets/RedundancyLevelPart2DUnitTest.java  |   96 +-
 .../tier/sockets/RedundancyLevelTestBase.java   |    4 +-
 .../tier/sockets/command/CommitCommandTest.java |   12 +-
 .../cache/versions/RVVExceptionJUnitTest.java   |   14 +-
 .../versions/RegionVersionHolder2JUnitTest.java |    5 +-
 .../versions/RegionVersionHolderJUnitTest.java  |   52 +-
 .../RegionVersionHolderRandomJUnitTest.java     |   47 +-
 ...RegionVersionHolderSmallBitSetJUnitTest.java |   15 +-
 .../versions/RegionVersionVectorJUnitTest.java  |   39 +-
 .../ParallelGatewaySenderQueueJUnitTest.java    |    8 +-
 ...ialGatewaySenderEventProcessorJUnitTest.java |   16 +-
 .../xmlcache/AbstractEntityResolverTest.java    |   34 +-
 .../xmlcache/AbstractXmlParserJUnitTest.java    |    3 +-
 .../cache/xmlcache/CacheCreationJUnitTest.java  |    9 +-
 .../cache/xmlcache/CacheXmlParserJUnitTest.java |    4 +-
 .../xmlcache/CacheXmlVersionJUnitTest.java      |    1 -
 .../xmlcache/GeodeEntityResolverJUnitTest.java  |   10 +-
 .../PivotalEntityResolverJUnitTest.java         |   11 +-
 .../cache/xmlcache/RegionCreationJUnitTest.java |    3 -
 .../xmlcache/XmlGeneratorUtilsJUnitTest.java    |   29 +-
 .../compression/SnappyCompressorJUnitTest.java  |   28 +-
 .../internal/i18n/BasicI18nJUnitTest.java       |  333 ++---
 .../io/CompositeOutputStreamJUnitTest.java      |    2 +-
 .../gemfire/internal/jndi/ContextJUnitTest.java |  305 ++---
 .../internal/lang/ObjectUtilsJUnitTest.java     |    2 +-
 .../internal/lang/ThreadUtilsJUnitTest.java     |   14 +-
 .../internal/logging/LogServiceJUnitTest.java   |   16 +-
 .../internal/logging/SortLogFileJUnitTest.java  |   10 +-
 .../logging/log4j/AlertAppenderJUnitTest.java   |    6 +-
 .../logging/log4j/ConfigLocatorJUnitTest.java   |    4 +-
 .../logging/log4j/FastLoggerJUnitTest.java      |    4 +-
 .../log4j/LocalizedMessageJUnitTest.java        |    6 +-
 .../log4j/LogWriterAppenderJUnitTest.java       |    1 -
 .../offheap/AbstractStoredObjectTestBase.java   |  256 ++--
 .../internal/offheap/DataTypeJUnitTest.java     |  142 +-
 ...tingOutOfOffHeapMemoryListenerJUnitTest.java |    8 +-
 .../internal/offheap/FragmentJUnitTest.java     |   29 +-
 .../internal/offheap/FreeListManagerTest.java   |   34 +-
 .../offheap/LifecycleListenerJUnitTest.java     |   96 +-
 .../MemoryAllocatorFillPatternJUnitTest.java    |    4 +-
 .../offheap/MemoryAllocatorJUnitTest.java       |   16 +-
 .../offheap/MemoryBlockNodeJUnitTest.java       |   38 +-
 .../offheap/MemoryInspectorImplJUnitTest.java   |   18 +-
 .../offheap/OffHeapHelperJUnitTest.java         |   17 +-
 .../OffHeapRegionEntryHelperJUnitTest.java      |    9 +-
 .../offheap/OffHeapStorageJUnitTest.java        |   82 +-
 ...ffHeapStoredObjectAddressStackJUnitTest.java |   24 -
 .../offheap/OffHeapStoredObjectJUnitTest.java   |   18 +-
 .../OffHeapStoredObjectSliceJUnitTest.java      |    4 +-
 ...ffHeapStoredObjectWithHeapFormJUnitTest.java |    7 +-
 .../OffHeapWriteObjectAsByteArrayJUnitTest.java |    6 -
 .../offheap/RefCountChangeInfoJUnitTest.java    |   14 +-
 .../offheap/TinyMemoryBlockJUnitTest.java       |   33 +-
 .../offheap/TinyStoredObjectJUnitTest.java      |  502 ++++---
 .../LocalProcessControllerJUnitTest.java        |   36 +-
 .../process/LocalProcessLauncherDUnitTest.java  |    4 -
 .../process/LocalProcessLauncherJUnitTest.java  |   36 +-
 .../internal/process/PidFileJUnitTest.java      |    4 +-
 ...tractSignalNotificationHandlerJUnitTest.java |   10 +-
 .../internal/size/ObjectSizerJUnitTest.java     |   21 +-
 .../internal/size/ObjectTraverserJUnitTest.java |   53 +-
 .../size/ReflectionObjectSizerJUnitTest.java    |   15 +-
 .../size/SizeClassOnceObjectSizerJUnitTest.java |   15 +-
 .../size/WellKnownClassSizerJUnitTest.java      |   18 +-
 .../statistics/SampleCollectorJUnitTest.java    |   54 +-
 .../statistics/StatMonitorHandlerJUnitTest.java |   42 +-
 .../statistics/StatisticsMonitorJUnitTest.java  |   51 +-
 .../internal/tcp/ConnectionJUnitTest.java       |    5 +-
 .../util/AbortableTaskServiceJUnitTest.java     |    1 -
 .../internal/util/ArrayUtilsJUnitTest.java      |    3 +-
 .../gemfire/internal/util/BytesJUnitTest.java   |   35 +-
 .../internal/util/CollectionUtilsJUnitTest.java |    1 -
 .../internal/util/DelayedActionJUnitTest.java   |    9 +-
 .../gemfire/internal/util/IOUtilsJUnitTest.java |    4 +-
 .../CompactConcurrentHashSetJUnitTest.java      |   26 +-
 .../concurrent/ReentrantSemaphoreJUnitTest.java |   98 +-
 .../SemaphoreReadWriteLockJUnitTest.java        |  110 +-
 ...ersalMembershipListenerAdapterDUnitTest.java |    2 +-
 .../stats/GatewayReceiverStatsJUnitTest.java    |    8 +-
 .../bean/stats/RegionStatsJUnitTest.java        |    2 +-
 .../bean/stats/StatsRateJUnitTest.java          |   59 +-
 .../internal/JettyHelperJUnitTest.java          |   27 +-
 .../beans/DistributedSystemBridgeJUnitTest.java |    3 +-
 .../cli/ClasspathScanLoadHelperJUnitTest.java   |   22 +-
 .../internal/cli/CliUtilDUnitTest.java          |    2 +-
 .../internal/cli/CommandManagerJUnitTest.java   |   82 +-
 .../cli/CommandSeparatorEscapeJUnitTest.java    |   47 +-
 .../internal/cli/DataCommandJsonJUnitTest.java  |   14 +-
 .../internal/cli/GfshParserJUnitTest.java       |  169 +--
 .../cli/annotations/CliArgumentJUnitTest.java   |  181 +--
 .../AbstractCommandsSupportJUnitTest.java       |    6 +-
 .../commands/DiskStoreCommandsJUnitTest.java    |    6 +-
 .../commands/GemfireDataCommandsDUnitTest.java  |    2 +-
 .../HTTPServiceSSLSupportJUnitTest.java         |    2 +-
 .../cli/commands/IndexCommandsJUnitTest.java    |    6 +-
 .../cli/commands/MemberCommandsDUnitTest.java   |    2 +-
 .../RegionPathConverterJUnitTest.java           |   23 +-
 .../DescribeDiskStoreFunctionJUnitTest.java     |   64 +-
 .../ListDiskStoresFunctionJUnitTest.java        |   30 +-
 .../functions/ListIndexFunctionJUnitTest.java   |  112 +-
 .../cli/parser/ParserUtilsJUnitTest.java        |   14 +-
 .../preprocessor/PreprocessorJUnitTest.java     |    7 +-
 .../PreprocessorUtilsJUnitTest.java             |   17 +-
 .../cli/shell/GfshConfigInitFileJUnitTest.java  |   20 +-
 .../shell/GfshExecutionStrategyJUnitTest.java   |   51 +-
 .../cli/shell/GfshHistoryJUnitTest.java         |    9 +-
 .../cli/shell/GfshInitFileJUnitTest.java        |   22 +-
 .../configuration/ZipUtilsJUnitTest.java        |  114 +-
 .../domain/CacheElementJUnitTest.java           |   14 +-
 .../configuration/utils/XmlUtilsJUnitTest.java  |   46 +-
 .../WanCommandsControllerJUnitTest.java         |   11 +-
 .../gemfire/pdx/ByteSourceJUnitTest.java        |    8 +-
 .../pdx/JSONPdxClientServerDUnitTest.java       |    2 +-
 .../gemfire/pdx/OffHeapByteSourceJUnitTest.java |    4 +-
 .../pdx/PdxDeserializationDUnitTest.java        |   12 +-
 .../security/ClientAuthorizationTestCase.java   |    2 +-
 .../security/NotAuthorizedExceptionTest.java    |    4 +-
 .../security/templates/PKCSPrincipalTest.java   |    3 +-
 .../templates/UsernamePrincipalTest.java        |    3 +-
 .../com/gemstone/gemfire/test/dunit/Assert.java |    2 +-
 .../gemfire/test/dunit/RMIException.java        |    2 +-
 .../test/dunit/SerializableCallable.java        |    2 +-
 .../test/dunit/SerializableRunnable.java        |    2 +-
 .../test/process/MainLauncherJUnitTest.java     |    9 +-
 .../cache/query/cq/dunit/CqQueryDUnitTest.java  |    2 +-
 .../cq/dunit/CqQueryUsingPoolDUnitTest.java     |    4 +-
 .../cache/query/cq/dunit/CqStatsDUnitTest.java  |    2 +-
 .../cq/dunit/CqStatsUsingPoolDUnitTest.java     |    2 +-
 .../PartitionedRegionCqQueryDUnitTest.java      |    2 +-
 .../internal/cache/PutAllCSDUnitTest.java       |    2 +-
 .../cache/RemoteCQTransactionDUnitTest.java     |   20 +-
 .../internal/cache/ha/CQListGIIDUnitTest.java   |    2 +-
 .../tier/sockets/DurableClientTestCase.java     |    8 +-
 .../CacheServerManagementDUnitTest.java         |    2 +-
 .../LuceneIndexForPartitionedRegion.java        |    5 +-
 .../HeterogeneousLuceneSerializer.java          |   82 ++
 .../HeterogenousLuceneSerializer.java           |   83 --
 .../internal/LuceneEventListenerJUnitTest.java  |    8 +-
 .../LuceneIndexForPartitionedRegionTest.java    |   27 +-
 .../LuceneIndexRecoveryHAJUnitTest.java         |    7 +-
 .../LuceneQueryResultsImplJUnitTest.java        |    4 -
 .../LuceneResultStructImpJUnitTest.java         |    2 -
 .../internal/LuceneServiceImplJUnitTest.java    |   14 +-
 .../PartitionedRepositoryManagerJUnitTest.java  |   15 +-
 .../internal/StringQueryProviderJUnitTest.java  |    4 +-
 .../directory/RegionDirectoryJUnitTest.java     |    7 +-
 .../DistributedScoringJUnitTest.java            |   29 +-
 .../distributed/EntryScoreJUnitTest.java        |    9 +-
 .../LuceneFunctionContextJUnitTest.java         |    9 +-
 .../TopEntriesCollectorJUnitTest.java           |   31 +-
 .../distributed/TopEntriesJUnitTest.java        |   18 +-
 .../internal/filesystem/ChunkKeyJUnitTest.java  |    1 -
 .../internal/filesystem/FileJUnitTest.java      |    5 +-
 .../filesystem/FileSystemJUnitTest.java         |   49 +-
 .../IndexRepositoryImplJUnitTest.java           |    6 +-
 .../IndexRepositoryImplPerformanceTest.java     |    6 +-
 .../HeterogeneousLuceneSerializerJUnitTest.java |   86 ++
 .../HeterogenousLuceneSerializerJUnitTest.java  |   90 --
 .../serializer/PdxFieldMapperJUnitTest.java     |   36 +-
 .../ReflectionFieldMapperJUnitTest.java         |    8 +-
 .../xml/LuceneIndexXmlGeneratorJUnitTest.java   |   29 +-
 .../controllers/PulseControllerJUnitTest.java   |   34 +-
 .../tools/pulse/testbed/driver/PulseUITest.java |    2 +-
 .../SerialGatewaySenderQueueDUnitTest.java      |    2 +-
 .../wancommand/WanCommandStatusDUnitTest.java   |    6 +-
 .../ShellCommandsControllerJUnitTest.java       |   19 +-
 .../LoginHandlerInterceptorJUnitTest.java       |   11 +-
 .../web/http/ClientHttpRequestJUnitTest.java    |   12 +-
 ...ableObjectHttpMessageConverterJUnitTest.java |    6 +-
 .../RestHttpOperationInvokerJUnitTest.java      |   32 +-
 .../SimpleHttpOperationInvokerJUnitTest.java    |    8 +-
 .../web/util/ConvertUtilsJUnitTest.java         |    4 +-
 381 files changed, 7987 insertions(+), 8122 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
index ef89a37..df7fa1c 100644
--- a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
+++ b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
@@ -466,7 +466,7 @@ public class SessionReplicationIntegrationJUnitTest {
 //        request.setURI("/test/request2");
 //        response.parse(tester.getResponses(request.generate()));
 //
-//        assertEquals("null", response.getContent());
+//        assertIndexDetailsEquals("null", response.getContent());
 //
 //        Region r = getRegion();
 //        assertNull("Region should not contain session", r.get(id));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/extensions/geode-modules-tomcat7/src/test/java/com/gemstone/gemfire/modules/session/Tomcat7SessionsJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat7/src/test/java/com/gemstone/gemfire/modules/session/Tomcat7SessionsJUnitTest.java b/extensions/geode-modules-tomcat7/src/test/java/com/gemstone/gemfire/modules/session/Tomcat7SessionsJUnitTest.java
index 5ac87ab..e7970d7 100644
--- a/extensions/geode-modules-tomcat7/src/test/java/com/gemstone/gemfire/modules/session/Tomcat7SessionsJUnitTest.java
+++ b/extensions/geode-modules-tomcat7/src/test/java/com/gemstone/gemfire/modules/session/Tomcat7SessionsJUnitTest.java
@@ -21,8 +21,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 import org.junit.BeforeClass;
 import org.junit.experimental.categories.Category;
 
-/**
- */
 @Category(UnitTest.class)
 public class Tomcat7SessionsJUnitTest extends TestSessionsBase {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java b/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
index 544658e..194a7c7 100644
--- a/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
+++ b/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
@@ -38,10 +38,8 @@ import java.io.PrintWriter;
 
 import static junit.framework.Assert.*;
 
-/**
- *
- */
 public abstract class TestSessionsBase {
+
   private static EmbeddedTomcat server;
 
   private static Region<String, HttpSession> region;
@@ -68,7 +66,7 @@ public abstract class TestSessionsBase {
     servlet = server.addServlet("/test/*", "default", CommandServlet.class.getName());
     server.startContainer();
 
-    /**
+    /*
      * Can only retrieve the region once the container has started up
      * (and the cache has started too).
      */
@@ -212,7 +210,7 @@ public abstract class TestSessionsBase {
 //        req.removeParameter("value");
 //        response = wc.getResponse(req);
 //
-//        assertEquals(value, response.getText());
+//        assertIndexDetailsEquals(value, response.getText());
 //    }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/Tomcat6SessionsJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/Tomcat6SessionsJUnitTest.java b/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/Tomcat6SessionsJUnitTest.java
index 7500a3c..bccf695 100644
--- a/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/Tomcat6SessionsJUnitTest.java
+++ b/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/Tomcat6SessionsJUnitTest.java
@@ -21,8 +21,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 import org.junit.BeforeClass;
 import org.junit.experimental.categories.Category;
 
-/**
- */
 @Category(UnitTest.class)
 public class Tomcat6SessionsJUnitTest extends TestSessionsBase {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-assembly/src/test/java/com/gemstone/gemfire/BundledJarsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/BundledJarsJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/BundledJarsJUnitTest.java
index 8ae3b22..9b59f80 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/BundledJarsJUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/BundledJarsJUnitTest.java
@@ -36,10 +36,10 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.FileUtil;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.gemstone.gemfire.util.test.TestUtil;
 
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class BundledJarsJUnitTest {
 
   private static final String VERSION_PATTERN = "[0-9-_.v]{3,}.*\\.jar$";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
index b5fa956..478316f 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
@@ -714,7 +714,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
     // TODO figure out what output to assert and validate on now that 'stop locator' uses Gfsh's logger
     // and standard err/out...
-    //assertEquals(CliStrings.format(CliStrings.STOP_LOCATOR__SHUTDOWN_MEMBER_MESSAGE, pathname),
+    //assertIndexDetailsEquals(CliStrings.format(CliStrings.STOP_LOCATOR__SHUTDOWN_MEMBER_MESSAGE, pathname),
     //  StringUtils.trim(toString(result)));
 
     WaitCriterion waitCriteria = new WaitCriterion() {
@@ -792,7 +792,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
     // TODO figure out what output to assert and validate on now that 'stop locator' uses Gfsh's logger
     // and standard err/out...
-    //assertEquals(CliStrings.format(CliStrings.STOP_LOCATOR__SHUTDOWN_MEMBER_MESSAGE, memberId),
+    //assertIndexDetailsEquals(CliStrings.format(CliStrings.STOP_LOCATOR__SHUTDOWN_MEMBER_MESSAGE, memberId),
     //  StringUtils.trim(toString(result)));
 
     WaitCriterion waitCriteria = new WaitCriterion() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsIntegrationTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsIntegrationTest.java
new file mode 100644
index 0000000..42e7291
--- /dev/null
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsIntegrationTest.java
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.management.internal.cli.commands;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.jar.Attributes;
+import java.util.jar.Attributes.Name;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+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.TemporaryFolder;
+import org.junit.rules.TestName;
+
+import com.gemstone.gemfire.internal.util.IOUtils;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+/**
+ * The LauncherLifecycleCommandsJUnitTest class is a test suite of test cases testing the contract and functionality of
+ * the lifecycle launcher GemFire shell (Gfsh) commands.
+ *
+ * @see com.gemstone.gemfire.management.internal.cli.commands.LauncherLifecycleCommands
+ * @see org.junit.Assert
+ * @see org.junit.Test
+ * @since 7.0
+ */
+@Category(IntegrationTest.class)
+public class LauncherLifecycleCommandsIntegrationTest {
+
+  private LauncherLifecycleCommands launcherCommands;
+
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  @Rule
+  public TestName testName = new TestName();
+
+  @Before
+  public void setup() {
+    launcherCommands = new LauncherLifecycleCommands();
+  }
+
+  @After
+  public void tearDown() {
+    launcherCommands = null;
+  }
+
+  @Test
+  public void testGemFireCoreClasspath() throws IOException {
+    File coreDependenciesJar = new File(LauncherLifecycleCommands.CORE_DEPENDENCIES_JAR_PATHNAME);
+
+    assertNotNull(coreDependenciesJar);
+    assertTrue(coreDependenciesJar + " is not a file", coreDependenciesJar.isFile());
+
+    Collection<String> expectedJarDependencies = Arrays.asList("antlr", "commons-io", "commons-lang", "commons-logging",
+            "geode", "jackson-annotations", "jackson-core", "jackson-databind", "jansi", "jline", "snappy-java",
+            "spring-core", "spring-shell", "jetty-server", "jetty-servlet", "jetty-webapp", "jetty-util", "jetty-http",
+            "servlet-api", "jetty-io", "jetty-security", "jetty-xml"
+
+    );
+
+    assertJarFileManifestClassPath(coreDependenciesJar, expectedJarDependencies);
+  }
+
+  @Test
+  public void testReadPid() throws IOException {
+    final int expectedPid = 12345;
+
+    File folder = temporaryFolder.newFolder();
+    File pidFile = new File(folder, getClass().getSimpleName() + "_" + testName.getMethodName() + ".pid");
+
+    assertTrue(pidFile.createNewFile());
+
+    pidFile.deleteOnExit();
+    writePid(pidFile, expectedPid);
+
+    final int actualPid = getLauncherLifecycleCommands().readPid(pidFile);
+
+    assertEquals(expectedPid, actualPid);
+  }
+
+  private LauncherLifecycleCommands getLauncherLifecycleCommands() {
+    return launcherCommands;
+  }
+
+  private void writePid(final File pidFile, final int pid) throws IOException {
+    final FileWriter fileWriter = new FileWriter(pidFile, false);
+    fileWriter.write(String.valueOf(pid));
+    fileWriter.write("\n");
+    fileWriter.flush();
+    IOUtils.close(fileWriter);
+  }
+
+  private void assertJarFileManifestClassPath(final File dependenciesJar,
+                                              final Collection<String> expectedJarDependencies) throws IOException {
+    JarFile dependenciesJarFile = new JarFile(dependenciesJar);
+    Manifest manifest = dependenciesJarFile.getManifest();
+
+    assertNotNull(manifest);
+
+    Attributes attributes = manifest.getMainAttributes();
+
+    assertNotNull(attributes);
+    assertTrue(attributes.containsKey(Name.CLASS_PATH));
+
+    String[] actualJarDependencies = attributes.getValue(Name.CLASS_PATH).split(" ");
+
+    assertNotNull(actualJarDependencies);
+    assertTrue(String.format("Expected the actual number of JAR dependencies to be (%1$d); but was (%2$d)!",
+            expectedJarDependencies.size(), actualJarDependencies.length),
+            actualJarDependencies.length >= expectedJarDependencies.size());
+    //assertTrue(Arrays.asList(actualJarDependencies).containsAll(expectedJarDependencies));
+
+    List<String> actualJarDependenciesList = new ArrayList<>(Arrays.asList(actualJarDependencies));
+    List<String> missingExpectedJarDependenciesList = new ArrayList<>(expectedJarDependencies.size());
+
+    for (String expectedJarDependency : expectedJarDependencies) {
+      boolean containsExpectedJar = false;
+
+      for (int index = 0, size = actualJarDependenciesList.size(); index < size; index++) {
+        if (actualJarDependenciesList.get(index).toLowerCase().contains(expectedJarDependency.toLowerCase())) {
+          actualJarDependenciesList.remove(index);
+          containsExpectedJar = true;
+          break;
+        }
+      }
+
+      if (!containsExpectedJar) {
+        missingExpectedJarDependenciesList.add(expectedJarDependency);
+      }
+    }
+
+    assertTrue(String.format(
+            "GemFire dependencies JAR file (%1$s) does not contain the expected dependencies (%2$s) in the Manifest Class-Path attribute (%3$s)!",
+            dependenciesJar, missingExpectedJarDependenciesList, attributes.getValue(Name.CLASS_PATH)),
+            missingExpectedJarDependenciesList.isEmpty());
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
index dc89f03..0b5cdfb 100755
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
@@ -16,6 +16,21 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Stack;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.GemFireException;
 import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.distributed.ServerLauncher;
@@ -26,28 +41,6 @@ import com.gemstone.gemfire.internal.lang.SystemUtils;
 import com.gemstone.gemfire.internal.util.IOUtils;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Stack;
-import java.util.jar.Attributes;
-import java.util.jar.Attributes.Name;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-
-import static org.junit.Assert.*;
 
 /**
  * The LauncherLifecycleCommandsJUnitTest class is a test suite of test cases testing the contract and functionality of
@@ -62,9 +55,6 @@ import static org.junit.Assert.*;
 @Category(UnitTest.class)
 public class LauncherLifecycleCommandsJUnitTest {
 
-  private static final String GFSH_DEPENDENCIES_JAR_PATHNAME = IOUtils.appendToPath(System.getenv("GEMFIRE"), "lib",
-      "gfsh-dependencies.jar");
-
   private LauncherLifecycleCommands launcherCommands;
 
   @Before
@@ -77,18 +67,6 @@ public class LauncherLifecycleCommandsJUnitTest {
     launcherCommands = null;
   }
 
-  protected LauncherLifecycleCommands getLauncherLifecycleCommands() {
-    return launcherCommands;
-  }
-
-  protected void writePid(final File pidFile, final int pid) throws IOException {
-    final FileWriter fileWriter = new FileWriter(pidFile, false);
-    fileWriter.write(String.valueOf(pid));
-    fileWriter.write("\n");
-    fileWriter.flush();
-    IOUtils.close(fileWriter);
-  }
-
   @Test
   public void testAddGemFirePropertyFileToCommandLine() {
     final List<String> commandLine = new ArrayList<>();
@@ -260,28 +238,6 @@ public class LauncherLifecycleCommandsJUnitTest {
   }
 
   @Test
-  public void testReadPidWithNonExistingFile() {
-    assertEquals(LauncherLifecycleCommands.INVALID_PID,
-        getLauncherLifecycleCommands().readPid(new File("/path/to/non_existing/pid.file")));
-  }
-
-  @Test
-  public void testReadPid() throws IOException {
-    final int expectedPid = 12345;
-
-    File pidFile = new File(getClass().getSimpleName().concat("_testReadPid.pid"));
-
-    assertTrue(pidFile.createNewFile());
-
-    pidFile.deleteOnExit();
-    writePid(pidFile, expectedPid);
-
-    final int actualPid = getLauncherLifecycleCommands().readPid(pidFile);
-
-    assertEquals(expectedPid, actualPid);
-  }
-
-  @Test
   @SuppressWarnings("deprecation")
   public void testGetClasspath() {
     assertEquals(System.getProperty("java.class.path"), getLauncherLifecycleCommands().getClasspath(null));
@@ -295,23 +251,6 @@ public class LauncherLifecycleCommandsJUnitTest {
   }
 
   @Test
-  public void testGemFireCoreClasspath() throws IOException {
-    File coreDependenciesJar = new File(LauncherLifecycleCommands.CORE_DEPENDENCIES_JAR_PATHNAME);
-
-    assertNotNull(coreDependenciesJar);
-    assertTrue(coreDependenciesJar + " is not a file", coreDependenciesJar.isFile());
-
-    Collection<String> expectedJarDependencies = Arrays.asList("antlr", "commons-io", "commons-lang", "commons-logging",
-        "geode", "jackson-annotations", "jackson-core", "jackson-databind", "jansi", "jline", "snappy-java",
-        "spring-core", "spring-shell", "jetty-server", "jetty-servlet", "jetty-webapp", "jetty-util", "jetty-http",
-        "servlet-api", "jetty-io", "jetty-security", "jetty-xml"
-
-    );
-
-    assertJarFileManifestClassPath(coreDependenciesJar, expectedJarDependencies);
-  }
-
-  @Test
   public void testGetSystemClasspath() {
     assertEquals(System.getProperty("java.class.path"), getLauncherLifecycleCommands().getSystemClasspath());
   }
@@ -342,17 +281,6 @@ public class LauncherLifecycleCommandsJUnitTest {
     assertEquals(expectedClasspath, actualClasspath);
   }
 
-  private String toPath(Object... pathElements) {
-    String path = "";
-
-    for (Object pathElement : pathElements) {
-      path += (path.isEmpty() ? StringUtils.EMPTY_STRING : File.pathSeparator);
-      path += pathElement;
-    }
-
-    return path;
-  }
-
   @Test
   public void testToClasspath() {
     final boolean EXCLUDE_SYSTEM_CLASSPATH = false;
@@ -406,64 +334,6 @@ public class LauncherLifecycleCommandsJUnitTest {
     assertEquals(expectedClasspath, actualClasspath);
   }
 
-  private void assertJarFileManifestClassPath(final File dependenciesJar,
-      final Collection<String> expectedJarDependencies) throws IOException {
-    JarFile dependenciesJarFile = new JarFile(dependenciesJar);
-    Manifest manifest = dependenciesJarFile.getManifest();
-
-    assertNotNull(manifest);
-
-    Attributes attributes = manifest.getMainAttributes();
-
-    assertNotNull(attributes);
-    assertTrue(attributes.containsKey(Name.CLASS_PATH));
-
-    String[] actualJarDependencies = attributes.getValue(Name.CLASS_PATH).split(" ");
-
-    assertNotNull(actualJarDependencies);
-    assertTrue(String.format("Expected the actual number of JAR dependencies to be (%1$d); but was (%2$d)!",
-        expectedJarDependencies.size(), actualJarDependencies.length),
-        actualJarDependencies.length >= expectedJarDependencies.size());
-    //assertTrue(Arrays.asList(actualJarDependencies).containsAll(expectedJarDependencies));
-
-    List<String> actualJarDependenciesList = new ArrayList<>(Arrays.asList(actualJarDependencies));
-    List<String> missingExpectedJarDependenciesList = new ArrayList<>(expectedJarDependencies.size());
-
-    for (String expectedJarDependency : expectedJarDependencies) {
-      boolean containsExpectedJar = false;
-
-      for (int index = 0, size = actualJarDependenciesList.size(); index < size; index++) {
-        if (actualJarDependenciesList.get(index).toLowerCase().contains(expectedJarDependency.toLowerCase())) {
-          actualJarDependenciesList.remove(index);
-          containsExpectedJar = true;
-          break;
-        }
-      }
-
-      if (!containsExpectedJar) {
-        missingExpectedJarDependenciesList.add(expectedJarDependency);
-      }
-    }
-
-    assertTrue(String.format(
-        "GemFire dependencies JAR file (%1$s) does not contain the expected dependencies (%2$s) in the Manifest Class-Path attribute (%3$s)!",
-        dependenciesJar, missingExpectedJarDependenciesList, attributes.getValue(Name.CLASS_PATH)),
-        missingExpectedJarDependenciesList.isEmpty());
-  }
-
-  private String toClasspath(final String... jarFilePathnames) {
-    String classpath = StringUtils.EMPTY_STRING;
-
-    if (jarFilePathnames != null) {
-      for (final String jarFilePathname : jarFilePathnames) {
-        classpath += (classpath.isEmpty() ? StringUtils.EMPTY_STRING : File.pathSeparator);
-        classpath += jarFilePathname;
-      }
-    }
-
-    return classpath;
-  }
-
   @Test
   public void testGetJavaPathname() {
     assertEquals(IOUtils.appendToPath(System.getProperty("java.home"), "bin",
@@ -579,4 +449,38 @@ public class LauncherLifecycleCommandsJUnitTest {
         expectedCommandLineElements.isEmpty());
   }
 
+  @Test
+  public void testReadPidWithNonExistingFile() {
+    assertEquals(LauncherLifecycleCommands.INVALID_PID,
+            getLauncherLifecycleCommands().readPid(new File("/path/to/non_existing/pid.file")));
+  }
+
+  private LauncherLifecycleCommands getLauncherLifecycleCommands() {
+    return launcherCommands;
+  }
+
+  private String toClasspath(final String... jarFilePathnames) {
+    String classpath = StringUtils.EMPTY_STRING;
+
+    if (jarFilePathnames != null) {
+      for (final String jarFilePathname : jarFilePathnames) {
+        classpath += (classpath.isEmpty() ? StringUtils.EMPTY_STRING : File.pathSeparator);
+        classpath += jarFilePathname;
+      }
+    }
+
+    return classpath;
+  }
+
+  private String toPath(Object... pathElements) {
+    String path = "";
+
+    for (Object pathElement : pathElements) {
+      path += (path.isEmpty() ? StringUtils.EMPTY_STRING : File.pathSeparator);
+      path += pathElement;
+    }
+
+    return path;
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-common/src/test/java/com/gemstone/gemfire/annotations/ExperimentalJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-common/src/test/java/com/gemstone/gemfire/annotations/ExperimentalJUnitTest.java b/geode-common/src/test/java/com/gemstone/gemfire/annotations/ExperimentalJUnitTest.java
index 8067a4a..2df1cd6 100755
--- a/geode-common/src/test/java/com/gemstone/gemfire/annotations/ExperimentalJUnitTest.java
+++ b/geode-common/src/test/java/com/gemstone/gemfire/annotations/ExperimentalJUnitTest.java
@@ -32,7 +32,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
  * annotation can be applied to Interfaces, Classes, Public and Protected
  * Fields, Enums, Enum Constants, Public and Protected Methods, Packages,
  * and Constructors.
- * 
  */
 @Category(UnitTest.class)
 public class ExperimentalJUnitTest {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/main/java/com/gemstone/gemfire/internal/ClassPathLoader.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/ClassPathLoader.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/ClassPathLoader.java
index 1cb2332..028a57e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/ClassPathLoader.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/ClassPathLoader.java
@@ -87,8 +87,11 @@ public final class ClassPathLoader {
   // class is found in a directory instead of a JAR file (as when testing),
   // then it will be relative to the location of the root of the package and
   // class.
-  public static final File EXT_LIB_DIR = new File((new File(ClassPathLoader.class.getProtectionDomain().getCodeSource()
-      .getLocation().getPath())).getParent(), "ext");
+  public static final String EXT_LIB_DIR_PARENT_PROPERTY = "gemfire.ClassPathLoader.EXT_LIB_DIR";
+  public static final String EXT_LIB_DIR_PARENT_DEFAULT = ClassPathLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath();
+  static final File defineEXT_LIB_DIR() {
+    return new File((new File(System.getProperty(EXT_LIB_DIR_PARENT_PROPERTY, EXT_LIB_DIR_PARENT_DEFAULT))).getParent(), "ext");
+  }
 
   // This token is placed into the list of class loaders to determine where
   // to insert the TCCL when in forName(...), getResource(...), etc.
@@ -205,6 +208,7 @@ public final class ClassPathLoader {
     
     // Add user JAR files from the EXT_LIB_DIR directory using a single ClassLoader
     try {
+      File EXT_LIB_DIR = defineEXT_LIB_DIR();
       if (EXT_LIB_DIR.exists()) {
         if (!EXT_LIB_DIR.isDirectory() || !EXT_LIB_DIR.canRead()) {
           logger.warn("Cannot read from directory when attempting to load JAR files: {}", EXT_LIB_DIR.getAbsolutePath());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java
index b138e7f..6d9dcbc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java
@@ -33,6 +33,7 @@ public class SystemFailureJUnitTest {
 
   private static final int LONG_WAIT = 30000;
   private int oldWaitTime;
+
   @Before
   public void setWaitTime() {
     oldWaitTime = SystemFailure.SHUTDOWN_WAIT;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/TXJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/TXJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/TXJUnitTest.java
index ff24d24..acdba69 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/TXJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/TXJUnitTest.java
@@ -3069,7 +3069,7 @@ public class TXJUnitTest {
       assertNotNull(event.getRegion().getCache());
       assertNotNull(event.getRegion().getCache().getCacheTransactionManager());
       assertEquals(this.getTXId(), event.getTransactionId());
-      // assertEquals(event.getTransactionId(), event.getRegion().getCache().getCacheTransactionManager().getTransactionId(), );
+      // assertIndexDetailsEquals(event.getTransactionId(), event.getRegion().getCache().getCacheTransactionManager().getTransactionId(), );
       if (!isPR()) assertEquals("IsDistributed Assertion!",  this.isDistributed(), event.isDistributed());
       assertEquals(this.getKey(), event.getKey());
       assertSame(this.getCallBackArg(), event.getCallbackArgument());
@@ -3753,28 +3753,28 @@ public class TXJUnitTest {
         assertTrue(!txIt.hasNext());
       }
       reg1.invalidate("key1");
-//      assertEquals(0, nonTxKeys.size());
+//      assertIndexDetailsEquals(0, nonTxKeys.size());
       assertEquals(1, txKeys.size());
-//      assertEquals(0, nonTxValues.size());
+//      assertIndexDetailsEquals(0, nonTxValues.size());
       assertEquals(0, txValues.size());
       assertTrue(txKeys.contains("key1"));
       assertTrue(!txValues.contains("value1"));
       reg1.create("key2", "value2");
       reg1.create("key3", "value3");
-//      assertEquals(0, nonTxKeys.size());
+//      assertIndexDetailsEquals(0, nonTxKeys.size());
       assertEquals(3, txKeys.size());
-//      assertEquals(0, nonTxValues.size());
+//      assertIndexDetailsEquals(0, nonTxValues.size());
       assertEquals(2, txValues.size());
       reg1.put("key1", "value1");
-//      assertEquals(0, nonTxKeys.size());
+//      assertIndexDetailsEquals(0, nonTxKeys.size());
       assertEquals(3, txKeys.size());
-//      assertEquals(0, nonTxValues.size());
+//      assertIndexDetailsEquals(0, nonTxValues.size());
       assertEquals(3, txValues.size());
       reg1.localInvalidate("key2");
-//      assertEquals(0, nonTxValues.size());
+//      assertIndexDetailsEquals(0, nonTxValues.size());
       assertEquals(2, txValues.size());
       reg1.invalidate("key1");
-//      assertEquals(0, nonTxValues.size());
+//      assertIndexDetailsEquals(0, nonTxValues.size());
       assertEquals(1, txValues.size());
       reg1.destroy("key2");
       reg1.destroy("key3");
@@ -3813,7 +3813,7 @@ public class TXJUnitTest {
       this.txMgr.begin();
       reg1.create("key1", "value1");
       Collection txValues = reg1.values();
-//      assertEquals(0, nonTxValues.size());
+//      assertIndexDetailsEquals(0, nonTxValues.size());
       assertEquals(1, txValues.size());
       assertTrue(txValues.contains("value1"));
       {
@@ -3880,7 +3880,7 @@ public class TXJUnitTest {
       assertEquals(1, txValues.size());
       assertTrue(txValues.iterator().hasNext());
       assertEquals("txValue1", txValues.iterator().next());
-//      assertEquals(0, nonTxValues.size());
+//      assertIndexDetailsEquals(0, nonTxValues.size());
       // non-TX collections can now be used in a transactional context
       try {
         nonTxValues.iterator().hasNext();
@@ -4132,7 +4132,7 @@ public class TXJUnitTest {
     assertEquals("LV 2", reg1.getEntry("key1").getValue());
     this.txMgr.rollback();
     assertTrue(!reg1.containsKey("key1"));
-    // assertEquals("LV 2", reg1.getEntry("key1").getValue());
+    // assertIndexDetailsEquals("LV 2", reg1.getEntry("key1").getValue());
     // reg1.localDestroy("key1");
     // TX load: commit check
     this.txMgr.begin();
@@ -5623,7 +5623,7 @@ public class TXJUnitTest {
         lruRegion.create("key" + i, null);
       }
       assertLRUEntries(lruRegion.entrySet(false), lruSize, "key", LRUENTRY_NULL);
-      // assertEquals(lruSize, lruRegion.entrySet(false).size());
+      // assertIndexDetailsEquals(lruSize, lruRegion.entrySet(false).size());
       this.txMgr.begin();
       for(int i=0; i<numToPut; ++i) {
         lruRegion.get("key"+i, new Integer(i));
@@ -5688,8 +5688,8 @@ public class TXJUnitTest {
       // LocalRegion lrReg = (LocalRegion) lruRegion;
       // LRUClockNode lruE = null;
       // assertNotNull(lruE = (LRUClockNode) lrReg.basicGetEntry("key"+(numToPut-1)));
-      // assertEquals(2, lruE.getRefCount());
-      // assertEquals(lruSize, lruRegion.entrySet(false).size());
+      // assertIndexDetailsEquals(2, lruE.getRefCount());
+      // assertIndexDetailsEquals(lruSize, lruRegion.entrySet(false).size());
 
       // Force the Non-Tx "put" to remove each attempt since region is full
       // and all the committed entries are currently part of a TX
@@ -6384,7 +6384,7 @@ public class TXJUnitTest {
     }
     waitForUpdates(aIindex0, 4);
 //     waitForKeys(aIindex0, 3);
-//     assertEquals(3, aIindex0.getStatistics().getNumberOfKeys()); // Shouldn't this be 1, again?
+//     assertIndexDetailsEquals(3, aIindex0.getStatistics().getNumberOfKeys()); // Shouldn't this be 1, again?
     assertEquals(2, aIindex0.getStatistics().getNumberOfValues());
     assertEquals(4, aIindex0.getStatistics().getNumUpdates());
 
@@ -6413,7 +6413,7 @@ public class TXJUnitTest {
     assertEquals(2, aIindex1.getStatistics().getNumberOfKeys()); 
     assertEquals(2, aIindex1.getStatistics().getNumberOfValues());
     assertEquals(2, aIindex1.getStatistics().getNumUpdates());
-//     assertEquals(3, aIindex0.getStatistics().getNumberOfKeys()); 
+//     assertIndexDetailsEquals(3, aIindex0.getStatistics().getNumberOfKeys());
     assertEquals(2, aIindex0.getStatistics().getNumberOfValues());
     assertEquals(4, aIindex0.getStatistics().getNumUpdates());
 
@@ -6456,7 +6456,7 @@ public class TXJUnitTest {
     waitForUpdates(aIindex1, 2);
      waitForKeys(aIindex0, 2);
 //     waitForKeys(aIindex1, 2);
-//     assertEquals(2, aIindex1.getStatistics().getNumberOfKeys()); 
+//     assertIndexDetailsEquals(2, aIindex1.getStatistics().getNumberOfKeys());
     assertEquals(2, aIindex1.getStatistics().getNumberOfValues());
     assertEquals(2, aIindex1.getStatistics().getNumUpdates());
     assertEquals(2, aIindex0.getStatistics().getNumberOfKeys()); 
@@ -6501,7 +6501,7 @@ public class TXJUnitTest {
     assertEquals(3, aIindex1.getStatistics().getNumberOfKeys()); 
     assertEquals(3, aIindex1.getStatistics().getNumberOfValues()); // Shouldn't this be 4?
     assertEquals(5, aIindex1.getStatistics().getNumUpdates()); 
-    //assertEquals(4, aIindex0.getStatistics().getNumberOfKeys()); 
+    //assertIndexDetailsEquals(4, aIindex0.getStatistics().getNumberOfKeys());
     assertEquals(3, aIindex0.getStatistics().getNumberOfValues()); // Shouldn't this be 4?
     assertEquals(7, aIindex0.getStatistics().getNumUpdates());
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/AttributesFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/AttributesFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/AttributesFactoryJUnitTest.java
index a1d374f..69f0092 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/AttributesFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/AttributesFactoryJUnitTest.java
@@ -16,13 +16,14 @@
  */
 package com.gemstone.gemfire.cache;
 
+import static org.junit.Assert.*;
+
 import java.io.File;
 import java.util.Arrays;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
 import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
 import com.gemstone.gemfire.compression.SnappyCompressor;
@@ -31,18 +32,12 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 /**
  * Tests the functionality of the {@link AttributesFactory} class.
  *
- *
  * @since 3.0
  */
 @Category(UnitTest.class)
-public class AttributesFactoryJUnitTest extends TestCase {
-
-  public AttributesFactoryJUnitTest(String name) {
-    super(name);
-  }
-
-  ///////////////////////  Test Methods ///////////////////////
+public class AttributesFactoryJUnitTest {
 
+  @Test
   public void testCopyConstructor() {
     AttributesFactory f1 = new AttributesFactory();
     f1.setLockGrantor(true);
@@ -60,6 +55,7 @@ public class AttributesFactoryJUnitTest extends TestCase {
    * Tests the {@link AttributesFactory#create} throws
    * the appropriate exception with poorly-configured factory.
    */
+  @Test
   public void testInvalidConfigurations() {
     AttributesFactory factory;
 
@@ -233,6 +229,7 @@ public class AttributesFactoryJUnitTest extends TestCase {
    * default} attributes factory has the advertised default
    * configuration.
    */
+  @Test
   public void testDefaultConfiguration() {
     AttributesFactory factory = new AttributesFactory();
     RegionAttributes attrs = factory.create();
@@ -275,6 +272,8 @@ public class AttributesFactoryJUnitTest extends TestCase {
     assertEquals(1, diskSizes.length);
     assertEquals(DiskStoreFactory.DEFAULT_DISK_DIR_SIZE, diskSizes[0]);
   }
+
+  @Test
   public void testDiskSynchronous() {
     {
       AttributesFactory factory = new AttributesFactory();
@@ -316,10 +315,12 @@ public class AttributesFactoryJUnitTest extends TestCase {
       assertEquals(false, attrs.isDiskSynchronous());
     }
   }
+
   /**
    * Tests the cacheListener functionality
    * @since 5.0
    */
+  @Test
   public void testCacheListeners() {
     RegionAttributes ra;
     CacheListener cl1 = new MyCacheListener();
@@ -386,9 +387,11 @@ public class AttributesFactoryJUnitTest extends TestCase {
     ra = factory.create();
     assertEquals(Arrays.asList(new CacheListener[]{cl2}), Arrays.asList(ra.getCacheListeners()));
   }
+
   /**
    * @since 5.7
    */
+  @Test
   public void testConnectionPool() {
     CacheLoader cl = new CacheLoader() {
         public Object load(LoaderHelper helper) throws CacheLoaderException {
@@ -413,7 +416,7 @@ public class AttributesFactoryJUnitTest extends TestCase {
    * Trivial cache listener impl
    * @since 5.0
    */
-  public static class MyCacheListener extends CacheListenerAdapter {
+  private static class MyCacheListener extends CacheListenerAdapter {
     // empty impl
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/Bug36619JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/Bug36619JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/Bug36619JUnitTest.java
deleted file mode 100644
index 9f0e458..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/Bug36619JUnitTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.cache;
-
-import java.io.*;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-import junit.framework.TestCase;
-
-/** Tests classes of Bug36619 to make sure they are Serializable */
-@Category(UnitTest.class)
-public class Bug36619JUnitTest extends TestCase {
-  
-  public Bug36619JUnitTest(String name) {
-    super(name);
-  }
-
-  protected void setUp() throws Exception {
-    super.setUp();
-  }
-
-  protected void tearDown() throws Exception {
-    super.tearDown();
-  }
-
-  /**
-   * Assert that MembershipAttributes are serializable.
-   */
-  public void testMembershipAttributesAreSerializable() throws Exception {
-    String[] roles = {"a", "b", "c"};
-    MembershipAttributes outMA = new MembershipAttributes(roles);
-    ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
-    ObjectOutputStream oos = new ObjectOutputStream(baos);
-    oos.writeObject(outMA);
-    
-    byte[] data = baos.toByteArray();
-    
-    ByteArrayInputStream bais = new ByteArrayInputStream(data);
-    ObjectInputStream ois = new ObjectInputStream(bais);
-    MembershipAttributes inMA = (MembershipAttributes) ois.readObject();
-    assertEquals(outMA, inMA);
-  }
-  /**
-   * Assert that SubscriptionAttributes are serializable.
-   */
-  public void testSubscriptionAttributesAreSerializable() throws Exception {
-    SubscriptionAttributes outSA = new SubscriptionAttributes();
-    ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
-    ObjectOutputStream oos = new ObjectOutputStream(baos);
-    oos.writeObject(outSA);
-    
-    byte[] data = baos.toByteArray();
-    
-    ByteArrayInputStream bais = new ByteArrayInputStream(data);
-    ObjectInputStream ois = new ObjectInputStream(bais);
-    SubscriptionAttributes inSA = (SubscriptionAttributes) ois.readObject();
-    assertEquals(outSA, inSA);
-  }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/Bug52289JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/Bug52289JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/Bug52289JUnitTest.java
deleted file mode 100644
index 0ba5154..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/Bug52289JUnitTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.cache;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-/**
- * Test case for Trac <a
- * href="https://svn.gemstone.com/trac/gemfire/ticket/52289">#52289</a>.
- * 
- * Asserts fixes for bug JDK-8076152 in JDK 1.8.0u20 to 1.8.0.u45.
- * http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8076152
- * 
- * The JVM crashes when hotspot compiling a method that uses an array consisting
- * of objects of a base class when different child classes is used as actual
- * instance objects AND when the array is constant (declared final). The crash
- * occurs during process of the aaload byte code.
- * 
- * This test and its corrections can be removed after the release of JDK
- * 1.8.0u60 if we choose to not support 1.8.0u20 - 1.8.0u45 inclusive.
- * 
- *
- * @since 8.2
- * 
- */
-@Category(UnitTest.class)
-public class Bug52289JUnitTest {
-
-  @Test
-  public void test() throws IOException, ClassNotFoundException {
-    // Iterate enough to cause JIT to compile
-    // javax.print.attribute.EnumSyntax::readResolve
-    for (int i = 0; i < 100_000; i++) {
-      // Must execute two or more subclasses with final static arrays of
-      // different types.
-      doEvictionAlgorithm();
-      doEvictionAction();
-    }
-  }
-
-  protected void doEvictionAlgorithm() throws IOException, ClassNotFoundException {
-    final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-    final ObjectOutputStream oos = new ObjectOutputStream(baos);
-    oos.writeObject(EvictionAlgorithm.NONE);
-    oos.close();
-
-    final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-    final ObjectInputStream ois = new ObjectInputStream(bais);
-    ois.readObject();
-    ois.close();
-  }
-
-  protected void doEvictionAction() throws IOException, ClassNotFoundException {
-    final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-    final ObjectOutputStream oos = new ObjectOutputStream(baos);
-    oos.writeObject(EvictionAction.NONE);
-    oos.close();
-
-    final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-    final ObjectInputStream ois = new ObjectInputStream(bais);
-    ois.readObject();
-    ois.close();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
index a5ddb4e..23c9439 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
@@ -4440,7 +4440,7 @@ public class ConnectionPoolDUnitTest extends CacheTestCase {
           };
           Wait.waitForCriterion(ev, maxTime, 200, true);
 //            Set prox = ccn.getClientProxies();
-//            assertEquals(1, prox.size());
+//            assertIndexDetailsEquals(1, prox.size());
 //            for (Iterator cpi = prox.iterator(); cpi.hasNext(); ) {
 //              CacheClientProxy ccp = (CacheClientProxy) cpi.next();
 //              start = System.currentTimeMillis();
@@ -5426,7 +5426,7 @@ public class ConnectionPoolDUnitTest extends CacheTestCase {
           assertNull(r.getEntry(key1));
           r.registerInterest(key1);
           assertNotNull(r.getEntry(key1));
-          assertEquals(val1, r.getEntry(key1).getValue());
+          assertIndexDetailsEquals(val1, r.getEntry(key1).getValue());
           r.registerInterest(key2);
           assertNull(r.getEntry(key2));
         }
@@ -5443,7 +5443,7 @@ public class ConnectionPoolDUnitTest extends CacheTestCase {
           factory.setCacheListener(new CertifiableTestCacheListener(getLogWriter()));
           Region r = createRootRegion(name, factory.create());
           assertNull(r.getEntry(key1));
-          assertEquals(val1, r.get(key1));
+          assertIndexDetailsEquals(val1, r.get(key1));
           assertNull(r.getEntry(key2));
           r.registerInterest(key2);
           assertNull(r.getEntry(key2));
@@ -5469,11 +5469,11 @@ public class ConnectionPoolDUnitTest extends CacheTestCase {
 
           ctl.waitForUpdated(key1);
           assertNotNull(r.getEntry(key1));
-          assertEquals(val2, r.getEntry(key1).getValue()); // new value should have been pushed
+          assertIndexDetailsEquals(val2, r.getEntry(key1).getValue()); // new value should have been pushed
 
           ctl.waitForCreated(key2);
           assertNotNull(r.getEntry(key2)); // new entry should have been pushed
-          assertEquals(val2, r.getEntry(key2).getValue());
+          assertIndexDetailsEquals(val2, r.getEntry(key2).getValue());
         }
       });
 
@@ -5486,11 +5486,11 @@ public class ConnectionPoolDUnitTest extends CacheTestCase {
           ctl.waitForInvalidated(key1);
           assertNotNull(r.getEntry(key1));
           assertNull(r.getEntry(key1).getValue()); // Invalidate should have been pushed
-          assertEquals(val2, r.get(key1)); // New value should be fetched
+          assertIndexDetailsEquals(val2, r.get(key1)); // New value should be fetched
 
           assertNull(r.getEntry(key2));
           // assertNull(r.getEntry(key2).getValue());
-          assertEquals(val2, r.get(key2)); // New entry should be fetched
+          assertIndexDetailsEquals(val2, r.get(key2)); // New entry should be fetched
         }
       });
       tearDown();
@@ -5719,7 +5719,7 @@ public class ConnectionPoolDUnitTest extends CacheTestCase {
             }
           };
           Wait.waitForCriterion(ev, 10 * 1000, 200, true);
-//          assertEquals(3, region.size());
+//          assertIndexDetailsEquals(3, region.size());
           assertTrue(region.containsKey("k1"));
           assertTrue(region.containsKey("k2"));
           assertTrue(region.containsKey("k3"));
@@ -5836,7 +5836,7 @@ public class ConnectionPoolDUnitTest extends CacheTestCase {
             }
           };
           Wait.waitForCriterion(ev, 10 * 1000, 200, true);
-//          assertEquals(3, region.size());
+//          assertIndexDetailsEquals(3, region.size());
           assertTrue(region.containsKey("k1"));
           assertTrue(region.containsKey("k2"));
           assertTrue(region.containsKey("k3"));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/FinalStaticArrayShouldNotCauseSegFaultTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/FinalStaticArrayShouldNotCauseSegFaultTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/FinalStaticArrayShouldNotCauseSegFaultTest.java
new file mode 100644
index 0000000..4f0335a
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/FinalStaticArrayShouldNotCauseSegFaultTest.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.cache;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+/**
+ * Test case for Trac <a
+ * href="https://svn.gemstone.com/trac/gemfire/ticket/52289">#52289</a>.
+ * 
+ * Asserts fixes for bug JDK-8076152 in JDK 1.8.0u20 to 1.8.0.u45.
+ * http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8076152
+ * 
+ * The JVM crashes when hotspot compiling a method that uses an array consisting
+ * of objects of a base class when different child classes is used as actual
+ * instance objects AND when the array is constant (declared final). The crash
+ * occurs during process of the aaload byte code.
+ * 
+ * This test and its corrections can be removed after the release of JDK
+ * 1.8.0u60 if we choose to not support 1.8.0u20 - 1.8.0u45 inclusive.
+ * 
+ * @since 8.2
+ */
+@Category(UnitTest.class)
+public class FinalStaticArrayShouldNotCauseSegFaultTest {
+
+  @Test
+  public void test() throws IOException, ClassNotFoundException {
+    // Iterate enough to cause JIT to compile
+    // javax.print.attribute.EnumSyntax::readResolve
+    for (int i = 0; i < 100_000; i++) {
+      // Must execute two or more subclasses with final static arrays of
+      // different types.
+      doEvictionAlgorithm();
+      doEvictionAction();
+    }
+  }
+
+  protected void doEvictionAlgorithm() throws IOException, ClassNotFoundException {
+    final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    final ObjectOutputStream oos = new ObjectOutputStream(baos);
+    oos.writeObject(EvictionAlgorithm.NONE);
+    oos.close();
+
+    final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+    final ObjectInputStream ois = new ObjectInputStream(bais);
+    ois.readObject();
+    ois.close();
+  }
+
+  protected void doEvictionAction() throws IOException, ClassNotFoundException {
+    final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    final ObjectOutputStream oos = new ObjectOutputStream(baos);
+    oos.writeObject(EvictionAction.NONE);
+    oos.close();
+
+    final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+    final ObjectInputStream ois = new ObjectInputStream(bais);
+    ois.readObject();
+    ois.close();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/MembershipAttributesAreSerializableTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/MembershipAttributesAreSerializableTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/MembershipAttributesAreSerializableTest.java
new file mode 100644
index 0000000..f0e6479
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/MembershipAttributesAreSerializableTest.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.cache;
+
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+/**
+ * Tests MembershipAttributes and SubscriptionAttributes to  make sure they are Serializable
+ */
+@Category(UnitTest.class)
+public class MembershipAttributesAreSerializableTest {
+  
+  /**
+   * Assert that MembershipAttributes are serializable.
+   */
+  @Test
+  public void testMembershipAttributesAreSerializable() throws Exception {
+    String[] roles = {"a", "b", "c"};
+    MembershipAttributes outMA = new MembershipAttributes(roles);
+    ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
+    ObjectOutputStream oos = new ObjectOutputStream(baos);
+    oos.writeObject(outMA);
+    
+    byte[] data = baos.toByteArray();
+    
+    ByteArrayInputStream bais = new ByteArrayInputStream(data);
+    ObjectInputStream ois = new ObjectInputStream(bais);
+    MembershipAttributes inMA = (MembershipAttributes) ois.readObject();
+    assertEquals(outMA, inMA);
+  }
+
+  /**
+   * Assert that SubscriptionAttributes are serializable.
+   */
+  @Test
+  public void testSubscriptionAttributesAreSerializable() throws Exception {
+    SubscriptionAttributes outSA = new SubscriptionAttributes();
+    ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
+    ObjectOutputStream oos = new ObjectOutputStream(baos);
+    oos.writeObject(outSA);
+    
+    byte[] data = baos.toByteArray();
+    
+    ByteArrayInputStream bais = new ByteArrayInputStream(data);
+    ObjectInputStream ois = new ObjectInputStream(bais);
+    SubscriptionAttributes inSA = (SubscriptionAttributes) ois.readObject();
+    assertEquals(outSA, inSA);
+  }
+}
+


[53/55] [abbrv] incubator-geode git commit: GEODE-1380: mark testRebalanceWithOfflineChildRegionTwoDiskStores as Flaky

Posted by sa...@apache.org.
GEODE-1380: mark testRebalanceWithOfflineChildRegionTwoDiskStores as Flaky


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/980b492d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/980b492d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/980b492d

Branch: refs/heads/feature/GEODE-1153
Commit: 980b492d113655ba21f5a33ec191f843adba18f9
Parents: c92e5da
Author: Kirk Lund <kl...@apache.org>
Authored: Wed May 11 11:22:45 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed May 11 11:22:45 2016 -0700

----------------------------------------------------------------------
 .../PersistentColocatedPartitionedRegionDUnitTest.java            | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/980b492d/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
index b7919b1..6df3dec 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
@@ -1354,7 +1354,8 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends PersistentPar
     async1.getResult();
     async2.getResult();
   }
-  
+
+  @Category(FlakyTest.class) // GEODE-1380: time sensitive, async actions with 30 sec max
   public void testRebalanceWithOfflineChildRegionTwoDiskStores() throws Throwable {
     SerializableRunnable createParentPR = new SerializableRunnable() {
       public void run() {


[19/55] [abbrv] incubator-geode git commit: GEODE-1255: Revert some changes which had broken the build

Posted by sa...@apache.org.
GEODE-1255: Revert some changes which had broken the build


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/dc024d07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/dc024d07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/dc024d07

Branch: refs/heads/feature/GEODE-1153
Commit: dc024d071772894ca2162fe47108437e62f82361
Parents: bf258f6
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon May 9 07:21:07 2016 -0700
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon May 9 07:21:07 2016 -0700

----------------------------------------------------------------------
 .../internal/cli/commands/ListIndexCommandDUnitTest.java         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc024d07/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
index 8947c22..5753b16 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
@@ -589,7 +589,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
     }
   }
 
-  private static class Consumer extends AbstractBean<Long> {
+  public static class Consumer extends AbstractBean<Long> {
 
     private volatile int units;
 
@@ -609,7 +609,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
     }
   }
 
-  private static class Producer extends AbstractBean<Long> {
+  public static class Producer extends AbstractBean<Long> {
 
     private volatile int units;
 


[32/55] [abbrv] incubator-geode git commit: GEODE-1234: add a test hook to track client transactions scheduled to be removed.

Posted by sa...@apache.org.
GEODE-1234: add a test hook to track client transactions scheduled to be removed.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0bf54254
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0bf54254
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0bf54254

Branch: refs/heads/feature/GEODE-1153
Commit: 0bf5425491a0ddbe0d614ab174be98957072f962
Parents: 3fe55d4
Author: eshu <es...@pivotal.io>
Authored: Mon May 9 16:36:59 2016 -0700
Committer: eshu <es...@pivotal.io>
Committed: Mon May 9 16:36:59 2016 -0700

----------------------------------------------------------------------
 .../cache/tier/sockets/ClientHealthMonitor.java       | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0bf54254/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java
index 93e543d..c0f5021 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java
@@ -42,6 +42,7 @@ import com.gemstone.gemfire.internal.cache.IncomingGatewayStatus;
 import com.gemstone.gemfire.internal.cache.TXId;
 import com.gemstone.gemfire.internal.cache.TXManagerImpl;
 import com.gemstone.gemfire.internal.cache.tier.Acceptor;
+import com.gemstone.gemfire.internal.concurrent.ConcurrentHashSet;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
@@ -278,6 +279,16 @@ public class ClientHealthMonitor {
       }
     }
   }
+  
+  private final Set<TXId> scheduledToBeRemovedTx = Boolean.getBoolean("gemfire.trackScheduledToBeRemovedTx")? 
+      new ConcurrentHashSet<TXId>() : null;
+
+  /**
+   * provide a test hook to track client transactions to be removed
+   */
+  public Set<TXId> getScheduledToBeRemovedTx() {
+    return scheduledToBeRemovedTx;
+  }
 
   /**
    * expire the transaction states for the given client.  This uses the
@@ -298,13 +309,16 @@ public class ClientHealthMonitor {
       if (logger.isDebugEnabled()) {
         logger.debug("expiring {} transaction contexts for {} timeout={}", txids.size(), proxyID, timeout/1000);
       }
+
       if (timeout <= 0) {
         txMgr.removeTransactions(txids, true);
       } else {
+        if (scheduledToBeRemovedTx != null) scheduledToBeRemovedTx.addAll(txids);       
         SystemTimerTask task = new SystemTimerTask() {
           @Override
           public void run2() {
             txMgr.removeTransactions(txids, true);
+            if (scheduledToBeRemovedTx != null) scheduledToBeRemovedTx.removeAll(txids);
           }
         };
         ((GemFireCacheImpl)this._cache).getCCPTimer().schedule(task, timeout);


[20/55] [abbrv] incubator-geode git commit: GEODE-1346: Typo "Emtpy" affects Exception name and some help strings

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f24b9fb0/geode-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
old mode 100644
new mode 100755
index 46b5ba4..f598b44
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
@@ -300,10 +300,8 @@ public class BasicI18nJUnitTest {
   private Set<String> getStringIdDefiningClasses() {
     final Set<String> StringIdDefiningClasses = new LinkedHashSet<String>();
     final String pkg = "com.gemstone.gemfire.internal.i18n.";
-    StringIdDefiningClasses.add(pkg + "ParentLocalizedStrings");
+//    StringIdDefiningClasses.add(pkg + "ParentLocalizedStrings");
     StringIdDefiningClasses.add(pkg + "LocalizedStrings");
-    // JGroupsStrings are no longer localizable
-//    StringIdDefiningClasses.add(pkg + "JGroupsStrings");
     StringIdDefiningClasses.add("com.gemstone.gemfire.management.internal.ManagementStrings");
     return StringIdDefiningClasses;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f24b9fb0/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
old mode 100644
new mode 100755
index 03746c1..f356bda
--- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
@@ -124,7 +124,7 @@ com/gemstone/gemfire/cache/client/SubscriptionNotEnabledException,true,-82124467
 com/gemstone/gemfire/cache/client/internal/ContainsKeyOp$MODE,false
 com/gemstone/gemfire/cache/client/internal/TXSynchronizationOp$CompletionType,false
 com/gemstone/gemfire/cache/client/internal/pooling/ConnectionDestroyedException,true,-6918516787578041316
-com/gemstone/gemfire/cache/execute/EmtpyRegionFunctionException,true,1
+com/gemstone/gemfire/cache/execute/EmptyRegionFunctionException,true,1
 com/gemstone/gemfire/cache/execute/FunctionAdapter,false
 com/gemstone/gemfire/cache/execute/FunctionException,true,4893171227542647452
 com/gemstone/gemfire/cache/execute/FunctionInvocationTargetException,true,1,id:com/gemstone/gemfire/distributed/DistributedMember


[39/55] [abbrv] incubator-geode git commit: GEODE-1373: resolve the shiro subject in JMX AccessControlContext first

Posted by sa...@apache.org.
GEODE-1373: resolve the shiro subject in JMX AccessControlContext first


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/9a770540
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/9a770540
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/9a770540

Branch: refs/heads/feature/GEODE-1153
Commit: 9a770540795691fb16a5ef5fef6dbb64c7e5183d
Parents: bcf7c94
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Mon May 9 21:31:02 2016 -0700
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Tue May 10 13:06:12 2016 -0700

----------------------------------------------------------------------
 .../internal/security/GeodeSecurityUtil.java    | 69 ++++++++++++++++----
 .../security/shiro/JMXShiroAuthenticator.java   | 13 +++-
 .../internal/security/shiro/ShiroPrincipal.java | 39 +++++++++++
 3 files changed, 108 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9a770540/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
index 1f1f4eb..6e10f3f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
@@ -17,12 +17,15 @@
 
 package com.gemstone.gemfire.internal.security;
 
+import java.security.AccessController;
+import java.util.Set;
 import java.util.concurrent.Callable;
 
 import com.gemstone.gemfire.cache.operations.OperationContext;
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.cache.operations.OperationContext.Resource;
 import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.security.shiro.ShiroPrincipal;
 import com.gemstone.gemfire.management.internal.security.ResourceOperation;
 import com.gemstone.gemfire.management.internal.security.ResourceOperationContext;
 import com.gemstone.gemfire.security.AuthenticationFailedException;
@@ -41,9 +44,15 @@ public class GeodeSecurityUtil {
 
   private static Logger logger = LogService.getLogger();
 
-  public static void login(String username, String password){
-    if(!isShiroConfigured())
-      return;
+  /**
+   *
+   * @param username
+   * @param password
+   * @return null if security is not enabled, otherwise return a shiro subject
+   */
+  public static Subject login(String username, String password){
+    if(!isSecured())
+      return null;
 
     Subject currentUser = SecurityUtils.getSubject();
 
@@ -56,13 +65,52 @@ public class GeodeSecurityUtil {
       logger.info(e.getMessage(), e);
       throw new AuthenticationFailedException(e.getMessage(), e);
     }
+
+    return currentUser;
+  }
+
+  /**
+   * It first looks the shiro subject in AccessControlContext since JMX will use multiple threads to process operations from the same client.
+   * then it looks into Shiro's thead context.
+   *
+   * @return the shiro subject, null if security is not enabled
+   */
+  public static Subject getSubject(){
+    if(!isSecured())
+      return null;
+
+    Subject currentUser = null;
+
+    // First try get the principal out of AccessControlContext instead of Shiro's Thread context
+    // since threads can be shared between JMX clients.
+    javax.security.auth.Subject jmxSubject =
+      javax.security.auth.Subject.getSubject(AccessController.getContext());
+
+    if(jmxSubject!=null){
+      Set<ShiroPrincipal> principals = jmxSubject.getPrincipals(ShiroPrincipal.class);
+      if(principals.size()>0){
+        ShiroPrincipal principal = principals.iterator().next();
+        currentUser = principal.getSubject();
+        ThreadContext.bind(currentUser);
+        return currentUser;
+      }
+    }
+
+    // in other cases like admin rest call or pulse authorization
+    currentUser = SecurityUtils.getSubject();
+
+    if(currentUser==null || currentUser.getPrincipal()==null){
+      throw new GemFireSecurityException("Error: Anonymous User");
+    }
+
+    return currentUser;
   }
 
   public static void logout(){
-    if(!isShiroConfigured())
+    Subject currentUser = getSubject();
+    if(currentUser==null)
       return;
 
-    Subject currentUser = SecurityUtils.getSubject();
     try {
       logger.info("Logging out "+currentUser.getPrincipal());
       currentUser.logout();
@@ -76,10 +124,10 @@ public class GeodeSecurityUtil {
   }
 
   public static Callable associateWith(Callable callable){
-    if(!isShiroConfigured())
+    Subject currentUser = getSubject();
+    if(currentUser==null)
       return callable;
 
-    Subject currentUser = SecurityUtils.getSubject();
     return currentUser.associateWith(callable);
   }
 
@@ -140,11 +188,10 @@ public class GeodeSecurityUtil {
     if(context.getResource()== Resource.NULL && context.getOperationCode()== OperationCode.NULL)
       return;
 
-    if(!isShiroConfigured())
+    Subject currentUser = getSubject();
+    if(currentUser==null)
       return;
 
-
-    Subject currentUser = SecurityUtils.getSubject();
     try {
       currentUser.checkPermission(context);
     }
@@ -154,7 +201,7 @@ public class GeodeSecurityUtil {
     }
   }
 
-  private static boolean isShiroConfigured(){
+  private static boolean isSecured(){
     try{
       SecurityUtils.getSecurityManager();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9a770540/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/JMXShiroAuthenticator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/JMXShiroAuthenticator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/JMXShiroAuthenticator.java
index 4a4cc28..984a2bf 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/JMXShiroAuthenticator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/JMXShiroAuthenticator.java
@@ -18,6 +18,7 @@ package com.gemstone.gemfire.internal.security.shiro;
 
 import static com.gemstone.gemfire.management.internal.security.ResourceConstants.*;
 
+import java.security.Principal;
 import java.util.Collections;
 import java.util.Properties;
 import javax.management.Notification;
@@ -50,9 +51,17 @@ public class JMXShiroAuthenticator implements JMXAuthenticator, NotificationList
       throw new SecurityException(WRONGE_CREDENTIALS_MESSAGE);
     }
 
-    GeodeSecurityUtil.login(username, password);
+    org.apache.shiro.subject.Subject shiroSubject = GeodeSecurityUtil.login(username, password);
+    Principal principal;
 
-    return new Subject(true, Collections.singleton(new JMXPrincipal(username)), Collections.EMPTY_SET,
+    if(shiroSubject==null){
+      principal = new JMXPrincipal(username);
+    }
+    else{
+      principal = new ShiroPrincipal(shiroSubject);
+    }
+
+    return new Subject(true, Collections.singleton(principal), Collections.EMPTY_SET,
       Collections.EMPTY_SET);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9a770540/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/ShiroPrincipal.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/ShiroPrincipal.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/ShiroPrincipal.java
new file mode 100644
index 0000000..8413ebb
--- /dev/null
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/ShiroPrincipal.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.gemstone.gemfire.internal.security.shiro;
+
+import java.security.Principal;
+
+import org.apache.shiro.subject.Subject;
+
+public class ShiroPrincipal implements Principal {
+  private Subject subject;
+
+  public ShiroPrincipal(Subject subject){
+    this.subject = subject;
+  }
+
+  @Override
+  public String getName() {
+    return subject.toString();
+  }
+
+  public Subject getSubject(){
+    return subject;
+  }
+}


[36/55] [abbrv] incubator-geode git commit: GEODE-11: Adding package level javadocs for lucene

Posted by sa...@apache.org.
GEODE-11: Adding package level javadocs for lucene

Adding package-info.java files to all of the lucene packages. The public
API javadocs provide and overview of the what the lucene package does
and where to start.

The internal javadocs provide an overview of the purpose of each
internal package.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c8ca8a0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c8ca8a0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c8ca8a0e

Branch: refs/heads/feature/GEODE-1153
Commit: c8ca8a0ed893d19e6da395cb13b72a61532ee555
Parents: f4b0643
Author: Dan Smith <up...@apache.org>
Authored: Mon May 9 18:09:47 2016 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Tue May 10 10:03:49 2016 -0700

----------------------------------------------------------------------
 .../lucene/internal/directory/package-info.java | 23 ++++++++++++++
 .../internal/distributed/package-info.java      | 25 +++++++++++++++
 .../lucene/internal/filesystem/FileSystem.java  | 11 ++++++-
 .../internal/filesystem/package-info.java       | 26 ++++++++++++++++
 .../cache/lucene/internal/package-info.java     | 23 ++++++++++++++
 .../internal/repository/package-info.java       | 25 +++++++++++++++
 .../repository/serializer/package-info.java     | 23 ++++++++++++++
 .../cache/lucene/internal/xml/package-info.java | 24 +++++++++++++++
 .../gemfire/cache/lucene/package-info.java      | 32 ++++++++++++++++++++
 9 files changed, 211 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8ca8a0e/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/package-info.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/package-info.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/package-info.java
new file mode 100644
index 0000000..2dd0606
--- /dev/null
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * An implementation of Lucene's {@link org.apache.lucene.store.Directory} interface that uses the filesystem
+ * API in {@link com.gemstone.gemfire.cache.lucene.internal.filesystem.FileSystem}
+ */
+package com.gemstone.gemfire.cache.lucene.internal.directory;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8ca8a0e/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/package-info.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/package-info.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/package-info.java
new file mode 100644
index 0000000..4079ad4
--- /dev/null
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes used for distributing lucene queries to geode nodes. Contains the lucene related functions
+ * like {@link com.gemstone.gemfire.cache.lucene.internal.distributed.LuceneFunction} as well as objects that are
+ * passed between nodes like {@link com.gemstone.gemfire.cache.lucene.internal.distributed.EntryScore}
+ */
+
+package com.gemstone.gemfire.cache.lucene.internal.distributed;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8ca8a0e/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java
index 44513f1..fdafcbe 100644
--- a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java
@@ -25,7 +25,7 @@ import java.util.Collection;
 import java.util.concurrent.ConcurrentMap;
 
 /**
- * A Filesystem like interface that stores file data in gemfire regions.
+ * A Filesystem like interface that stores file data in geode regions.
  * 
  * This filesystem is safe for use with multiple threads if the threads are not
  * modifying the same files. A single file is not safe to modify by multiple
@@ -33,6 +33,7 @@ import java.util.concurrent.ConcurrentMap;
  * 
  * Changes to a file may not be visible to other members of the system until the
  * FileOutputStream is closed.
+ *
  */
 public class FileSystem {
   // private final Cache cache;
@@ -41,6 +42,14 @@ public class FileSystem {
   
   static final int CHUNK_SIZE = 1024 * 1024; //1 MB
 
+  /**
+   * Create filesystem that will store data in the two provided regions. The fileRegion contains
+   * metadata about the files, and the chunkRegion contains the actual data. If data from either region is missing
+   * or inconsistent, no guarantees are made about what this class will do, so it's best if these regions are colocated
+   * and in the same disk store to ensure the data remains together.
+   * @param fileRegion the region to store metadata about the files
+   * @param chunkRegion the region to store actual file data.
+   */
   public FileSystem(ConcurrentMap<String, File> fileRegion, ConcurrentMap<ChunkKey, byte[]> chunkRegion) {
     super();
     this.fileRegion = fileRegion;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8ca8a0e/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/package-info.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/package-info.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/package-info.java
new file mode 100644
index 0000000..f8b612c
--- /dev/null
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/package-info.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * A distributed filesystem implementation that uses a geode region as the underlying storage mechanism.
+ *
+ * Users of this filesystem should interact with the {@link com.gemstone.gemfire.cache.lucene.internal.filesystem.FileSystem} class.
+ *
+ */
+
+package com.gemstone.gemfire.cache.lucene.internal.filesystem;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8ca8a0e/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/package-info.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/package-info.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/package-info.java
new file mode 100644
index 0000000..22670f3
--- /dev/null
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Internal lucene classes, not intended to be used directly.
+ */
+
+package com.gemstone.gemfire.cache.lucene.internal;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8ca8a0e/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/package-info.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/package-info.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/package-info.java
new file mode 100644
index 0000000..894b464
--- /dev/null
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * The repository package contains classes for managing a Lucene index in geode.
+ *
+ * All lucene index access should be through the {@link com.gemstone.gemfire.cache.lucene.internal.repository.IndexRepository}
+ * class.
+ */
+package com.gemstone.gemfire.cache.lucene.internal.repository;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8ca8a0e/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/package-info.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/package-info.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/package-info.java
new file mode 100644
index 0000000..dca7737
--- /dev/null
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes for converting gemfire objects into lucene documents.
+ */
+
+package com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8ca8a0e/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/package-info.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/package-info.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/package-info.java
new file mode 100644
index 0000000..4eb1ca3
--- /dev/null
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes for parsing lucene index elements a cache.xml file. See the lucene-1.0.xsd file for
+ * the schema.
+ */
+
+package com.gemstone.gemfire.cache.lucene.internal.xml;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8ca8a0e/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/package-info.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/package-info.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/package-info.java
new file mode 100644
index 0000000..0e0c89b
--- /dev/null
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/package-info.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * This package provides an integration with Apache Lucene that allows Geode regions to be indexed in a distributed
+ * Lucene index and queries using Lucene queries.
+ * <p>
+ * All indexing and query operations are performed through the {@link com.gemstone.gemfire.cache.lucene.LuceneService} class.
+ * See {@link com.gemstone.gemfire.cache.lucene.LuceneService} for an example of how to add a lucene index to a geode region.
+ * <p>
+ *
+ * The Lucene indexes created using this API are stored in geode and colocated with the indexed region, which means they
+ * have the same availability guarantees as the underlying region. The indexes are maintained asynchronously, so changes
+ * to the region may not be immediately visible in the lucene index.
+ */
+
+package com.gemstone.gemfire.cache.lucene;
\ No newline at end of file


[49/55] [abbrv] incubator-geode git commit: GEODE-1356: remove DataAsAddress references

Posted by sa...@apache.org.
GEODE-1356: remove DataAsAddress references


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4d522605
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4d522605
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4d522605

Branch: refs/heads/feature/GEODE-1153
Commit: 4d52260550c18e73382e3b337f464f290ffa4093
Parents: fc943cb
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Tue May 10 14:36:52 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed May 11 10:27:52 2016 -0700

----------------------------------------------------------------------
 .../com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java | 2 +-
 .../gemfire/internal/offheap/OffHeapRegionEntryHelper.java       | 4 ++--
 .../internal/offheap/OffHeapRegionEntryHelperJUnitTest.java      | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d522605/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
index 46a851d..481c3be 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
@@ -1281,7 +1281,7 @@ public abstract class AbstractRegionEntry implements RegionEntry,
             throw new IllegalStateException("Could not use an off heap value because it was freed");
           }
         }
-        // else it is DataAsAddress. This code just returns it as prepared.
+        // else it is has no refCount so just return it as prepared.
       } else {
         byte[] data;
         boolean isSerialized = !(val instanceof byte[]);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d522605/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
index 158e6fe..8b57c43 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
@@ -129,7 +129,7 @@ public class OffHeapRegionEntryHelper {
     }
   }
   
-  public static int getSerializedLengthFromDataAsAddress(TinyStoredObject dataAsAddress) {
+  public static int getSerializedLength(TinyStoredObject dataAsAddress) {
     final long ohAddress = dataAsAddress.getAddress();
     
      if ((ohAddress & ENCODED_BIT) != 0) {     
@@ -307,7 +307,7 @@ public class OffHeapRegionEntryHelper {
     }
     if (decompress && isCompressed) {
       if (!compressedOk) {
-        throw new UnsupportedOperationException("Did not expect DataAsAddress to be compressed");
+        throw new UnsupportedOperationException("Did not expect encoded address to be compressed");
       }
     }
     return bytes;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d522605/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
index 2f33927..b9b3dfc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
@@ -790,7 +790,7 @@ public class OffHeapRegionEntryHelperJUnitTest {
     long address = OffHeapRegionEntryHelper.encodeDataAsAddress(data, isSerialized, isCompressed);
     TinyStoredObject daa = new TinyStoredObject(address);
 
-    int actualLength = OffHeapRegionEntryHelper.getSerializedLengthFromDataAsAddress(daa);
+    int actualLength = OffHeapRegionEntryHelper.getSerializedLength(daa);
 
     assertThat(actualLength).isEqualTo(data.length);
   }
@@ -798,7 +798,7 @@ public class OffHeapRegionEntryHelperJUnitTest {
   @Test
   public void getSerializedLengthFromDataAsAddressShouldReturnZeroForNonEncodedAddress() {
     TinyStoredObject nonEncodedAddress = new TinyStoredObject(100000L);
-    int actualLength = OffHeapRegionEntryHelper.getSerializedLengthFromDataAsAddress(nonEncodedAddress);
+    int actualLength = OffHeapRegionEntryHelper.getSerializedLength(nonEncodedAddress);
     assertThat(actualLength).isZero();
   }
 


[14/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
index cabb5ff..0ebd4b6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
@@ -42,7 +42,7 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class AbstractLauncherTest {
 
-  protected AbstractLauncher<?> createAbstractLauncher(final String memberName, final String memberId) {
+  private AbstractLauncher<?> createAbstractLauncher(final String memberName, final String memberId) {
     return new FakeServiceLauncher(memberName, memberId);
   }
 
@@ -249,7 +249,7 @@ public class AbstractLauncherTest {
       TimeUnit.DAYS.toMillis(2) + TimeUnit.HOURS.toMillis(1) + TimeUnit.MINUTES.toMillis(30) + TimeUnit.SECONDS.toMillis(1)));
   }
 
-  protected static final class FakeServiceLauncher extends AbstractLauncher<String> {
+  private static final class FakeServiceLauncher extends AbstractLauncher<String> {
 
     private final String memberId;
     private final String memberName;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
index 252b5aa..897d0fa 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
@@ -289,7 +289,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
       final int pid = readPid(this.pidFile);
       assertTrue(pid > 0);
       assertTrue(ProcessUtils.isProcessAlive(pid));
-      assertEquals(getPid(), pid);
+      assertIndexDetailsEquals(getPid(), pid);
       
       // validate log file was created
       final String logFileName = getUniqueName()+".log";
@@ -303,7 +303,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
     }
 
     try {
-      assertEquals(Status.STOPPED, this.launcher.stop().getStatus());
+      assertIndexDetailsEquals(Status.STOPPED, this.launcher.stop().getStatus());
       waitForFileToDelete(this.pidFile);
     } catch (Throwable e) {
       logger.error(e);
@@ -433,7 +433,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
       expected = e;
       assertNotNull(expected.getMessage());
       assertTrue(expected.getMessage(), expected.getMessage().contains("A PID file already exists and a Locator may be running in"));
-      assertEquals(RuntimeException.class, expected.getClass());
+      assertIndexDetailsEquals(RuntimeException.class, expected.getClass());
     } catch (Throwable e) {
       logger.error(e);
       if (failure == null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
index 8550a35..a5b8831 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
@@ -93,7 +93,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
     Thread waiting = new Thread(new Runnable() {
       public void run() {
         try {
-          assertEquals(0, process.waitFor());
+          assertIndexDetailsEquals(0, process.waitFor());
         }
         catch (InterruptedException ignore) {
           logger.error("Interrupted while waiting for process!", ignore);
@@ -114,8 +114,8 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
 
     LocatorLauncher locatorLauncher = new Builder().setWorkingDirectory(this.temporaryFolder.getRoot().getCanonicalPath()).build();
 
-    assertEquals(Status.ONLINE, locatorLauncher.status().getStatus());
-    assertEquals(Status.STOPPED, locatorLauncher.stop().getStatus());
+    assertIndexDetailsEquals(Status.ONLINE, locatorLauncher.status().getStatus());
+    assertIndexDetailsEquals(Status.STOPPED, locatorLauncher.stop().getStatus());
   }
   */
 
@@ -556,7 +556,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
       // check the status
       final LocatorState locatorState = dirLauncher.status();
       assertNotNull(locatorState);
-      assertEquals(Status.NOT_RESPONDING, locatorState.getStatus());
+      assertIndexDetailsEquals(Status.NOT_RESPONDING, locatorState.getStatus());
       
       final String logFileName = getUniqueName()+".log";
       assertFalse("Log file should not exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorStateTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorStateTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorStateTest.java
index 55d7d6a..5693460 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorStateTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorStateTest.java
@@ -40,6 +40,22 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class LocatorStateTest {
 
+  private String classpath = "test_classpath";
+  private String gemFireVersion = "test_gemfireversion";
+  private String host = "test_host";
+  private String javaVersion = "test_javaversion";
+  private String jvmArguments = "test_jvmarguments";
+  private String serviceLocation = "test_location";
+  private String logFile = "test_logfile";
+  private String memberName = "test_membername";
+  private Integer pid = 6396;
+  private String port = "test_port";
+  private String statusDescription = Status.NOT_RESPONDING.getDescription();
+  private String statusMessage = "test_statusmessage";
+  private Long timestampTime = 1450728233024L;
+  private Long uptime = 1629L;
+  private String workingDirectory = "test_workingdirectory";
+
   @Test
   public void fromJsonWithEmptyStringThrowsIllegalArgumentException() throws Exception {
     // given: empty string
@@ -122,66 +138,64 @@ public class LocatorStateTest {
     return LocatorState.fromJson(value);
   }
 
-  private String classpath = "test_classpath";
-  private String gemFireVersion = "test_gemfireversion";
-  private String host = "test_host";
-  private String javaVersion = "test_javaversion";
-  private String jvmArguments = "test_jvmarguments";
-  private String serviceLocation = "test_location";
-  private String logFile = "test_logfile";
-  private String memberName = "test_membername";
-  private Integer pid = 6396;
-  private String port = "test_port";
-  private String statusDescription = Status.NOT_RESPONDING.getDescription();
-  private String statusMessage = "test_statusmessage";
-  private Long timestampTime = 1450728233024L;
-  private Long uptime = 1629L;
-  private String workingDirectory = "test_workingdirectory";
-  
   private String getClasspath() {
     return this.classpath;
   }
+
   private String getGemFireVersion() {
     return this.gemFireVersion;
   }
+
   private String getHost() {
     return this.host;
   }
+
   private String getJavaVersion() {
     return this.javaVersion;
   }
+
   private List<String> getJvmArguments() {
     List<String> list = new ArrayList<String>();
     list.add(this.jvmArguments);
     return list;
   }
+
   private String getServiceLocation() {
     return this.serviceLocation;
   }
+
   private String getLogFile() {
     return this.logFile;
   }
+
   private String getMemberName() {
     return this.memberName;
   }
+
   private Integer getPid() {
     return this.pid;
   }
+
   private String getPort() {
     return this.port;
   }
+
   private String getStatusDescription() {
     return this.statusDescription;
   }
+
   private String getStatusMessage() {
     return this.statusMessage;
   }
+
   private Long getTimestampTime() {
     return this.timestampTime;
   }
+
   private Long getUptime() {
     return this.uptime;
   }
+
   private String getWorkingDirectory() {
     return this.workingDirectory;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
index 911bfab..85bfe0a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
@@ -432,7 +432,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
       final int pid = readPid(this.pidFile);
       assertTrue(pid > 0);
       assertTrue(ProcessUtils.isProcessAlive(pid));
-      assertEquals(getPid(), pid);
+      assertIndexDetailsEquals(getPid(), pid);
       
       // validate log file was created
       final String logFileName = getUniqueName()+".log";
@@ -446,7 +446,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
     }
 
     try {
-      assertEquals(Status.STOPPED, this.launcher.stop().getStatus());
+      assertIndexDetailsEquals(Status.STOPPED, this.launcher.stop().getStatus());
       waitForFileToDelete(this.pidFile);
     } catch (Throwable e) {
       logger.error(e);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
index 4cd21a2..06c6bd1 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
@@ -111,7 +111,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
 //      @Override
 //      public void run() {
 //        try {
-//          assertEquals(0, process.waitFor());
+//          assertIndexDetailsEquals(0, process.waitFor());
 //        } catch (InterruptedException e) {
 //          logger.error("Interrupted while waiting for process", e);
 //        }
@@ -932,7 +932,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
       // check the status
       final ServerState serverState = dirLauncher.status();
       assertNotNull(serverState);
-      assertEquals(Status.NOT_RESPONDING, serverState.getStatus());
+      assertIndexDetailsEquals(Status.NOT_RESPONDING, serverState.getStatus());
       
       final String logFileName = getUniqueName()+".log";
       assertFalse("Log file should not exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
index 25e9528..ac331e2 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
@@ -739,6 +739,7 @@ public class ServerLauncherTest {
     assertFalse(serverLauncher.isDisableDefaultServer());
     assertFalse(serverLauncher.isDefaultServerEnabled(mockCache));
   }
+
   @Test
   public void testIsDefaultServerEnabledWhenNoCacheServersExistAndDefaultServerDisabled() {
     final Cache mockCache = mockContext.mock(Cache.class, "Cache");
@@ -821,12 +822,6 @@ public class ServerLauncherTest {
     serverLauncher.startCacheServer(mockCache);
   }
   
-  public static void main(final String... args) {
-    System.err.printf("Thread (%1$s) is daemon (%2$s)%n", Thread.currentThread().getName(),
-      Thread.currentThread().isDaemon());
-    new Builder(args).setCommand(Command.START).build().run();
-  }
-
   private final class ServerWaitMultiThreadedTestCase extends MultithreadedTestCase {
 
     private final AtomicBoolean connectionStateHolder = new AtomicBoolean(true);
@@ -840,7 +835,8 @@ public class ServerLauncherTest {
       final Cache mockCache = mockContext.mock(Cache.class, "Cache");
 
       final DistributedSystem mockDistributedSystem = new DistributedSystemAdapter() {
-        @Override public boolean isConnected() {
+        @Override
+        public boolean isConnected() {
           return connectionStateHolder.get();
         }
       };

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/AtomicLongWithTerminalStateJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/AtomicLongWithTerminalStateJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/AtomicLongWithTerminalStateJUnitTest.java
index aca6874..eec4730 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/AtomicLongWithTerminalStateJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/AtomicLongWithTerminalStateJUnitTest.java
@@ -16,18 +16,17 @@
  */
 package com.gemstone.gemfire.distributed.internal;
 
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- *
- */
 @Category(UnitTest.class)
-public class AtomicLongWithTerminalStateJUnitTest extends TestCase {
-  
+public class AtomicLongWithTerminalStateJUnitTest {
+
+  @Test
   public void test() {
     AtomicLongWithTerminalState al = new AtomicLongWithTerminalState();
     assertEquals(23, al.compareAddAndGet(-1, 23));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index 31acc47..8e1031f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -29,39 +29,47 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.InternalGemFireException;
 import com.gemstone.gemfire.UnmodifiableException;
 import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.management.internal.security.JSONAuthorization;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-
 @Category(UnitTest.class)
 public class DistributionConfigJUnitTest {
-  static Map<String, ConfigAttribute> attributes;
-  static Map<String, Method> setters;
-  static Map<String, Method> getters;
-  static Map<String, Method> isModifiables;
-  static Map<String, Method> checkers;
-  static String[] attNames;
-  DistributionConfigImpl config;
-
-  @BeforeClass
-  public static void beforeClass() {
+
+  private Map<Class<?>, Class<?>> classMap;
+
+  private Map<String, ConfigAttribute> attributes;
+  private Map<String, Method> setters;
+  private Map<String, Method> getters;
+  private Map<String, Method> checkers;
+  private String[] attNames;
+
+  private DistributionConfigImpl config;
+
+  @Before
+  public void before() {
+    classMap = new HashMap<Class<?>, Class<?>>();
+    classMap.put(boolean.class, Boolean.class);
+    classMap.put(byte.class, Byte.class);
+    classMap.put(short.class, Short.class);
+    classMap.put(char.class, Character.class);
+    classMap.put(int.class, Integer.class);
+    classMap.put(long.class, Long.class);
+    classMap.put(float.class, Float.class);
+    classMap.put(double.class, Double.class);
+
     attributes = DistributionConfig.attributes;
     setters = DistributionConfig.setters;
     getters = DistributionConfig.getters;
     attNames = DistributionConfig.dcValidAttributeNames;
     checkers = AbstractDistributionConfig.checkers;
-  }
 
-  @Before
-  public void before() {
     config = new DistributionConfigImpl(new Properties());
   }
 
@@ -99,6 +107,7 @@ public class DistributionConfigJUnitTest {
     System.out.println("filelList: " + fileList);
     System.out.println();
     System.out.println("otherList: " + otherList);
+
     assertEquals(boolList.size(), 30);
     assertEquals(intList.size(), 33);
     assertEquals(stringList.size(), 70);
@@ -245,6 +254,7 @@ public class DistributionConfigJUnitTest {
         modifiables.add(attName);
       }
     }
+
     assertEquals(modifiables.size(), 10);
     assertEquals(modifiables.get(0), "archive-disk-space-limit");
     assertEquals(modifiables.get(1), "archive-file-size-limit");
@@ -256,7 +266,6 @@ public class DistributionConfigJUnitTest {
     assertEquals(modifiables.get(7), "statistic-archive-file");
     assertEquals(modifiables.get(8), "statistic-sample-rate");
     assertEquals(modifiables.get(9), "statistic-sampling-enabled");
-
   }
 
   @Test(expected = IllegalArgumentException.class)
@@ -343,17 +352,4 @@ public class DistributionConfigJUnitTest {
     DistributionConfig config = new DistributionConfigImpl(props);
     assertEquals(config.getSecurityProps().size(), 4);
   }
-
-  public final static Map<Class<?>, Class<?>> classMap = new HashMap<Class<?>, Class<?>>();
-
-  static {
-    classMap.put(boolean.class, Boolean.class);
-    classMap.put(byte.class, Byte.class);
-    classMap.put(short.class, Short.class);
-    classMap.put(char.class, Character.class);
-    classMap.put(int.class, Integer.class);
-    classMap.put(long.class, Long.class);
-    classMap.put(float.class, Float.class);
-    classMap.put(double.class, Double.class);
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
index 2024bf2..8832459 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
@@ -132,7 +132,7 @@ public class InternalDistributedSystemJUnitTest
     assertEquals(DistributionConfig.DEFAULT_LOG_FILE, config.getLogFile());
 
     //default log level gets overrided by the gemfire.properties created for unit tests.
-//    assertEquals(DistributionConfig.DEFAULT_LOG_LEVEL, config.getLogLevel());
+//    assertIndexDetailsEquals(DistributionConfig.DEFAULT_LOG_LEVEL, config.getLogLevel());
 
     assertEquals(DistributionConfig.DEFAULT_STATISTIC_SAMPLING_ENABLED,
                  config.getStatisticSamplingEnabled());
@@ -145,7 +145,7 @@ public class InternalDistributedSystemJUnitTest
 
     // ack-wait-threadshold is overridden on VM's command line using a
     // system property.  This is not a valid test.  Hrm.
-//     assertEquals(DistributionConfig.DEFAULT_ACK_WAIT_THRESHOLD, config.getAckWaitThreshold());
+//     assertIndexDetailsEquals(DistributionConfig.DEFAULT_ACK_WAIT_THRESHOLD, config.getAckWaitThreshold());
 
     assertEquals(DistributionConfig.DEFAULT_ACK_SEVERE_ALERT_THRESHOLD, config.getAckSevereAlertThreshold());
     
@@ -683,7 +683,7 @@ public class InternalDistributedSystemJUnitTest
     Locator locator = (Locator) locators.iterator().next();
     Assert.assertTrue(locator.isPeerLocator());
 //    Assert.assertFalse(locator.isServerLocator()); server location is forced on while licensing is disabled in GemFire
-//    Assert.assertEquals("127.0.0.1", locator.getBindAddress().getHostAddress());  removed this check for ipv6 testing
+//    Assert.assertIndexDetailsEquals("127.0.0.1", locator.getBindAddress().getHostAddress());  removed this check for ipv6 testing
     Assert.assertEquals(unusedPort, locator.getPort());
     deleteStateFile(unusedPort);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LocatorLoadSnapshotIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LocatorLoadSnapshotIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LocatorLoadSnapshotIntegrationTest.java
new file mode 100644
index 0000000..08648d9
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LocatorLoadSnapshotIntegrationTest.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal;
+
+import static org.junit.Assert.*;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.server.ServerLoad;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+/**
+ * Integration tests extracted from LocatorLoadSnapshotJUnitTest
+ */
+@Category(IntegrationTest.class)
+public class LocatorLoadSnapshotIntegrationTest {
+
+  /**
+   * A basic test of concurrent functionality. Starts a number of
+   * threads making requests and expects the load to be balanced between
+   * three servers.
+   * @throws InterruptedException
+   */
+  @Category(FlakyTest.class) // GEODE-613: lots of threads, async action, IntegrationTest-not-UnitTest, thread joins, time sensitive
+  @Test
+  public void testConcurrentBalancing() throws InterruptedException {
+    int NUM_THREADS = 50;
+    final int NUM_REQUESTS = 10000;
+    int ALLOWED_THRESHOLD = 50; //We should never be off by more than
+    //the number of concurrent threads.
+
+    final LocatorLoadSnapshot sn = new LocatorLoadSnapshot();
+    final ServerLocation l1 = new ServerLocation("localhost", 1);
+    final ServerLocation l2 = new ServerLocation("localhost", 2);
+    final ServerLocation l3 = new ServerLocation("localhost", 3);
+
+    int initialLoad1 = (int) (Math.random() * (NUM_REQUESTS / 2));
+    int initialLoad2 = (int) (Math.random() * (NUM_REQUESTS / 2));
+    int initialLoad3 = (int) (Math.random() * (NUM_REQUESTS / 2));
+
+    sn.addServer(l1, new String[0], new ServerLoad(initialLoad1, 1, 0, 1));
+    sn.addServer(l2, new String[0], new ServerLoad(initialLoad2, 1, 0, 1));
+    sn.addServer(l3, new String[0], new ServerLoad(initialLoad3, 1, 0, 1));
+
+    final Map loadCounts = new HashMap();
+    loadCounts.put(l1, new AtomicInteger(initialLoad1));
+    loadCounts.put(l2, new AtomicInteger(initialLoad2));
+    loadCounts.put(l3, new AtomicInteger(initialLoad3));
+
+    Thread[] threads = new Thread[NUM_THREADS];
+//    final Object lock = new Object();
+    for(int i =0; i < NUM_THREADS; i++) {
+      threads[i] = new Thread("Thread-" + i) {
+        public void run() {
+          for(int ii = 0; ii < NUM_REQUESTS; ii++) {
+            ServerLocation location;
+//            synchronized(lock) {
+            location = sn.getServerForConnection(null, Collections.EMPTY_SET);
+//            }
+            AtomicInteger count = (AtomicInteger) loadCounts.get(location);
+            count.incrementAndGet();
+          }
+        }
+      };
+    }
+
+    for(int i =0; i < NUM_THREADS; i++) {
+      threads[i].start();
+    }
+
+    for(int i =0; i < NUM_THREADS; i++) {
+      Thread t = threads[i];
+      long ms = 30 * 1000;
+      t.join(30 * 1000);
+      if (t.isAlive()) {
+        for(int j =0; j < NUM_THREADS; j++) {
+          threads[j].interrupt();
+        }
+        fail("Thread did not terminate after " + ms + " ms: " + t);
+      }
+    }
+
+    double expectedPerServer = ( initialLoad1 + initialLoad2 + initialLoad3 +
+            NUM_REQUESTS * NUM_THREADS) / (double) loadCounts.size();
+//    for(Iterator itr = loadCounts.entrySet().iterator(); itr.hasNext(); ) {
+//      Map.Entry entry = (Entry) itr.next();
+//      ServerLocation location = (ServerLocation) entry.getKey();
+//      AI count= (AI) entry.getValue();
+//    }
+
+    for(Iterator itr = loadCounts.entrySet().iterator(); itr.hasNext(); ) {
+      Map.Entry entry = (Map.Entry) itr.next();
+      ServerLocation location = (ServerLocation) entry.getKey();
+      AtomicInteger count= (AtomicInteger) entry.getValue();
+      int difference = (int) Math.abs(count.get() - expectedPerServer);
+      assertTrue("Count " + count + " for server " + location + " is not within " + ALLOWED_THRESHOLD + " of " + expectedPerServer, difference < ALLOWED_THRESHOLD);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LocatorLoadSnapshotJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LocatorLoadSnapshotJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LocatorLoadSnapshotJUnitTest.java
index 34ac767..fb391f9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LocatorLoadSnapshotJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LocatorLoadSnapshotJUnitTest.java
@@ -22,23 +22,18 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.atomic.AtomicInteger;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.server.ServerLoad;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Tests the functionality of the LocatorLoadSnapshot, which
  * is the data structure that is used in the locator to compare
  * the load between multiple servers.
- * 
  */
 @Category(UnitTest.class)
 public class LocatorLoadSnapshotJUnitTest {
@@ -61,7 +56,6 @@ public class LocatorLoadSnapshotJUnitTest {
    * and then we test that after several requests, the
    * load balancer starts sending connections to the second
    * server.
-   * 
    */
   @Test
   public void testTwoServers() {
@@ -174,7 +168,7 @@ public class LocatorLoadSnapshotJUnitTest {
    * servers with interecting groups correctly.
    */
   @Test
-  public void testInterectingGroups() {
+  public void testIntersectingGroups() {
     LocatorLoadSnapshot sn = new LocatorLoadSnapshot();
     ServerLocation l1 = new ServerLocation("localhost", 1);
     ServerLocation l2 = new ServerLocation("localhost", 2);
@@ -258,88 +252,6 @@ public class LocatorLoadSnapshotJUnitTest {
     assertEquals(Arrays.asList(new ServerLocation[] {} ), sn.getServersForQueue(null, excludeAll, 3));
   }
   
-  /**
-   * A basic test of concurrent functionality. Starts a number of
-   * threads making requests and expects the load to be balanced between
-   * three servers.
-   * @throws InterruptedException
-   */
-  @Category(FlakyTest.class) // GEODE-613: lots of threads, async action, IntegrationTest-not-UnitTest, thread joins, time sensitive
-  @Test
-  public void testConcurrentBalancing() throws InterruptedException {
-    int NUM_THREADS = 50;
-    final int NUM_REQUESTS = 10000;
-    int ALLOWED_THRESHOLD = 50; //We should never be off by more than
-    //the number of concurrent threads.
-    
-    final LocatorLoadSnapshot sn = new LocatorLoadSnapshot();
-    final ServerLocation l1 = new ServerLocation("localhost", 1);
-    final ServerLocation l2 = new ServerLocation("localhost", 2);
-    final ServerLocation l3 = new ServerLocation("localhost", 3);
-    
-    int initialLoad1 = (int) (Math.random() * (NUM_REQUESTS / 2));
-    int initialLoad2 = (int) (Math.random() * (NUM_REQUESTS / 2));
-    int initialLoad3 = (int) (Math.random() * (NUM_REQUESTS / 2));
-    
-    sn.addServer(l1, new String[0], new ServerLoad(initialLoad1, 1, 0, 1));
-    sn.addServer(l2, new String[0], new ServerLoad(initialLoad2, 1, 0, 1));
-    sn.addServer(l3, new String[0], new ServerLoad(initialLoad3, 1, 0, 1));
-    
-    final Map loadCounts = new HashMap();
-    loadCounts.put(l1, new AtomicInteger(initialLoad1));
-    loadCounts.put(l2, new AtomicInteger(initialLoad2));
-    loadCounts.put(l3, new AtomicInteger(initialLoad3));
-    
-    Thread[] threads = new Thread[NUM_THREADS];
-//    final Object lock = new Object();
-    for(int i =0; i < NUM_THREADS; i++) {
-      threads[i] = new Thread("Thread-" + i) {
-        public void run() {
-          for(int ii = 0; ii < NUM_REQUESTS; ii++) {
-            ServerLocation location;
-//            synchronized(lock) {
-              location = sn.getServerForConnection(null, Collections.EMPTY_SET);
-//            }
-            AtomicInteger count = (AtomicInteger) loadCounts.get(location);
-            count.incrementAndGet();
-          }
-        }
-      };
-    }
-    
-    for(int i =0; i < NUM_THREADS; i++) {
-      threads[i].start();
-    }
-    
-    for(int i =0; i < NUM_THREADS; i++) {
-      Thread t = threads[i];
-      long ms = 30 * 1000;
-      t.join(30 * 1000);
-      if (t.isAlive()) {
-        for(int j =0; j < NUM_THREADS; j++) {
-          threads[j].interrupt();
-        }
-        fail("Thread did not terminate after " + ms + " ms: " + t);
-      }
-    }
-    
-    double expectedPerServer = ( initialLoad1 + initialLoad2 + initialLoad3 + 
-              NUM_REQUESTS * NUM_THREADS) / (double) loadCounts.size();
-//    for(Iterator itr = loadCounts.entrySet().iterator(); itr.hasNext(); ) {
-//      Map.Entry entry = (Entry) itr.next();
-//      ServerLocation location = (ServerLocation) entry.getKey();
-//      AI count= (AI) entry.getValue();
-//    }
-    
-    for(Iterator itr = loadCounts.entrySet().iterator(); itr.hasNext(); ) {
-      Map.Entry entry = (Entry) itr.next();
-      ServerLocation location = (ServerLocation) entry.getKey();
-      AtomicInteger count= (AtomicInteger) entry.getValue();
-      int difference = (int) Math.abs(count.get() - expectedPerServer);
-      assertTrue("Count " + count + " for server " + location + " is not within " + ALLOWED_THRESHOLD + " of " + expectedPerServer, difference < ALLOWED_THRESHOLD);
-    }
-  }
-  
   @Test
   public void testAreBalanced() {
     final LocatorLoadSnapshot sn = new LocatorLoadSnapshot();
@@ -367,19 +279,5 @@ public class LocatorLoadSnapshotJUnitTest {
     assertTrue(sn.hasBalancedConnections("a"));
     assertFalse(sn.hasBalancedConnections("b"));
   }
-  
-  public void _test2() { // delete this method?
-    final LocatorLoadSnapshot sn = new LocatorLoadSnapshot();
-    sn.addServer(new ServerLocation("hs20h.gemstone.com",28543), new String[0], new ServerLoad(0.0f, 0.00125f, 0.0f, 1.0f));
-    sn.addServer(new ServerLocation("hs20l.gemstone.com",22385), new String[0], new ServerLoad(0.0f, 0.00125f, 0.0f, 1.0f));
-    sn.addServer(new ServerLocation("hs20n.gemstone.com",23482), new String[0], new ServerLoad(0.0f, 0.00125f, 0.0f, 1.0f));
-    sn.addServer(new ServerLocation("hs20m.gemstone.com",23429), new String[0], new ServerLoad(0.0f, 0.00125f, 0.0f, 1.0f));
-    sn.addServer(new ServerLocation("hs20e.gemstone.com",20154), new String[0],new ServerLoad(0.0f, 0.00125f, 0.0f, 1.0f));
-    sn.addServer(new ServerLocation("hs20j.gemstone.com",24273), new String[0],new ServerLoad(0.0f, 0.00125f, 0.0f, 1.0f));
-    sn.addServer(new ServerLocation("hs20g.gemstone.com",27125), new String[0],new ServerLoad(0.0f, 0.00125f, 0.0f, 1.0f));
-    sn.addServer(new ServerLocation("hs20i.gemstone.com",25201), new String[0],new ServerLoad(0.0f, 0.00125f, 0.0f, 1.0f));
-    sn.addServer(new ServerLocation("hs20k.gemstone.com",23711), new String[0],new ServerLoad(0.0f, 0.00125f, 0.0f, 1.0f));
-    sn.addServer(new ServerLocation("hs20f.gemstone.com",21025), new String[0],new ServerLoad(0.0f, 0.00125f, 0.0f, 1.0f));
-  }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogJUnitTest.java
index ffcf09c..7e23f7b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogJUnitTest.java
@@ -16,71 +16,92 @@
  */
 package com.gemstone.gemfire.distributed.internal;
 
+import static org.junit.Assert.*;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
 
+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.TemporaryFolder;
+import org.junit.rules.TestName;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
+@Category(UnitTest.class) // Fails on Windows -- see GEODE-373
+public class ProductUseLogJUnitTest {
 
-@Category(UnitTest.class)
-public class ProductUseLogJUnitTest extends TestCase {
+  private long oldMax;
+  private File logFile;
+  private ProductUseLog log;
 
-  public void testBasics() throws Exception {
-    File logFile = new File("ProductUseLogTest_testBasics.log");
-    if (logFile.exists()) {
-      logFile.delete();
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  @Rule
+  public TestName testName = new TestName();
+
+  @Before
+  public void setUp() throws Exception {
+    oldMax = ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE;
+    logFile = temporaryFolder.newFile(getClass().getSimpleName() + "_" + testName.getMethodName() + ".log");
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE = oldMax;
+    if (log != null) {
+      log.close();
     }
-    ProductUseLog log = new ProductUseLog(logFile);
+  }
+
+  @Test
+  public void testBasics() throws Exception {
+    assertTrue(logFile.delete());
+
+    log = new ProductUseLog(logFile);
+
     assertTrue(logFile.exists());
+
     log.log("test message");
     log.close();
     log.log("shouldn't be logged");
     log.reopen();
     log.log("test message");
     log.close();
+
     BufferedReader reader = new BufferedReader(new  FileReader(logFile));
-    try {
-      String line = reader.readLine();
-      assertTrue(line.length() == 0);
-      line = reader.readLine();
-      assertTrue("expected first line to contain 'test message'", line.contains("test message"));
-
-      line = reader.readLine();
-      assertTrue(line.length() == 0);
-      line = reader.readLine();
-      assertTrue("expected second line to contain 'test message'", line.contains("test message"));
-
-      line = reader.readLine();
-      assertTrue("expected only two non-empty lines in the file", line == null);
-    } finally {
-      reader.close();
-    }
+
+    String line = reader.readLine();
+    assertTrue(line.length() == 0);
+    line = reader.readLine();
+    assertTrue("expected first line to contain 'test message'", line.contains("test message"));
+
+    line = reader.readLine();
+    assertTrue(line.length() == 0);
+    line = reader.readLine();
+    assertTrue("expected second line to contain 'test message'", line.contains("test message"));
+
+    line = reader.readLine();
+    assertTrue("expected only two non-empty lines in the file", line == null);
   }
 
+  @Test
   public void testSizeLimit() throws Exception {
-    long oldMax = ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE;
     ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE = 2000L;
-    try {
-      File logFile = new File("ProductUseLogTest_testSizeLimit.log");
-      assertTrue(logFile.createNewFile());
-      ProductUseLog log = new ProductUseLog(logFile);
-      try {
-        String logEntry = "log entry";
-        for (long i=0; i<ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE; i++) {
-          log.log(logEntry);
-          assertTrue("expected " + logFile.getPath() + " to remain under "+ 
-              ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE + " bytes in length",
-              logFile.length() < ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE);
-        }
-      } finally {
-        log.close();
-      }
-    } finally {
-      ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE = oldMax;
+
+    ProductUseLog log = new ProductUseLog(logFile);
+
+    String logEntry = "log entry";
+    for (long i=0; i<ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE; i++) {
+      log.log(logEntry);
+      assertTrue("expected " + logFile.getPath() + " to remain under "+
+          ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE + " bytes in length",
+          logFile.length() < ProductUseLog.MAX_PRODUCT_USE_FILE_SIZE);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ServerLocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ServerLocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ServerLocatorJUnitTest.java
index 7690c87..bb83df9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ServerLocatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ServerLocatorJUnitTest.java
@@ -20,33 +20,30 @@ import static org.junit.Assert.*;
 
 import java.io.IOException;
 
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.client.internal.locator.LocatorStatusRequest;
 import com.gemstone.gemfire.cache.client.internal.locator.LocatorStatusResponse;
 import com.gemstone.gemfire.i18n.LogWriterI18n;
-import com.gemstone.gemfire.internal.logging.LocalLogWriter;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
+import com.gemstone.gemfire.internal.logging.LocalLogWriter;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 /**
  * The ServerLocatorJUnitTest class is a test suite of test cases testing the contract and functionality of the
  * ServerLocator class.
  * </p>
+ * TODO: write more unit tests for this class...
+ * </p>
  * @see com.gemstone.gemfire.distributed.internal.ServerLocator
  * @see org.junit.Assert
  * @see org.junit.Test
  * @since 7.0
  */
-// TODO Dan, write more unit tests for this class...
 @Category(UnitTest.class)
 public class ServerLocatorJUnitTest {
 
-  protected ServerLocator createServerLocator() throws IOException {
-    return new TestServerLocator();
-  }
-
   @Test
   public void testProcessRequestProcessesLocatorStatusRequest() throws IOException {
     final ServerLocator serverLocator = createServerLocator();
@@ -56,7 +53,11 @@ public class ServerLocatorJUnitTest {
     assertTrue(response instanceof LocatorStatusResponse);
   }
 
-  protected static class TestServerLocator extends ServerLocator {
+  private ServerLocator createServerLocator() throws IOException {
+    return new TestServerLocator();
+  }
+
+  private static class TestServerLocator extends ServerLocator {
     TestServerLocator() throws IOException {
       super();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/SharedConfigurationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/SharedConfigurationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/SharedConfigurationJUnitTest.java
index f308855..8af42b6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/SharedConfigurationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/SharedConfigurationJUnitTest.java
@@ -31,7 +31,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Unit tests for {@link SharedConfiguration}.
- * 
  *
  * @since 8.1
  */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/StartupMessageDataJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/StartupMessageDataJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/StartupMessageDataJUnitTest.java
index aa0a88e..ee3f99e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/StartupMessageDataJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/StartupMessageDataJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.distributed.internal;
 
+import static org.junit.Assert.*;
+
 import java.io.DataInput;
 import java.io.DataOutputStream;
 import java.util.ArrayList;
@@ -24,6 +26,7 @@ import java.util.List;
 import java.util.Properties;
 import java.util.StringTokenizer;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.DataSerializer;
@@ -33,21 +36,15 @@ import com.gemstone.gemfire.internal.ByteArrayData;
 import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 /**
  * Tests {@link StartupMessageData}.
  * 
  * @since 7.0
  */
 @Category(UnitTest.class)
-public class StartupMessageDataJUnitTest extends TestCase {
-
-  public StartupMessageDataJUnitTest(String name) {
-    super(name);
-  }
-  
+public class StartupMessageDataJUnitTest {
 
+  @Test
   public void testWriteHostedLocatorsWithEmpty() throws Exception {
     Collection<String> hostedLocators = new ArrayList<String>();
     StartupMessageData data = new StartupMessageData();
@@ -55,6 +52,7 @@ public class StartupMessageDataJUnitTest extends TestCase {
     assertTrue(data.getOptionalFields().isEmpty());
   }
 
+  @Test
   public void testWriteHostedLocatorsWithNull() throws Exception {
     Collection<String> hostedLocators = null;
     StartupMessageData data = new StartupMessageData();
@@ -62,6 +60,7 @@ public class StartupMessageDataJUnitTest extends TestCase {
     assertTrue(data.getOptionalFields().isEmpty());
   }
 
+  @Test
   public void testWriteHostedLocatorsWithOne() throws Exception {
     String locatorString = createOneLocatorString();
     
@@ -74,6 +73,7 @@ public class StartupMessageDataJUnitTest extends TestCase {
     assertEquals(locatorString, data.getOptionalFields().get(StartupMessageData.HOSTED_LOCATORS));
   }
 
+  @Test
   public void testWriteHostedLocatorsWithThree() throws Exception {
     String[] locatorStrings = createManyLocatorStrings(3);
     List<String> hostedLocators = new ArrayList<String>();
@@ -94,7 +94,8 @@ public class StartupMessageDataJUnitTest extends TestCase {
       assertEquals(locatorStrings[i], st.nextToken());
     }
   }
-  
+
+  @Test
   public void testReadHostedLocatorsWithThree() throws Exception {
     // set up the data
     String[] locatorStrings = createManyLocatorStrings(3);
@@ -116,7 +117,8 @@ public class StartupMessageDataJUnitTest extends TestCase {
       i++;
     }
   }
-  
+
+  @Test
   public void testToDataWithEmptyHostedLocators() throws Exception {
     Collection<String> hostedLocators = new ArrayList<String>();
     StartupMessageData data = new StartupMessageData();
@@ -134,6 +136,7 @@ public class StartupMessageDataJUnitTest extends TestCase {
     assertNull(props);
   }
 
+  @Test
   public void testToDataWithNullHostedLocators() throws Exception {
     Collection<String> hostedLocators = null;
     StartupMessageData data = new StartupMessageData();
@@ -150,7 +153,8 @@ public class StartupMessageDataJUnitTest extends TestCase {
     Properties props = (Properties) DataSerializer.readObject(in);
     assertNull(props);
   }
-  
+
+  @Test
   public void testToDataWithOneHostedLocator() throws Exception {
     String locatorString = createOneLocatorString();
     
@@ -176,6 +180,7 @@ public class StartupMessageDataJUnitTest extends TestCase {
     assertEquals(locatorString, hostedLocatorsString);
   }
 
+  @Test
   public void testToDataWithThreeHostedLocators() throws Exception {
     String[] locatorStrings = createManyLocatorStrings(3);
     List<String> hostedLocators = new ArrayList<String>();
@@ -215,6 +220,7 @@ public class StartupMessageDataJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testNullHostedLocator() throws Exception {
     String locatorString = null;
     DataInput in = getDataInputWithOneHostedLocator(locatorString);
@@ -223,7 +229,8 @@ public class StartupMessageDataJUnitTest extends TestCase {
     Collection<String> readHostedLocators = dataToRead.readHostedLocators();
     assertNull(readHostedLocators);
   }
-  
+
+  @Test
   public void testEmptyHostedLocator() throws Exception {
     String locatorString = "";
     DataInput in = getDataInputWithOneHostedLocator(locatorString);
@@ -232,7 +239,8 @@ public class StartupMessageDataJUnitTest extends TestCase {
     Collection<String> readHostedLocators = dataToRead.readHostedLocators();
     assertNull(readHostedLocators);
   }
-  
+
+  @Test
   public void testOneHostedLocator() throws Exception {
     String locatorString = createOneLocatorString();
     DataInput in = getDataInputWithOneHostedLocator(locatorString);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorIntegrationTest.java
new file mode 100644
index 0000000..4eaf9cb
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorIntegrationTest.java
@@ -0,0 +1,299 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal.deadlock;
+
+import static org.junit.Assert.*;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Set;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+/**
+ * TODO: can we get rid of the Thread.sleep calls?
+ */
+@Category(IntegrationTest.class)
+public class DeadlockDetectorIntegrationTest {
+
+  private volatile Set<Thread> stuckThreads;
+
+  @Before
+  public void setUp() throws Exception {
+    stuckThreads = Collections.synchronizedSet(new HashSet<Thread>());
+  }
+
+  /**
+   * IntegrationTests are forkEvery 1 so cleanup is not necessary
+   */
+  @After
+  public void tearDown() throws Exception {
+    for (Thread thread: stuckThreads) {
+      thread.interrupt();
+    }
+
+    stuckThreads.clear();
+  }
+
+  /**
+   * must be IntegrationTest because: "we can't clean up the threads deadlocked on monitors"
+   */
+  @Test
+  public void testMonitorDeadlock() throws Exception {
+    final Object lock1 = new Object();
+    final Object lock2 = new Object();
+
+    Thread thread1 =  new Thread() {
+      public void run() {
+        stuckThreads.add(Thread.currentThread());
+
+        synchronized(lock1) {
+          Thread thread2 = new Thread() {
+            public void run() {
+              stuckThreads.add(Thread.currentThread());
+              synchronized(lock2) {
+                synchronized(lock1) {
+                  System.out.println("we won't get here");
+                }
+              }
+            }
+          };
+
+          thread2.start();
+
+          try {
+            Thread.sleep(1000);
+            synchronized(lock2) {
+              System.out.println("We won't get here");
+            }
+          } catch (InterruptedException ignore) {
+          }
+        }
+      }
+    };
+
+    thread1.start();
+
+    Thread.sleep(2000);
+
+    DeadlockDetector detector = new DeadlockDetector();
+    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
+    LinkedList<Dependency> deadlocks = detector.findDeadlock();
+
+    System.out.println("deadlocks=" +  DeadlockDetector.prettyFormat(deadlocks));
+
+    assertEquals(4, detector.findDeadlock().size());
+  }
+
+  /**
+   * Make sure that we can detect a deadlock between two threads
+   * that are trying to acquire a two different syncs in the different orders.
+   */
+  @Test
+  public void testSyncDeadlock() throws Exception {
+    final Lock lock1 = new ReentrantLock();
+    final Lock lock2 = new ReentrantLock();
+
+    Thread thread1 =  new Thread() {
+      public void run() {
+        stuckThreads.add(Thread.currentThread());
+
+        lock1.lock();
+
+        Thread thread2 = new Thread() {
+          public void run() {
+            stuckThreads.add(Thread.currentThread());
+            lock2.lock();
+            try {
+              lock1.tryLock(10, TimeUnit.SECONDS);
+            } catch (InterruptedException e) {
+              //ignore
+            }
+            lock2.unlock();
+          }
+        };
+
+        thread2.start();
+
+        try {
+          Thread.sleep(1000);
+          lock2.tryLock(10, TimeUnit.SECONDS);
+        } catch (InterruptedException ignore) {
+        }
+
+        lock1.unlock();
+      }
+    };
+
+    thread1.start();
+
+    Thread.sleep(2000);
+
+    DeadlockDetector detector = new DeadlockDetector();
+    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
+    LinkedList<Dependency> deadlocks = detector.findDeadlock();
+
+    System.out.println("deadlocks=" +  DeadlockDetector.prettyFormat(deadlocks));
+
+    assertEquals(4, detector.findDeadlock().size());
+  }
+
+  @Ignore("Semaphore deadlock detection is not supported by the JDK")
+  @Test
+  public void testSemaphoreDeadlock() throws Exception {
+    final Semaphore lock1 = new Semaphore(1);
+    final Semaphore lock2 = new Semaphore(1);
+
+    Thread thread1 =  new Thread() {
+      public void run() {
+        stuckThreads.add(Thread.currentThread());
+
+        try {
+          lock1.acquire();
+        } catch (InterruptedException e1) {
+          e1.printStackTrace();
+        }
+
+        Thread thread2 = new Thread() {
+          public void run() {
+            stuckThreads.add(Thread.currentThread());
+            try {
+              lock2.acquire();
+              lock1.tryAcquire(10, TimeUnit.SECONDS);
+            } catch (InterruptedException ignore) {
+            }
+            lock2.release();
+          }
+        };
+
+        thread2.start();
+
+        try {
+          Thread.sleep(1000);
+          lock2.tryAcquire(10, TimeUnit.SECONDS);
+        } catch (InterruptedException ignore) {
+        }
+
+        lock1.release();
+      }
+    };
+
+    thread1.start();
+
+    Thread.sleep(2000);
+
+    DeadlockDetector detector = new DeadlockDetector();
+    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
+    LinkedList<Dependency> deadlocks = detector.findDeadlock();
+
+    System.out.println("deadlocks=" +  DeadlockDetector.prettyFormat(deadlocks));
+
+    assertEquals(4, detector.findDeadlock().size());
+  }
+
+  @Ignore("ReadWriteLock deadlock detection is not currently supported by DeadlockDetector")
+  @Test
+  public void testReadLockDeadlock() throws Exception {
+    final ReadWriteLock lock1 = new ReentrantReadWriteLock();
+    final ReadWriteLock lock2 = new ReentrantReadWriteLock();
+
+    Thread thread1 =  new Thread() {
+      @Override
+      public void run() {
+        stuckThreads.add(Thread.currentThread());
+
+        lock1.readLock().lock();
+
+        Thread thread2 = new Thread() {
+          @Override
+          public void run() {
+            stuckThreads.add(Thread.currentThread());
+            lock2.readLock().lock();
+            try {
+              lock1.writeLock().tryLock(10, TimeUnit.SECONDS);
+            } catch (InterruptedException ignore) {
+            }
+            lock2.readLock().unlock();
+          }
+        };
+
+        thread2.start();
+
+        try {
+          Thread.sleep(1000);
+          lock2.writeLock().tryLock(10, TimeUnit.SECONDS);
+        } catch (InterruptedException ignore) {
+        }
+
+        lock1.readLock().unlock();
+      }
+    };
+
+    thread1.start();
+
+    Thread.sleep(2000);
+
+    DeadlockDetector detector = new DeadlockDetector();
+    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
+    LinkedList<Dependency> deadlocks = detector.findDeadlock();
+
+    System.out.println("deadlocks=" +  deadlocks);
+
+    assertEquals(4, detector.findDeadlock().size());
+  }
+
+  /**
+   * A fake dependency monitor.
+   */
+  private static class MockDependencyMonitor implements DependencyMonitor {
+
+    Set<Dependency<Thread, Serializable>> blockedThreads = new HashSet<>();
+    Set<Dependency<Serializable, Thread>> held = new HashSet<>();
+
+    @Override
+    public Set<Dependency<Thread, Serializable>> getBlockedThreads(Thread[] allThreads) {
+      return blockedThreads;
+    }
+
+    public void addDependency(String resource, Thread thread) {
+      held.add(new Dependency<>(resource, thread));
+    }
+
+    public void addDependency(Thread thread, String resource) {
+      blockedThreads.add(new Dependency<>(thread, resource));
+    }
+
+    @Override
+    public Set<Dependency<Serializable, Thread>> getHeldResources(Thread[] allThreads) {
+      return held;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorJUnitTest.java
deleted file mode 100644
index d27aa2c..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorJUnitTest.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.distributed.internal.deadlock;
-
-import static org.junit.Assert.*;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.junit.After;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-/**
- *
- */
-@Category(UnitTest.class)
-public class DeadlockDetectorJUnitTest {
-  
-  private final Set<Thread> stuckThreads = Collections.synchronizedSet(new HashSet<Thread>());
-  
-  @After
-  public void tearDown() {
-    for(Thread thread: stuckThreads) {
-      thread.interrupt();
-      try {
-        thread.join(20 * 1000);
-      } catch (InterruptedException e) {
-        throw new RuntimeException("interrupted", e);
-      }
-      if(thread.isAlive()) {
-        fail("Couldn't kill" + thread);
-      }
-    }
-    stuckThreads.clear();
-  }
-  
-  @Test
-  public void testNoDeadlocks() {
-    DeadlockDetector detector = new DeadlockDetector();
-    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
-    assertEquals(null, detector.findDeadlock());
-  }
-  
-  //this is commented out, because we can't
-  //clean up the threads deadlocked on monitors.
-  @Ignore
-  @Test
-  public void testMonitorDeadlock() throws InterruptedException {
-    final Object lock1 = new Object();
-    final Object lock2 = new Object();
-    Thread thread1 =  new Thread() {
-      public void run() {
-        stuckThreads.add(Thread.currentThread());
-        synchronized(lock1) {
-          Thread thread2 = new Thread() {
-            public void run() {
-              stuckThreads.add(Thread.currentThread());
-              synchronized(lock2) {
-               synchronized(lock1) {
-                 System.out.println("we won't get here");
-               }
-              }
-            }
-          };
-          thread2.start();
-          try {
-            Thread.sleep(1000);
-            synchronized(lock2) {
-              System.out.println("We won't get here");
-            }
-          } catch (InterruptedException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-          }
-        }
-      }
-    };
-    
-    thread1.start();
-    Thread.sleep(2000);
-    DeadlockDetector detector = new DeadlockDetector();
-    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
-    LinkedList<Dependency> deadlocks = detector.findDeadlock();
-    System.out.println("deadlocks=" +  DeadlockDetector.prettyFormat(deadlocks));
-    assertEquals(4, detector.findDeadlock().size());
-  }
-
-  /**
-   * Make sure that we can detect a deadlock between two threads
-   * that are trying to acquire a two different syncs in the different orders.
-   * @throws InterruptedException
-   */
-  @Test
-  public void testSyncDeadlock() throws InterruptedException {
-
-    final Lock lock1 = new ReentrantLock();
-    final Lock lock2 = new ReentrantLock();
-    Thread thread1 =  new Thread() {
-      public void run() {
-        stuckThreads.add(Thread.currentThread());
-        lock1.lock();
-        Thread thread2 = new Thread() {
-          public void run() {
-            stuckThreads.add(Thread.currentThread());
-            lock2.lock();
-            try {
-              lock1.tryLock(10, TimeUnit.SECONDS);
-            } catch (InterruptedException e) {
-              //ignore
-            }
-            lock2.unlock();
-          }
-        };
-        thread2.start();
-        try {
-          Thread.sleep(1000);
-          lock2.tryLock(10, TimeUnit.SECONDS);
-        } catch (InterruptedException e) {
-          //ignore
-        }
-        lock1.unlock();
-      }
-    };
-    
-    thread1.start();
-    Thread.sleep(2000);
-    DeadlockDetector detector = new DeadlockDetector();
-    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
-    LinkedList<Dependency> deadlocks = detector.findDeadlock();
-    System.out.println("deadlocks=" +  DeadlockDetector.prettyFormat(deadlocks));
-    assertEquals(4, detector.findDeadlock().size());
-  }
-  
-  //Semaphore are also not supported by the JDK
-  @Ignore
-  @Test
-  public void testSemaphoreDeadlock() throws InterruptedException {
-
-    final Semaphore lock1 = new Semaphore(1);
-    final Semaphore lock2 = new Semaphore(1);
-    Thread thread1 =  new Thread() {
-      public void run() {
-        stuckThreads.add(Thread.currentThread());
-        try {
-          lock1.acquire();
-        } catch (InterruptedException e1) {
-          e1.printStackTrace();
-        }
-        Thread thread2 = new Thread() {
-          public void run() {
-            stuckThreads.add(Thread.currentThread());
-            try {
-              lock2.acquire();
-              lock1.tryAcquire(10, TimeUnit.SECONDS);
-            } catch (InterruptedException e) {
-              //ignore
-            }
-            lock2.release();
-          }
-        };
-        thread2.start();
-        try {
-          Thread.sleep(1000);
-          lock2.tryAcquire(10, TimeUnit.SECONDS);
-        } catch (InterruptedException e) {
-          //ignore
-        }
-        lock1.release();
-      }
-    };
-    
-    thread1.start();
-    Thread.sleep(2000);
-    DeadlockDetector detector = new DeadlockDetector();
-    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
-    LinkedList<Dependency> deadlocks = detector.findDeadlock();
-    System.out.println("deadlocks=" +  DeadlockDetector.prettyFormat(deadlocks));
-    assertEquals(4, detector.findDeadlock().size());
-  }
-  
-  /**
-   * This type of deadlock is currently not detected
-   * @throws InterruptedException
-   */
-  @Ignore
-  @Test
-  public void testReadLockDeadlock() throws InterruptedException {
-
-    final ReadWriteLock lock1 = new ReentrantReadWriteLock();
-    final ReadWriteLock lock2 = new ReentrantReadWriteLock();
-    Thread thread1 =  new Thread() {
-      public void run() {
-        stuckThreads.add(Thread.currentThread());
-        lock1.readLock().lock();
-        Thread thread2 = new Thread() {
-          public void run() {
-            stuckThreads.add(Thread.currentThread());
-            lock2.readLock().lock();
-            try {
-              lock1.writeLock().tryLock(10, TimeUnit.SECONDS);
-            } catch (InterruptedException e) {
-              e.printStackTrace();
-            }
-            lock2.readLock().unlock();
-          }
-        };
-        thread2.start();
-        try {
-          Thread.sleep(1000);
-          lock2.writeLock().tryLock(10, TimeUnit.SECONDS);
-        } catch (InterruptedException e) {
-          // TODO Auto-generated catch block
-          e.printStackTrace();
-        }
-        lock1.readLock().unlock();
-      }
-    };
-    
-    thread1.start();
-    Thread.sleep(2000);
-    DeadlockDetector detector = new DeadlockDetector();
-    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
-    LinkedList<Dependency> deadlocks = detector.findDeadlock();
-    System.out.println("deadlocks=" +  deadlocks);
-    assertEquals(4, detector.findDeadlock().size());
-  }
-  
-  /**
-   * Test that the deadlock detector will find deadlocks
-   * that are reported by the {@link DependencyMonitorManager}
-   */
-  @Test
-  public void testProgramaticDependencies() {
-    final CountDownLatch cdl = new CountDownLatch(1);
-    MockDependencyMonitor mock = new MockDependencyMonitor();
-    DependencyMonitorManager.addMonitor(mock);
-    
-    Thread t1 = startAThread(cdl);
-    Thread t2 = startAThread(cdl);
-    
-    String resource1 = "one";
-    String resource2 = "two";
-    
-    mock.addDependency(t1, resource1);
-    mock.addDependency(resource1, t2);
-    mock.addDependency(t2, resource2);
-    mock.addDependency(resource2, t1);
-    
-
-    DeadlockDetector detector = new DeadlockDetector();
-    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
-    LinkedList<Dependency> deadlocks = detector.findDeadlock();
-    System.out.println("deadlocks=" + deadlocks);
-    assertEquals(4, deadlocks.size());
-    cdl.countDown();
-    DependencyMonitorManager.removeMonitor(mock);
-  }
-
-  private Thread startAThread(final CountDownLatch cdl) {
-    Thread thread = new Thread() {
-      public void run() {
-        try {
-          cdl.await();
-        } catch (InterruptedException e) {
-        }
-      }
-    };
-    thread.start();
-    
-    return thread;
-  }
-  
-  /**
-   * A fake dependency monitor.
-   *
-   */
-  private static class MockDependencyMonitor implements DependencyMonitor {
-    
-    Set<Dependency<Thread, Serializable>> blockedThreads = new HashSet<Dependency<Thread, Serializable>>();
-    Set<Dependency<Serializable, Thread>> held = new HashSet<Dependency<Serializable, Thread>>();
-
-    public Set<Dependency<Thread, Serializable>> getBlockedThreads(
-        Thread[] allThreads) {
-      return blockedThreads;
-    }
-
-    public void addDependency(String resource, Thread thread) {
-      held.add(new Dependency<Serializable, Thread>(resource, thread));
-      
-    }
-
-    public void addDependency(Thread thread, String resource) {
-      blockedThreads.add(new Dependency<Thread, Serializable>(thread, resource));
-    }
-
-    public Set<Dependency<Serializable, Thread>> getHeldResources(
-        Thread[] allThreads) {
-      return held;
-    }
-    
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorTest.java
new file mode 100644
index 0000000..9490f47
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DeadlockDetectorTest.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal.deadlock;
+
+import static org.junit.Assert.*;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class DeadlockDetectorTest {
+  
+  private volatile Set<Thread> stuckThreads;
+
+  @Before
+  public void setUp() throws Exception {
+    stuckThreads = Collections.synchronizedSet(new HashSet<Thread>());
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    for (Thread thread: stuckThreads) {
+      thread.interrupt();
+      thread.join(20 * 1000);
+      if (thread.isAlive()) {
+        fail("Couldn't kill" + thread);
+      }
+    }
+
+    stuckThreads.clear();
+  }
+  
+  @Test
+  public void testNoDeadlocks() {
+    DeadlockDetector detector = new DeadlockDetector();
+    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
+    assertEquals(null, detector.findDeadlock());
+  }
+
+  /**
+   * Test that the deadlock detector will find deadlocks
+   * that are reported by the {@link DependencyMonitorManager}
+   */
+  @Test
+  public void testProgrammaticDependencies() throws Exception {
+    final CountDownLatch latch = new CountDownLatch(1);
+    MockDependencyMonitor mockDependencyMonitor = new MockDependencyMonitor();
+    DependencyMonitorManager.addMonitor(mockDependencyMonitor);
+    
+    Thread thread1 = startAThread(latch);
+    Thread thread2 = startAThread(latch);
+    
+    String resource1 = "one";
+    String resource2 = "two";
+    
+    mockDependencyMonitor.addDependency(thread1, resource1);
+    mockDependencyMonitor.addDependency(resource1, thread2);
+    mockDependencyMonitor.addDependency(thread2, resource2);
+    mockDependencyMonitor.addDependency(resource2, thread1);
+
+    DeadlockDetector detector = new DeadlockDetector();
+    detector.addDependencies(DeadlockDetector.collectAllDependencies("here"));
+    LinkedList<Dependency> deadlocks = detector.findDeadlock();
+
+    System.out.println("deadlocks=" + deadlocks);
+
+    assertEquals(4, deadlocks.size());
+
+    latch.countDown();
+    DependencyMonitorManager.removeMonitor(mockDependencyMonitor);
+  }
+
+  private Thread startAThread(final CountDownLatch latch) {
+    Thread thread = new Thread() {
+      @Override
+      public void run() {
+        try {
+          latch.await();
+        } catch (InterruptedException ignore) {
+        }
+      }
+    };
+
+    thread.start();
+    
+    return thread;
+  }
+  
+  /**
+   * A fake dependency monitor.
+   */
+  private static class MockDependencyMonitor implements DependencyMonitor {
+    
+    Set<Dependency<Thread, Serializable>> blockedThreads = new HashSet<>();
+    Set<Dependency<Serializable, Thread>> held = new HashSet<>();
+
+    @Override
+    public Set<Dependency<Thread, Serializable>> getBlockedThreads(Thread[] allThreads) {
+      return blockedThreads;
+    }
+
+    public void addDependency(String resource, Thread thread) {
+      held.add(new Dependency<>(resource, thread));
+    }
+
+    public void addDependency(Thread thread, String resource) {
+      blockedThreads.add(new Dependency<>(thread, resource));
+    }
+
+    @Override
+    public Set<Dependency<Serializable, Thread>> getHeldResources(Thread[] allThreads) {
+      return held;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DependencyGraphJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DependencyGraphJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DependencyGraphJUnitTest.java
index b93ea09..93f47f0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DependencyGraphJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/DependencyGraphJUnitTest.java
@@ -16,23 +16,21 @@
  */
 package com.gemstone.gemfire.distributed.internal.deadlock;
 
+import static org.junit.Assert.*;
+
 import java.util.HashSet;
 import java.util.Set;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- *
- */
 @Category(UnitTest.class)
-public class DependencyGraphJUnitTest extends TestCase {
-  
+public class DependencyGraphJUnitTest {
+
+  @Test
   public void testFindCycle() {
-    
     DependencyGraph graph = new DependencyGraph();
     graph.addEdge(new Dependency("A", "B"));
     graph.addEdge(new Dependency("A", "F"));
@@ -47,9 +45,9 @@ public class DependencyGraphJUnitTest extends TestCase {
     expected.add(new Dependency("E", "A"));
     assertEquals(expected, new HashSet(graph.findCycle()));
   }
-  
+
+  @Test
   public void testSubGraph() {
-    
     DependencyGraph graph = new DependencyGraph();
     graph.addEdge(new Dependency("A", "B"));
     graph.addEdge(new Dependency("B", "C"));
@@ -68,7 +66,8 @@ public class DependencyGraphJUnitTest extends TestCase {
     DependencyGraph sub2 = graph.getSubGraph("E");
     assertEquals(null, sub2.findCycle());
   }
-  
+
+  @Test
   public void testTwoPaths() {
     DependencyGraph graph = new DependencyGraph();
     graph.addEdge(new Dependency("A", "B"));
@@ -78,7 +77,8 @@ public class DependencyGraphJUnitTest extends TestCase {
     
     assertEquals(null, graph.findCycle());
   }
-  
+
+  @Test
   public void testEmptySet() {
     DependencyGraph graph = new DependencyGraph();
     assertEquals(null, graph.findCycle());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/UnsafeThreadLocalJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/UnsafeThreadLocalJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/UnsafeThreadLocalJUnitTest.java
index 7c7a7fc..41e2ff7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/UnsafeThreadLocalJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/deadlock/UnsafeThreadLocalJUnitTest.java
@@ -16,45 +16,62 @@
  */
 package com.gemstone.gemfire.distributed.internal.deadlock;
 
+import static org.junit.Assert.*;
+
 import java.util.concurrent.CountDownLatch;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- * 
- */
 @Category(UnitTest.class)
-public class UnsafeThreadLocalJUnitTest extends TestCase {
+public class UnsafeThreadLocalJUnitTest {
+
+  private static final long INTERVAL = 10;
+
+  private volatile boolean sleep;
+
+  @Before
+  public void setUp() throws Exception {
+    sleep = true;
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    sleep = false;
+  }
 
   /**
    * Test that we can get the value of a thread local from another thread.
-   * 
-   * @throws InterruptedException
    */
+  @Test
   public void test() throws InterruptedException {
-    final UnsafeThreadLocal<String> utl = new UnsafeThreadLocal<String>();
+    final UnsafeThreadLocal<String> unsafeThreadLocal = new UnsafeThreadLocal<String>();
     final CountDownLatch localSet = new CountDownLatch(1);
 
     Thread test = new Thread() {
       public void run() {
-        utl.set("hello");
+        unsafeThreadLocal.set("hello");
         localSet.countDown();
         try {
-          Thread.sleep(100 * 1000);
+          while (sleep) {
+            Thread.sleep(INTERVAL);
+          }
         } catch (InterruptedException e) {
-          e.printStackTrace();
+          throw new AssertionError(e);
         }
       }
     };
+
     test.setDaemon(true);
     test.start();
+
     localSet.await();
-    assertEquals("hello", utl.get(test));
-    assertEquals(null, utl.get(Thread.currentThread()));
-  }
 
+    assertEquals("hello", unsafeThreadLocal.get(test));
+    assertEquals(null, unsafeThreadLocal.get(Thread.currentThread()));
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/NetViewJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/NetViewJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/NetViewJUnitTest.java
index dd7b432..5caf997 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/NetViewJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/NetViewJUnitTest.java
@@ -1,54 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.distributed.internal.membership;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
 
-import java.io.IOException;
-import java.net.UnknownHostException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
-import java.util.Timer;
 
-import org.junit.After;
-import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
 
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.distributed.internal.membership.NetView;
 import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 @Category(UnitTest.class)
 public class NetViewJUnitTest {
-  List<InternalDistributedMember> members;
+
+  private List<InternalDistributedMember> members;
   
   @Before
   public void initMembers() throws Exception {
@@ -205,7 +193,6 @@ public class NetViewJUnitTest {
   
   /**
    * Test that failed weight calculations are correctly performed.  See bug #47342
-   * @throws Exception
    */
   @Test
   public void testFailedWeight() throws Exception {


[38/55] [abbrv] incubator-geode git commit: GEODE-364: Amending Pool configuration to avoid the changing of connections, which could cause the test to fail.

Posted by sa...@apache.org.
GEODE-364: Amending Pool configuration to avoid the changing of connections, which could cause the test to fail.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/bcf7c94f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/bcf7c94f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/bcf7c94f

Branch: refs/heads/feature/GEODE-1153
Commit: bcf7c94fb8247754eb2d73749d05be3a5011624c
Parents: f93c87f
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed May 11 05:47:10 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed May 11 05:51:44 2016 +1000

----------------------------------------------------------------------
 .../internal/cache/SingleHopStatsDUnitTest.java | 448 ++++++++-----------
 1 file changed, 198 insertions(+), 250 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bcf7c94f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
index 307f18f..671bdf7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
@@ -16,20 +16,8 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import java.io.IOException;
-import java.util.Map;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.Pool;
 import com.gemstone.gemfire.cache.client.PoolManager;
 import com.gemstone.gemfire.cache.client.internal.ClientMetadataService;
@@ -37,71 +25,43 @@ import com.gemstone.gemfire.cache.client.internal.ClientPartitionAdvisor;
 import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.execute.data.CustId;
 import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
 import com.gemstone.gemfire.internal.cache.execute.data.ShipmentId;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-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.dunit.*;
 import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.jayway.awaitility.Awaitility;
+import org.junit.experimental.categories.Category;
 
-public class SingleHopStatsDUnitTest extends CacheTestCase {
+import java.io.IOException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
 
-  private static final String Region_Name = "42010";
+public class SingleHopStatsDUnitTest extends CacheTestCase {
 
+  private final String Region_Name = "42010";
+  private final String ORDER_REGION_NAME = "ORDER";
+  private final String SHIPMENT_REGION_NAME = "SHIPMENT";
+  private final String CUSTOMER_REGION_NAME = "CUSTOMER";
   private VM member0 = null;
-
   private VM member1 = null;
-
   private VM member2 = null;
-
   private VM member3 = null;
 
-  private static Region region = null;
-
-  private static Region customerRegion = null;
-
-  private static Region orderRegion = null;
-
-  private static Region shipmentRegion = null;
-
-  private static Region regionWithResolver = null;
-
-  private static Cache cache = null;
-
-  private static final int locatorPort = 12345;
-
-  private static Locator locator = null;
-  
   private static long metaDataRefreshCount;
-  
   private static long nonSingleHopsCount;
-  
   private static long metaDataRefreshCount_Customer;
-  
   private static long nonSingleHopsCount_Customer;
-  
   private static long metaDataRefreshCount_Order;
-  
   private static long nonSingleHopsCount_Order;
-  
   private static long metaDataRefreshCount_Shipment;
-  
   private static long nonSingleHopsCount_Shipment;
-  
+
+
   public SingleHopStatsDUnitTest(String name) {
     super(name);
-
-    // TODO Auto-generated constructor stub
   }
 
   @Override
@@ -116,13 +76,13 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
   @Override
   public final void preTearDownCacheTestCase() throws Exception {
     // close the clients first
-    member0.invoke(() -> SingleHopStatsDUnitTest.closeCacheAndDisconnect());
-    member1.invoke(() -> SingleHopStatsDUnitTest.closeCacheAndDisconnect());
-    member2.invoke(() -> SingleHopStatsDUnitTest.closeCacheAndDisconnect());
-    member3.invoke(() -> SingleHopStatsDUnitTest.closeCacheAndDisconnect());
+    member0.invoke(() -> closeCacheAndDisconnect());
+    member1.invoke(() -> closeCacheAndDisconnect());
+    member2.invoke(() -> closeCacheAndDisconnect());
+    member3.invoke(() -> closeCacheAndDisconnect());
     closeCacheAndDisconnect();
   }
-  
+
   @Override
   public final void postTearDownCacheTestCase() throws Exception {
     try {
@@ -130,104 +90,95 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
       member1 = null;
       member2 = null;
       member3 = null;
-      cache = null;
-      Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
-
-    }
-    finally {
+    } finally {
       DistributedTestUtils.unregisterAllDataSerializersFromAllVms();
     }
   }
 
-  public static void closeCacheAndDisconnect() {
-    if (cache != null && !cache.isClosed()) {
-      cache.close();
-      cache.getDistributedSystem().disconnect();
+  private void closeCacheAndDisconnect() {
+    try {
+      Cache cache = CacheFactory.getAnyInstance();
+      if (cache != null && !cache.isClosed()) {
+        cache.close();
+        cache.getDistributedSystem().disconnect();
+      }
+    } catch (CacheClosedException e) {
     }
   }
 
   @Category(FlakyTest.class) // GEODE-364: random ports, time sensitive, waitForCriterions, magic numbers (113, 226)
   public void testClientStatsPR() {
-    VM server1 = member0;
-    VM server2 = member1;
-    VM server3 = member2;
-    VM client1 = member3;
-    
-    Integer port0 = (Integer)member0.invoke(() -> SingleHopStatsDUnitTest.createServerForStats( 0, 113,"No_Colocation"));
-    Integer port1 = (Integer)member1.invoke(() -> SingleHopStatsDUnitTest.createServerForStats( 0, 113,"No_Colocation"));
-    Integer port2 = (Integer)member2.invoke(() -> SingleHopStatsDUnitTest.createServerForStats( 0, 113,"No_Colocation"));
-     client1.invoke(() -> SingleHopStatsDUnitTest.createClient(port0, port1, port2,"No_Colocation"));
-     
+    Integer port0 = (Integer) member0.invoke(() -> createServerForStats(0, 113, "No_Colocation"));
+    Integer port1 = (Integer) member1.invoke(() -> createServerForStats(0, 113, "No_Colocation"));
+    Integer port2 = (Integer) member2.invoke(() -> createServerForStats(0, 113, "No_Colocation"));
+
+    member3.invoke(() -> createClient(port0, port1, port2, "No_Colocation"));
     createClient(port0, port1, port2, "No_Colocation");
 
-    client1.invoke(() -> SingleHopStatsDUnitTest.createPR("FirstClient", "No_Colocation"));
+    member3.invoke(() -> createPR("FirstClient", "No_Colocation"));
     createPR("SecondClient", "No_Colocation");
-    
-    client1.invoke(() -> SingleHopStatsDUnitTest.getPR("FirstClient", "No_Colocation"));
+
+    member3.invoke(() -> getPR("FirstClient", "No_Colocation"));
     getPR("SecondClient", "No_Colocation");
-    
-    client1.invoke(() -> SingleHopStatsDUnitTest.updatePR("FirstClient", "No_Colocation"));
+
+    member3.invoke(() -> updatePR("FirstClient", "No_Colocation"));
   }
-  
-  public void testClientStatsColocationPR(){
-    VM server1 = member0;
-    VM server2 = member1;
-    VM server3 = member2;
-    VM client1 = member3;
-    
-    Integer port0 = (Integer)member0.invoke(() -> SingleHopStatsDUnitTest.createServerForStats( 0, 4, "Colocation" ));
-    Integer port1 = (Integer)member1.invoke(() -> SingleHopStatsDUnitTest.createServerForStats( 0, 4, "Colocation" ));
-    Integer port2 = (Integer)member2.invoke(() -> SingleHopStatsDUnitTest.createServerForStats( 0, 4, "Colocation"));
-     client1.invoke(() -> SingleHopStatsDUnitTest.createClient(port0, port1, port2, "Colocation"));
+
+  public void testClientStatsColocationPR() {
+    Integer port0 = (Integer) member0.invoke(() -> createServerForStats(0, 4, "Colocation"));
+    Integer port1 = (Integer) member1.invoke(() -> createServerForStats(0, 4, "Colocation"));
+    Integer port2 = (Integer) member2.invoke(() -> createServerForStats(0, 4, "Colocation"));
+    member3.invoke(() -> createClient(port0, port1, port2, "Colocation"));
     createClient(port0, port1, port2, "Colocation");
 
-    client1.invoke(() -> SingleHopStatsDUnitTest.createPR("FirstClient", "Colocation"));
-    
-    client1.invoke(() -> SingleHopStatsDUnitTest.getPR("FirstClient", "Colocation"));
+    member3.invoke(() -> createPR("FirstClient", "Colocation"));
+
+    member3.invoke(() -> getPR("FirstClient", "Colocation"));
   }
 
-  
-  public static void createClient(int port0, int port1, int port2, String colocation) {
+  private void createClient(int port0, int port1, int port2, String colocation) {
     Properties props = new Properties();
     props = new Properties();
     props.setProperty("mcast-port", "0");
     props.setProperty("locators", "");
     CacheTestCase test = new SingleHopStatsDUnitTest(
         "SingleHopStatsDUnitTest");
-    DistributedSystem ds = test.getSystem(props);
-    cache = CacheFactory.create(ds);
+    DistributedSystem distributedSystem = test.getSystem(props);
+    Cache cache = CacheFactory.create(distributedSystem);
     assertNotNull(cache);
     CacheServerTestUtil.disableShufflingOfEndpoints();
     Pool p;
     try {
-      p = PoolManager.createFactory().addServer("localhost", port0).addServer(
-          "localhost", port1).addServer("localhost", port2)
+      p = PoolManager.createFactory().addServer("localhost", port0)
+          .addServer("localhost", port1).addServer("localhost", port2)
+          .setRetryAttempts(5)
+          .setMinConnections(1)
+          .setMaxConnections(1)
           .setSubscriptionEnabled(false)
           .create(Region_Name);
-    }
-    finally {
+    } finally {
       CacheServerTestUtil.enableShufflingOfEndpoints();
     }
-    createRegionInClientCache(p.getName(), colocation);
+    createRegionInClientCache(p.getName(), colocation, cache);
   }
 
-  public static int createServerForStats(int redundantCopies, int totalNoofBuckets, String colocation) {
+  private int createServerForStats(int redundantCopies, int totalNoofBuckets, String colocation) {
     CacheTestCase test = new SingleHopStatsDUnitTest(
         "SingleHopStatsDUnitTest");
-    cache = test.getCache();
+    Cache cache = test.getCache();
     CacheServer server = cache.addCacheServer();
-    int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    server.setPort(port);
+    server.setPort(0);
     server.setHostnameForClients("localhost");
     try {
       server.start();
-    }
-    catch (IOException e) {
+    } catch (IOException e) {
       Assert.fail("Failed to start server ", e);
     }
 
+    Region region = null;
+
     if (colocation.equals("No_Colocation")) {
-      if(totalNoofBuckets == 0){ //DR
+      if (totalNoofBuckets == 0) { //DR
         AttributesFactory attr = new AttributesFactory();
         attr.setScope(Scope.DISTRIBUTED_ACK);
         attr.setDataPolicy(DataPolicy.REPLICATE);
@@ -236,27 +187,27 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
         LogWriterUtils.getLogWriter().info(
             "Distributed Region " + Region_Name + " created Successfully :"
                 + region.toString());
-      }else{
-      PartitionAttributesFactory paf = new PartitionAttributesFactory();
-      paf.setRedundantCopies(redundantCopies).setTotalNumBuckets(
-          totalNoofBuckets);
-      AttributesFactory attr = new AttributesFactory();
-      attr.setPartitionAttributes(paf.create());
-      region = cache.createRegion(Region_Name, attr.create());
-      assertNotNull(region);
-      LogWriterUtils.getLogWriter().info(
-          "Partitioned Region " + Region_Name + " created Successfully :"
-              + region.toString());
+      } else {
+        PartitionAttributesFactory paf = new PartitionAttributesFactory();
+        paf.setRedundantCopies(redundantCopies).setTotalNumBuckets(
+            totalNoofBuckets);
+        AttributesFactory attr = new AttributesFactory();
+        attr.setPartitionAttributes(paf.create());
+        region = cache.createRegion(Region_Name, attr.create());
+        assertNotNull(region);
+        LogWriterUtils.getLogWriter().info(
+            "Partitioned Region " + Region_Name + " created Successfully :"
+                + region.toString());
       }
-    }
-    else {
+    } else {
       PartitionAttributesFactory paf = new PartitionAttributesFactory();
       paf.setRedundantCopies(redundantCopies).setTotalNumBuckets(
           totalNoofBuckets).setPartitionResolver(
-          new CustomerIDPartitionResolver("CustomerIDPartitionResolver"));
+          new CustomerIDPartitionResolver("CustomerIDPartitio"
+              + "nResolver"));
       AttributesFactory attr = new AttributesFactory();
       attr.setPartitionAttributes(paf.create());
-      customerRegion = cache.createRegion("CUSTOMER", attr.create());
+      Region customerRegion = cache.createRegion(CUSTOMER_REGION_NAME, attr.create());
       assertNotNull(customerRegion);
       LogWriterUtils.getLogWriter().info(
           "Partitioned Region CUSTOMER created Successfully :"
@@ -264,11 +215,11 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
 
       paf = new PartitionAttributesFactory();
       paf.setRedundantCopies(redundantCopies).setTotalNumBuckets(
-          totalNoofBuckets).setColocatedWith("CUSTOMER").setPartitionResolver(
+          totalNoofBuckets).setColocatedWith(CUSTOMER_REGION_NAME).setPartitionResolver(
           new CustomerIDPartitionResolver("CustomerIDPartitionResolver"));
       attr = new AttributesFactory();
       attr.setPartitionAttributes(paf.create());
-      orderRegion = cache.createRegion("ORDER", attr.create());
+      Region orderRegion = cache.createRegion(ORDER_REGION_NAME, attr.create());
       assertNotNull(orderRegion);
       LogWriterUtils.getLogWriter().info(
           "Partitioned Region ORDER created Successfully :"
@@ -276,20 +227,21 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
 
       paf = new PartitionAttributesFactory();
       paf.setRedundantCopies(redundantCopies).setTotalNumBuckets(
-          totalNoofBuckets).setColocatedWith("ORDER").setPartitionResolver(
+          totalNoofBuckets).setColocatedWith(ORDER_REGION_NAME).setPartitionResolver(
           new CustomerIDPartitionResolver("CustomerIDPartitionResolver"));
       attr = new AttributesFactory();
       attr.setPartitionAttributes(paf.create());
-      shipmentRegion = cache.createRegion("SHIPMENT", attr.create());
+      Region shipmentRegion = cache.createRegion(SHIPMENT_REGION_NAME, attr.create());
       assertNotNull(shipmentRegion);
       LogWriterUtils.getLogWriter().info(
           "Partitioned Region SHIPMENT created Successfully :"
               + shipmentRegion.toString());
     }
-    return port;
+    return server.getPort();
   }
-  
-  private static void createRegionInClientCache(String poolName, String colocation) {
+
+  private void createRegionInClientCache(String poolName, String colocation, Cache cache) {
+    Region region = null;
     if (colocation.equals("No_Colocation")) {
       AttributesFactory factory = new AttributesFactory();
       factory.setPoolName(poolName);
@@ -299,12 +251,11 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
       assertNotNull(region);
       LogWriterUtils.getLogWriter().info(
           "Region " + Region_Name + " created Successfully :" + region.toString());
-    }
-    else {
+    } else {
       AttributesFactory factory = new AttributesFactory();
       factory.setPoolName(poolName);
       RegionAttributes attrs = factory.create();
-      customerRegion = cache.createRegion("CUSTOMER", attrs);
+      Region customerRegion = cache.createRegion(CUSTOMER_REGION_NAME, attrs);
       assertNotNull(customerRegion);
       LogWriterUtils.getLogWriter().info(
           "Partitioned Region CUSTOMER created Successfully :"
@@ -313,7 +264,7 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
       factory = new AttributesFactory();
       factory.setPoolName(poolName);
       attrs = factory.create();
-      orderRegion = cache.createRegion("ORDER", attrs);
+      Region orderRegion = cache.createRegion(ORDER_REGION_NAME, attrs);
       assertNotNull(orderRegion);
       LogWriterUtils.getLogWriter().info(
           "Partitioned Region ORDER created Successfully :"
@@ -322,24 +273,27 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
       factory = new AttributesFactory();
       factory.setPoolName(poolName);
       attrs = factory.create();
-      shipmentRegion = cache.createRegion("SHIPMENT", attrs);
+      Region shipmentRegion = cache.createRegion("SHIPMENT", attrs);
       assertNotNull(shipmentRegion);
       LogWriterUtils.getLogWriter().info(
           "Partitioned Region SHIPMENT created Successfully :"
               + shipmentRegion.toString());
     }
   }
-  
-  public static void createPR(String fromClient,
-      String colocation) {
+
+  private void createPR(String fromClient, String colocation) {
+    GemFireCacheImpl cache = (GemFireCacheImpl) CacheFactory.getAnyInstance();
+    Region region = cache.getRegion(Region_Name);
+
+
     if (colocation.equals("No_Colocation")) {
       if (fromClient.equals("FirstClient")) {
-        
+
         System.out.println("first pass...");
         for (int i = 0; i < 113; i++) {
           region.create(new Integer(i), "create" + i);
         }
-        ClientMetadataService cms = ((GemFireCacheImpl)cache)
+        ClientMetadataService cms = ((GemFireCacheImpl) cache)
             .getClientMetadataService();
         final Map<String, ClientPartitionAdvisor> regionMetaData = cms
             .getClientPRMetadata_TEST_ONLY();
@@ -349,124 +303,121 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
         for (int i = 113; i < 226; i++) {
           region.create(new Integer(i), "create" + i);
         }
-        cms = ((GemFireCacheImpl)cache).getClientMetadataService();
+        cms = ((GemFireCacheImpl) cache).getClientMetadataService();
         // since PR metadata is fetched in a background executor thread
         // we need to wait for it to arrive for a bit
-        Wait.waitForCriterion(new WaitCriterion(){
-          public boolean done() {
-            return regionMetaData.size() == 1;
-          }
-          public String description() {
-            return "waiting for metadata to arrive: " + regionMetaData;
-          }
-          
-        }, 30000, 500, true);
+        Awaitility.await().timeout(120, TimeUnit.SECONDS).pollDelay(100, TimeUnit.MILLISECONDS)
+            .pollInterval(500, TimeUnit.MILLISECONDS).until(() -> {
+          return regionMetaData.size() == 1;
+        });
+
         assertTrue(regionMetaData.containsKey(region.getFullPath()));
-        ClientPartitionAdvisor prMetaData = regionMetaData.get(region
-            .getFullPath());
-        metaDataRefreshCount = ((LocalRegion)region).getCachePerfStats().getMetaDataRefreshCount();
-        nonSingleHopsCount = ((LocalRegion)region).getCachePerfStats().getNonSingleHopsCount();
+        regionMetaData.get(region.getFullPath());
+        metaDataRefreshCount = ((LocalRegion) region).getCachePerfStats().getMetaDataRefreshCount();
+        nonSingleHopsCount = ((LocalRegion) region).getCachePerfStats().getNonSingleHopsCount();
         assertTrue(metaDataRefreshCount != 0); // hops are not predictable
         assertTrue(nonSingleHopsCount != 0);
-      }
-      else {
+      } else {
         for (int i = 0; i < 226; i++) {
           region.create(new Integer(i), "create" + i);
         }
-        ClientMetadataService cms = ((GemFireCacheImpl)cache)
+        ClientMetadataService cms = ((GemFireCacheImpl) cache)
             .getClientMetadataService();
         Map<String, ClientPartitionAdvisor> regionMetaData = cms
             .getClientPRMetadata_TEST_ONLY();
         assertEquals(1, regionMetaData.size());
         assertTrue(regionMetaData.containsKey(region.getFullPath()));
-        ClientPartitionAdvisor prMetaData = regionMetaData.get(region
-            .getFullPath());
-        metaDataRefreshCount = ((LocalRegion)region).getCachePerfStats().getMetaDataRefreshCount();
-        nonSingleHopsCount = ((LocalRegion)region).getCachePerfStats().getNonSingleHopsCount();
+
+        regionMetaData.get(region.getFullPath());
+        metaDataRefreshCount = ((LocalRegion) region).getCachePerfStats().getMetaDataRefreshCount();
+        nonSingleHopsCount = ((LocalRegion) region).getCachePerfStats().getNonSingleHopsCount();
         assertTrue(metaDataRefreshCount != 0); // hops are not predictable
         assertTrue(nonSingleHopsCount != 0);
       }
+    } else {
+      createdColocatedPRData(cache);
     }
-    else {
-      for (int i = 0; i <= 20; i++) {
-        CustId custid = new CustId(i);
-        Customer customer = new Customer("name" + i, "Address" + i);
-        customerRegion.put(custid, customer);
-        for (int j = 1; j <= 10; j++) {
-          int oid = (i * 10) + j;
-          OrderId orderId = new OrderId(oid, custid);
-          Order order = new Order("OREDR" + oid);
-          orderRegion.put(orderId, order);
-          for (int k = 1; k <= 10; k++) {
-            int sid = (oid * 10) + k;
-            ShipmentId shipmentId = new ShipmentId(sid, orderId);
-            Shipment shipment = new Shipment("Shipment" + sid);
-            shipmentRegion.put(shipmentId, shipment);
-          }
+  }
+
+  private void createdColocatedPRData(GemFireCacheImpl cache) {
+    Region customerRegion = cache.getRegion(CUSTOMER_REGION_NAME);
+    Region orderRegion = cache.getRegion(ORDER_REGION_NAME);
+    Region shipmentRegion = cache.getRegion(SHIPMENT_REGION_NAME);
+    for (int i = 0; i <= 20; i++) {
+      CustId custid = new CustId(i);
+      Customer customer = new Customer("name" + i, "Address" + i);
+
+      customerRegion.put(custid, customer);
+      for (int j = 1; j <= 10; j++) {
+        int oid = (i * 10) + j;
+        OrderId orderId = new OrderId(oid, custid);
+        Order order = new Order(ORDER_REGION_NAME + oid);
+        orderRegion.put(orderId, order);
+        for (int k = 1; k <= 10; k++) {
+          int sid = (oid * 10) + k;
+          ShipmentId shipmentId = new ShipmentId(sid, orderId);
+          Shipment shipment = new Shipment("Shipment" + sid);
+          shipmentRegion.put(shipmentId, shipment);
         }
       }
-      ClientMetadataService cms = ((GemFireCacheImpl)cache)
-          .getClientMetadataService();
-      Map<String, ClientPartitionAdvisor> regionMetaData = cms
-          .getClientPRMetadata_TEST_ONLY();
-      assertEquals(3, regionMetaData.size());
-      assertTrue(regionMetaData.containsKey(customerRegion.getFullPath()));
-      ClientPartitionAdvisor prMetaData_Customer = regionMetaData
-          .get(customerRegion.getFullPath());
-      metaDataRefreshCount_Customer = ((LocalRegion)customerRegion).getCachePerfStats().getMetaDataRefreshCount();
-      nonSingleHopsCount_Customer = ((LocalRegion)customerRegion).getCachePerfStats().getNonSingleHopsCount();
-      assertTrue(metaDataRefreshCount_Customer != 0); // hops are not predictable
-      assertTrue(nonSingleHopsCount_Customer != 0);
-
-      ClientPartitionAdvisor prMetaData_Order = regionMetaData
-          .get(orderRegion.getFullPath());
-      metaDataRefreshCount_Order = ((LocalRegion)orderRegion).getCachePerfStats().getMetaDataRefreshCount();
-      nonSingleHopsCount_Order = ((LocalRegion)orderRegion).getCachePerfStats().getNonSingleHopsCount();
-      assertTrue(metaDataRefreshCount_Order == 0); 
-      assertTrue(nonSingleHopsCount_Order != 0);
-
-      ClientPartitionAdvisor prMetaData_Shipment = regionMetaData
-          .get(shipmentRegion.getFullPath());
-      metaDataRefreshCount_Shipment = ((LocalRegion)shipmentRegion).getCachePerfStats().getMetaDataRefreshCount();
-      nonSingleHopsCount_Shipment = ((LocalRegion)shipmentRegion).getCachePerfStats().getNonSingleHopsCount();
-      assertTrue(metaDataRefreshCount_Shipment == 0); 
-      assertTrue(nonSingleHopsCount_Shipment != 0);
     }
+    ClientMetadataService cms = cache.getClientMetadataService();
+    Map<String, ClientPartitionAdvisor> regionMetaData = cms
+        .getClientPRMetadata_TEST_ONLY();
+    assertEquals(3, regionMetaData.size());
+    assertTrue(regionMetaData.containsKey(customerRegion.getFullPath()));
+    regionMetaData.get(customerRegion.getFullPath());
+    metaDataRefreshCount_Customer = ((LocalRegion) customerRegion).getCachePerfStats().getMetaDataRefreshCount();
+    nonSingleHopsCount_Customer = ((LocalRegion) customerRegion).getCachePerfStats().getNonSingleHopsCount();
+    assertTrue(metaDataRefreshCount_Customer != 0); // hops are not predictable
+    assertTrue(nonSingleHopsCount_Customer != 0);
+
+    regionMetaData.get(orderRegion.getFullPath());
+    metaDataRefreshCount_Order = ((LocalRegion) orderRegion).getCachePerfStats().getMetaDataRefreshCount();
+    nonSingleHopsCount_Order = ((LocalRegion) orderRegion).getCachePerfStats().getNonSingleHopsCount();
+    assertTrue(metaDataRefreshCount_Order == 0);
+    assertTrue(nonSingleHopsCount_Order != 0);
+
+    regionMetaData.get(shipmentRegion.getFullPath());
+    metaDataRefreshCount_Shipment = ((LocalRegion) shipmentRegion).getCachePerfStats().getMetaDataRefreshCount();
+    nonSingleHopsCount_Shipment = ((LocalRegion) shipmentRegion).getCachePerfStats().getNonSingleHopsCount();
+    assertTrue(metaDataRefreshCount_Shipment == 0);
+    assertTrue(nonSingleHopsCount_Shipment != 0);
   }
-  
-  public static void getPR(String FromClient,
-      String colocation) {
+
+  private void getPR(String FromClient, String colocation) {
+    Cache cache = CacheFactory.getAnyInstance();
+    Region region = cache.getRegion(Region_Name);
+    Region customerRegion = cache.getRegion(CUSTOMER_REGION_NAME);
+    Region orderRegion = cache.getRegion(ORDER_REGION_NAME);
+    Region shipmentRegion = cache.getRegion("SHIPMENT");
     if (colocation.equals("No_Colocation")) {
       if (FromClient.equals("FirstClient")) {
         for (int i = 0; i < 226; i++) {
           region.get(new Integer(i));
         }
-        ClientMetadataService cms = ((GemFireCacheImpl)cache)
+        ClientMetadataService cms = ((GemFireCacheImpl) cache)
             .getClientMetadataService();
         Map<String, ClientPartitionAdvisor> regionMetaData = cms
             .getClientPRMetadata_TEST_ONLY();
         assertEquals(1, regionMetaData.size());
-        ClientPartitionAdvisor prMetaData = regionMetaData.get(region
-            .getFullPath());
-        assertEquals(metaDataRefreshCount , ((LocalRegion)region).getCachePerfStats().getMetaDataRefreshCount());
-        assertEquals(nonSingleHopsCount , ((LocalRegion)region).getCachePerfStats().getNonSingleHopsCount());
-      }
-      else {
+        regionMetaData.get(region.getFullPath());
+        assertEquals(metaDataRefreshCount, ((LocalRegion) region).getCachePerfStats().getMetaDataRefreshCount());
+        assertEquals(nonSingleHopsCount, ((LocalRegion) region).getCachePerfStats().getNonSingleHopsCount());
+      } else {
         for (int i = 0; i < 226; i++) {
           region.get(new Integer(i));
         }
-        ClientMetadataService cms = ((GemFireCacheImpl)cache)
+        ClientMetadataService cms = ((GemFireCacheImpl) cache)
             .getClientMetadataService();
         Map<String, ClientPartitionAdvisor> regionMetaData = cms
             .getClientPRMetadata_TEST_ONLY();
         assertEquals(1, regionMetaData.size());
-        ClientPartitionAdvisor prMetaData = regionMetaData.get(region
-            .getFullPath());
-        assertEquals(metaDataRefreshCount , ((LocalRegion)region).getCachePerfStats().getMetaDataRefreshCount());
-        assertEquals(nonSingleHopsCount , ((LocalRegion)region).getCachePerfStats().getNonSingleHopsCount());
+        regionMetaData.get(region.getFullPath());
+        assertEquals(metaDataRefreshCount, ((LocalRegion) region).getCachePerfStats().getMetaDataRefreshCount());
+        assertEquals(nonSingleHopsCount, ((LocalRegion) region).getCachePerfStats().getNonSingleHopsCount());
       }
-    }
-    else {
+    } else {
       for (int i = 0; i <= 20; i++) {
         CustId custid = new CustId(i);
         customerRegion.get(custid);
@@ -481,45 +432,42 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
           }
         }
       }
-      ClientMetadataService cms = ((GemFireCacheImpl)cache)
+      ClientMetadataService cms = ((GemFireCacheImpl) cache)
           .getClientMetadataService();
       Map<String, ClientPartitionAdvisor> regionMetaData = cms
           .getClientPRMetadata_TEST_ONLY();
       assertEquals(3, regionMetaData.size());
       assertTrue(regionMetaData.containsKey(customerRegion.getFullPath()));
-      ClientPartitionAdvisor prMetaData_Customer = regionMetaData
-          .get(customerRegion.getFullPath());
-      assertEquals(metaDataRefreshCount_Customer , ((LocalRegion)customerRegion).getCachePerfStats().getMetaDataRefreshCount());
-      assertEquals(nonSingleHopsCount_Customer , ((LocalRegion)customerRegion).getCachePerfStats().getNonSingleHopsCount());
-
-      ClientPartitionAdvisor prMetaData_Order = regionMetaData
-          .get(orderRegion.getFullPath());
-      assertEquals(metaDataRefreshCount_Order , ((LocalRegion)orderRegion).getCachePerfStats().getMetaDataRefreshCount());
-      assertEquals(nonSingleHopsCount_Order , ((LocalRegion)orderRegion).getCachePerfStats().getNonSingleHopsCount());
-
-      ClientPartitionAdvisor prMetaData_Shipment = regionMetaData
-          .get(shipmentRegion.getFullPath());
-      assertEquals(metaDataRefreshCount_Shipment , ((LocalRegion)shipmentRegion).getCachePerfStats().getMetaDataRefreshCount());
-      assertEquals(nonSingleHopsCount_Shipment , ((LocalRegion)shipmentRegion).getCachePerfStats().getNonSingleHopsCount());
+      regionMetaData.get(customerRegion.getFullPath());
+      assertEquals(metaDataRefreshCount_Customer, ((LocalRegion) customerRegion).getCachePerfStats().getMetaDataRefreshCount());
+      assertEquals(nonSingleHopsCount_Customer, ((LocalRegion) customerRegion).getCachePerfStats().getNonSingleHopsCount());
+
+      regionMetaData.get(orderRegion.getFullPath());
+      assertEquals(metaDataRefreshCount_Order, ((LocalRegion) orderRegion).getCachePerfStats().getMetaDataRefreshCount());
+      assertEquals(nonSingleHopsCount_Order, ((LocalRegion) orderRegion).getCachePerfStats().getNonSingleHopsCount());
+
+      regionMetaData.get(shipmentRegion.getFullPath());
+      assertEquals(metaDataRefreshCount_Shipment, ((LocalRegion) shipmentRegion).getCachePerfStats().getMetaDataRefreshCount());
+      assertEquals(nonSingleHopsCount_Shipment, ((LocalRegion) shipmentRegion).getCachePerfStats().getNonSingleHopsCount());
     }
   }
-  
-  public static void updatePR(String FromClient,
-      String colocation) {
+
+  private void updatePR(String FromClient, String colocation) {
+    Cache cache = CacheFactory.getAnyInstance();
+    Region region = cache.getRegion(Region_Name);
     if (colocation.equals("No_Colocation")) {
       if (FromClient.equals("FirstClient")) {
         for (int i = 0; i < 226; i++) {
           region.put(new Integer(i), "Update" + i);
         }
-        ClientMetadataService cms = ((GemFireCacheImpl)cache)
+        ClientMetadataService cms = ((GemFireCacheImpl) cache)
             .getClientMetadataService();
         Map<String, ClientPartitionAdvisor> regionMetaData = cms
             .getClientPRMetadata_TEST_ONLY();
         assertEquals(1, regionMetaData.size());
-        ClientPartitionAdvisor prMetaData = regionMetaData.get(region
-            .getFullPath());
-        assertEquals(metaDataRefreshCount , ((LocalRegion)region).getCachePerfStats().getMetaDataRefreshCount());
-        assertEquals(nonSingleHopsCount , ((LocalRegion)region).getCachePerfStats().getNonSingleHopsCount());
+        regionMetaData.get(region.getFullPath());
+        assertEquals(metaDataRefreshCount, ((LocalRegion) region).getCachePerfStats().getMetaDataRefreshCount());
+        assertEquals(nonSingleHopsCount, ((LocalRegion) region).getCachePerfStats().getNonSingleHopsCount());
       }
     }
   }


[23/55] [abbrv] incubator-geode git commit: GEODE-1340: Refactored the names of lucene integration tests.

Posted by sa...@apache.org.
GEODE-1340: Refactored the names of lucene integration tests.

* Renamed the names of integration tests to not end with JUnitTest but just IntegrationTest
* Modified LuceneIndexXmlParserJUnitTest code to use mockito so that the test is more aligned to Unit tests.

This closes #141


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/eaa15939
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/eaa15939
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/eaa15939

Branch: refs/heads/feature/GEODE-1153
Commit: eaa1593949556e515feb886a13fd93f6f3e17016
Parents: f24b9fb
Author: nabarun <nn...@pivotal.io>
Authored: Wed May 4 10:07:23 2016 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Mon May 9 12:08:24 2016 -0700

----------------------------------------------------------------------
 .../LuceneIndexRecoveryHAIntegrationTest.java   | 211 ++++++++++++++
 .../LuceneIndexRecoveryHAJUnitTest.java         | 211 --------------
 .../LuceneQueryImplIntegrationTest.java         | 123 ++++++++
 .../internal/LuceneQueryImplJUnitTest.java      | 123 --------
 .../LuceneServiceImplIntegrationTest.java       | 292 +++++++++++++++++++
 .../internal/LuceneServiceImplJUnitTest.java    | 292 -------------------
 .../xml/LuceneIndexXmlParserJUnitTest.java      |  13 +-
 7 files changed, 637 insertions(+), 628 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/eaa15939/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAIntegrationTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAIntegrationTest.java
new file mode 100644
index 0000000..77d2a5c
--- /dev/null
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAIntegrationTest.java
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.gemstone.gemfire.cache.lucene.internal;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.EvictionAction;
+import com.gemstone.gemfire.cache.EvictionAlgorithm;
+import com.gemstone.gemfire.cache.PartitionAttributes;
+import com.gemstone.gemfire.cache.PartitionAttributesFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
+import com.gemstone.gemfire.cache.lucene.LuceneQuery;
+import com.gemstone.gemfire.cache.lucene.LuceneQueryResults;
+import com.gemstone.gemfire.cache.lucene.LuceneService;
+import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
+import com.gemstone.gemfire.cache.lucene.internal.repository.IndexRepository;
+import com.gemstone.gemfire.cache.lucene.internal.repository.RepositoryManager;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.Type1;
+import com.gemstone.gemfire.internal.cache.BucketNotFoundException;
+import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.jayway.awaitility.Awaitility;
+
+@Category(IntegrationTest.class)
+public class LuceneIndexRecoveryHAIntegrationTest {
+
+  private static final String INDEX = "index";
+  private static final String REGION = "indexedRegion";
+  String[] indexedFields = new String[] { "txt" };
+  HeterogeneousLuceneSerializer mapper = new HeterogeneousLuceneSerializer(indexedFields);
+  Analyzer analyzer = new StandardAnalyzer();
+
+  Cache cache;
+
+  @Before
+  public void setup() {
+    indexedFields = new String[] { "txt" };
+    mapper = new HeterogeneousLuceneSerializer(indexedFields);
+    analyzer = new StandardAnalyzer();
+    LuceneServiceImpl.registerDataSerializables();
+
+    cache = new CacheFactory().set("mcast-port", "0").create();
+  }
+
+  @After
+  public void tearDown() {
+    Cache cache = GemFireCacheImpl.getInstance();
+    if (cache != null) {
+      cache.close();
+    }
+  }
+
+  /**
+   * On rebalance, new repository manager will be created. It will try to read fileRegion and construct index. This test
+   * simulates the same.
+   */
+  @Test
+  public void recoverRepoInANewNode() throws BucketNotFoundException, IOException {
+    PartitionAttributes<String, String> attrs = new PartitionAttributesFactory().setTotalNumBuckets(1).create();
+    RegionFactory<String, String> regionfactory = cache.createRegionFactory(RegionShortcut.PARTITION);
+    regionfactory.setPartitionAttributes(attrs);
+
+    PartitionedRegion userRegion = (PartitionedRegion) regionfactory.create("userRegion");
+    // put an entry to create the bucket
+    userRegion.put("rebalance", "test");
+
+    PartitionedRegion fileRegion = (PartitionedRegion) regionfactory.create("fileRegion");
+    PartitionedRegion chunkRegion = (PartitionedRegion) regionfactory.create("chunkRegion");
+
+    RepositoryManager manager = new PartitionedRepositoryManager(userRegion, fileRegion, chunkRegion, mapper, analyzer);
+    IndexRepository repo = manager.getRepository(userRegion, 0, null);
+    assertNotNull(repo);
+
+    repo.create("rebalance", "test");
+    repo.commit();
+
+    // close the region to simulate bucket movement. New node will create repo using data persisted by old region
+    userRegion.close();
+
+    userRegion = (PartitionedRegion) regionfactory.create("userRegion");
+    userRegion.put("rebalance", "test");
+    manager = new PartitionedRepositoryManager(userRegion, fileRegion, chunkRegion, mapper, analyzer);
+    IndexRepository newRepo = manager.getRepository(userRegion, 0, null);
+
+    Assert.assertNotEquals(newRepo, repo);
+  }
+
+  @Category(FlakyTest.class) // GEODE-1012: time sensitive, awaitility, short timeout
+  @Test
+  public void recoverPersistentIndex() throws Exception {
+    String aeqId = LuceneServiceImpl.getUniqueIndexName(INDEX, REGION);
+
+    LuceneService service = LuceneServiceProvider.get(cache);
+    service.createIndex(INDEX, REGION, Type1.fields);
+
+    RegionFactory<String, Type1> regionFactory = cache.createRegionFactory(RegionShortcut.PARTITION_PERSISTENT);
+    Region<String, Type1> userRegion = regionFactory.create(REGION);
+
+    Type1 value = new Type1("hello world", 1, 2L, 3.0, 4.0f);
+    userRegion.put("value1", value);
+    value = new Type1("test world", 1, 2L, 3.0, 4.0f);
+    userRegion.put("value2", value);
+    value = new Type1("lucene world", 1, 2L, 3.0, 4.0f);
+    userRegion.put("value3", value);
+
+    waitUntilQueueEmpty(aeqId);
+
+    LuceneQuery<Integer, Type1> query = service.createLuceneQueryFactory().create(INDEX, REGION, "s:world");
+    LuceneQueryResults<Integer, Type1> results = query.search();
+    Assert.assertEquals(3, results.size());
+
+    // close the cache and all the regions
+    cache.close();
+
+    cache = new CacheFactory().set("mcast-port", "0").create();
+    service = LuceneServiceProvider.get(cache);
+    service.createIndex(INDEX, REGION, Type1.fields);
+    regionFactory = cache.createRegionFactory(RegionShortcut.PARTITION_PERSISTENT);
+    userRegion = regionFactory.create(REGION);
+
+    query = service.createLuceneQueryFactory().create(INDEX, REGION, "s:world");
+    results = query.search();
+    Assert.assertEquals(3, results.size());
+
+    PartitionedRegion chunkRegion = (PartitionedRegion) cache.getRegion(aeqId + ".chunks");
+    assertNotNull(chunkRegion);
+    chunkRegion.destroyRegion();
+    PartitionedRegion fileRegion = (PartitionedRegion) cache.getRegion(aeqId + ".files");
+    assertNotNull(fileRegion);
+    fileRegion.destroyRegion();
+    userRegion.destroyRegion();
+  }
+
+  @Category(FlakyTest.class) // GEODE-1013: time sensitive, awaitility, short timeout, possible disk pollution
+  @Test
+  public void overflowRegionIndex() throws Exception {
+    String aeqId = LuceneServiceImpl.getUniqueIndexName(INDEX, REGION);
+
+    LuceneService service = LuceneServiceProvider.get(cache);
+    service.createIndex(INDEX, REGION, Type1.fields);
+
+    RegionFactory<String, Type1> regionFactory = cache.createRegionFactory(RegionShortcut.PARTITION);
+    EvictionAttributesImpl evicAttr = new EvictionAttributesImpl().setAction(EvictionAction.OVERFLOW_TO_DISK);
+    evicAttr.setAlgorithm(EvictionAlgorithm.LRU_ENTRY).setMaximum(1);
+    regionFactory.setEvictionAttributes(evicAttr);
+
+    PartitionedRegion userRegion = (PartitionedRegion) regionFactory.create(REGION);
+    Assert.assertEquals(0, userRegion.getDiskRegionStats().getNumOverflowOnDisk());
+
+    Type1 value = new Type1("hello world", 1, 2L, 3.0, 4.0f);
+    userRegion.put("value1", value);
+    value = new Type1("test world", 1, 2L, 3.0, 4.0f);
+    userRegion.put("value2", value);
+    value = new Type1("lucene world", 1, 2L, 3.0, 4.0f);
+    userRegion.put("value3", value);
+
+    waitUntilQueueEmpty(aeqId);
+
+    PartitionedRegion fileRegion = (PartitionedRegion) cache.getRegion(aeqId + ".files");
+    assertNotNull(fileRegion);
+    PartitionedRegion chunkRegion = (PartitionedRegion) cache.getRegion(aeqId + ".chunks");
+    assertNotNull(chunkRegion);
+    Assert.assertTrue(0 < userRegion.getDiskRegionStats().getNumOverflowOnDisk());
+
+    LuceneQuery<Integer, Type1> query = service.createLuceneQueryFactory().create(INDEX, REGION, "s:world");
+    LuceneQueryResults<Integer, Type1> results = query.search();
+    Assert.assertEquals(3, results.size());
+  }
+
+  private void waitUntilQueueEmpty(final String aeqId) {
+    // TODO flush queue
+    AsyncEventQueue queue = cache.getAsyncEventQueue(aeqId);
+    Awaitility.waitAtMost(1000, TimeUnit.MILLISECONDS).until(() -> assertEquals(0, queue.size()));
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/eaa15939/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
deleted file mode 100644
index ebde9d4..0000000
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.gemstone.gemfire.cache.lucene.internal;
-
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAlgorithm;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
-import com.gemstone.gemfire.cache.lucene.LuceneQuery;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryResults;
-import com.gemstone.gemfire.cache.lucene.LuceneService;
-import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
-import com.gemstone.gemfire.cache.lucene.internal.repository.IndexRepository;
-import com.gemstone.gemfire.cache.lucene.internal.repository.RepositoryManager;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.Type1;
-import com.gemstone.gemfire.internal.cache.BucketNotFoundException;
-import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import com.jayway.awaitility.Awaitility;
-
-@Category(IntegrationTest.class)
-public class LuceneIndexRecoveryHAJUnitTest {
-
-  private static final String INDEX = "index";
-  private static final String REGION = "indexedRegion";
-  String[] indexedFields = new String[] { "txt" };
-  HeterogeneousLuceneSerializer mapper = new HeterogeneousLuceneSerializer(indexedFields);
-  Analyzer analyzer = new StandardAnalyzer();
-
-  Cache cache;
-
-  @Before
-  public void setup() {
-    indexedFields = new String[] { "txt" };
-    mapper = new HeterogeneousLuceneSerializer(indexedFields);
-    analyzer = new StandardAnalyzer();
-    LuceneServiceImpl.registerDataSerializables();
-
-    cache = new CacheFactory().set("mcast-port", "0").create();
-  }
-
-  @After
-  public void tearDown() {
-    Cache cache = GemFireCacheImpl.getInstance();
-    if (cache != null) {
-      cache.close();
-    }
-  }
-
-  /**
-   * On rebalance, new repository manager will be created. It will try to read fileRegion and construct index. This test
-   * simulates the same.
-   */
-  @Test
-  public void recoverRepoInANewNode() throws BucketNotFoundException, IOException {
-    PartitionAttributes<String, String> attrs = new PartitionAttributesFactory().setTotalNumBuckets(1).create();
-    RegionFactory<String, String> regionfactory = cache.createRegionFactory(RegionShortcut.PARTITION);
-    regionfactory.setPartitionAttributes(attrs);
-
-    PartitionedRegion userRegion = (PartitionedRegion) regionfactory.create("userRegion");
-    // put an entry to create the bucket
-    userRegion.put("rebalance", "test");
-
-    PartitionedRegion fileRegion = (PartitionedRegion) regionfactory.create("fileRegion");
-    PartitionedRegion chunkRegion = (PartitionedRegion) regionfactory.create("chunkRegion");
-
-    RepositoryManager manager = new PartitionedRepositoryManager(userRegion, fileRegion, chunkRegion, mapper, analyzer);
-    IndexRepository repo = manager.getRepository(userRegion, 0, null);
-    assertNotNull(repo);
-
-    repo.create("rebalance", "test");
-    repo.commit();
-
-    // close the region to simulate bucket movement. New node will create repo using data persisted by old region
-    userRegion.close();
-
-    userRegion = (PartitionedRegion) regionfactory.create("userRegion");
-    userRegion.put("rebalance", "test");
-    manager = new PartitionedRepositoryManager(userRegion, fileRegion, chunkRegion, mapper, analyzer);
-    IndexRepository newRepo = manager.getRepository(userRegion, 0, null);
-
-    Assert.assertNotEquals(newRepo, repo);
-  }
-
-  @Category(FlakyTest.class) // GEODE-1012: time sensitive, awaitility, short timeout
-  @Test
-  public void recoverPersistentIndex() throws Exception {
-    String aeqId = LuceneServiceImpl.getUniqueIndexName(INDEX, REGION);
-
-    LuceneService service = LuceneServiceProvider.get(cache);
-    service.createIndex(INDEX, REGION, Type1.fields);
-
-    RegionFactory<String, Type1> regionFactory = cache.createRegionFactory(RegionShortcut.PARTITION_PERSISTENT);
-    Region<String, Type1> userRegion = regionFactory.create(REGION);
-
-    Type1 value = new Type1("hello world", 1, 2L, 3.0, 4.0f);
-    userRegion.put("value1", value);
-    value = new Type1("test world", 1, 2L, 3.0, 4.0f);
-    userRegion.put("value2", value);
-    value = new Type1("lucene world", 1, 2L, 3.0, 4.0f);
-    userRegion.put("value3", value);
-
-    waitUntilQueueEmpty(aeqId);
-
-    LuceneQuery<Integer, Type1> query = service.createLuceneQueryFactory().create(INDEX, REGION, "s:world");
-    LuceneQueryResults<Integer, Type1> results = query.search();
-    Assert.assertEquals(3, results.size());
-
-    // close the cache and all the regions
-    cache.close();
-
-    cache = new CacheFactory().set("mcast-port", "0").create();
-    service = LuceneServiceProvider.get(cache);
-    service.createIndex(INDEX, REGION, Type1.fields);
-    regionFactory = cache.createRegionFactory(RegionShortcut.PARTITION_PERSISTENT);
-    userRegion = regionFactory.create(REGION);
-
-    query = service.createLuceneQueryFactory().create(INDEX, REGION, "s:world");
-    results = query.search();
-    Assert.assertEquals(3, results.size());
-
-    PartitionedRegion chunkRegion = (PartitionedRegion) cache.getRegion(aeqId + ".chunks");
-    assertNotNull(chunkRegion);
-    chunkRegion.destroyRegion();
-    PartitionedRegion fileRegion = (PartitionedRegion) cache.getRegion(aeqId + ".files");
-    assertNotNull(fileRegion);
-    fileRegion.destroyRegion();
-    userRegion.destroyRegion();
-  }
-
-  @Category(FlakyTest.class) // GEODE-1013: time sensitive, awaitility, short timeout, possible disk pollution
-  @Test
-  public void overflowRegionIndex() throws Exception {
-    String aeqId = LuceneServiceImpl.getUniqueIndexName(INDEX, REGION);
-
-    LuceneService service = LuceneServiceProvider.get(cache);
-    service.createIndex(INDEX, REGION, Type1.fields);
-
-    RegionFactory<String, Type1> regionFactory = cache.createRegionFactory(RegionShortcut.PARTITION);
-    EvictionAttributesImpl evicAttr = new EvictionAttributesImpl().setAction(EvictionAction.OVERFLOW_TO_DISK);
-    evicAttr.setAlgorithm(EvictionAlgorithm.LRU_ENTRY).setMaximum(1);
-    regionFactory.setEvictionAttributes(evicAttr);
-
-    PartitionedRegion userRegion = (PartitionedRegion) regionFactory.create(REGION);
-    Assert.assertEquals(0, userRegion.getDiskRegionStats().getNumOverflowOnDisk());
-
-    Type1 value = new Type1("hello world", 1, 2L, 3.0, 4.0f);
-    userRegion.put("value1", value);
-    value = new Type1("test world", 1, 2L, 3.0, 4.0f);
-    userRegion.put("value2", value);
-    value = new Type1("lucene world", 1, 2L, 3.0, 4.0f);
-    userRegion.put("value3", value);
-
-    waitUntilQueueEmpty(aeqId);
-
-    PartitionedRegion fileRegion = (PartitionedRegion) cache.getRegion(aeqId + ".files");
-    assertNotNull(fileRegion);
-    PartitionedRegion chunkRegion = (PartitionedRegion) cache.getRegion(aeqId + ".chunks");
-    assertNotNull(chunkRegion);
-    Assert.assertTrue(0 < userRegion.getDiskRegionStats().getNumOverflowOnDisk());
-
-    LuceneQuery<Integer, Type1> query = service.createLuceneQueryFactory().create(INDEX, REGION, "s:world");
-    LuceneQueryResults<Integer, Type1> results = query.search();
-    Assert.assertEquals(3, results.size());
-  }
-
-  private void waitUntilQueueEmpty(final String aeqId) {
-    // TODO flush queue
-    AsyncEventQueue queue = cache.getAsyncEventQueue(aeqId);
-    Awaitility.waitAtMost(1000, TimeUnit.MILLISECONDS).until(() -> assertEquals(0, queue.size()));
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/eaa15939/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplIntegrationTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplIntegrationTest.java
new file mode 100644
index 0000000..90ab022
--- /dev/null
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplIntegrationTest.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.gemstone.gemfire.cache.lucene.internal;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.execute.FunctionAdapter;
+import com.gemstone.gemfire.cache.execute.FunctionContext;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.lucene.LuceneQueryResults;
+import com.gemstone.gemfire.cache.lucene.LuceneResultStruct;
+import com.gemstone.gemfire.cache.lucene.internal.distributed.LuceneFunction;
+import com.gemstone.gemfire.cache.lucene.internal.distributed.LuceneFunctionContext;
+import com.gemstone.gemfire.cache.lucene.internal.distributed.TopEntriesCollector;
+import com.gemstone.gemfire.cache.lucene.internal.distributed.TopEntriesCollectorManager;
+import com.gemstone.gemfire.cache.lucene.internal.repository.IndexResultCollector;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+@Category(IntegrationTest.class)
+public class LuceneQueryImplIntegrationTest {
+  private static int LIMIT = 123;
+  private Cache cache;
+  private Region<Object, Object> region;
+
+  @Before
+  public void createCache() {
+    cache = new CacheFactory().set("mcast-port", "0").create();
+    region = cache.createRegionFactory(RegionShortcut.PARTITION_PERSISTENT).create("region");
+  }
+
+  @After
+  public void removeCache() {
+    FunctionService.unregisterFunction(LuceneFunction.ID);
+    cache.close();
+  }
+
+  @Test
+  public void test() {
+    // Register a fake function to observe the function invocation
+    FunctionService.unregisterFunction(LuceneFunction.ID);
+    TestLuceneFunction function = new TestLuceneFunction();
+    FunctionService.registerFunction(function);
+
+    StringQueryProvider provider = new StringQueryProvider();
+    LuceneQueryImpl<Object, Object> query = new LuceneQueryImpl<>("index", region, provider, null, LIMIT, 20);
+    LuceneQueryResults<Object, Object> results = query.search();
+
+    assertTrue(function.wasInvoked);
+    assertEquals(2f * LIMIT, results.getMaxScore(), 0.01);
+    int resultCount = 0;
+    while (results.hasNextPage()) {
+      List<LuceneResultStruct<Object, Object>> nextPage = results.getNextPage();
+      resultCount += nextPage.size();
+      if (results.hasNextPage()) {
+        assertEquals(20, nextPage.size());
+      }
+    }
+    assertEquals(LIMIT, resultCount);
+
+    LuceneFunctionContext<? extends IndexResultCollector> funcArgs = function.args;
+    assertEquals(provider.getQueryString(), ((StringQueryProvider) funcArgs.getQueryProvider()).getQueryString());
+    assertEquals("index", funcArgs.getIndexName());
+    assertEquals(LIMIT, funcArgs.getLimit());
+  }
+
+  private static class TestLuceneFunction extends FunctionAdapter {
+    private static final long serialVersionUID = 1L;
+    private boolean wasInvoked;
+    private LuceneFunctionContext<? extends IndexResultCollector> args;
+
+    @Override
+    public void execute(FunctionContext context) {
+      this.args = (LuceneFunctionContext<?>) context.getArguments();
+      TopEntriesCollectorManager manager = (TopEntriesCollectorManager) args.getCollectorManager();
+
+      assertEquals(LIMIT, manager.getLimit());
+
+      wasInvoked = true;
+      TopEntriesCollector lastResult = new TopEntriesCollector(null, 2 * LIMIT);
+      // put more than LIMIT entries. The resultCollector should trim the results
+      for (int i = LIMIT * 2; i >= 0; i--) {
+        lastResult.collect(i, i * 1f);
+      }
+      assertEquals(LIMIT * 2, lastResult.getEntries().getHits().size());
+
+      context.getResultSender().lastResult(lastResult);
+    }
+
+    @Override
+    public String getId() {
+      return LuceneFunction.ID;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/eaa15939/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplJUnitTest.java
deleted file mode 100644
index 2439645..0000000
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplJUnitTest.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package com.gemstone.gemfire.cache.lucene.internal;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryResults;
-import com.gemstone.gemfire.cache.lucene.LuceneResultStruct;
-import com.gemstone.gemfire.cache.lucene.internal.distributed.LuceneFunction;
-import com.gemstone.gemfire.cache.lucene.internal.distributed.LuceneFunctionContext;
-import com.gemstone.gemfire.cache.lucene.internal.distributed.TopEntriesCollector;
-import com.gemstone.gemfire.cache.lucene.internal.distributed.TopEntriesCollectorManager;
-import com.gemstone.gemfire.cache.lucene.internal.repository.IndexResultCollector;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-@Category(IntegrationTest.class)
-public class LuceneQueryImplJUnitTest {
-  private static int LIMIT = 123;
-  private Cache cache;
-  private Region<Object, Object> region;
-
-  @Before
-  public void createCache() {
-    cache = new CacheFactory().set("mcast-port", "0").create();
-    region = cache.createRegionFactory(RegionShortcut.PARTITION_PERSISTENT).create("region");
-  }
-
-  @After
-  public void removeCache() {
-    FunctionService.unregisterFunction(LuceneFunction.ID);
-    cache.close();
-  }
-
-  @Test
-  public void test() {
-    // Register a fake function to observe the function invocation
-    FunctionService.unregisterFunction(LuceneFunction.ID);
-    TestLuceneFunction function = new TestLuceneFunction();
-    FunctionService.registerFunction(function);
-
-    StringQueryProvider provider = new StringQueryProvider();
-    LuceneQueryImpl<Object, Object> query = new LuceneQueryImpl<>("index", region, provider, null, LIMIT, 20);
-    LuceneQueryResults<Object, Object> results = query.search();
-
-    assertTrue(function.wasInvoked);
-    assertEquals(2f * LIMIT, results.getMaxScore(), 0.01);
-    int resultCount = 0;
-    while (results.hasNextPage()) {
-      List<LuceneResultStruct<Object, Object>> nextPage = results.getNextPage();
-      resultCount += nextPage.size();
-      if (results.hasNextPage()) {
-        assertEquals(20, nextPage.size());
-      }
-    }
-    assertEquals(LIMIT, resultCount);
-
-    LuceneFunctionContext<? extends IndexResultCollector> funcArgs = function.args;
-    assertEquals(provider.getQueryString(), ((StringQueryProvider) funcArgs.getQueryProvider()).getQueryString());
-    assertEquals("index", funcArgs.getIndexName());
-    assertEquals(LIMIT, funcArgs.getLimit());
-  }
-
-  private static class TestLuceneFunction extends FunctionAdapter {
-    private static final long serialVersionUID = 1L;
-    private boolean wasInvoked;
-    private LuceneFunctionContext<? extends IndexResultCollector> args;
-
-    @Override
-    public void execute(FunctionContext context) {
-      this.args = (LuceneFunctionContext<?>) context.getArguments();
-      TopEntriesCollectorManager manager = (TopEntriesCollectorManager) args.getCollectorManager();
-
-      assertEquals(LIMIT, manager.getLimit());
-
-      wasInvoked = true;
-      TopEntriesCollector lastResult = new TopEntriesCollector(null, 2 * LIMIT);
-      // put more than LIMIT entries. The resultCollector should trim the results
-      for (int i = LIMIT * 2; i >= 0; i--) {
-        lastResult.collect(i, i * 1f);
-      }
-      assertEquals(LIMIT * 2, lastResult.getEntries().getHits().size());
-
-      context.getResultSender().lastResult(lastResult);
-    }
-
-    @Override
-    public String getId() {
-      return LuceneFunction.ID;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/eaa15939/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplIntegrationTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplIntegrationTest.java
new file mode 100644
index 0000000..fa3392c
--- /dev/null
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplIntegrationTest.java
@@ -0,0 +1,292 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.gemstone.gemfire.cache.lucene.internal;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.gemstone.gemfire.cache.Region;
+
+import org.apache.logging.log4j.Logger;
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.core.KeywordAnalyzer;
+import org.apache.lucene.analysis.miscellaneous.PerFieldAnalyzerWrapper;
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.apache.lucene.index.IndexWriter;
+import org.apache.lucene.queryparser.classic.ParseException;
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.ExpectedException;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
+import com.gemstone.gemfire.cache.client.ClientCache;
+import com.gemstone.gemfire.cache.client.ClientCacheFactory;
+import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.lucene.LuceneService;
+import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
+import com.gemstone.gemfire.cache.lucene.internal.distributed.LuceneFunction;
+import com.gemstone.gemfire.cache.lucene.internal.repository.RepositoryManager;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+@Category(IntegrationTest.class)
+public class LuceneServiceImplIntegrationTest {
+
+  Cache cache;
+  ClientCache clientCache;
+  private LuceneIndexImpl repo;
+  private HeterogeneousLuceneSerializer mapper;
+  private StandardAnalyzer analyzer = new StandardAnalyzer();
+  private IndexWriter writer;
+  LuceneServiceImpl service = null;
+  private static final Logger logger = LogService.getLogger();
+
+  @Rule
+  public ExpectedException expectedException = ExpectedException.none();
+
+  @Test
+  public void luceneServiceProviderGetShouldAcceptClientCacheAsAParameter(){
+    clientCache = getClientCache();
+    LuceneService luceneService = LuceneServiceProvider.get(clientCache);
+    assertNotNull(luceneService);
+  }
+
+  // lucene service will register query execution function on initialization
+  @Test
+  public void shouldRegisterQueryFunction() {
+    Function function = FunctionService.getFunction(LuceneFunction.ID);
+    assertNull(function);
+
+    cache = getCache();
+    new LuceneServiceImpl().init(cache);
+
+    function = FunctionService.getFunction(LuceneFunction.ID);
+    assertNotNull(function);
+  }
+
+  @After
+  public void destroyService() {
+    if (null != service) {
+      service = null;
+    }
+  }
+
+  @After
+  public void destroyCache() {
+    if (null != cache && !cache.isClosed()) {
+      cache.close();
+      cache = null;
+    }
+    if (null != clientCache  && !clientCache.isClosed()) {
+      clientCache.close();
+      clientCache = null;
+    }
+  }
+
+  private ClientCache getClientCache() {
+    if (null == clientCache) {
+      clientCache = new ClientCacheFactory().set("mcast-port", "0").create();
+    }
+    else{
+      return clientCache;
+    }
+    return clientCache;
+  }
+
+  private Cache getCache() {
+    if (null == cache) {
+      cache = new CacheFactory().set("mcast-port", "0").create();
+    }
+    return cache;
+  }
+
+  private LuceneService getService() {
+    if (null == cache) {
+      getCache();
+    }
+    if (null == service) {
+      service = (LuceneServiceImpl)LuceneServiceProvider.get(cache);
+    }
+    return service;
+  }
+
+
+  private Region createRegion(String regionName, RegionShortcut shortcut) {
+    return cache.createRegionFactory(shortcut).create(regionName);
+  }
+
+  private LocalRegion createPR(String regionName, boolean isSubRegion) {
+    if (isSubRegion) {
+      LocalRegion root = (LocalRegion) cache.createRegionFactory(RegionShortcut.PARTITION).create("root");
+      LocalRegion region = (LocalRegion) cache.createRegionFactory(RegionShortcut.PARTITION_PERSISTENT).
+        createSubregion(root, regionName);
+      return region;
+    }
+    else {
+      LocalRegion region = (LocalRegion) createRegion(regionName, RegionShortcut.PARTITION_PERSISTENT);
+      return region;
+    }
+  }
+
+  private LocalRegion createRR(String regionName, boolean isSubRegion) {
+    if (isSubRegion) {
+
+      LocalRegion root = (LocalRegion) cache.createRegionFactory(RegionShortcut.REPLICATE).create("root");
+      LocalRegion region = (LocalRegion) cache.createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT).
+        createSubregion(root, regionName);
+      return region;
+    }
+    else {
+      LocalRegion region = (LocalRegion) createRegion(regionName, RegionShortcut.REPLICATE_PERSISTENT);
+      return region;
+    }
+  }
+
+  @Test(expected = IllegalStateException.class)
+  public void cannotCreateLuceneIndexAfterRegionHasBeenCreated() throws IOException, ParseException {
+    getService();
+
+    LocalRegion userRegion = createPR("PR1", false);
+    service.createIndex("index1", "PR1", "field1", "field2", "field3");
+  }
+
+  @Test
+  public void canCreateLuceneIndexForPRWithAnalyzer() throws IOException, ParseException {
+    getService();
+    StandardAnalyzer sa = new StandardAnalyzer();
+    KeywordAnalyzer ka = new KeywordAnalyzer();
+    Map<String, Analyzer> analyzerPerField = new HashMap<String, Analyzer>();
+    analyzerPerField.put("field1", ka);
+    analyzerPerField.put("field2", sa);
+    analyzerPerField.put("field3", sa);
+    //  field2 and field3 will use StandardAnalyzer
+    PerFieldAnalyzerWrapper analyzer2 = new PerFieldAnalyzerWrapper(sa, analyzerPerField);
+
+    service.createIndex("index1", "PR1", analyzerPerField);
+    createPR("PR1", false);
+    LuceneIndexImpl index1 = (LuceneIndexImpl) service.getIndex("index1", "PR1");
+    assertTrue(index1 instanceof LuceneIndexForPartitionedRegion);
+    LuceneIndexForPartitionedRegion index1PR = (LuceneIndexForPartitionedRegion) index1;
+    assertEquals("index1", index1.getName());
+    assertEquals("/PR1", index1.getRegionPath());
+    String[] fields1 = index1.getFieldNames();
+    assertEquals(3, fields1.length);
+    Analyzer analyzer = index1PR.getAnalyzer();
+    assertTrue(analyzer instanceof PerFieldAnalyzerWrapper);
+    RepositoryManager RepositoryManager = index1PR.getRepositoryManager();
+    assertTrue(RepositoryManager != null);
+
+    final String fileRegionName = LuceneServiceImpl.getUniqueIndexName("index1", "/PR1") + ".files";
+    final String chunkRegionName = LuceneServiceImpl.getUniqueIndexName("index1", "/PR1") + ".chunks";
+    PartitionedRegion filePR = (PartitionedRegion) cache.getRegion(fileRegionName);
+    PartitionedRegion chunkPR = (PartitionedRegion) cache.getRegion(chunkRegionName);
+    assertTrue(filePR != null);
+    assertTrue(chunkPR != null);
+  }
+
+  @Test
+  public void cannotCreateLuceneIndexForReplicateRegion() throws IOException, ParseException {
+    expectedException.expect(UnsupportedOperationException.class);
+    expectedException.expectMessage("Lucene indexes on replicated regions are not supported");
+    getService();
+    service.createIndex("index1", "RR1", "field1", "field2", "field3");
+    createRR("RR1", false);
+  }
+
+  @Test
+  public void canCreateIndexForAllNonProxyPartitionRegionTypes() {
+    for (RegionShortcut shortcut : RegionShortcut.values()) {
+      String sname = shortcut.name().toLowerCase();
+      if (sname.contains("partition") && !sname.contains("proxy")) {
+        canCreateLuceneIndexForPRType(shortcut);
+        //Destroying cache and service for now because aeq's are not completely being cleaned up correctly after
+        // being destroyed.  Instead we should close the aeq and clean up any regions associated with this lucene
+        //index but only after aeq destroy works properly
+        destroyCache();
+        destroyService();
+      }
+    }
+  }
+
+  private void canCreateLuceneIndexForPRType(RegionShortcut regionShortcut) {
+    getService();
+    service.createIndex("index1", "PR1", "field1", "field2", "field3");
+    Region region = null;
+    AsyncEventQueueImpl aeq = null;
+    try {
+      region = createRegion("PR1", regionShortcut);
+      LuceneIndexImpl index1 = (LuceneIndexImpl) service.getIndex("index1", "PR1");
+      assertTrue(index1 instanceof LuceneIndexForPartitionedRegion);
+      LuceneIndexForPartitionedRegion index1PR = (LuceneIndexForPartitionedRegion) index1;
+      assertEquals("index1", index1.getName());
+      assertEquals("/PR1", index1.getRegionPath());
+      String[] fields1 = index1.getFieldNames();
+      assertEquals(3, fields1.length);
+      Analyzer analyzer = index1PR.getAnalyzer();
+      assertTrue(analyzer instanceof StandardAnalyzer);
+      RepositoryManager RepositoryManager = index1PR.getRepositoryManager();
+      assertTrue(RepositoryManager != null);
+
+      final String fileRegionName = LuceneServiceImpl.getUniqueIndexName("index1", "/PR1") + ".files";
+      final String chunkRegionName = LuceneServiceImpl.getUniqueIndexName("index1", "/PR1") + ".chunks";
+      PartitionedRegion filePR = (PartitionedRegion) cache.getRegion(fileRegionName);
+      PartitionedRegion chunkPR = (PartitionedRegion) cache.getRegion(chunkRegionName);
+      assertTrue(filePR != null);
+      assertTrue(chunkPR != null);
+
+      String aeqId = LuceneServiceImpl.getUniqueIndexName(index1.getName(), index1.getRegionPath());
+      aeq = (AsyncEventQueueImpl) cache.getAsyncEventQueue(aeqId);
+      assertTrue(aeq != null);
+
+      //Make sure our queue doesn't show up in the list of async event queues
+      assertEquals(Collections.emptySet(), cache.getAsyncEventQueues());
+    }
+    finally {
+      String aeqId = LuceneServiceImpl.getUniqueIndexName("index1", "PR1");
+      PartitionedRegion chunkRegion = (PartitionedRegion) cache.getRegion(aeqId + ".chunks");
+      if (chunkRegion != null) {
+        chunkRegion.destroyRegion();
+      }
+      PartitionedRegion fileRegion = (PartitionedRegion) cache.getRegion(aeqId + ".files");
+      if (fileRegion != null) {
+        fileRegion.destroyRegion();
+      }
+      ((GemFireCacheImpl) cache).removeAsyncEventQueue(aeq);
+      if (aeq != null) {
+        aeq.destroy();
+      }
+      region.destroyRegion();
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/eaa15939/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
deleted file mode 100644
index dec4572..0000000
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.gemstone.gemfire.cache.lucene.internal;
-
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.gemstone.gemfire.cache.Region;
-
-import org.apache.logging.log4j.Logger;
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.core.KeywordAnalyzer;
-import org.apache.lucene.analysis.miscellaneous.PerFieldAnalyzerWrapper;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.queryparser.classic.ParseException;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.ExpectedException;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
-import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.lucene.LuceneService;
-import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
-import com.gemstone.gemfire.cache.lucene.internal.distributed.LuceneFunction;
-import com.gemstone.gemfire.cache.lucene.internal.repository.RepositoryManager;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-@Category(IntegrationTest.class)
-public class LuceneServiceImplJUnitTest {
-
-  Cache cache;
-  ClientCache clientCache;
-  private LuceneIndexImpl repo;
-  private HeterogeneousLuceneSerializer mapper;
-  private StandardAnalyzer analyzer = new StandardAnalyzer();
-  private IndexWriter writer;
-  LuceneServiceImpl service = null;
-  private static final Logger logger = LogService.getLogger();
-
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
-
-  @Test
-  public void luceneServiceProviderGetShouldAcceptClientCacheAsAParameter(){
-    clientCache = getClientCache();
-    LuceneService luceneService = LuceneServiceProvider.get(clientCache);
-    assertNotNull(luceneService);
-  }
-
-  // lucene service will register query execution function on initialization
-  @Test
-  public void shouldRegisterQueryFunction() {
-    Function function = FunctionService.getFunction(LuceneFunction.ID);
-    assertNull(function);
-
-    cache = getCache();
-    new LuceneServiceImpl().init(cache);
-
-    function = FunctionService.getFunction(LuceneFunction.ID);
-    assertNotNull(function);
-  }
-
-  @After
-  public void destroyService() {
-    if (null != service) {
-      service = null;
-    }
-  }
-
-  @After
-  public void destroyCache() {
-    if (null != cache && !cache.isClosed()) {
-      cache.close();
-      cache = null;
-    }
-    if (null != clientCache  && !clientCache.isClosed()) {
-      clientCache.close();
-      clientCache = null;
-    }
-  }
-
-  private ClientCache getClientCache() {
-    if (null == clientCache) {
-      clientCache = new ClientCacheFactory().set("mcast-port", "0").create();
-    }
-    else{
-      return clientCache;
-    }
-    return clientCache;
-  }
-
-  private Cache getCache() {
-    if (null == cache) {
-      cache = new CacheFactory().set("mcast-port", "0").create();
-    }
-    return cache;
-  }
-
-  private LuceneService getService() {
-    if (null == cache) {
-      getCache();
-    }
-    if (null == service) {
-      service = (LuceneServiceImpl)LuceneServiceProvider.get(cache);
-    }
-    return service;
-  }
-
-
-  private Region createRegion(String regionName, RegionShortcut shortcut) {
-    return cache.createRegionFactory(shortcut).create(regionName);
-  }
-
-  private LocalRegion createPR(String regionName, boolean isSubRegion) {
-    if (isSubRegion) {
-      LocalRegion root = (LocalRegion) cache.createRegionFactory(RegionShortcut.PARTITION).create("root");
-      LocalRegion region = (LocalRegion) cache.createRegionFactory(RegionShortcut.PARTITION_PERSISTENT).
-        createSubregion(root, regionName);
-      return region;
-    }
-    else {
-      LocalRegion region = (LocalRegion) createRegion(regionName, RegionShortcut.PARTITION_PERSISTENT);
-      return region;
-    }
-  }
-
-  private LocalRegion createRR(String regionName, boolean isSubRegion) {
-    if (isSubRegion) {
-
-      LocalRegion root = (LocalRegion) cache.createRegionFactory(RegionShortcut.REPLICATE).create("root");
-      LocalRegion region = (LocalRegion) cache.createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT).
-        createSubregion(root, regionName);
-      return region;
-    }
-    else {
-      LocalRegion region = (LocalRegion) createRegion(regionName, RegionShortcut.REPLICATE_PERSISTENT);
-      return region;
-    }
-  }
-
-  @Test(expected = IllegalStateException.class)
-  public void cannotCreateLuceneIndexAfterRegionHasBeenCreated() throws IOException, ParseException {
-    getService();
-
-    LocalRegion userRegion = createPR("PR1", false);
-    service.createIndex("index1", "PR1", "field1", "field2", "field3");
-  }
-
-  @Test
-  public void canCreateLuceneIndexForPRWithAnalyzer() throws IOException, ParseException {
-    getService();
-    StandardAnalyzer sa = new StandardAnalyzer();
-    KeywordAnalyzer ka = new KeywordAnalyzer();
-    Map<String, Analyzer> analyzerPerField = new HashMap<String, Analyzer>();
-    analyzerPerField.put("field1", ka);
-    analyzerPerField.put("field2", sa);
-    analyzerPerField.put("field3", sa);
-    //  field2 and field3 will use StandardAnalyzer
-    PerFieldAnalyzerWrapper analyzer2 = new PerFieldAnalyzerWrapper(sa, analyzerPerField);
-
-    service.createIndex("index1", "PR1", analyzerPerField);
-    createPR("PR1", false);
-    LuceneIndexImpl index1 = (LuceneIndexImpl) service.getIndex("index1", "PR1");
-    assertTrue(index1 instanceof LuceneIndexForPartitionedRegion);
-    LuceneIndexForPartitionedRegion index1PR = (LuceneIndexForPartitionedRegion) index1;
-    assertEquals("index1", index1.getName());
-    assertEquals("/PR1", index1.getRegionPath());
-    String[] fields1 = index1.getFieldNames();
-    assertEquals(3, fields1.length);
-    Analyzer analyzer = index1PR.getAnalyzer();
-    assertTrue(analyzer instanceof PerFieldAnalyzerWrapper);
-    RepositoryManager RepositoryManager = index1PR.getRepositoryManager();
-    assertTrue(RepositoryManager != null);
-
-    final String fileRegionName = LuceneServiceImpl.getUniqueIndexName("index1", "/PR1") + ".files";
-    final String chunkRegionName = LuceneServiceImpl.getUniqueIndexName("index1", "/PR1") + ".chunks";
-    PartitionedRegion filePR = (PartitionedRegion) cache.getRegion(fileRegionName);
-    PartitionedRegion chunkPR = (PartitionedRegion) cache.getRegion(chunkRegionName);
-    assertTrue(filePR != null);
-    assertTrue(chunkPR != null);
-  }
-
-  @Test
-  public void cannotCreateLuceneIndexForReplicateRegion() throws IOException, ParseException {
-    expectedException.expect(UnsupportedOperationException.class);
-    expectedException.expectMessage("Lucene indexes on replicated regions are not supported");
-    getService();
-    service.createIndex("index1", "RR1", "field1", "field2", "field3");
-    createRR("RR1", false);
-  }
-
-  @Test
-  public void canCreateIndexForAllNonProxyPartitionRegionTypes() {
-    for (RegionShortcut shortcut : RegionShortcut.values()) {
-      String sname = shortcut.name().toLowerCase();
-      if (sname.contains("partition") && !sname.contains("proxy")) {
-        canCreateLuceneIndexForPRType(shortcut);
-        //Destroying cache and service for now because aeq's are not completely being cleaned up correctly after
-        // being destroyed.  Instead we should close the aeq and clean up any regions associated with this lucene
-        //index but only after aeq destroy works properly
-        destroyCache();
-        destroyService();
-      }
-    }
-  }
-
-  private void canCreateLuceneIndexForPRType(RegionShortcut regionShortcut) {
-    getService();
-    service.createIndex("index1", "PR1", "field1", "field2", "field3");
-    Region region = null;
-    AsyncEventQueueImpl aeq = null;
-    try {
-      region = createRegion("PR1", regionShortcut);
-      LuceneIndexImpl index1 = (LuceneIndexImpl) service.getIndex("index1", "PR1");
-      assertTrue(index1 instanceof LuceneIndexForPartitionedRegion);
-      LuceneIndexForPartitionedRegion index1PR = (LuceneIndexForPartitionedRegion) index1;
-      assertEquals("index1", index1.getName());
-      assertEquals("/PR1", index1.getRegionPath());
-      String[] fields1 = index1.getFieldNames();
-      assertEquals(3, fields1.length);
-      Analyzer analyzer = index1PR.getAnalyzer();
-      assertTrue(analyzer instanceof StandardAnalyzer);
-      RepositoryManager RepositoryManager = index1PR.getRepositoryManager();
-      assertTrue(RepositoryManager != null);
-
-      final String fileRegionName = LuceneServiceImpl.getUniqueIndexName("index1", "/PR1") + ".files";
-      final String chunkRegionName = LuceneServiceImpl.getUniqueIndexName("index1", "/PR1") + ".chunks";
-      PartitionedRegion filePR = (PartitionedRegion) cache.getRegion(fileRegionName);
-      PartitionedRegion chunkPR = (PartitionedRegion) cache.getRegion(chunkRegionName);
-      assertTrue(filePR != null);
-      assertTrue(chunkPR != null);
-
-      String aeqId = LuceneServiceImpl.getUniqueIndexName(index1.getName(), index1.getRegionPath());
-      aeq = (AsyncEventQueueImpl) cache.getAsyncEventQueue(aeqId);
-      assertTrue(aeq != null);
-
-      //Make sure our queue doesn't show up in the list of async event queues
-      assertEquals(Collections.emptySet(), cache.getAsyncEventQueues());
-    }
-    finally {
-      String aeqId = LuceneServiceImpl.getUniqueIndexName("index1", "PR1");
-      PartitionedRegion chunkRegion = (PartitionedRegion) cache.getRegion(aeqId + ".chunks");
-      if (chunkRegion != null) {
-        chunkRegion.destroyRegion();
-      }
-      PartitionedRegion fileRegion = (PartitionedRegion) cache.getRegion(aeqId + ".files");
-      if (fileRegion != null) {
-        fileRegion.destroyRegion();
-      }
-      ((GemFireCacheImpl) cache).removeAsyncEventQueue(aeq);
-      if (aeq != null) {
-        aeq.destroy();
-      }
-      region.destroyRegion();
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/eaa15939/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserJUnitTest.java
index cae2142..c3e9c0e 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserJUnitTest.java
@@ -30,10 +30,14 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.mockito.Mockito;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
 
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.internal.cache.extension.SimpleExtensionPoint;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
+import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.RegionCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.XmlGeneratorUtils;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
@@ -50,8 +54,13 @@ public class LuceneIndexXmlParserJUnitTest {
   @Before
   public void setUp() {
     this.parser = new LuceneXmlParser();
-    CacheCreation cache = new CacheCreation();
-    this.rc = new RegionCreation(cache, "region");
+    CacheCreation cache = Mockito.mock(CacheCreation.class);
+    RegionCreation regionCreation = Mockito.mock(RegionCreation.class);
+    RegionAttributesCreation rac = Mockito.mock(RegionAttributesCreation.class);
+    Mockito.when(regionCreation.getFullPath()).thenReturn("/region");
+    Mockito.when(regionCreation.getAttributes()).thenReturn(rac);
+    Mockito.when(regionCreation.getExtensionPoint()).thenReturn(new SimpleExtensionPoint(this.rc,this.rc));
+    this.rc = regionCreation;
     this.stack = new Stack<Object>();
     stack.push(cache);
     stack.push(rc);


[17/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/OperationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/OperationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/OperationJUnitTest.java
index 4f23a89..f4bb936 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/OperationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/OperationJUnitTest.java
@@ -16,33 +16,20 @@
  */
 package com.gemstone.gemfire.cache;
 
-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.cache.Operation;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
-public class OperationJUnitTest extends TestCase {
-  public OperationJUnitTest(String name) {
-    super(name);
-  }
-
-  public OperationJUnitTest() {
-    // TODO Auto-generated constructor stub
-  }
-
-  protected void setUp() throws Exception {
-    super.setUp();
-  }
+public class OperationJUnitTest {
 
-  protected void tearDown() throws Exception {
-    super.tearDown();
-  }
   /**
    * Check CREATE Operation.
    */
+  @Test
   public void testCREATE() {
     Operation op = Operation.CREATE;
     assertTrue(op.isCreate());
@@ -64,9 +51,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check PUTALL_CREATE Operation.
    */
+  @Test
   public void testPUTALL_CREATE() {
     Operation op = Operation.PUTALL_CREATE;
     assertTrue(op.isCreate());
@@ -88,9 +77,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check SEARCH_CREATE Operation.
    */
+  @Test
   public void testSEARCH_CREATE() {
     Operation op = Operation.SEARCH_CREATE;
     assertTrue(op.isCreate());
@@ -112,9 +103,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check LOCAL_LOAD_CREATE Operation.
    */
+  @Test
   public void testLOCAL_LOAD_CREATE() {
     Operation op = Operation.LOCAL_LOAD_CREATE;
     assertTrue(op.isCreate());
@@ -136,9 +129,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check NET_LOAD_CREATE Operation.
    */
+  @Test
   public void testNET_LOAD_CREATE() {
     Operation op = Operation.NET_LOAD_CREATE;
     assertTrue(op.isCreate());
@@ -160,9 +155,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check UPDATE Operation.
    */
+  @Test
   public void testUPDATE() {
     Operation op = Operation.UPDATE;
     assertFalse(op.isCreate());
@@ -184,9 +181,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check PUTALL_UPDATE Operation.
    */
+  @Test
   public void testPUTALL_UPDATE() {
     Operation op = Operation.PUTALL_UPDATE;
     assertFalse(op.isCreate());
@@ -208,9 +207,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check SEARCH_UPDATE Operation.
    */
+  @Test
   public void testSEARCH_UPDATE() {
     Operation op = Operation.SEARCH_UPDATE;
     assertFalse(op.isCreate());
@@ -232,9 +233,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check LOCAL_LOAD_UPDATE Operation.
    */
+  @Test
   public void testLOCAL_LOAD_UPDATE() {
     Operation op = Operation.LOCAL_LOAD_UPDATE;
     assertFalse(op.isCreate());
@@ -256,9 +259,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check NET_LOAD_UPDATE Operation.
    */
+  @Test
   public void testNET_LOAD_UPDATE() {
     Operation op = Operation.NET_LOAD_UPDATE;
     assertFalse(op.isCreate());
@@ -280,9 +285,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check INVALIDATE Operation.
    */
+  @Test
   public void testINVALIDATE() {
     Operation op = Operation.INVALIDATE;
     assertFalse(op.isCreate());
@@ -304,9 +311,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check LOCAL_INVALIDATE Operation.
    */
+  @Test
   public void testLOCAL_INVALIDATE() {
     Operation op = Operation.LOCAL_INVALIDATE;
     assertFalse(op.isCreate());
@@ -328,9 +337,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check DESTROY Operation.
    */
+  @Test
   public void testDESTROY() {
     Operation op = Operation.DESTROY;
     assertFalse(op.isCreate());
@@ -352,9 +363,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REMOVEALL Operation.
    */
+  @Test
   public void testREMOVEALL() {
     Operation op = Operation.REMOVEALL_DESTROY;
     assertFalse(op.isCreate());
@@ -377,9 +390,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check LOCAL_DESTROY Operation.
    */
+  @Test
   public void testLOCAL_DESTROY() {
     Operation op = Operation.LOCAL_DESTROY;
     assertFalse(op.isCreate());
@@ -401,9 +416,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check EVICT_DESTROY Operation.
    */
+  @Test
   public void testEVICT_DESTROY() {
     Operation op = Operation.EVICT_DESTROY;
     assertFalse(op.isCreate());
@@ -425,9 +442,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_LOAD_SNAPSHOT Operation.
    */
+  @Test
   public void testREGION_LOAD_SNAPSHOT() {
     Operation op = Operation.REGION_LOAD_SNAPSHOT;
     assertFalse(op.isCreate());
@@ -449,9 +468,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_LOCAL_DESTROY Operation.
    */
+  @Test
   public void testREGION_LOCAL_DESTROY() {
     Operation op = Operation.REGION_LOCAL_DESTROY;
     assertFalse(op.isCreate());
@@ -473,9 +494,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_CREATE Operation.
    */
+  @Test
   public void testREGION_CREATE() {
     Operation op = Operation.REGION_CREATE;
     assertFalse(op.isCreate());
@@ -497,9 +520,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_CLOSE Operation.
    */
+  @Test
   public void testREGION_CLOSE() {
     Operation op = Operation.REGION_CLOSE;
     assertFalse(op.isCreate());
@@ -521,9 +546,11 @@ public class OperationJUnitTest extends TestCase {
     assertTrue(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_DESTROY Operation.
    */
+  @Test
   public void testREGION_DESTROY() {
     Operation op = Operation.REGION_DESTROY;
     assertFalse(op.isCreate());
@@ -545,9 +572,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check EXPIRE_DESTROY Operation.
    */
+  @Test
   public void testEXPIRE_DESTROY() {
     Operation op = Operation.EXPIRE_DESTROY;
     assertFalse(op.isCreate());
@@ -569,9 +598,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check EXPIRE_LOCAL_DESTROY Operation.
    */
+  @Test
   public void testEXPIRE_LOCAL_DESTROY() {
     Operation op = Operation.EXPIRE_LOCAL_DESTROY;
     assertFalse(op.isCreate());
@@ -593,9 +624,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check EXPIRE_INVALIDATE Operation.
    */
+  @Test
   public void testEXPIRE_INVALIDATE() {
     Operation op = Operation.EXPIRE_INVALIDATE;
     assertFalse(op.isCreate());
@@ -617,9 +650,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check EXPIRE_LOCAL_INVALIDATE Operation.
    */
+  @Test
   public void testEXPIRE_LOCAL_INVALIDATE() {
     Operation op = Operation.EXPIRE_LOCAL_INVALIDATE;
     assertFalse(op.isCreate());
@@ -641,9 +676,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_EXPIRE_DESTROY Operation.
    */
+  @Test
   public void testREGION_EXPIRE_DESTROY() {
     Operation op = Operation.REGION_EXPIRE_DESTROY;
     assertFalse(op.isCreate());
@@ -665,9 +702,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_EXPIRE_LOCAL_DESTROY Operation.
    */
+  @Test
   public void testREGION_EXPIRE_LOCAL_DESTROY() {
     Operation op = Operation.REGION_EXPIRE_LOCAL_DESTROY;
     assertFalse(op.isCreate());
@@ -689,9 +728,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_EXPIRE_INVALIDATE Operation.
    */
+  @Test
   public void testREGION_EXPIRE_INVALIDATE() {
     Operation op = Operation.REGION_EXPIRE_INVALIDATE;
     assertFalse(op.isCreate());
@@ -713,9 +754,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_EXPIRE_LOCAL_INVALIDATE Operation.
    */
+  @Test
   public void testREGION_EXPIRE_LOCAL_INVALIDATE() {
     Operation op = Operation.REGION_EXPIRE_LOCAL_INVALIDATE;
     assertFalse(op.isCreate());
@@ -737,9 +780,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_LOCAL_INVALIDATE Operation.
    */
+  @Test
   public void testREGION_LOCAL_INVALIDATE() {
     Operation op = Operation.REGION_LOCAL_INVALIDATE;
     assertFalse(op.isCreate());
@@ -761,9 +806,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_INVALIDATE Operation.
    */
+  @Test
   public void testREGION_INVALIDATE() {
     Operation op = Operation.REGION_INVALIDATE;
     assertFalse(op.isCreate());
@@ -777,17 +824,19 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isLocal());
     assertTrue(op.isDistributed());
     assertFalse(op.isEntry());
+    assertFalse(op.isClose());
     assertFalse(op.isExpiration());
     assertFalse(op.isLocalLoad());
     assertFalse(op.isNetLoad());
     assertFalse(op.isLoad());
     assertFalse(op.isNetSearch());
-    assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_CLEAR Operation.
    */
+  @Test
   public void testREGION_CLEAR() {
     Operation op = Operation.REGION_CLEAR;
     assertFalse(op.isCreate());
@@ -809,9 +858,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertTrue(op.isClear());
   }
+
   /**
    * Check REGION_LOCAL_CLEAR Operation.
    */
+  @Test
   public void testREGION_LOCAL_CLEAR() {
     Operation op = Operation.REGION_LOCAL_CLEAR;
     assertFalse(op.isCreate());
@@ -833,9 +884,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertTrue(op.isClear());
   }
+
   /**
    * Check CACHE_CREATE Operation
    */
+  @Test
   public void testCACHE_CREATE() {
     Operation op = Operation.CACHE_CREATE;
     assertFalse(op.isCreate());
@@ -857,9 +910,11 @@ public class OperationJUnitTest extends TestCase {
     assertFalse(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check CACHE_CLOSE Operation.
    */
+  @Test
   public void testCACHE_CLOSE() {
     Operation op = Operation.CACHE_CLOSE;
     assertFalse(op.isCreate());
@@ -881,9 +936,11 @@ public class OperationJUnitTest extends TestCase {
     assertTrue(op.isClose());
     assertFalse(op.isClear());
   }
+
   /**
    * Check REGION_REINITIALIZE Operation.
    */
+  @Test
   public void testREGION_REINITIALIZE() {
     Operation op = Operation.REGION_REINITIALIZE;
     assertFalse(op.isCreate());
@@ -909,6 +966,7 @@ public class OperationJUnitTest extends TestCase {
   /**
    * Check UPDATE_VERSION Operation.
    */
+  @Test
   public void testUPDATE_VERSION() {
     Operation op = Operation.UPDATE_VERSION_STAMP;
     assertFalse(op.isCreate());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/RoleExceptionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/RoleExceptionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/RoleExceptionJUnitTest.java
index 42c146f..61d550b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/RoleExceptionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/RoleExceptionJUnitTest.java
@@ -16,35 +16,27 @@
  */
 package com.gemstone.gemfire.cache;
 
+import static org.junit.Assert.*;
+
 import java.io.*;
 import java.util.*;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.distributed.internal.membership.InternalRole;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/** Tests the subclasses of RoleException to make sure they are Serializable */
+/**
+ * Tests the subclasses of RoleException to make sure they are Serializable
+ */
 @Category(UnitTest.class)
-public class RoleExceptionJUnitTest extends TestCase {
+public class RoleExceptionJUnitTest {
   
-  public RoleExceptionJUnitTest(String name) {
-    super(name);
-  }
-
-  protected void setUp() throws Exception {
-    super.setUp();
-  }
-
-  protected void tearDown() throws Exception {
-    super.tearDown();
-  }
-
   /**
    * Assert that RegionAccessException is serializable.
    */
+  @Test
   public void testRegionAccessExceptionIsSerializable() throws Exception {
     RegionAccessException out = createRegionAccessException();
     ByteArrayOutputStream baos = new ByteArrayOutputStream(100);
@@ -65,6 +57,7 @@ public class RoleExceptionJUnitTest extends TestCase {
   /**
    * Assert that RegionDistributionException is serializable.
    */
+  @Test
   public void testRegionDistributionExceptionIsSerializable() throws Exception {
     RegionDistributionException out = createRegionDistributionException();
     ByteArrayOutputStream baos = new ByteArrayOutputStream(100);
@@ -85,6 +78,7 @@ public class RoleExceptionJUnitTest extends TestCase {
   /**
    * Assert that CommitDistributionException is serializable.
    */
+  @Test
   public void testCommitDistributionExceptionIsSerializable() throws Exception {
     String s = "MyString";
     Set outExceptions = new HashSet();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/OpExecutorImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/OpExecutorImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/OpExecutorImplJUnitTest.java
index 8171c67..6e370cd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/OpExecutorImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/OpExecutorImplJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.cache.client.internal;
 
+import static org.junit.Assert.*;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -28,8 +30,8 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ScheduledExecutorService;
 
-import junit.framework.TestCase;
-
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.CancelCriterion;
@@ -46,11 +48,9 @@ import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- *
- */
 @Category(UnitTest.class)
-public class OpExecutorImplJUnitTest extends TestCase {
+public class OpExecutorImplJUnitTest {
+
   DummyManager manager;
   private LogWriter logger;
   private DummyEndpointManager endpointManager;
@@ -65,7 +65,8 @@ public class OpExecutorImplJUnitTest extends TestCase {
   protected int getPrimary;
   protected int getBackups;
   private CancelCriterion cancelCriterion;
-  
+
+  @Before
   public void setUp() {
     this.logger = new LocalLogWriter(InternalLogWriter.FINEST_LEVEL, System.out);
     this.endpointManager = new DummyEndpointManager();
@@ -74,22 +75,23 @@ public class OpExecutorImplJUnitTest extends TestCase {
     riTracker = new RegisterInterestTracker();
     cancelCriterion = new CancelCriterion() {
 
+      @Override
       public String cancelInProgress() {
         return null;
       }
 
+      @Override
       public RuntimeException generateCancelledException(Throwable e) {
         return null;
       }
     };
   }
   
-  public void tearDown() throws InterruptedException {
-  }
-  
+  @Test
   public void testExecute() throws Exception {
     OpExecutorImpl exec = new OpExecutorImpl(manager, queueManager, endpointManager, riTracker, 3, 10, false, cancelCriterion, null);
     Object result = exec.execute(new Op() {
+      @Override
       public Object attempt(Connection cnx) throws Exception {
         return "hello";
       }
@@ -108,6 +110,7 @@ public class OpExecutorImplJUnitTest extends TestCase {
     
     try {
     result = exec.execute(new Op() {
+      @Override
       public Object attempt(Connection cnx) throws Exception {
         throw new SocketTimeoutException();
       }
@@ -130,6 +133,7 @@ public class OpExecutorImplJUnitTest extends TestCase {
     
     try {
       result = exec.execute(new Op() {
+        @Override
         public Object attempt(Connection cnx) throws Exception {
           throw new ServerOperationException("Something didn't work");
         }
@@ -151,6 +155,7 @@ public class OpExecutorImplJUnitTest extends TestCase {
     
     try {
       result = exec.execute(new Op() {
+        @Override
         public Object attempt(Connection cnx) throws Exception {
           throw new IOException("Something didn't work");
         }
@@ -179,13 +184,15 @@ public class OpExecutorImplJUnitTest extends TestCase {
     getPrimary = 0;
     getBackups = 0;
   }
-  
+
+  @Test
   public void testExecuteOncePerServer() throws Exception {
     OpExecutorImpl exec = new OpExecutorImpl(manager, queueManager, endpointManager, riTracker, -1, 10, false, cancelCriterion, null);
     
     manager.numServers = 5;
     try {
       exec.execute(new Op() {
+        @Override
         public Object attempt(Connection cnx) throws Exception {
           throw new IOException("Something didn't work");
         }
@@ -204,13 +211,15 @@ public class OpExecutorImplJUnitTest extends TestCase {
     assertEquals(6, invalidateConnections);
     assertEquals(6, serverCrashes);
   }
-  
+
+  @Test
   public void testRetryFailedServers() throws Exception {
     OpExecutorImpl exec = new OpExecutorImpl(manager, queueManager, endpointManager, riTracker, 10, 10, false, cancelCriterion, null);
     
     manager.numServers = 5;
     try {
       exec.execute(new Op() {
+        @Override
         public Object attempt(Connection cnx) throws Exception {
           throw new IOException("Something didn't work");
         }
@@ -230,10 +239,12 @@ public class OpExecutorImplJUnitTest extends TestCase {
     assertEquals(11, serverCrashes);
   }
 
+  @Test
   public void testExecuteOn() throws Exception {
     OpExecutorImpl exec = new OpExecutorImpl(manager,queueManager, endpointManager, riTracker, 3, 10, false, cancelCriterion, null);
     ServerLocation server = new ServerLocation("localhost", -1);
     Object result = exec.executeOn(server, new Op() {
+      @Override
       public Object attempt(Connection cnx) throws Exception {
         return "hello";
       }
@@ -252,6 +263,7 @@ public class OpExecutorImplJUnitTest extends TestCase {
     
     try {
     result = exec.executeOn(server, new Op() {
+      @Override
       public Object attempt(Connection cnx) throws Exception {
         throw new SocketTimeoutException();
       }
@@ -273,6 +285,7 @@ public class OpExecutorImplJUnitTest extends TestCase {
     
     try {
       result = exec.executeOn(server,new Op() {
+        @Override
         public Object attempt(Connection cnx) throws Exception {
           throw new ServerOperationException("Something didn't work");
         }
@@ -301,6 +314,7 @@ public class OpExecutorImplJUnitTest extends TestCase {
       logger.info(addExpected);
       try {
         result = exec.executeOn(server,new Op() {
+          @Override
             public Object attempt(Connection cnx) throws Exception {
               throw new Exception("Something didn't work");
             }
@@ -321,10 +335,12 @@ public class OpExecutorImplJUnitTest extends TestCase {
     assertEquals(1, invalidateConnections);
     assertEquals(1, serverCrashes);
   }
-  
+
+  @Test
   public void testExecuteOnAllQueueServers() {
     OpExecutorImpl exec = new OpExecutorImpl(manager,queueManager, endpointManager, riTracker, 3, 10, false, cancelCriterion, null);
     exec.executeOnAllQueueServers(new Op() {
+      @Override
       public Object attempt(Connection cnx) throws Exception {
         return "hello";
       }
@@ -342,6 +358,7 @@ public class OpExecutorImplJUnitTest extends TestCase {
     
     queueManager.backups = 3;
     exec.executeOnAllQueueServers(new Op() {
+      @Override
       public Object attempt(Connection cnx) throws Exception {
         throw new SocketTimeoutException();
       }
@@ -361,6 +378,7 @@ public class OpExecutorImplJUnitTest extends TestCase {
     queueManager.backups = 3;
     Object result = exec.executeOnQueuesAndReturnPrimaryResult(new Op() {
       int i = 0;
+      @Override
       public Object attempt(Connection cnx) throws Exception {
         i++;
         if(i < 15) {
@@ -382,10 +400,12 @@ public class OpExecutorImplJUnitTest extends TestCase {
     
   }
 
+  @Test
   public void testThreadLocalConnection() {
     OpExecutorImpl exec = new OpExecutorImpl(manager,queueManager, endpointManager, riTracker, 3, 10, true, cancelCriterion, null);
     ServerLocation server = new ServerLocation("localhost", -1);
     Op op = new Op() {
+      @Override
       public Object attempt(Connection cnx) throws Exception {
         //do nothing
         return cnx;
@@ -417,21 +437,19 @@ public class OpExecutorImplJUnitTest extends TestCase {
     assertEquals(0, returns);
   }
   
-  public class DummyManager implements ConnectionManager {
+  private class DummyManager implements ConnectionManager {
+
     protected int numServers  = Integer.MAX_VALUE;
     private int currentServer = 0;
 
-    
     public DummyManager() {
     }
-    
-    
 
+    @Override
     public void emergencyClose() {
     }
 
-
-
+    @Override
     public Connection borrowConnection(long aquireTimeout) {
       borrows++;
       return new DummyConnection(new ServerLocation("localhost", currentServer++ % numServers));
@@ -440,180 +458,217 @@ public class OpExecutorImplJUnitTest extends TestCase {
     /* (non-Javadoc)
      * @see com.gemstone.gemfire.cache.client.internal.pooling.ConnectionManager#borrowConnection(com.gemstone.gemfire.distributed.internal.ServerLocation, long)
      */
+    @Override
     public Connection borrowConnection(ServerLocation server, long aquireTimeout,boolean onlyUseExistingCnx) {
       borrows++;
       return new DummyConnection(server);
     }
 
+    @Override
     public void close(boolean keepAlive) {
-      
-    }
-
-    public Map getEndpointMap() {
-      return null;
     }
 
+    @Override
     public void returnConnection(Connection connection) {
       returns++;
       
     }
+
+    @Override
     public void returnConnection(Connection connection, boolean accessed) {
       returns++;
       
     }
 
+    @Override
     public void start(ScheduledExecutorService backgroundProcessor) {
     }
 
-    public Connection exchangeConnection(Connection conn, Set excludedServers,
-        long aquireTimeout) {
+    @Override
+    public Connection exchangeConnection(Connection conn, Set excludedServers, long aquireTimeout) {
       if(excludedServers.size() >= numServers) {
         throw new NoAvailableServersException();
       }
       exchanges++;
       return new DummyConnection(new ServerLocation("localhost", currentServer++ % numServers));
     }
+
+    @Override
     public int getConnectionCount() {
       return 0;
     }
+
+    @Override
     public Connection getConnection(Connection conn) {
       return conn;
     }
-    public void activate(Connection conn) {}
-    public void passivate(Connection conn, boolean accessed) {}
+
+    @Override
+    public void activate(Connection conn) {
+    }
+
+    @Override
+    public void passivate(Connection conn, boolean accessed) {
+    }
   }
   
-  public class DummyConnection implements Connection {
+  private class DummyConnection implements Connection {
     
     private ServerLocation server;
 
     public DummyConnection(ServerLocation serverLocation) {
       this.server = serverLocation;
     }
+
+    @Override
     public void close(boolean keepAlive) throws Exception {
     }
+
+    @Override
     public void destroy() {
       invalidateConnections++;
     }
+
+    @Override
     public boolean isDestroyed() {
       return false;
     }
+
+    @Override
     public ByteBuffer getCommBuffer() {
       return null;
     }
 
+    @Override
     public ServerLocation getServer() {
       return server;
     }
 
+    @Override
     public Socket getSocket() {
       return null;
     }
 
+    @Override
     public ConnectionStats getStats() {
       return null;
     }
-    
+
+    @Override
     public int getDistributedSystemId() {
       return 0;
     }
 
-
+    @Override
     public Endpoint getEndpoint() {
       return new Endpoint(null,null,null,null, null);
     }
 
-    public void setEndpoint(Endpoint endpoint) {
-    }
-
+    @Override
     public ServerQueueStatus getQueueStatus() {
       return null;
     }
 
+    @Override
     public Object execute(Op op) throws Exception {
       return op.attempt(this);
     }
-    
+
+    @Override
     public void emergencyClose() {
     }
-    
+
+    @Override
     public short getWanSiteVersion(){
       return -1;
     }
-    
+
+    @Override
     public void setWanSiteVersion(short wanSiteVersion){
     }
+
+    @Override
     public InputStream getInputStream() {
       return null;
     }
+
+    @Override
     public OutputStream getOutputStream() {
       return null;
-    } 
+    }
+
+    @Override
     public void setConnectionID(long id) {
     }
+
+    @Override
     public long getConnectionID() {
       return 0;
     }
   }
   
-    
-  public class DummyEndpointManager implements EndpointManager {
-
-    
+  private class DummyEndpointManager implements EndpointManager {
 
+    @Override
     public void addListener(EndpointListener listener) {
     }
 
+    @Override
     public void close() {
     }
 
+    @Override
     public Endpoint referenceEndpoint(ServerLocation server, DistributedMember memberId) {
       return null;
     }
 
+    @Override
     public Map getEndpointMap() {
       return null;
     }
 
+    @Override
     public void removeListener(EndpointListener listener) {
-      
     }
 
+    @Override
     public void serverCrashed(Endpoint endpoint) {
       serverCrashes++;
     }
+
+    @Override
     public int getConnectedServerCount() {
       return 0;
     }
 
-    public void fireEndpointNowInUse(Endpoint endpoint) {
-      // TODO Auto-generated method stub
-      
-    }
-
+    @Override
     public Map getAllStats() {
       return null;
     }
 
+    @Override
     public String getPoolName() {
       return null;
     }
   }
   
-  public class DummyQueueManager implements QueueManager {
+  private class DummyQueueManager implements QueueManager {
+
     int backups = 0;
     int currentServer = 0;
+
     public QueueConnections getAllConnectionsNoWait() {
       return getAllConnections();
     }
-    
+
+    @Override
     public void emergencyClose() {
     }
 
-
-
+    @Override
     public QueueConnections getAllConnections() {
       return new QueueConnections() {
+        @Override
         public List getBackups() {
           getBackups++;
           ArrayList result = new ArrayList(backups);
@@ -622,41 +677,47 @@ public class OpExecutorImplJUnitTest extends TestCase {
           }
           return result;
         }
+        @Override
         public Connection getPrimary() {
           getPrimary++;
           return new DummyConnection(new ServerLocation("localhost", currentServer++));
         }
+        @Override
         public QueueConnectionImpl getConnection(Endpoint ep) {
           return null;
         }
       };
     }
 
+    @Override
     public void close(boolean keepAlive) {
     }
 
+    @Override
     public void start(ScheduledExecutorService background) {
     }
-    
-    
+
+    @Override
     public QueueState getState() {
       return null;
     }
 
+    @Override
     public InternalPool getPool() {
       return null;
     }
 
+    @Override
     public void readyForEvents(InternalDistributedSystem system) {
     }
-    
+
+    @Override
     public InternalLogWriter getSecurityLogger() {
       return null;
     }
 
+    @Override
     public void checkEndpoint(ClientUpdater qc, Endpoint endpoint) {
-      // 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/cache/client/internal/ServerBlackListJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ServerBlackListJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ServerBlackListJUnitTest.java
index 8a9d7a1..e9e50c2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ServerBlackListJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ServerBlackListJUnitTest.java
@@ -28,21 +28,17 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
 import com.gemstone.gemfire.cache.client.internal.ServerBlackList.BlackListListenerAdapter;
 import com.gemstone.gemfire.cache.client.internal.ServerBlackList.FailureTracker;
 import com.gemstone.gemfire.distributed.internal.ServerLocation;
 import com.gemstone.gemfire.internal.util.StopWatch;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- *
- */
 @Category(UnitTest.class)
 public class ServerBlackListJUnitTest {
   
   private ScheduledExecutorService background;
-  protected ServerBlackList blackList;
+  private ServerBlackList blackList;
 
   @Before
   public void setUp()  throws Exception {
@@ -67,12 +63,8 @@ public class ServerBlackListJUnitTest {
     assertEquals(Collections.singleton(location1),  blackList.getBadServers());
     
     boolean done = false;
-    try {
-      for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 10000; done = (blackList.getBadServers().size() == 0)) {
-        Thread.sleep(200);
-      }
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
+    for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 10000; done = (blackList.getBadServers().size() == 0)) {
+      Thread.sleep(200);
     }
     assertTrue("blackList still has bad servers", done);
     
@@ -81,15 +73,16 @@ public class ServerBlackListJUnitTest {
 
   @Test
   public void testListener()  throws Exception {
-    
     final AtomicInteger adds = new AtomicInteger();
     final AtomicInteger removes = new AtomicInteger();
     blackList.addListener(new BlackListListenerAdapter() {
 
+      @Override
       public void serverAdded(ServerLocation location) {
         adds.incrementAndGet();
       }
 
+      @Override
       public void serverRemoved(ServerLocation location) {
         removes.incrementAndGet();
       }
@@ -107,12 +100,8 @@ public class ServerBlackListJUnitTest {
     assertEquals(0, removes.get());
     
     boolean done = false;
-    try {
-      for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 10000; done = (removes.get() != 0)) {
-        Thread.sleep(200);
-      }
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
+    for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 10000; done = (removes.get() != 0)) {
+      Thread.sleep(200);
     }
     assertTrue("removes still empty", done);
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/locator/LocatorStatusResponseJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/locator/LocatorStatusResponseJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/locator/LocatorStatusResponseJUnitTest.java
index f7a960b..165dcd4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/locator/LocatorStatusResponseJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/locator/LocatorStatusResponseJUnitTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.cache.client.internal.locator;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
index 6360d59..fc06afd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
@@ -448,8 +448,8 @@ public class ConnectionManagerJUnitTest {
     
 //     //wait to make sure checked out connections aren't timed out
 //     Thread.sleep(idleTimeout + 100);
-//     Assert.assertEquals(5,factory.creates);
-//     Assert.assertEquals(0,factory.destroys);
+//     Assert.assertIndexDetailsEquals(5,factory.creates);
+//     Assert.assertIndexDetailsEquals(0,factory.destroys);
     
 //     manager.returnConnection(conn1);
 //     manager.returnConnection(conn2);
@@ -468,8 +468,8 @@ public class ConnectionManagerJUnitTest {
 //     long elapsed = System.currentTimeMillis() - start;
 //     Assert.assertTrue(elapsed > idleTimeout);
     
-//     Assert.assertEquals(5,factory.creates);
-//     Assert.assertEquals(3,factory.destroys);
+//     Assert.assertIndexDetailsEquals(5,factory.creates);
+//     Assert.assertIndexDetailsEquals(3,factory.destroys);
   }
   
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java
index 9f57fc0..b8d5008 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java
@@ -474,7 +474,7 @@ public class ResourceManagerDUnitTest extends CacheTestCase {
                     primaryCount++;
                   }
                 }
-                //assertEquals(memberSizes[membersIdx] * (1024* 1024), 
+                //assertIndexDetailsEquals(memberSizes[membersIdx] * (1024* 1024),
                 //             totalBucketBytes);
                 assertEquals(memberPrimaryCounts[membersIdx], primaryCount);
                 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/PutOperationContextJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/PutOperationContextJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/PutOperationContextJUnitTest.java
index 7b265f9..8df44ea 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/PutOperationContextJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/PutOperationContextJUnitTest.java
@@ -16,24 +16,13 @@
  */
 package com.gemstone.gemfire.cache.operations;
 
-import static org.junit.Assert.*;
-import static org.junit.matchers.JUnitMatchers.*;
-
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
-import java.util.Properties;
 
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
-import org.junit.matchers.JUnitMatchers;
-import org.junit.rules.ExpectedException;
 
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.Cache;
@@ -42,30 +31,11 @@ import com.gemstone.gemfire.pdx.PdxInstance;
 import com.gemstone.gemfire.pdx.PdxReader;
 import com.gemstone.gemfire.pdx.PdxSerializable;
 import com.gemstone.gemfire.pdx.PdxWriter;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class PutOperationContextJUnitTest {
 
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
-  
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception {
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception {
-  }
-
-  @Before
-  public void setUp() throws Exception {
-  }
-
-  @After
-  public void tearDown() throws Exception {
-  }
-
   @Test
   public void testGetSerializedValue() throws IOException {
     {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
index 00aa506..57b481f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
@@ -16,57 +16,24 @@
  */
 package com.gemstone.gemfire.cache.operations.internal;
 
-import static org.junit.Assert.*;
-import static org.junit.matchers.JUnitMatchers.*;
-
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
-import java.util.Properties;
 
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
-import org.junit.matchers.JUnitMatchers;
-import org.junit.rules.ExpectedException;
 
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.cache.operations.PutOperationContextJUnitTest;
 import com.gemstone.gemfire.pdx.PdxInstance;
-import com.gemstone.gemfire.pdx.PdxReader;
-import com.gemstone.gemfire.pdx.PdxSerializable;
-import com.gemstone.gemfire.pdx.PdxWriter;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class GetOperationContextImplJUnitTest {
 
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
-  
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception {
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception {
-  }
-
-  @Before
-  public void setUp() throws Exception {
-  }
-
-  @After
-  public void tearDown() throws Exception {
-  }
-
   @Test
   public void testGetSerializedValue() throws IOException {
     {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/partition/PartitionRegionHelperDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/partition/PartitionRegionHelperDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/partition/PartitionRegionHelperDUnitTest.java
index d09c6e0..6910089 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/partition/PartitionRegionHelperDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/partition/PartitionRegionHelperDUnitTest.java
@@ -115,7 +115,7 @@ public class PartitionRegionHelperDUnitTest extends CacheTestCase {
           //when we get to the last bucket, which should be primary on that node, we
           //don't even put a copy of the bucket on that node
           // See bug #40470
-//          assertEquals(4, member.getPrimaryCount());
+//          assertIndexDetailsEquals(4, member.getPrimaryCount());
         }
       }
     };

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/CacheUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/CacheUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/CacheUtils.java
index 88d0e30..78ec8b6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/CacheUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/CacheUtils.java
@@ -361,7 +361,7 @@ public class CacheUtils {
           if (p1 instanceof Struct) { 
             Object[] values1 = ((Struct)p1).getFieldValues(); 
             Object[] values2 = ((Struct)p2).getFieldValues(); 
-            //test.assertEquals(values1.length, values2.length); 
+            //test.assertIndexDetailsEquals(values1.length, values2.length);
             if(values1.length != values2.length) { 
               ok = false; 
               break outer; 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
index 934798c..0498a79 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.cache.query.dunit;
 
 import java.io.IOException;
@@ -60,16 +60,16 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
-import com.gemstone.gemfire.pdx.internal.PdxString;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.pdx.internal.PdxString;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
 public class PdxStringQueryDUnitTest extends CacheTestCase{
@@ -82,8 +82,8 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
   private final String rootRegionName = "root";
   private final String regionName = "PdxTest";
   private final String regName = "/" + rootRegionName + "/" + regionName;
-  private final static int orderByQueryIndex = 11;
-  private final static int [] groupByQueryIndex = new int[]{7, 8, 9,10};
+  private final static int orderByQueryIndex = 11;
+  private final static int [] groupByQueryIndex = new int[]{7, 8, 9,10};
   
   private final String[] queryString = new String[] { 
       "SELECT pos.secId FROM " + regName + " p, p.positions.values pos WHERE pos.secId LIKE '%L'",//0
@@ -92,10 +92,10 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       "SELECT pos.secId FROM " + regName + " p, p.positions.values pos WHERE pos.secId > 'APPL' and pos.secId < 'SUN'",//3
       "select pos.secId from " + regName + " p, p.positions.values pos where pos.secId  IN SET ('YHOO', 'VMW')",//4
       "select pos.secId from " + regName + " p, p.positions.values pos where NOT (pos.secId = 'VMW')",//5
-      "select pos.secId from " + regName + " p, p.positions.values pos where NOT (pos.secId IN SET('SUN', 'ORCL')) ",//6
-      "select pos.secId , count(pos.id) from " + regName + " p, p.positions.values pos where  pos.secId > 'APPL' group by pos.secId ",//7
-      "select pos.secId , sum(pos.id) from " + regName + " p, p.positions.values pos where  pos.secId > 'APPL' group by pos.secId ",//8,
-      "select pos.secId , count(distinct pos.secId) from " + regName + " p, p.positions.values pos where  pos.secId > 'APPL' group by pos.secId ",//9
+      "select pos.secId from " + regName + " p, p.positions.values pos where NOT (pos.secId IN SET('SUN', 'ORCL')) ",//6
+      "select pos.secId , count(pos.id) from " + regName + " p, p.positions.values pos where  pos.secId > 'APPL' group by pos.secId ",//7
+      "select pos.secId , sum(pos.id) from " + regName + " p, p.positions.values pos where  pos.secId > 'APPL' group by pos.secId ",//8,
+      "select pos.secId , count(distinct pos.secId) from " + regName + " p, p.positions.values pos where  pos.secId > 'APPL' group by pos.secId ",//9
       "select  count(distinct pos.secId) from " + regName + " p, p.positions.values pos where  pos.secId > 'APPL' ",//10
       "SELECT distinct pos.secId FROM " + regName + " p, p.positions.values pos order by pos.secId",//11
       "SELECT distinct pos.secId FROM " + regName + " p, p.positions.values pos WHERE p.ID > 1 order by pos.secId limit 5",//12
@@ -108,10 +108,10 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
       "SELECT pos.secIdIndexed FROM " + regName + " p, p.positions.values pos WHERE pos.secIdIndexed > 'APPL' and pos.secIdIndexed < 'SUN'",//3
       "select pos.secIdIndexed from " + regName + " p, p.positions.values pos where pos.secIdIndexed  IN SET ('YHOO', 'VMW')",//4
       "select pos.secIdIndexed from " + regName + " p, p.positions.values pos where NOT (pos.secIdIndexed = 'VMW')",//5
-      "select pos.secIdIndexed from " + regName + " p, p.positions.values pos where NOT (pos.secIdIndexed IN SET('SUN', 'ORCL')) ",//6
-      "select pos.secIdIndexed , count(pos.id) from " + regName + " p, p.positions.values pos where  pos.secIdIndexed > 'APPL' group by pos.secIdIndexed ",//7
-      "select pos.secIdIndexed , sum(pos.id) from " + regName + " p, p.positions.values pos where  pos.secIdIndexed > 'APPL' group by pos.secIdIndexed ",//8
-      "select pos.secIdIndexed , count(distinct pos.secIdIndexed) from " + regName + " p, p.positions.values pos where  pos.secIdIndexed > 'APPL' group by pos.secIdIndexed ",//9
+      "select pos.secIdIndexed from " + regName + " p, p.positions.values pos where NOT (pos.secIdIndexed IN SET('SUN', 'ORCL')) ",//6
+      "select pos.secIdIndexed , count(pos.id) from " + regName + " p, p.positions.values pos where  pos.secIdIndexed > 'APPL' group by pos.secIdIndexed ",//7
+      "select pos.secIdIndexed , sum(pos.id) from " + regName + " p, p.positions.values pos where  pos.secIdIndexed > 'APPL' group by pos.secIdIndexed ",//8
+      "select pos.secIdIndexed , count(distinct pos.secIdIndexed) from " + regName + " p, p.positions.values pos where  pos.secIdIndexed > 'APPL' group by pos.secIdIndexed ",//9
       "select  count(distinct pos.secIdIndexed) from " + regName + " p, p.positions.values pos where  pos.secIdIndexed > 'APPL'  ",//10
       "SELECT distinct pos.secIdIndexed FROM " + regName + " p, p.positions.values pos order by pos.secIdIndexed",//11
       "SELECT distinct pos.secIdIndexed FROM " + regName + " p, p.positions.values pos WHERE p.ID > 1 order by pos.secIdIndexed limit 5",//12
@@ -930,8 +930,8 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
 
             if(i < orderByQueryIndex){
               // Compare local and remote query results.
-              if (!compareResultsOfWithAndWithoutIndex(rs)){
-                LogWriterUtils.getLogWriter().info("result0="+rs[0][0].asList());
+              if (!compareResultsOfWithAndWithoutIndex(rs)){
+                LogWriterUtils.getLogWriter().info("result0="+rs[0][0].asList());
                 LogWriterUtils.getLogWriter().info("result1="+rs[0][1].asList());
                fail("Local and Remote Query Results are not matching for query :" + queryString[i]);  
               }
@@ -1417,8 +1417,8 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
                    
             if(i < orderByQueryIndex){
               // Compare local and remote query results.
-              if (!compareResultsOfWithAndWithoutIndex(rs)){
-                LogWriterUtils.getLogWriter().info("result0="+rs[0][0].asList());
+              if (!compareResultsOfWithAndWithoutIndex(rs)){
+                LogWriterUtils.getLogWriter().info("result0="+rs[0][0].asList());
                 LogWriterUtils.getLogWriter().info("result1="+rs[0][1].asList());
                fail("Local and Remote Query Results are not matching for query :" + queryString[i]);  
               }
@@ -1689,38 +1689,38 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     }
   }
   
-  private void checkForPdxString(List results, String query) {
-    boolean isGroupByQuery = false;
-    for (int i : groupByQueryIndex) {
-      if (query.equals(queryString[i]) || query.equals(queryString2[i])) {
-        isGroupByQuery = true;
-        break;
-      }
-    }
-    for (Object o : results) {
-      if (o instanceof Struct) {
-        if (!isGroupByQuery) {
-          Object o1 = ((Struct) o).getFieldValues()[0];
-          Object o2 = ((Struct) o).getFieldValues()[1];
-          if (!(o1 instanceof String)) {
-            fail("Returned instance of " + o1.getClass()
-                + " instead of String for query: " + query);
-          }
-
-          if (!(o2 instanceof String)) {
-            fail("Returned instance of " + o2.getClass()
-                + " instead of String for query: " + query);
-          }
-        }
-      } else {
-        if (!isGroupByQuery) {
-          if (!(o instanceof String)) {
-            fail("Returned instance of " + o.getClass()
-                + " instead of String for query: " + query);
-          }
-        }
-      }
-    }
+  private void checkForPdxString(List results, String query) {
+    boolean isGroupByQuery = false;
+    for (int i : groupByQueryIndex) {
+      if (query.equals(queryString[i]) || query.equals(queryString2[i])) {
+        isGroupByQuery = true;
+        break;
+      }
+    }
+    for (Object o : results) {
+      if (o instanceof Struct) {
+        if (!isGroupByQuery) {
+          Object o1 = ((Struct) o).getFieldValues()[0];
+          Object o2 = ((Struct) o).getFieldValues()[1];
+          if (!(o1 instanceof String)) {
+            fail("Returned instance of " + o1.getClass()
+                + " instead of String for query: " + query);
+          }
+
+          if (!(o2 instanceof String)) {
+            fail("Returned instance of " + o2.getClass()
+                + " instead of String for query: " + query);
+          }
+        }
+      } else {
+        if (!isGroupByQuery) {
+          if (!(o instanceof String)) {
+            fail("Returned instance of " + o.getClass()
+                + " instead of String for query: " + query);
+          }
+        }
+      }
+    }
   }
 
   public boolean compareResultsOfWithAndWithoutIndex(SelectResults[][] r ) { 
@@ -1759,7 +1759,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
           if (p1 instanceof Struct) { 
             Object[] values1 = ((Struct)p1).getFieldValues(); 
             Object[] values2 = ((Struct)p2).getFieldValues(); 
-            //test.assertEquals(values1.length, values2.length); 
+            //test.assertIndexDetailsEquals(values1.length, values2.length);
             if(values1.length != values2.length) { 
               ok = false; 
               break outer; 
@@ -1966,7 +1966,7 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     vm.invoke(new CacheSerializableRunnable("createPool :" + poolName) {
       public void run2() throws CacheException {
         // Create Cache.
-        getLonerSystem();
+        getLonerSystem();
         IgnoredException.addIgnoredException("Connection refused");
         getCache();        
         PoolFactory cpf = PoolManager.createFactory();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
index 4e94e8b..a87c243 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
@@ -567,7 +567,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
         Assert.fail("Failed executing " + queryString, e);
       }
       LogWriterUtils.getLogWriter().fine("size: " + results.size());
-      //assertEquals(numberOfEntries, results.size());
+      //assertIndexDetailsEquals(numberOfEntries, results.size());
       assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
     });
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
index 6769a0e..9b8ae0c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
@@ -201,7 +201,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           } catch (Exception e) {
             fail("Failed executing " + queryString, e);
         }
-          assertEquals(100, results.size());
+          assertIndexDetailsEquals(100, results.size());
           assertTrue(results instanceof ResultsCollectionWrapper);
           IdComparator comparator = new IdComparator();
           Object[] resultsArray = results.toArray();
@@ -659,7 +659,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
             Assert.fail("Failed executing " + queryString, e);
           }
           LogWriterUtils.getLogWriter().fine("size: " + results.size());
-          //assertEquals(numberOfEntries, results.size());
+          //assertIndexDetailsEquals(numberOfEntries, results.size());
           assertTrue(!results.getCollectionType().allowsDuplicates() && results.getCollectionType().getElementType().isStructType());
         }
       });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/CountStarJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/CountStarJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/CountStarJUnitTest.java
index b6d7af0..7b28cae 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/CountStarJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/CountStarJUnitTest.java
@@ -216,7 +216,7 @@ public class CountStarJUnitTest {
         //Also verify with size of result2 to count
         assertEquals("COUNT(*) query result is wrong for query: " + queryStr , result2.size(), count);
         
-        //assertEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
+        //assertIndexDetailsEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
       }
     } catch (Exception e){
       e.printStackTrace();
@@ -271,7 +271,7 @@ public class CountStarJUnitTest {
         //Also verify with size of result2 to count
         assertEquals("COUNT(*) query result is wrong for query: " + queryStr , result2.size(), count);
         
-        //assertEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
+        //assertIndexDetailsEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
       }
     } catch (Exception e){
       e.printStackTrace();
@@ -325,7 +325,7 @@ public class CountStarJUnitTest {
         //Also verify with size of result2 to count
         assertEquals("COUNT(*) query result is wrong for query: " + queryStr , result2.size(), count);
         
-        //assertEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
+        //assertIndexDetailsEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
       }
     } catch (Exception e){
       e.printStackTrace();
@@ -360,7 +360,7 @@ public class CountStarJUnitTest {
     //Verify Index Creation
     //assertNotNull(queryService.getIndex(region, "sampleIndex-1"));
     //assertNotNull(queryService.getIndex(region, "sampleIndex-2"));
-    //assertEquals(3, queryService.getIndexes().size());
+    //assertIndexDetailsEquals(3, queryService.getIndexes().size());
 
     //Run queries
     Query query1 = null;
@@ -380,7 +380,7 @@ public class CountStarJUnitTest {
         //Also verify with size of result2 to count
         assertEquals("COUNT(*) query result is wrong for query: " + queryStr , result2.size(), count);
         
-        //assertEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
+        //assertIndexDetailsEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
       }
     } catch (Exception e){
       e.printStackTrace();
@@ -423,7 +423,7 @@ public class CountStarJUnitTest {
         //Also verify with size of result2 to count
         assertEquals("COUNT(*) query result is wrong for query: " + queryStr , result2.size(), count);
         
-        //assertEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
+        //assertIndexDetailsEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
       }
     } catch (Exception e){
       e.printStackTrace();
@@ -465,7 +465,7 @@ public class CountStarJUnitTest {
         //Also verify with size of result2 to count
         assertEquals("COUNT(*) query result is wrong for query with indexes: " + queryStr , result2.size(), count);
         
-        //assertEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
+        //assertIndexDetailsEquals("Query: "+ queryStr, countStarQueries.get(queryStr).intValue(), count);
       }
     } catch (Exception e){
       e.printStackTrace();
@@ -582,7 +582,7 @@ public class CountStarJUnitTest {
         //Also verify with size of result2 to count
         assertEquals("COUNT(*) query result is wrong for query: " + queryStr , result2.size(), count);
         
-        //assertEquals("Query: "+ queryStr, countStarDistinctQueries.get(queryStr).intValue(), count);
+        //assertIndexDetailsEquals("Query: "+ queryStr, countStarDistinctQueries.get(queryStr).intValue(), count);
       }
     } catch (Exception e){
       e.printStackTrace();
@@ -619,7 +619,7 @@ public class CountStarJUnitTest {
         //Also verify with size of result2 to count
         assertEquals("COUNT(*) query result is wrong for query: " + queryStr , result2.size(), count);
         
-        //assertEquals("Query: "+ queryStr, countStarDistinctQueries.get(queryStr).intValue(), count);
+        //assertIndexDetailsEquals("Query: "+ queryStr, countStarDistinctQueries.get(queryStr).intValue(), count);
       }
     } catch (Exception e){
       e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IUMRMultiIndexesMultiRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IUMRMultiIndexesMultiRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IUMRMultiIndexesMultiRegionJUnitTest.java
index c12d820..f326fb9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IUMRMultiIndexesMultiRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IUMRMultiIndexesMultiRegionJUnitTest.java
@@ -137,7 +137,7 @@ public class IUMRMultiIndexesMultiRegionJUnitTest {
           if( !(indexUsed).equals("statusIndexPf1")){
             fail("<statusIndexPf1> was expected but found "+indexUsed);
           }
-          //assertEquals("statusIndexPf1",itr.next().toString());
+          //assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -231,7 +231,7 @@ public class IUMRMultiIndexesMultiRegionJUnitTest {
             fail("indices used do not match with those which are expected to be used" +
                 "<statusIndexPf1> and <empIdIndex> were expected but found " +itr.next());
           }
-          //assertEquals("statusIndexPf1",itr.next().toString());
+          //assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
       } catch (Exception e) {
@@ -843,7 +843,7 @@ public class IUMRMultiIndexesMultiRegionJUnitTest {
             if(  !(temp.equals("idIndexPf") || temp.equals("empIdIndexPf2") || temp.equals("statusIndexPf"))){
               fail("<idIndexPf> or <empIdIndexPf2>    was expected but found "+temp.toString());
             }
-            //assertEquals("statusIndexPf1",itr.next().toString());
+            //assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
           }
 
           if (i != 3 /* For join query without parenthesis */) {
@@ -945,7 +945,7 @@ public class IUMRMultiIndexesMultiRegionJUnitTest {
             if(  !(temp.equals("idIndexPf") || temp.equals("empIdIndexPf2"))){
               fail("<idIndexPf> or <empIdIndexPf2>    was expected but found "+temp.toString());
             }
-            //assertEquals("statusIndexPf1",itr.next().toString());
+            //assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
           }
 
           int indxs = observer.indexesUsed.size();
@@ -1054,7 +1054,7 @@ public class IUMRMultiIndexesMultiRegionJUnitTest {
               fail("<idIndexPf> or <empIdIndexPf2>    was expected but found "
                   + temp.toString());
             }
-            // assertEquals("statusIndexPf1",itr.next().toString());
+            // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
           }
 
           int indxs = observer.indexesUsed.size();
@@ -1232,7 +1232,7 @@ public class IUMRMultiIndexesMultiRegionJUnitTest {
             if(  !(temp.equals("ageIndexemp")||temp.equals("idIndexPf") || temp.equals("empIdIndexPf2") || temp.equals("statusIndexPf3"))){
               fail("<idIndexPf> or <empIdIndexPf2>    was expected but found "+temp.toString());
             }
-            //assertEquals("statusIndexPf1",itr.next().toString());
+            //assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
           }
 
           int indxs = observer.indexesUsed.size();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexMaintenanceAsynchJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexMaintenanceAsynchJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexMaintenanceAsynchJUnitTest.java
index 168bb57..6f70ecf 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexMaintenanceAsynchJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexMaintenanceAsynchJUnitTest.java
@@ -102,7 +102,7 @@ public class IndexMaintenanceAsynchJUnitTest {
   public void testAddEntry() throws Exception {
 
     new NewThread(region, index);
-    //assertEquals(5, stats.getNumberOfValues());
+    //assertIndexDetailsEquals(5, stats.getNumberOfValues());
     Thread.sleep(12000);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/JavaSerializationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/JavaSerializationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/JavaSerializationJUnitTest.java
index 0242e39..c300a1c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/JavaSerializationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/JavaSerializationJUnitTest.java
@@ -16,15 +16,16 @@
  */
 package com.gemstone.gemfire.cache.query.functional;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.cache.query.QueryService;
 import com.gemstone.gemfire.cache.query.internal.StructImpl;
 import com.gemstone.gemfire.cache.query.internal.types.ObjectTypeImpl;
@@ -33,12 +34,9 @@ import com.gemstone.gemfire.cache.query.types.ObjectType;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
-public class JavaSerializationJUnitTest extends TestCase {
-  
-  public JavaSerializationJUnitTest(String testName) {
-    super(testName);
-  }
-  
+public class JavaSerializationJUnitTest {
+
+  @Test
   public void testStructImplSerialization() throws Exception {
     String[] fieldNames = {"col1", "col2"};
     ObjectType[] fieldTypes = {new ObjectTypeImpl(Integer.class), new ObjectTypeImpl(String.class)};
@@ -47,7 +45,8 @@ public class JavaSerializationJUnitTest extends TestCase {
     StructImpl si = new StructImpl(type, values);
     verifyJavaSerialization(si);   
   }
-  
+
+  @Test
   public void testUndefinedSerialization() throws Exception {
     verifyJavaSerialization(QueryService.UNDEFINED);   
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/LimitClauseJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/LimitClauseJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/LimitClauseJUnitTest.java
index c8f08a1..5280dfb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/LimitClauseJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/LimitClauseJUnitTest.java
@@ -1289,14 +1289,14 @@ public class LimitClauseJUnitTest {
       assertTrue(idIndex instanceof CompactRangeIndex);
       SelectResults resultsWithIndex = (SelectResults) query.execute();
 
-      assertEquals(resultsNoIndex.size(), resultsWithIndex.size());
-      assertEquals(limit, resultsWithIndex.size());
+      assertIndexDetailsEquals(resultsNoIndex.size(), resultsWithIndex.size());
+      assertIndexDetailsEquals(limit, resultsWithIndex.size());
       
       int expectedId = 6;
       Iterator iterator = resultsNoIndex.iterator();
       while (iterator.hasNext()) {
         Portfolio p = (Portfolio) iterator.next();
-        assertEquals(expectedId++, p.ID);
+        assertIndexDetailsEquals(expectedId++, p.ID);
       }
       
       //check order by results
@@ -1304,7 +1304,7 @@ public class LimitClauseJUnitTest {
       iterator = resultsWithIndex.iterator();
       while (iterator.hasNext()) {
         Portfolio p = (Portfolio) iterator.next();
-        assertEquals(expectedId++, p.ID);
+        assertIndexDetailsEquals(expectedId++, p.ID);
       }      
   }
  */ 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MiscJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MiscJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MiscJUnitTest.java
index cb2a5f1..4bd3258 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MiscJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MiscJUnitTest.java
@@ -320,7 +320,7 @@ public class MiscJUnitTest {
       j = 0;
       while ( itr.hasNext()) {
        Struct struct = (Struct)itr.next();
-       assertEquals(j++, ((Integer)struct.get("getID")).intValue());
+       assertIndexDetailsEquals(j++, ((Integer)struct.get("getID")).intValue());
       }*/      
     }
     catch (Exception e) {      
@@ -614,22 +614,22 @@ public class MiscJUnitTest {
     String qStr = "Select distinct * from /portfolios pf where pf.getID() > Integer.MIN_VALUE"; 
     Query q = qs.newQuery(qStr);
     SelectResults result = (SelectResults) q.execute();
-    assertEquals(result.size(),4);  
+    assertIndexDetailsEquals(result.size(),4);
     
     qStr = "Select distinct * from /portfolios pf where pf.getID() > Integer.MAX_VALUE"; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),0);
+    assertIndexDetailsEquals(result.size(),0);
     
     qStr = "Select distinct * from /portfolios pf where pf.getID() > \"Long\".MAX_VALUE"; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),0);
+    assertIndexDetailsEquals(result.size(),0);
     
     qStr = "Select distinct * from /portfolios pf where pf.getID() > \"Long\".MIN_VALUE"; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),4);
+    assertIndexDetailsEquals(result.size(),4);
     
     qStr = "Select distinct * from /portfolios pf where pf.getID() > integer.MIN_VALUE"; 
     q = qs.newQuery(qStr);
@@ -643,22 +643,22 @@ public class MiscJUnitTest {
     qStr = "Select distinct * from /portfolios pf where pf.intFunction(Integer.MIN_VALUE) = Integer.MIN_VALUE"; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),4);
+    assertIndexDetailsEquals(result.size(),4);
     
     qStr = "Select distinct * from /portfolios pf where pf.intFunction(Integer.MAX_VALUE) = Integer.MAX_VALUE"; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),4);
+    assertIndexDetailsEquals(result.size(),4);
     
     qStr = "Select distinct * from /portfolios pf where pf.longFunction( \"Long\".MAX_VALUE) = \"Long\".MAX_VALUE"; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),4);
+    assertIndexDetailsEquals(result.size(),4);
     
     qStr = "Select distinct * from /portfolios pf where pf.longFunction(\"Long\".MIN_VALUE) = \"Long\".MIN_VALUE"; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),4);
+    assertIndexDetailsEquals(result.size(),4);
       
     qStr = "Select distinct * from /portfolios pf where pf.Integer.MAX_VALUE = Integer.MAX_VALUE"; 
     q = qs.newQuery(qStr);
@@ -672,8 +672,8 @@ public class MiscJUnitTest {
     qStr = "Select distinct Integer.MAX_VALUE from /portfolios pf where Integer.MAX_VALUE = Integer.MAX_VALUE"; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),1);
-    assertEquals(result.iterator().next(),Integer.valueOf(Integer.MAX_VALUE));
+    assertIndexDetailsEquals(result.size(),1);
+    assertIndexDetailsEquals(result.iterator().next(),Integer.valueOf(Integer.MAX_VALUE));
     
     
   }
@@ -687,27 +687,27 @@ public class MiscJUnitTest {
     String qStr = "Select distinct * from /tempdata td where td.Integer.MAX_VALUE > Integer.MAX_VALUE"; 
     Query q = qs.newQuery(qStr);
     SelectResults result = (SelectResults) q.execute();
-    assertEquals(result.size(),0);  
+    assertIndexDetailsEquals(result.size(),0);
     
     qStr = "Select distinct * from /tempdata td where td.Integer.MAX_VALUE = 2 "; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),1);
+    assertIndexDetailsEquals(result.size(),1);
        
     qStr = "Select distinct * from /tempdata td where Integer.MAX_VALUE = 2 "; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),0);
+    assertIndexDetailsEquals(result.size(),0);
     
     qStr = "Select distinct * from /tempdata td where Integer.MAX_VALUE.intValue = Integer.MAX_VALUE "; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),0);
+    assertIndexDetailsEquals(result.size(),0);
     
     qStr = "Select distinct * from /tempdata td where Integer.test = 'test'"; 
     q = qs.newQuery(qStr);
     result = (SelectResults) q.execute();
-    assertEquals(result.size(),1);
+    assertIndexDetailsEquals(result.size(),1);
   }  
   
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MultiRegionIndexUsageJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MultiRegionIndexUsageJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MultiRegionIndexUsageJUnitTest.java
index 4354b89..4b6071c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MultiRegionIndexUsageJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MultiRegionIndexUsageJUnitTest.java
@@ -206,8 +206,8 @@ public class MultiRegionIndexUsageJUnitTest {
       }
 
       // while(itr.hasNext()){
-      // assertEquals("villageName1", itr.next().toString());
-      // assertEquals("cityName2", itr.next().toString());
+      // assertIndexDetailsEquals("villageName1", itr.next().toString());
+      // assertIndexDetailsEquals("cityName2", itr.next().toString());
       // }
 
       CacheUtils.log("5555555555555555555555555555");
@@ -269,8 +269,8 @@ public class MultiRegionIndexUsageJUnitTest {
         }
       }
 
-      // assertEquals("villageName1", itr.next().toString());
-      // assertEquals("cityName3", itr.next().toString());
+      // assertIndexDetailsEquals("villageName1", itr.next().toString());
+      // assertIndexDetailsEquals("cityName3", itr.next().toString());
 
       areResultsMatching(rs, new String[] { sqlStr });
 
@@ -404,8 +404,8 @@ public class MultiRegionIndexUsageJUnitTest {
         }
       }
 
-      // assertEquals("districtName3", itr.next().toString());
-      // assertEquals("stateName2", itr.next().toString());
+      // assertIndexDetailsEquals("districtName3", itr.next().toString());
+      // assertIndexDetailsEquals("stateName2", itr.next().toString());
 
       areResultsMatching(rs, new String[] { sqlStr });
 
@@ -461,8 +461,8 @@ public class MultiRegionIndexUsageJUnitTest {
         }
       }
 
-      // assertEquals("cityName1", itr.next().toString());
-      // assertEquals("cityName2", itr.next().toString());
+      // assertIndexDetailsEquals("cityName1", itr.next().toString());
+      // assertIndexDetailsEquals("cityName2", itr.next().toString());
 
       areResultsMatching(rs, new String[] { sqlStr });
       CacheUtils.log("------------- testCutDown1 end------------- ");
@@ -516,8 +516,8 @@ public class MultiRegionIndexUsageJUnitTest {
         }
       }
 
-      // assertEquals("stateName2", itr.next().toString());
-      // assertEquals("cityName1", itr.next().toString());
+      // assertIndexDetailsEquals("stateName2", itr.next().toString());
+      // assertIndexDetailsEquals("cityName1", itr.next().toString());
 
       areResultsMatching(rs, new String[] { sqlStr });
       CacheUtils.log("------------- testSelectAsFromClause end------------- ");
@@ -571,9 +571,9 @@ public class MultiRegionIndexUsageJUnitTest {
         }
       }
 
-      // assertEquals("cityName3", itr.next().toString());
-      // assertEquals("cityName1", itr.next().toString());
-      // assertEquals("stateName1", itr.next().toString());
+      // assertIndexDetailsEquals("cityName3", itr.next().toString());
+      // assertIndexDetailsEquals("cityName1", itr.next().toString());
+      // assertIndexDetailsEquals("stateName1", itr.next().toString());
 
       areResultsMatching(rs, new String[] { sqlStr });
       CacheUtils.log("------------- testSelectAsWhereClause end------------- ");
@@ -665,8 +665,8 @@ public class MultiRegionIndexUsageJUnitTest {
         }
       }
 
-      // assertEquals("cityName", itr.next().toString());
-      // assertEquals("stateName", itr.next().toString());
+      // assertIndexDetailsEquals("cityName", itr.next().toString());
+      // assertIndexDetailsEquals("stateName", itr.next().toString());
 
       areResultsMatching(rs, new String[] { sqlStr });
       CacheUtils.log("------------- testFunctionUse2 end------------- ");
@@ -741,7 +741,7 @@ public class MultiRegionIndexUsageJUnitTest {
       QueryObserverHolder.setInstance(observer);
       rs[0][1] = (SelectResults) q.execute();
 
-      // assertEquals("districtName3", itr.next().toString());
+      // assertIndexDetailsEquals("districtName3", itr.next().toString());
 
       areResultsMatching(rs, new String[] { sqlStr });
       CacheUtils.log("------------- testFunctionUse4 end------------- ");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NonDistinctOrderByReplicatedJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NonDistinctOrderByReplicatedJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NonDistinctOrderByReplicatedJUnitTest.java
index 9f8ef4f..7ddb6b4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NonDistinctOrderByReplicatedJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NonDistinctOrderByReplicatedJUnitTest.java
@@ -160,7 +160,7 @@ public class NonDistinctOrderByReplicatedJUnitTest extends NonDistinctOrderByTes
           if (!(indexUsed).equals("PKIDIndexPf1")) {
             fail("<PKIDIndexPf1> was expected but found " + indexUsed);
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -259,7 +259,7 @@ public class NonDistinctOrderByReplicatedJUnitTest extends NonDistinctOrderByTes
           if (!(indexUsed).equals("PKIDIndexPf1")) {
             fail("<PKIDIndexPf1> was expected but found " + indexUsed);
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();


[33/55] [abbrv] incubator-geode git commit: GEODE-1139: mark test method as flaky

Posted by sa...@apache.org.
GEODE-1139: mark test method as flaky


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c33de6d5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c33de6d5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c33de6d5

Branch: refs/heads/feature/GEODE-1153
Commit: c33de6d598db8b36a35b21e2698a33896889e6d3
Parents: 0bf5425
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Mon May 9 17:22:13 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Mon May 9 17:23:11 2016 -0700

----------------------------------------------------------------------
 .../test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java   | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c33de6d5/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
index ce46d6b..a2f92d7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
@@ -66,6 +66,7 @@ public class Bug44418JUnitTest { // TODO: rename this test to non-ticket descrip
   private static final int POLL_INTERVAL_MS = 1;       // How often to check for expiration
   private static final String TEST_KEY = "key";
   
+  @Category(FlakyTest.class) // GEODE-1139: time sensitive, thread sleep, expiration
   @Test
   public void testPut() throws Exception {
 


[05/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectSliceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectSliceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectSliceJUnitTest.java
index 1b5bf26..09c0f59 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectSliceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectSliceJUnitTest.java
@@ -14,11 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.offheap;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.*;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectWithHeapFormJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectWithHeapFormJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectWithHeapFormJUnitTest.java
index a763e76..8193b15 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectWithHeapFormJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectWithHeapFormJUnitTest.java
@@ -14,14 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.offheap;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertSame;
+import static org.junit.Assert.*;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
index 5d79192..7498670 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.offheap;
 import static org.junit.Assert.*;
 
 import java.io.ByteArrayInputStream;
-import java.io.DataInput;
 import java.io.DataInputStream;
 import java.io.IOException;
 
@@ -31,11 +30,6 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
-import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
-import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.StoredObject;
-import com.gemstone.gemfire.internal.offheap.SlabImpl;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfoJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfoJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfoJUnitTest.java
index 99f4ed8..d02717a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfoJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfoJUnitTest.java
@@ -18,8 +18,6 @@ package com.gemstone.gemfire.internal.offheap;
 
 import static org.junit.Assert.*;
 
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -28,14 +26,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class RefCountChangeInfoJUnitTest {
 
-  @Before
-  public void setUp() throws Exception {
-  }
-
-  @After
-  public void tearDown() throws Exception {
-  }
-
   @Test
   public void testGetOwner() {
 
@@ -192,7 +182,7 @@ public class RefCountChangeInfoJUnitTest {
 
   }
 
-  class SameHashDifferentTrace {
+  private static class SameHashDifferentTrace {
 
     public int hashCode() { 
       return 1; 
@@ -202,6 +192,4 @@ public class RefCountChangeInfoJUnitTest {
       return false; 
     }
   }
-  
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
index 681bec0..2e1bd6a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.offheap;
 
 import static org.junit.Assert.*;
@@ -42,18 +41,7 @@ public class TinyMemoryBlockJUnitTest {
   private MemoryAllocatorImpl ma;
   private OutOfOffHeapMemoryListener ooohml;
   private OffHeapMemoryStats stats;
-
-  private Slab[] slabs = {
-      new SlabImpl((int)OffHeapStorage.MIN_SLAB_SIZE),
-      new SlabImpl((int)OffHeapStorage.MIN_SLAB_SIZE),
-      new SlabImpl((int)OffHeapStorage.MIN_SLAB_SIZE)
-  };
-
-  private static class TestableFreeListManager extends FreeListManager {
-    TestableFreeListManager(MemoryAllocatorImpl ma, final Slab[] slabs) {
-      super (ma, slabs);
-    }
-  }
+  private Slab[] slabs;
 
   @Rule
   public ExpectedException expectedException = ExpectedException.none();
@@ -61,16 +49,13 @@ public class TinyMemoryBlockJUnitTest {
   @Rule
   public JUnitSoftAssertions softly = new JUnitSoftAssertions();
 
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception {
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception {
-  }
-
   @Before
   public void setUp() throws Exception {
+    slabs = new Slab[] {
+            new SlabImpl((int)OffHeapStorage.MIN_SLAB_SIZE),
+            new SlabImpl((int)OffHeapStorage.MIN_SLAB_SIZE),
+            new SlabImpl((int)OffHeapStorage.MIN_SLAB_SIZE)
+    };
     ooohml = mock(OutOfOffHeapMemoryListener.class);
     stats = mock(OffHeapMemoryStats.class);
     ma = (MemoryAllocatorImpl) MemoryAllocatorImpl.createForUnitTest(ooohml, stats, slabs);
@@ -241,4 +226,10 @@ public class TinyMemoryBlockJUnitTest {
     softly.assertThat(mb.hashCode()).isEqualTo(new OffHeapStoredObject(slabs[0].getMemoryAddress(), slabs[0].getSize()).hashCode());
   }
 
+  private static class TestableFreeListManager extends FreeListManager {
+    TestableFreeListManager(MemoryAllocatorImpl ma, final Slab[] slabs) {
+      super (ma, slabs);
+    }
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyStoredObjectJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyStoredObjectJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyStoredObjectJUnitTest.java
index 94559d6..56a93db 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyStoredObjectJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyStoredObjectJUnitTest.java
@@ -14,340 +14,334 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.offheap;
 
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+
+import java.nio.ByteBuffer;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.compression.Compressor;
 import com.gemstone.gemfire.internal.cache.BytesAndBitsForCompactor;
 import com.gemstone.gemfire.internal.cache.CachePerfStats;
 import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.RegionEntryContext;
-import com.gemstone.gemfire.internal.offheap.TinyStoredObject;
-
-import com.gemstone.gemfire.internal.offheap.OffHeapRegionEntryHelper;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.Mock;
-
-import java.nio.ByteBuffer;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Mockito.*;
 
 @Category(UnitTest.class)
 public class TinyStoredObjectJUnitTest extends AbstractStoredObjectTestBase {
 
-    @Override
-    public Object getValue() {
-        return Integer.valueOf(123456789);
+  @Override
+  public Object getValue() {
+    return Integer.valueOf(123456789);
+  }
+
+  @Override
+  public byte[] getValueAsByteArray() {
+    return convertValueToByteArray(getValue());
+  }
+
+  private byte[] convertValueToByteArray(Object value) {
+    return ByteBuffer.allocate(Integer.SIZE / Byte.SIZE).putInt((Integer) value).array();
+  }
+
+  @Override
+  public Object convertByteArrayToObject(byte[] valueInByteArray) {
+    return ByteBuffer.wrap(valueInByteArray).getInt();
+  }
+
+  @Override
+  public Object convertSerializedByteArrayToObject(byte[] valueInSerializedByteArray) {
+    return EntryEventImpl.deserialize(valueInSerializedByteArray);
+  }
+
+  @Override
+  public TinyStoredObject createValueAsUnserializedStoredObject(Object value) {
+    byte[] valueInByteArray;
+    if (value instanceof Integer) {
+      valueInByteArray = convertValueToByteArray(value);
+    } else {
+      valueInByteArray = (byte[]) value;
     }
+    //encode a non-serialized entry value to address
+    long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(valueInByteArray, false, false);
+    return new TinyStoredObject(encodedAddress);
+  }
+
+  @Override
+  public TinyStoredObject createValueAsSerializedStoredObject(Object value) {
+    byte[] valueInSerializedByteArray = EntryEventImpl.serialize(value);
+    //encode a serialized entry value to address
+    long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(valueInSerializedByteArray, true, false);
+    return new TinyStoredObject(encodedAddress);
+  }
+
+  public TinyStoredObject createValueAsCompressedStoredObject(Object value) {
+    byte[] valueInSerializedByteArray = EntryEventImpl.serialize(value);
+    //encode a serialized, compressed entry value to address
+    long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(valueInSerializedByteArray, true, true);
+    return new TinyStoredObject(encodedAddress);
+  }
+
+  public TinyStoredObject createValueAsUncompressedStoredObject(Object value) {
+    byte[] valueInSerializedByteArray = EntryEventImpl.serialize(value);
+    //encode a serialized, uncompressed entry value to address
+    long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(valueInSerializedByteArray, true, false);
+    return new TinyStoredObject(encodedAddress);
+  }
+
+  @Test
+  public void shouldReturnCorrectEncodingAddress() {
+
+    TinyStoredObject address1 = new TinyStoredObject(10001L);
+    assertNotNull(address1);
+    assertEquals("Encoding address should be:", 10001, address1.getAddress());
+
+    TinyStoredObject address2 = new TinyStoredObject(10002L);
+    assertNotNull(address2);
+    assertEquals("Returning always 10001 expected 10002", 10002, address2.getAddress());
+  }
 
-    @Override
-    public byte[] getValueAsByteArray() {
-        return convertValueToByteArray(getValue());
-    }
+  @Test
+  public void twoAddressesShouldBeEqualIfEncodingAddressIsSame() {
+    TinyStoredObject address1 = new TinyStoredObject(10001L);
+    TinyStoredObject address2 = new TinyStoredObject(10001L);
+
+    assertEquals("Two addresses are equal if encoding address is same", true, address1.equals(address2));
+  }
 
-    private byte[] convertValueToByteArray(Object value) {
-        return ByteBuffer.allocate(Integer.SIZE / Byte.SIZE).putInt((Integer) value).array();
-    }
+  @Test
+  public void twoAddressesShouldNotBeEqualIfEncodingAddressIsNotSame() {
+    TinyStoredObject address1 = new TinyStoredObject(10001L);
+    TinyStoredObject address2 = new TinyStoredObject(10002L);
+
+    assertEquals("Two addresses are not equal if encoding address is not same", false, address1.equals(address2));
+  }
 
-    @Override
-    public Object convertByteArrayToObject(byte[] valueInByteArray) {
-        return ByteBuffer.wrap(valueInByteArray).getInt();
-    }
+  @Test
+  public void twoAddressesAreNotEqualIfTheyAreNotTypeDataAsAddress() {
+    TinyStoredObject address1 = new TinyStoredObject(10001L);
+    Long address2 = new Long(10002L);
+
+    assertEquals("Two addresses are not equal if encoding address is not same", false, address1.equals(address2));
+  }
 
-    @Override
-    public Object convertSerializedByteArrayToObject(byte[] valueInSerializedByteArray) {
-       return EntryEventImpl.deserialize(valueInSerializedByteArray);
-    }
+  @Test
+  public void addressHashCodeShouldBe() {
+    TinyStoredObject address1 = new TinyStoredObject(10001L);
+    assertEquals("", 10001, address1.hashCode());
+  }
 
-    @Override
-    public TinyStoredObject createValueAsUnserializedStoredObject(Object value) {
-        byte[] valueInByteArray;
-        if(value instanceof Integer) {
-            valueInByteArray = convertValueToByteArray(value);
-        } else {
-            valueInByteArray = (byte[]) value;
-        }
-        //encode a non-serialized entry value to address
-        long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(valueInByteArray, false, false);
-        return new TinyStoredObject(encodedAddress);
-    }
+  @Test
+  public void getSizeInBytesAlwaysReturnsZero() {
+    TinyStoredObject address1 = new TinyStoredObject(10001L);
+    TinyStoredObject address2 = new TinyStoredObject(10002L);
 
-    @Override
-    public TinyStoredObject createValueAsSerializedStoredObject(Object value) {
-        byte[] valueInSerializedByteArray = EntryEventImpl.serialize(value);
-        //encode a serialized entry value to address
-        long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(valueInSerializedByteArray, true, false);
-        return new TinyStoredObject(encodedAddress);
-    }
+    assertEquals("getSizeInBytes", 0, address1.getSizeInBytes());
+    assertEquals("getSizeInBytes", 0, address2.getSizeInBytes());
+  }
 
-    public TinyStoredObject createValueAsCompressedStoredObject(Object value) {
-        byte[] valueInSerializedByteArray = EntryEventImpl.serialize(value);
-        //encode a serialized, compressed entry value to address
-        long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(valueInSerializedByteArray, true, true);
-        return new TinyStoredObject(encodedAddress);
-    }
+  @Test
+  public void getValueSizeInBytesAlwaysReturnsZero() {
+    TinyStoredObject address1 = new TinyStoredObject(10001L);
+    TinyStoredObject address2 = new TinyStoredObject(10002L);
 
-    public TinyStoredObject createValueAsUncompressedStoredObject(Object value) {
-        byte[] valueInSerializedByteArray = EntryEventImpl.serialize(value);
-        //encode a serialized, uncompressed entry value to address
-        long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(valueInSerializedByteArray, true, false);
-        return new TinyStoredObject(encodedAddress);
-    }
+    assertEquals("getSizeInBytes", 0, address1.getValueSizeInBytes());
+    assertEquals("getSizeInBytes", 0, address2.getValueSizeInBytes());
+  }
 
-    @Test
-    public void shouldReturnCorrectEncodingAddress() {
+  @Test
+  public void isCompressedShouldReturnTrueIfCompressed() {
+    Object regionEntryValue = getValue();
 
-        TinyStoredObject address1 = new TinyStoredObject(10001L);
-        assertNotNull(address1);
-        assertEquals("Encoding address should be:", 10001, address1.getAddress());
+    TinyStoredObject offheapAddress = createValueAsCompressedStoredObject(regionEntryValue);
 
-        TinyStoredObject address2 = new TinyStoredObject(10002L);
-        assertNotNull(address2);
-        assertEquals("Returning always 10001 expected 10002", 10002, address2.getAddress());
-    }
+    assertEquals("Should return true as it is compressed", true, offheapAddress.isCompressed());
+  }
 
-    @Test
-    public void twoAddressesShouldBeEqualIfEncodingAddressIsSame() {
-        TinyStoredObject address1 = new TinyStoredObject(10001L);
-        TinyStoredObject address2 = new TinyStoredObject(10001L);
+  @Test
+  public void isCompressedShouldReturnFalseIfNotCompressed() {
+    Object regionEntryValue = getValue();
 
-        assertEquals("Two addresses are equal if encoding address is same", true, address1.equals(address2));
-    }
+    TinyStoredObject offheapAddress = createValueAsUncompressedStoredObject(regionEntryValue);
 
-    @Test
-    public void twoAddressesShouldNotBeEqualIfEncodingAddressIsNotSame() {
-        TinyStoredObject address1 = new TinyStoredObject(10001L);
-        TinyStoredObject address2 = new TinyStoredObject(10002L);
+    assertEquals("Should return false as it is compressed", false, offheapAddress.isCompressed());
+  }
 
-        assertEquals("Two addresses are not equal if encoding address is not same", false, address1.equals(address2));
-    }
+  @Test
+  public void isSerializedShouldReturnTrueIfSeriazlied() {
+    Object regionEntryValue = getValue();
 
-    @Test
-    public void twoAddressesAreNotEqualIfTheyAreNotTypeDataAsAddress() {
-        TinyStoredObject address1 = new TinyStoredObject(10001L);
-        Long address2 = new Long(10002L);
+    TinyStoredObject offheapAddress = createValueAsSerializedStoredObject(regionEntryValue);
 
-        assertEquals("Two addresses are not equal if encoding address is not same", false, address1.equals(address2));
-    }
+    assertEquals("Should return true as it is serialized", true, offheapAddress.isSerialized());
+  }
 
-    @Test
-    public void addressHashCodeShouldBe() {
-        TinyStoredObject address1 = new TinyStoredObject(10001L);
-        assertEquals("", 10001, address1.hashCode());
-    }
+  @Test
+  public void isSerializedShouldReturnFalseIfNotSeriazlied() {
+    Object regionEntryValue = getValue();
 
-    @Test
-    public void getSizeInBytesAlwaysReturnsZero() {
-        TinyStoredObject address1 = new TinyStoredObject(10001L);
-        TinyStoredObject address2 = new TinyStoredObject(10002L);
+    TinyStoredObject offheapAddress = createValueAsUnserializedStoredObject(regionEntryValue);
 
-        assertEquals("getSizeInBytes", 0, address1.getSizeInBytes());
-        assertEquals("getSizeInBytes", 0, address2.getSizeInBytes());
-    }
+    assertEquals("Should return false as it is serialized", false, offheapAddress.isSerialized());
+  }
 
-    @Test
-    public void getValueSizeInBytesAlwaysReturnsZero() {
-        TinyStoredObject address1 = new TinyStoredObject(10001L);
-        TinyStoredObject address2 = new TinyStoredObject(10002L);
+  @Test
+  public void getDecompressedBytesShouldReturnDecompressedBytesIfCompressed() {
+    Object regionEntryValue = getValue();
+    byte[] regionEntryValueAsBytes = convertValueToByteArray(regionEntryValue);
 
-        assertEquals("getSizeInBytes", 0, address1.getValueSizeInBytes());
-        assertEquals("getSizeInBytes", 0, address2.getValueSizeInBytes());
-    }
-
-    @Test
-    public void isCompressedShouldReturnTrueIfCompressed() {
-        Object regionEntryValue = getValue();
-
-        TinyStoredObject offheapAddress = createValueAsCompressedStoredObject(regionEntryValue);
-
-        assertEquals("Should return true as it is compressed", true, offheapAddress.isCompressed());
-    }
-
-    @Test
-    public void isCompressedShouldReturnFalseIfNotCompressed() {
-        Object regionEntryValue = getValue();
-
-        TinyStoredObject offheapAddress = createValueAsUncompressedStoredObject(regionEntryValue);
-
-        assertEquals("Should return false as it is compressed", false, offheapAddress.isCompressed());
-    }
-
-    @Test
-    public void isSerializedShouldReturnTrueIfSeriazlied() {
-        Object regionEntryValue = getValue();
-
-        TinyStoredObject offheapAddress = createValueAsSerializedStoredObject(regionEntryValue);
-
-        assertEquals("Should return true as it is serialized", true, offheapAddress.isSerialized());
-    }
-
-    @Test
-    public void isSerializedShouldReturnFalseIfNotSeriazlied() {
-        Object regionEntryValue = getValue();
+    //encode a non-serialized and compressed entry value to address - last argument is to let that it is compressed
+    long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(regionEntryValueAsBytes, false, true);
+    TinyStoredObject offheapAddress = new TinyStoredObject(encodedAddress);
 
-        TinyStoredObject offheapAddress = createValueAsUnserializedStoredObject(regionEntryValue);
+    RegionEntryContext regionContext = mock(RegionEntryContext.class);
+    CachePerfStats cacheStats = mock(CachePerfStats.class);
+    Compressor compressor = mock(Compressor.class);
 
-        assertEquals("Should return false as it is serialized", false, offheapAddress.isSerialized());
-    }
-
-    @Test
-    public void getDecompressedBytesShouldReturnDecompressedBytesIfCompressed() {
-        Object regionEntryValue = getValue();
-        byte[] regionEntryValueAsBytes =  convertValueToByteArray(regionEntryValue);
+    long startTime = 10000L;
 
-        //encode a non-serialized and compressed entry value to address - last argument is to let that it is compressed
-        long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(regionEntryValueAsBytes, false, true);
-        TinyStoredObject offheapAddress = new TinyStoredObject(encodedAddress);
+    //mock required things
+    when(regionContext.getCompressor()).thenReturn(compressor);
+    when(compressor.decompress(regionEntryValueAsBytes)).thenReturn(regionEntryValueAsBytes);
+    when(regionContext.getCachePerfStats()).thenReturn(cacheStats);
+    when(cacheStats.startDecompression()).thenReturn(startTime);
 
-        RegionEntryContext regionContext = mock(RegionEntryContext.class);
-        CachePerfStats cacheStats = mock(CachePerfStats.class);
-        Compressor compressor = mock(Compressor.class);
+    //invoke the thing
+    byte[] bytes = offheapAddress.getDecompressedBytes(regionContext);
 
-        long startTime = 10000L;
+    //verify the thing happened
+    verify(cacheStats, atLeastOnce()).startDecompression();
+    verify(compressor, times(1)).decompress(regionEntryValueAsBytes);
+    verify(cacheStats, atLeastOnce()).endDecompression(startTime);
 
-        //mock required things
-        when(regionContext.getCompressor()).thenReturn(compressor);
-        when(compressor.decompress(regionEntryValueAsBytes)).thenReturn(regionEntryValueAsBytes);
-        when(regionContext.getCachePerfStats()).thenReturn(cacheStats);
-        when(cacheStats.startDecompression()).thenReturn(startTime);
+    assertArrayEquals(regionEntryValueAsBytes, bytes);
+  }
 
-        //invoke the thing
-        byte[] bytes = offheapAddress.getDecompressedBytes(regionContext);
+  @Test
+  public void getDecompressedBytesShouldNotTryToDecompressIfNotCompressed() {
+    Object regionEntryValue = getValue();
 
-        //verify the thing happened
-        verify(cacheStats, atLeastOnce()).startDecompression();
-        verify(compressor, times(1)).decompress(regionEntryValueAsBytes);
-        verify(cacheStats, atLeastOnce()).endDecompression(startTime);
-
-        assertArrayEquals(regionEntryValueAsBytes, bytes);
-    }
+    TinyStoredObject offheapAddress = createValueAsUncompressedStoredObject(regionEntryValue);
 
-    @Test
-    public void getDecompressedBytesShouldNotTryToDecompressIfNotCompressed() {
-        Object regionEntryValue = getValue();
+    //mock the thing
+    RegionEntryContext regionContext = mock(RegionEntryContext.class);
+    Compressor compressor = mock(Compressor.class);
+    when(regionContext.getCompressor()).thenReturn(compressor);
 
-        TinyStoredObject offheapAddress = createValueAsUncompressedStoredObject(regionEntryValue);
+    //invoke the thing
+    byte[] actualValueInBytes = offheapAddress.getDecompressedBytes(regionContext);
 
-        //mock the thing
-        RegionEntryContext regionContext = mock(RegionEntryContext.class);
-        Compressor compressor = mock(Compressor.class);
-        when(regionContext.getCompressor()).thenReturn(compressor);
+    //createValueAsUncompressedStoredObject does uses a serialized value - so convert it to object
+    Object actualRegionValue = convertSerializedByteArrayToObject(actualValueInBytes);
 
-        //invoke the thing
-        byte[] actualValueInBytes = offheapAddress.getDecompressedBytes(regionContext);
-
-        //createValueAsUncompressedStoredObject does uses a serialized value - so convert it to object
-        Object actualRegionValue = convertSerializedByteArrayToObject(actualValueInBytes);
-
-        //verify the thing happened
-        verify(regionContext, never()).getCompressor();
-        assertEquals(regionEntryValue, actualRegionValue);
-    }
+    //verify the thing happened
+    verify(regionContext, never()).getCompressor();
+    assertEquals(regionEntryValue, actualRegionValue);
+  }
 
-    @Test
-    public void getRawBytesShouldReturnAByteArray() {
-        byte[] regionEntryValueAsBytes = getValueAsByteArray();
+  @Test
+  public void getRawBytesShouldReturnAByteArray() {
+    byte[] regionEntryValueAsBytes = getValueAsByteArray();
 
-        TinyStoredObject offheapAddress = createValueAsUnserializedStoredObject(regionEntryValueAsBytes);
-        byte[] actual = offheapAddress.getRawBytes();
+    TinyStoredObject offheapAddress = createValueAsUnserializedStoredObject(regionEntryValueAsBytes);
+    byte[] actual = offheapAddress.getRawBytes();
 
-        assertArrayEquals(regionEntryValueAsBytes, actual);
-    }
+    assertArrayEquals(regionEntryValueAsBytes, actual);
+  }
 
-    @Test
-    public void getSerializedValueShouldReturnASerializedByteArray() {
-        Object regionEntryValue = getValue();
+  @Test
+  public void getSerializedValueShouldReturnASerializedByteArray() {
+    Object regionEntryValue = getValue();
 
-        TinyStoredObject offheapAddress = createValueAsSerializedStoredObject(regionEntryValue);
+    TinyStoredObject offheapAddress = createValueAsSerializedStoredObject(regionEntryValue);
 
-        byte[] actualSerializedValue = offheapAddress.getSerializedValue();
+    byte[] actualSerializedValue = offheapAddress.getSerializedValue();
 
-        Object actualRegionEntryValue = convertSerializedByteArrayToObject(actualSerializedValue);
+    Object actualRegionEntryValue = convertSerializedByteArrayToObject(actualSerializedValue);
 
-        assertEquals(regionEntryValue, actualRegionEntryValue);
-    }
+    assertEquals(regionEntryValue, actualRegionEntryValue);
+  }
 
-    @Test
-    public void getDeserializedObjectShouldReturnADeserializedObject() {
-        Object regionEntryValue = getValue();
+  @Test
+  public void getDeserializedObjectShouldReturnADeserializedObject() {
+    Object regionEntryValue = getValue();
 
-        TinyStoredObject offheapAddress = createValueAsSerializedStoredObject(regionEntryValue);
+    TinyStoredObject offheapAddress = createValueAsSerializedStoredObject(regionEntryValue);
 
-        Integer actualRegionEntryValue = (Integer) offheapAddress.getDeserializedValue(null, null);
+    Integer actualRegionEntryValue = (Integer) offheapAddress.getDeserializedValue(null, null);
 
-        assertEquals(regionEntryValue, actualRegionEntryValue);
-    }
+    assertEquals(regionEntryValue, actualRegionEntryValue);
+  }
 
-    @Test
-    public void getDeserializedObjectShouldReturnAByteArrayAsIsIfNotSerialized() {
-        byte[] regionEntryValueAsBytes = getValueAsByteArray();
+  @Test
+  public void getDeserializedObjectShouldReturnAByteArrayAsIsIfNotSerialized() {
+    byte[] regionEntryValueAsBytes = getValueAsByteArray();
 
-        TinyStoredObject offheapAddress = createValueAsUnserializedStoredObject(regionEntryValueAsBytes);
+    TinyStoredObject offheapAddress = createValueAsUnserializedStoredObject(regionEntryValueAsBytes);
 
-        byte[] deserializeValue = (byte[]) offheapAddress.getDeserializedValue(null, null);
+    byte[] deserializeValue = (byte[]) offheapAddress.getDeserializedValue(null, null);
 
-        assertArrayEquals(regionEntryValueAsBytes, deserializeValue);
-    }
+    assertArrayEquals(regionEntryValueAsBytes, deserializeValue);
+  }
 
-    @Test
-    public void fillSerializedValueShouldFillWrapperWithSerializedValueIfValueIsSerialized() {
-        Object regionEntryValue = getValue();
-        byte[] serializedRegionEntryValue = EntryEventImpl.serialize(regionEntryValue);
+  @Test
+  public void fillSerializedValueShouldFillWrapperWithSerializedValueIfValueIsSerialized() {
+    Object regionEntryValue = getValue();
+    byte[] serializedRegionEntryValue = EntryEventImpl.serialize(regionEntryValue);
 
-        //encode a serialized entry value to address
-        long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(serializedRegionEntryValue, true, false);
+    //encode a serialized entry value to address
+    long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(serializedRegionEntryValue, true, false);
 
-        TinyStoredObject offheapAddress = new TinyStoredObject(encodedAddress);
+    TinyStoredObject offheapAddress = new TinyStoredObject(encodedAddress);
 
-        //mock the things
-        BytesAndBitsForCompactor wrapper = mock(BytesAndBitsForCompactor.class);
+    //mock the things
+    BytesAndBitsForCompactor wrapper = mock(BytesAndBitsForCompactor.class);
 
-        byte userBits = 1;
-        offheapAddress.fillSerializedValue(wrapper, userBits);
+    byte userBits = 1;
+    offheapAddress.fillSerializedValue(wrapper, userBits);
 
-        verify(wrapper, times(1)).setData(serializedRegionEntryValue, userBits, serializedRegionEntryValue.length, true);
-    }
+    verify(wrapper, times(1)).setData(serializedRegionEntryValue, userBits, serializedRegionEntryValue.length, true);
+  }
 
-    @Test
-    public void fillSerializedValueShouldFillWrapperWithDeserializedValueIfValueIsNotSerialized() {
-        Object regionEntryValue = getValue();
-        byte[] regionEntryValueAsBytes =  convertValueToByteArray(regionEntryValue);
+  @Test
+  public void fillSerializedValueShouldFillWrapperWithDeserializedValueIfValueIsNotSerialized() {
+    Object regionEntryValue = getValue();
+    byte[] regionEntryValueAsBytes = convertValueToByteArray(regionEntryValue);
 
-        //encode a un serialized entry value to address
-        long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(regionEntryValueAsBytes, false, false);
+    //encode a un serialized entry value to address
+    long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(regionEntryValueAsBytes, false, false);
 
-        TinyStoredObject offheapAddress = new TinyStoredObject(encodedAddress);
+    TinyStoredObject offheapAddress = new TinyStoredObject(encodedAddress);
 
-        //mock the things
-        BytesAndBitsForCompactor wrapper = mock(BytesAndBitsForCompactor.class);
+    //mock the things
+    BytesAndBitsForCompactor wrapper = mock(BytesAndBitsForCompactor.class);
 
-        byte userBits = 1;
-        offheapAddress.fillSerializedValue(wrapper, userBits);
+    byte userBits = 1;
+    offheapAddress.fillSerializedValue(wrapper, userBits);
 
-        verify(wrapper, times(1)).setData(regionEntryValueAsBytes, userBits, regionEntryValueAsBytes.length, true);
-    }
+    verify(wrapper, times(1)).setData(regionEntryValueAsBytes, userBits, regionEntryValueAsBytes.length, true);
+  }
 
-    @Test
-    public void getStringFormShouldCatchExceptionAndReturnErrorMessageAsString() {
-        Object regionEntryValueAsBytes = getValue();
+  @Test
+  public void getStringFormShouldCatchExceptionAndReturnErrorMessageAsString() {
+    Object regionEntryValueAsBytes = getValue();
 
-        byte[] serializedValue = EntryEventImpl.serialize(regionEntryValueAsBytes);
+    byte[] serializedValue = EntryEventImpl.serialize(regionEntryValueAsBytes);
 
-        //store -127 (DSCODE.ILLEGAL) - in order the deserialize to throw exception
-        serializedValue[0] = -127;
+    //store -127 (DSCODE.ILLEGAL) - in order the deserialize to throw exception
+    serializedValue[0] = -127;
 
-        //encode a un serialized entry value to address
-        long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(serializedValue, true, false);
+    //encode a un serialized entry value to address
+    long encodedAddress = OffHeapRegionEntryHelper.encodeDataAsAddress(serializedValue, true, false);
 
-        TinyStoredObject offheapAddress = new TinyStoredObject(encodedAddress);
+    TinyStoredObject offheapAddress = new TinyStoredObject(encodedAddress);
 
-        String errorMessage = offheapAddress.getStringForm();
+    String errorMessage = offheapAddress.getStringForm();
 
-        assertEquals(true, errorMessage.contains("Could not convert object to string because "));
-    }
+    assertEquals(true, errorMessage.contains("Could not convert object to string because "));
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessControllerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessControllerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessControllerJUnitTest.java
index da811b5..db5f823 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessControllerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessControllerJUnitTest.java
@@ -31,9 +31,13 @@ import javax.management.Query;
 import javax.management.QueryExp;
 
 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.TestName;
 
+import com.gemstone.gemfire.internal.process.mbean.Process;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
@@ -45,25 +49,31 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 public class LocalProcessControllerJUnitTest {
 
   private MBeanServer server;
-  private ObjectName objectName; 
-  
+  private ObjectName objectName;
+  private int pid;
+
+  @Rule
+  public TestName testName = new TestName();
+
+  @Before
+  public void setUp() throws Exception {
+    pid = ProcessUtils.identifyPid();
+    final Process process = new Process(pid, true);
+
+    this.objectName = ObjectName.getInstance(getClass().getSimpleName() + ":testName=" + testName.getMethodName());
+    this.server = ManagementFactory.getPlatformMBeanServer();
+
+    final ObjectInstance instance = this.server.registerMBean(process, objectName);
+    assertNotNull(instance);
+  }
+
   @After
-  public void unregisterMBean() throws Exception {
+  public void tearDown() throws Exception {
     this.server.unregisterMBean(objectName);
   }
   
   @Test
   public void testProcessMBean() throws Exception {
-    final String testName = "testProcessMBean";
-    final int pid = ProcessUtils.identifyPid();
-    final com.gemstone.gemfire.internal.process.mbean.Process process = new com.gemstone.gemfire.internal.process.mbean.Process(pid, true);
-    
-    this.objectName = ObjectName.getInstance(getClass().getSimpleName() + ":testName=" + testName);
-    this.server = ManagementFactory.getPlatformMBeanServer();
-    
-    final ObjectInstance instance = this.server.registerMBean(process, objectName);
-    assertNotNull(instance);
-
     // validate basics of the ProcessMBean
     Set<ObjectName> mbeanNames = this.server.queryNames(objectName, null);
     assertFalse("Zero matching mbeans", mbeanNames.isEmpty());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherDUnitTest.java
index a20871b..0bbab35 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherDUnitTest.java
@@ -22,13 +22,9 @@ import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.IOException;
 
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.internal.process.LocalProcessLauncher;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Multi-process tests for ProcessLauncher.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherJUnitTest.java
index 78dc6bb..3ff9936 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherJUnitTest.java
@@ -24,26 +24,36 @@ import java.io.FileReader;
 import java.io.FileWriter;
 
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestName;
 
 import com.gemstone.gemfire.internal.OSProcess;
-import com.gemstone.gemfire.internal.process.LocalProcessLauncher;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
  * Unit tests for ProcessLauncher.
  * 
  * @since 7.0
  */
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class LocalProcessLauncherJUnitTest {
 
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  @Rule
+  public TestName testName = new TestName();
+
+  private File pidFile;
+
   @Before
-  public void createDirectory() throws Exception {
-    new File(getClass().getSimpleName()).mkdir();
+  public void setUp() throws Exception {
+    this.pidFile = new File(this.temporaryFolder.getRoot(), testName.getMethodName() + ".pid");
   }
-  
+
   @Test
   public void testPidAccuracy() throws PidUnavailableException {
     int pid = ProcessUtils.identifyPid();
@@ -58,8 +68,6 @@ public class LocalProcessLauncherJUnitTest {
   
   @Test
   public void testPidFileIsCreated() throws Exception {
-    final File pidFile = new File(getClass().getSimpleName() 
-        + File.separator + "testPidFileIsCreated.pid");
     assertFalse(pidFile.exists());
     new LocalProcessLauncher(pidFile, false);
     assertTrue(pidFile.exists());
@@ -67,8 +75,6 @@ public class LocalProcessLauncherJUnitTest {
   
   @Test
   public void testPidFileContainsPid() throws Exception {
-    final File pidFile = new File(getClass().getSimpleName() 
-        + File.separator + "testPidFileContainsPid.pid");
     final LocalProcessLauncher launcher = new LocalProcessLauncher(pidFile, false);
     assertNotNull(launcher);
     assertTrue(pidFile.exists());
@@ -85,8 +91,6 @@ public class LocalProcessLauncherJUnitTest {
   
   @Test
   public void testPidFileIsCleanedUp() throws Exception {
-    final File pidFile = new File(getClass().getSimpleName() 
-        + File.separator + "testPidFileIsCleanedUp.pid");
     final LocalProcessLauncher launcher = new LocalProcessLauncher(pidFile, false);
     assertTrue(pidFile.exists());
     launcher.close(); // TODO: launch an external JVM and then close it nicely
@@ -95,8 +99,6 @@ public class LocalProcessLauncherJUnitTest {
   
   @Test
   public void testExistingPidFileThrows() throws Exception {
-    final File pidFile = new File(getClass().getSimpleName() 
-        + File.separator + "testExistingPidFileThrows.pid");
     assertTrue(pidFile.createNewFile());
     assertTrue(pidFile.exists());
     
@@ -115,8 +117,6 @@ public class LocalProcessLauncherJUnitTest {
 
   @Test
   public void testStalePidFileIsReplaced() throws Exception {
-    final File pidFile = new File(getClass().getSimpleName() 
-        + File.separator + "testStalePidFileIsReplaced.pid");
     assertTrue(pidFile.createNewFile());
     assertTrue(pidFile.exists());
     
@@ -143,9 +143,7 @@ public class LocalProcessLauncherJUnitTest {
   public void testForceReplacesExistingPidFile() throws Exception {
     assertTrue("testForceReplacesExistingPidFile is broken if PID == Integer.MAX_VALUE", 
         ProcessUtils.identifyPid() != Integer.MAX_VALUE);
-    
-    final File pidFile = new File(getClass().getSimpleName() 
-        + File.separator + "testForceReplacesExistingPidFile.pid");
+
     assertTrue(pidFile.createNewFile());
     assertTrue(pidFile.exists());
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/process/PidFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/PidFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/PidFileJUnitTest.java
index e74365e..bd9bf62 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/PidFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/PidFileJUnitTest.java
@@ -41,7 +41,7 @@ import org.junit.rules.ExpectedException;
 import org.junit.rules.TemporaryFolder;
 
 import com.gemstone.gemfire.internal.util.StopWatch;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.gemstone.gemfire.test.junit.rules.ExpectedTimeoutRule;
 
 /**
@@ -49,7 +49,7 @@ import com.gemstone.gemfire.test.junit.rules.ExpectedTimeoutRule;
  * 
  * @since 8.2
  */
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class PidFileJUnitTest {
 
   @Rule

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/process/signal/AbstractSignalNotificationHandlerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/signal/AbstractSignalNotificationHandlerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/signal/AbstractSignalNotificationHandlerJUnitTest.java
index 243f8d3..488957d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/process/signal/AbstractSignalNotificationHandlerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/process/signal/AbstractSignalNotificationHandlerJUnitTest.java
@@ -20,9 +20,6 @@ import static org.junit.Assert.*;
 
 import java.util.Set;
 
-import com.gemstone.gemfire.internal.util.CollectionUtils;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.lib.legacy.ClassImposteriser;
@@ -31,6 +28,9 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.internal.util.CollectionUtils;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 /**
  * The AbstractSignalNotificationHandlerJUnitTest class is a test suite of test cases testing the contract
  * and functionality of the AbstractSignalNotificationHandler.
@@ -63,7 +63,7 @@ public class AbstractSignalNotificationHandlerJUnitTest {
     mockContext = null;
   }
 
-  protected AbstractSignalNotificationHandler createSignalNotificationHandler() {
+  private AbstractSignalNotificationHandler createSignalNotificationHandler() {
     return new TestSignalNotificationHandler();
   }
 
@@ -453,7 +453,7 @@ public class AbstractSignalNotificationHandlerJUnitTest {
     // notification verification handled by mockContext.assertIsSatisfied in tearDown()
   }
 
-  protected static final class TestSignalNotificationHandler extends AbstractSignalNotificationHandler {
+  private static final class TestSignalNotificationHandler extends AbstractSignalNotificationHandler {
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectSizerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectSizerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectSizerJUnitTest.java
index 91af22c..0852c9d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectSizerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectSizerJUnitTest.java
@@ -16,26 +16,19 @@
  */
 package com.gemstone.gemfire.internal.size;
 
+import static com.gemstone.gemfire.internal.size.SizeTestUtil.*;
+import static org.junit.Assert.*;
+
+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.internal.size.SizeTestUtil.*;
-
 @Category(UnitTest.class)
-public class ObjectSizerJUnitTest extends TestCase {
-  
-  
-  public ObjectSizerJUnitTest() {
-    super();
-  }
-
-  public ObjectSizerJUnitTest(String name) {
-    super(name);
-  }
+public class ObjectSizerJUnitTest {
 
-  public void test() throws IllegalArgumentException, IllegalAccessException {
+  @Test
+  public void test() throws Exception {
     assertEquals(roundup(OBJECT_SIZE), ObjectGraphSizer.size(new Object()));
     
     assertEquals(roundup(OBJECT_SIZE + 4), ObjectGraphSizer.size(new TestObject1()));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectTraverserJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectTraverserJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectTraverserJUnitTest.java
index bd0bf9d..87ca34f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectTraverserJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectTraverserJUnitTest.java
@@ -16,24 +16,25 @@
  */
 package com.gemstone.gemfire.internal.size;
 
+import static org.junit.Assert.*;
+
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.IdentityHashMap;
 import java.util.Map;
 import java.util.Set;
 
+import org.junit.Ignore;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
 @Category(UnitTest.class)
-public class ObjectTraverserJUnitTest extends TestCase {
-  
-  public void testBasic() throws IllegalArgumentException, IllegalAccessException {
-    
+public class ObjectTraverserJUnitTest {
+
+  @Test
+  public void testBasic() throws Exception {
     Set testData = new HashSet();
     Object one = new Object();
     testData.add(one);
@@ -46,36 +47,35 @@ public class ObjectTraverserJUnitTest extends TestCase {
     TestVisitor visitor = new TestVisitor();
     ObjectTraverser.breadthFirstSearch(testData, visitor, false);
     
-    Assert.assertNotNull(visitor.visited.remove(testData));
-    Assert.assertNotNull(visitor.visited.remove(one));
-    Assert.assertNotNull(visitor.visited.remove(two));
-    Assert.assertNotNull(visitor.visited.remove(three));
+    assertNotNull(visitor.visited.remove(testData));
+    assertNotNull(visitor.visited.remove(one));
+    assertNotNull(visitor.visited.remove(two));
+    assertNotNull(visitor.visited.remove(three));
   }
-  
-  public void testStatics() throws IllegalArgumentException, IllegalAccessException {
-   
+
+  @Test
+  public void testStatics() throws Exception {
     final Object staticObject = new Object();
     TestObject1.test2 = staticObject;
     TestObject1 test1 = new TestObject1();
     
     TestVisitor visitor = new TestVisitor();
     ObjectTraverser.breadthFirstSearch(test1, visitor, false);
-    Assert.assertNull(visitor.visited.get(staticObject));
+    assertNull(visitor.visited.get(staticObject));
     
     visitor = new TestVisitor();
     ObjectTraverser.breadthFirstSearch(test1, visitor, true);
-    Assert.assertNotNull(visitor.visited.get(staticObject));
+    assertNotNull(visitor.visited.get(staticObject));
   }
-  
-  public void testStop() throws IllegalArgumentException, IllegalAccessException {
+
+  @Test
+  public void testStop() throws Exception {
     Set set1 = new HashSet();
     final Set set2 = new HashSet();
     Object object3 = new Object();
     set1.add(set2);
     set2.add(object3);
     
-    
-    
     TestVisitor visitor = new TestVisitor();
     visitor = new TestVisitor() {
       public boolean visit(Object parent, Object object) {
@@ -86,14 +86,15 @@ public class ObjectTraverserJUnitTest extends TestCase {
     
     ObjectTraverser.breadthFirstSearch(set1, visitor, true);
     
-    Assert.assertNotNull(visitor.visited.get(set1));
-    Assert.assertNotNull(visitor.visited.get(set2));
-    Assert.assertNull(visitor.visited.get(object3));
+    assertNotNull(visitor.visited.get(set1));
+    assertNotNull(visitor.visited.get(set2));
+    assertNull(visitor.visited.get(object3));
   }
   
   /** This test is commented out because it needs to be verified manually */
-  public void z_testHistogram() throws IllegalArgumentException, IllegalAccessException {
-    
+  @Ignore("commented out because it needs to be verified manually")
+  @Test
+  public void testHistogram() throws Exception {
     Set set1 = new HashSet();
     final Set set2 = new HashSet();
     Object object3 = new Object();
@@ -110,7 +111,7 @@ public class ObjectTraverserJUnitTest extends TestCase {
     public Map visited = new IdentityHashMap();
 
     public boolean visit(Object parent, Object object) {
-      Assert.assertNull(visited.put(object, VALUE));
+      assertNull(visited.put(object, VALUE));
       return true;
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ReflectionObjectSizerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ReflectionObjectSizerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ReflectionObjectSizerJUnitTest.java
index 4489433..7618e36 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ReflectionObjectSizerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ReflectionObjectSizerJUnitTest.java
@@ -17,29 +17,26 @@
 package com.gemstone.gemfire.internal.size;
 
 import static org.junit.Assert.*;
-
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import static org.mockito.Mockito.*;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import io.codearte.catchexception.shade.mockito.Mockito;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class ReflectionObjectSizerJUnitTest {
 
   @Test
   public void skipsSizingDistributedSystem() {
-
-    Object referenceObject = Mockito.mock(InternalDistributedSystem.class);
+    Object referenceObject = mock(InternalDistributedSystem.class);
     checkSizeDoesNotChange(referenceObject);
   }
 
   @Test
   public void skipsSizingClassLoader() {
-
     checkSizeDoesNotChange(Thread.currentThread().getContextClassLoader());
   }
 
@@ -59,7 +56,7 @@ public class ReflectionObjectSizerJUnitTest {
     assertNotEquals(sizeWithoutReference, sizer.sizeof(stringReference));
   }
 
-  public class TestObject {
+  private static class TestObject {
 
     public TestObject(final Object reference) {
       this.reference = reference;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/size/SizeClassOnceObjectSizerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/SizeClassOnceObjectSizerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/SizeClassOnceObjectSizerJUnitTest.java
index 8f41b21..5f7bb1b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/SizeClassOnceObjectSizerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/SizeClassOnceObjectSizerJUnitTest.java
@@ -16,20 +16,19 @@
  */
 package com.gemstone.gemfire.internal.size;
 
-import org.junit.experimental.categories.Category;
-
-import junit.framework.TestCase;
 import static com.gemstone.gemfire.internal.size.SizeTestUtil.*;
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.util.ObjectSizer;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- *
- */
 @Category(UnitTest.class)
-public class SizeClassOnceObjectSizerJUnitTest extends TestCase{
-  
+public class SizeClassOnceObjectSizerJUnitTest {
+
+  @Test
   public void test() {
     byte[] b1 = new byte[5];
     byte[] b2 = new byte[15];

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/size/WellKnownClassSizerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/WellKnownClassSizerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/WellKnownClassSizerJUnitTest.java
index 76655fb..e25ae4c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/WellKnownClassSizerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/WellKnownClassSizerJUnitTest.java
@@ -16,20 +16,19 @@
  */
 package com.gemstone.gemfire.internal.size;
 
+import static com.gemstone.gemfire.internal.size.SizeTestUtil.*;
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.util.ObjectSizer;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-import static com.gemstone.gemfire.internal.size.SizeTestUtil.*;
-
-/**
- *
- */
 @Category(UnitTest.class)
-public class WellKnownClassSizerJUnitTest extends TestCase {
-  
+public class WellKnownClassSizerJUnitTest {
+
+  @Test
   public void testByteArrays() {
     byte[] test1 = new byte[5];
     byte[] test2 = new byte[8];
@@ -41,7 +40,8 @@ public class WellKnownClassSizerJUnitTest extends TestCase {
     
     assertEquals(0, WellKnownClassSizer.sizeof(new Object()));
   }
-  
+
+  @Test
   public void testStrings() {
     String test1 = "123";
     String test2 = "012345678";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SampleCollectorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SampleCollectorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SampleCollectorJUnitTest.java
index dcf9420..37b75a4 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SampleCollectorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SampleCollectorJUnitTest.java
@@ -16,18 +16,12 @@
  */
 package com.gemstone.gemfire.internal.statistics;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import java.io.File;
 import java.util.List;
 
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -44,47 +38,31 @@ import com.gemstone.gemfire.internal.statistics.TestSampleHandler.SampledInfo;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
- * Unit tests for the SampleCollector class.
+ * Unit tests for the SampleCollector class. No disk IO.
  *   
  * @since 7.0
  */
 @Category(UnitTest.class)
 public class SampleCollectorJUnitTest {
 
-  private static final String dir = "SampleCollectorJUnitTest";
-
-  private Mockery mockContext;
-  private TestStatisticsManager manager; 
+  private TestStatisticsManager manager;
   private SampleCollector sampleCollector;
   
   @Before
   public void setUp() throws Exception {
-    new File(dir).mkdir();
-    this.mockContext = new Mockery() {{
-      setImposteriser(ClassImposteriser.INSTANCE);
-    }};
     final long startTime = System.currentTimeMillis();
-    this.manager = new TestStatisticsManager(1, "SampleCollectorJUnitTest", startTime);
-    
-    final StatArchiveHandlerConfig mockStatArchiveHandlerConfig = this.mockContext.mock(StatArchiveHandlerConfig.class, "SampleCollectorJUnitTest$StatArchiveHandlerConfig");
-    this.mockContext.checking(new Expectations() {{
-      allowing(mockStatArchiveHandlerConfig).getArchiveFileName();
-      will(returnValue(new File("")));
-      allowing(mockStatArchiveHandlerConfig).getArchiveFileSizeLimit();
-      will(returnValue(0));
-      allowing(mockStatArchiveHandlerConfig).getArchiveDiskSpaceLimit();
-      will(returnValue(0));
-      allowing(mockStatArchiveHandlerConfig).getSystemId();
-      will(returnValue(1));
-      allowing(mockStatArchiveHandlerConfig).getSystemStartTime();
-      will(returnValue(startTime));
-      allowing(mockStatArchiveHandlerConfig).getSystemDirectoryPath();
-      will(returnValue(""));
-      allowing(mockStatArchiveHandlerConfig).getProductDescription();
-      will(returnValue("SampleCollectorJUnitTest"));
-    }});
+    this.manager = new TestStatisticsManager(1, getClass().getSimpleName(), startTime);
+
+    final StatArchiveHandlerConfig mockStatArchiveHandlerConfig = mock(StatArchiveHandlerConfig.class, getClass().getSimpleName() + "$" + StatArchiveHandlerConfig.class.getSimpleName());
+    when(mockStatArchiveHandlerConfig.getArchiveFileName()).thenReturn(new File(""));
+    when(mockStatArchiveHandlerConfig.getArchiveFileSizeLimit()).thenReturn(0L);
+    when(mockStatArchiveHandlerConfig.getArchiveDiskSpaceLimit()).thenReturn(0L);
+    when(mockStatArchiveHandlerConfig.getSystemId()).thenReturn(0L);
+    when(mockStatArchiveHandlerConfig.getSystemStartTime()).thenReturn(startTime);
+    when(mockStatArchiveHandlerConfig.getSystemDirectoryPath()).thenReturn("");
+    when(mockStatArchiveHandlerConfig.getProductDescription()).thenReturn(getClass().getSimpleName());
 
-    StatisticsSampler sampler = new TestStatisticsSampler(manager);
+    final StatisticsSampler sampler = new TestStatisticsSampler(manager);
     this.sampleCollector = new SampleCollector(sampler);
     this.sampleCollector.initialize(mockStatArchiveHandlerConfig, NanoTimer.getTime());
   }
@@ -95,8 +73,6 @@ public class SampleCollectorJUnitTest {
       this.sampleCollector.close();
       this.sampleCollector = null;
     }
-    this.mockContext.assertIsSatisfied();
-    this.mockContext = null;
     this.manager = null;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatMonitorHandlerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatMonitorHandlerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatMonitorHandlerJUnitTest.java
index 6c88fd4..c4370e5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatMonitorHandlerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatMonitorHandlerJUnitTest.java
@@ -27,29 +27,19 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.i18n.LogWriterI18n;
 import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.logging.LogWriterImpl;
-import com.gemstone.gemfire.internal.logging.PureLogWriter;
 import com.gemstone.gemfire.internal.statistics.StatMonitorHandler.StatMonitorNotifier;
 import com.gemstone.gemfire.internal.util.StopWatch;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
- * Unit test for the StatMonitorHandler and its inner classes.
+ * Unit tests for the StatMonitorHandler and its inner classes.
  *   
  * @since 7.0
  */
 @Category(UnitTest.class)
 public class StatMonitorHandlerJUnitTest {
 
-  private LogWriterI18n log = null;
-
-  @Before
-  public void setUp() throws Exception {
-    this.log = new PureLogWriter(LogWriterImpl.levelNameToCode("config"));
-  }
-
   @Test
   public void testAddNewMonitor() throws Exception {
     StatMonitorHandler handler = new StatMonitorHandler();
@@ -100,7 +90,7 @@ public class StatMonitorHandlerJUnitTest {
   }
   
   @Test
-  public void testNotificationSampleFrequencyDefault() {
+  public void testNotificationSampleFrequencyDefault() throws Exception {
     final int sampleFrequency = 1;
     StatMonitorHandler handler = new StatMonitorHandler();
     TestStatisticsMonitor monitor = new TestStatisticsMonitor();
@@ -114,7 +104,7 @@ public class StatMonitorHandlerJUnitTest {
   }
   
   @Test
-  public void testNotificationSampleTimeMillis() {
+  public void testNotificationSampleTimeMillis() throws Exception {
     final long currentTime = System.currentTimeMillis();
     StatMonitorHandler handler = new StatMonitorHandler();
     TestStatisticsMonitor monitor = new TestStatisticsMonitor();
@@ -127,7 +117,7 @@ public class StatMonitorHandlerJUnitTest {
   }
   
   @Test
-  public void testNotificationResourceInstances() {
+  public void testNotificationResourceInstances() throws Exception {
     final int resourceInstanceCount = 100;
     final List<ResourceInstance> resourceInstances = new ArrayList<ResourceInstance>();
     for (int i = 0; i < resourceInstanceCount; i++) {
@@ -194,26 +184,18 @@ public class StatMonitorHandlerJUnitTest {
     waitUntilWaiting(notifier);
   }
 
-  private static void waitUntilWaiting(StatMonitorNotifier notifier) {
+  private static void waitUntilWaiting(StatMonitorNotifier notifier) throws InterruptedException {
     boolean done = false;
-    try {
-      for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 2000; done = (notifier.isWaiting())) {
-        Thread.sleep(10);
-      }
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
+    for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 2000; done = (notifier.isWaiting())) {
+      Thread.sleep(10);
     }
-    assertTrue("waiting for notifier to be waiting", done);  
+    assertTrue("waiting for notifier to be waiting", done);
   }
   
-  private static void waitForNotificationCount(final TestStatisticsMonitor monitor, final int expected, long ms, long interval, boolean throwOnTimeout) {
+  private static void waitForNotificationCount(final TestStatisticsMonitor monitor, final int expected, long ms, long interval, boolean throwOnTimeout) throws InterruptedException {
     boolean done = false;
-    try {
-      for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < ms; done = (monitor.getNotificationCount() >= expected)) {
-        Thread.sleep(interval);
-      }
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
+    for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < ms; done = (monitor.getNotificationCount() >= expected)) {
+      Thread.sleep(interval);
     }
     if (throwOnTimeout) {
       assertTrue("waiting for notification count to be " + expected, done);
@@ -223,7 +205,7 @@ public class StatMonitorHandlerJUnitTest {
   /**
    * @since 7.0
    */
-  static class TestStatisticsMonitor extends StatisticsMonitor {
+  private static class TestStatisticsMonitor extends StatisticsMonitor {
     private volatile long timeStamp;
     private volatile List<ResourceInstance> resourceInstances;
     private volatile int notificationCount;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsMonitorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsMonitorJUnitTest.java
index f8cf043..4ee8995 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsMonitorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsMonitorJUnitTest.java
@@ -17,68 +17,43 @@
 package com.gemstone.gemfire.internal.statistics;
 
 import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import java.io.File;
 import java.util.List;
 
-import org.jmock.Expectations;
-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;
 
 import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
-import com.gemstone.gemfire.internal.logging.LogWriterImpl;
-import com.gemstone.gemfire.internal.logging.PureLogWriter;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
- * Unit and integration tests for the StatisticsMonitor.
+ * Unit tests for the StatisticsMonitor class. No disk IO.
  *   
  * @since 7.0
  */
 @Category(UnitTest.class)
 public class StatisticsMonitorJUnitTest {
   
-  private Mockery mockContext;
-  private InternalLogWriter log;
-  private TestStatisticsManager manager; 
+  private TestStatisticsManager manager;
   private SampleCollector sampleCollector;
 
   @Before
   public void setUp() throws Exception {
-    this.mockContext = new Mockery() {{
-      setImposteriser(ClassImposteriser.INSTANCE);
-    }};
-    
-    this.log = new PureLogWriter(LogWriterImpl.levelNameToCode("config"));
-    
     final long startTime = System.currentTimeMillis();
-    this.manager = new TestStatisticsManager(
-        1, 
-        "StatisticsMonitorJUnitTest", 
-        startTime);
+    this.manager = new TestStatisticsManager(1, getClass().getSimpleName(), startTime);
     
-    final StatArchiveHandlerConfig mockStatArchiveHandlerConfig = this.mockContext.mock(StatArchiveHandlerConfig.class, "StatisticsMonitorJUnitTest$StatArchiveHandlerConfig");
-    this.mockContext.checking(new Expectations() {{
-      allowing(mockStatArchiveHandlerConfig).getArchiveFileName();
-      will(returnValue(new File("")));
-      allowing(mockStatArchiveHandlerConfig).getArchiveFileSizeLimit();
-      will(returnValue(0));
-      allowing(mockStatArchiveHandlerConfig).getArchiveDiskSpaceLimit();
-      will(returnValue(0));
-      allowing(mockStatArchiveHandlerConfig).getSystemId();
-      will(returnValue(1));
-      allowing(mockStatArchiveHandlerConfig).getSystemStartTime();
-      will(returnValue(startTime));
-      allowing(mockStatArchiveHandlerConfig).getSystemDirectoryPath();
-      will(returnValue(""));
-      allowing(mockStatArchiveHandlerConfig).getProductDescription();
-      will(returnValue("StatisticsMonitorJUnitTest"));
-    }});
+    final StatArchiveHandlerConfig mockStatArchiveHandlerConfig = mock(StatArchiveHandlerConfig.class, getClass().getSimpleName() + "$" + StatArchiveHandlerConfig.class.getSimpleName());
+    when(mockStatArchiveHandlerConfig.getArchiveFileName()).thenReturn(new File(""));
+    when(mockStatArchiveHandlerConfig.getArchiveFileSizeLimit()).thenReturn(0L);
+    when(mockStatArchiveHandlerConfig.getArchiveDiskSpaceLimit()).thenReturn(0L);
+    when(mockStatArchiveHandlerConfig.getSystemId()).thenReturn(0L);
+    when(mockStatArchiveHandlerConfig.getSystemStartTime()).thenReturn(0L);
+    when(mockStatArchiveHandlerConfig.getSystemDirectoryPath()).thenReturn("");
+    when(mockStatArchiveHandlerConfig.getProductDescription()).thenReturn(getClass().getSimpleName());
 
     StatisticsSampler sampler = new TestStatisticsSampler(manager);
     this.sampleCollector = new SampleCollector(sampler);
@@ -91,8 +66,6 @@ public class StatisticsMonitorJUnitTest {
       this.sampleCollector.close();
       this.sampleCollector = null;
     }
-    this.mockContext.assertIsSatisfied();
-    this.mockContext = null;
     this.manager = null;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/tcp/ConnectionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/tcp/ConnectionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/tcp/ConnectionJUnitTest.java
index ffd5092..3a88707 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/tcp/ConnectionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/tcp/ConnectionJUnitTest.java
@@ -16,10 +16,7 @@
  */
 package com.gemstone.gemfire.internal.tcp;
 
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.*;
 
 import java.io.InputStream;
 import java.net.InetSocketAddress;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/AbortableTaskServiceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/AbortableTaskServiceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/AbortableTaskServiceJUnitTest.java
index 4378180..77098ca 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/AbortableTaskServiceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/AbortableTaskServiceJUnitTest.java
@@ -165,7 +165,6 @@ public class AbortableTaskServiceJUnitTest {
    * Proxy handler which invokes methodName asynchronously AND delays the 
    * invocation to the underlying methodName until after CountDownLatch is 
    * opened.
-   * 
    */
   private class DelayedExecutorHandler implements InvocationHandler {
     private final Executor executor;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/ArrayUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/ArrayUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/ArrayUtilsJUnitTest.java
index 0a78a19..1fd759a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/ArrayUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/ArrayUtilsJUnitTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.util;
 
 import static org.junit.Assert.*;
@@ -25,7 +24,7 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
- * The ArrayUtilsJUnitTest class... </p>
+ * Unit tests for {@link ArrayUtils}.
  *
  * @since 7.x
  */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/BytesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/BytesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/BytesJUnitTest.java
index e5a7f4d..50f3280 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/BytesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/BytesJUnitTest.java
@@ -16,18 +16,27 @@
  */
 package com.gemstone.gemfire.internal.util;
 
+import static org.junit.Assert.*;
+
 import java.nio.ByteBuffer;
 
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 @Category(UnitTest.class)
-public class BytesJUnitTest extends TestCase {
-  private ByteBuffer buf = ByteBuffer.allocate(8);
-  
+public class BytesJUnitTest {
+
+  private ByteBuffer buf;
+
+  @Before
+  public void setUp() throws Exception {
+    buf = ByteBuffer.allocate(8);
+  }
+
+  @Test
   public void testShort() {
     short[] val = { 666, -1, Short.MIN_VALUE, 0, 12, Short.MAX_VALUE };
     for (int i = 0; i < val.length; i++) {
@@ -37,7 +46,8 @@ public class BytesJUnitTest extends TestCase {
       buf.rewind();
     }
   }
-  
+
+  @Test
   public void testChar() {
     char[] val = { 'a', 'b', 'c' };
     for (int i = 0; i < val.length; i++) {
@@ -47,7 +57,8 @@ public class BytesJUnitTest extends TestCase {
       buf.rewind();
     }
   }
-  
+
+  @Test
   public void testUnsignedShort() {
     int[] val = { 0, 1, Short.MAX_VALUE + 1, 2 * Short.MAX_VALUE };
     for (int i = 0; i < val.length; i++) {
@@ -57,7 +68,8 @@ public class BytesJUnitTest extends TestCase {
       buf.rewind();
     }
   }
-  
+
+  @Test
   public void testInt() {
     int[] val = { 666, -1, Integer.MIN_VALUE, 0, 1, Integer.MAX_VALUE };
     for (int i = 0; i < val.length; i++) {
@@ -71,7 +83,8 @@ public class BytesJUnitTest extends TestCase {
       assertEquals(val[i], Bytes.toInt(bytes[0], bytes[1], bytes[2], bytes[3]));
     }
   }
-  
+
+  @Test
   public void testLong() {
     long[] val = { 666, -1, Long.MIN_VALUE, 0, 1, Long.MAX_VALUE };
     for (int i = 0; i < val.length; i++) {
@@ -82,8 +95,8 @@ public class BytesJUnitTest extends TestCase {
       buf.rewind();
     }
   }
-  
-  
+
+  @Test
   public void testVarint() {
     ByteBuffer buf = ByteBuffer.allocate(5);
     checkVarint(0, buf);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/CollectionUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/CollectionUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/CollectionUtilsJUnitTest.java
index 0748055..242d2f2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/CollectionUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/CollectionUtilsJUnitTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.util;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/DelayedActionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/DelayedActionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/DelayedActionJUnitTest.java
index c6aa1a3..3a2d660 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/DelayedActionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/DelayedActionJUnitTest.java
@@ -16,19 +16,22 @@
  */
 package com.gemstone.gemfire.internal.util;
 
+import static org.junit.Assert.*;
+
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 @Category(UnitTest.class)
-public class DelayedActionJUnitTest extends TestCase {
+public class DelayedActionJUnitTest {
+
+  @Test
   public void testDelay() throws InterruptedException {
     final AtomicBoolean hit = new AtomicBoolean(false);
     final CountDownLatch complete = new CountDownLatch(1);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/IOUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/IOUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/IOUtilsJUnitTest.java
index 0a36780..fe68196 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/IOUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/IOUtilsJUnitTest.java
@@ -70,7 +70,7 @@ public class IOUtilsJUnitTest {
    * @param pathElements a String array containing the elements of the path.
    * @return a fully-qualified pathname as a String value.
    */
-  protected String toPathname(final String... pathElements) {
+  private String toPathname(final String... pathElements) {
     if (pathElements != null) {
       final StringBuilder buffer = new StringBuilder();
       for (String pathElement : pathElements) {
@@ -274,7 +274,7 @@ public class IOUtilsJUnitTest {
     }
   }
 
-  protected static final class MockFile extends File {
+  private static final class MockFile extends File {
 
     private boolean isGetAbsoluteFileCalled = false;
     private boolean isGetCanonicalFileCalled = false;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/CompactConcurrentHashSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/CompactConcurrentHashSetJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/CompactConcurrentHashSetJUnitTest.java
index 216a85c..e053d38 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/CompactConcurrentHashSetJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/CompactConcurrentHashSetJUnitTest.java
@@ -16,14 +16,14 @@
  */
 package com.gemstone.gemfire.internal.util.concurrent;
 
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Random;
 import java.util.Set;
 
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -32,17 +32,23 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class CompactConcurrentHashSetJUnitTest {
-  static int RANGE = 100000;
-  static int SET_SIZE = 1000;
-  Random ran = new Random();
-  
+
+  private static final int RANGE = 100000;
+
+  private Random random;
+
+  @Before
+  public void setUp() throws Exception {
+    random = new Random();
+  }
+
   @Test
-  public void testEquals() {
+  public void testEquals() { // TODO: reduce test runtime
     Set s1, s2;
     s1 = new CompactConcurrentHashSet2();
     s2 = new HashSet();
     for (int i=0; i<10000; i++) {
-      int nexti = ran.nextInt(RANGE);
+      int nexti = random.nextInt(RANGE);
       s1.add(nexti);
       s2.add(nexti);
       assertTrue("expected s1 and s2 to be equal", s1.equals(s2));
@@ -60,7 +66,7 @@ public class CompactConcurrentHashSetJUnitTest {
     Set<Integer> s1;
     s1 = new CompactConcurrentHashSet2<Integer>();
     for (int i=0; i<10000; i++) {
-      int nexti = ran.nextInt(RANGE);
+      int nexti = random.nextInt(RANGE);
       s1.add(nexti);
     }
     for (Iterator<Integer> it=s1.iterator(); it.hasNext(); ) {
@@ -80,7 +86,7 @@ public class CompactConcurrentHashSetJUnitTest {
     s1 = new CompactConcurrentHashSet2<Integer>();
     s2 = new HashSet<Integer>();
     for (int i=0; i<10000; i++) {
-      int nexti = ran.nextInt(RANGE);
+      int nexti = random.nextInt(RANGE);
       s1.add(nexti);
       s2.add(nexti);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ReentrantSemaphoreJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ReentrantSemaphoreJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ReentrantSemaphoreJUnitTest.java
index d24d067..0fe7301 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ReentrantSemaphoreJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ReentrantSemaphoreJUnitTest.java
@@ -16,45 +16,69 @@
  */
 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.AtomicReference;
 
+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 ReentrantSemaphoreJUnitTest extends TestCase {
-  
-  public void test() throws Throwable {
+public class ReentrantSemaphoreJUnitTest {
+
+  private static final long OPERATION_TIMEOUT_MILLIS = 10 * 1000;
+
+  private CountDownLatch done;
+  private CountDownLatch acquired;
+
+  @Rule
+  public Timeout timeout = new Timeout(30, TimeUnit.SECONDS);
+
+  @Before
+  public void setUp() throws Exception {
+    done = new CountDownLatch(1);
+    acquired = new CountDownLatch(2);
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    acquired.countDown();
+    done.countDown();
+  }
+
+  @Test
+  public void testOneThread() throws Exception {
+    final ReentrantSemaphore semaphore = new ReentrantSemaphore(2);
+    semaphore.acquire();
+    semaphore.acquire();
+    assertEquals(1, semaphore.availablePermits());
+    semaphore.release();
+    semaphore.release();
+    assertEquals(2, semaphore.availablePermits());
+  }
+
+  @Test
+  public void testMultipleThreads() throws Exception {
     final ReentrantSemaphore sem = new ReentrantSemaphore(2);
-    
-    sem.acquire();
-    sem.acquire();
-    assertEquals(1, sem.availablePermits());
-    sem.release();
-    sem.release();
-    assertEquals(2, sem.availablePermits());
-    
-    final CountDownLatch testDone = new CountDownLatch(1);
-    final CountDownLatch semsAquired = new CountDownLatch(2);
-    
-    final AtomicReference<Throwable> failure = new AtomicReference<Throwable>();
-    
+
+    final AtomicReference<Throwable> failure = new AtomicReference<>();
+
     Thread t1 = new Thread() {
       public void run() {
-        try { 
+        try {
           sem.acquire();
           sem.acquire();
           sem.acquire();
-          semsAquired.countDown();
-          testDone.await();
+          acquired.countDown();
+          assertTrue(done.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
           sem.release();
           sem.release();
           sem.release();
@@ -71,8 +95,8 @@ public class ReentrantSemaphoreJUnitTest extends TestCase {
           sem.acquire();
           sem.acquire();
           sem.acquire();
-          semsAquired.countDown();
-          testDone.await();
+          acquired.countDown();
+          assertTrue(done.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
           sem.release();
           sem.release();
           sem.release();
@@ -86,7 +110,7 @@ public class ReentrantSemaphoreJUnitTest extends TestCase {
     Thread t3 = new Thread() {
       public void run() {
         try {
-          semsAquired.await();
+          assertTrue(acquired.await(OPERATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS));
           assertEquals(0, sem.availablePermits());
           assertFalse(sem.tryAcquire(1, TimeUnit.SECONDS));
         } catch(Exception e) {
@@ -96,13 +120,19 @@ public class ReentrantSemaphoreJUnitTest extends TestCase {
     };
     t3.start();
     
-    t3.join();
-    testDone.countDown();
-    t2.join();
-    t1.join();
-    
-    if(failure.get() != null) {
-      throw failure.get();
+    t3.join(OPERATION_TIMEOUT_MILLIS);
+    assertFalse(t3.isAlive());
+
+    done.countDown();
+
+    t2.join(OPERATION_TIMEOUT_MILLIS);
+    assertFalse(t3.isAlive());
+
+    t1.join(OPERATION_TIMEOUT_MILLIS);
+    assertFalse(t1.isAlive());
+
+    if (failure.get() != null) {
+      throw new AssertionError(failure.get());
     }
     
     assertEquals(2, sem.availablePermits());



[16/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NonDistinctOrderByTestImplementation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NonDistinctOrderByTestImplementation.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NonDistinctOrderByTestImplementation.java
index 41e0413..4feadaf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NonDistinctOrderByTestImplementation.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NonDistinctOrderByTestImplementation.java
@@ -164,7 +164,7 @@ public abstract class NonDistinctOrderByTestImplementation {
           if (!(itr.next().toString()).equals("IDIndexPf1")) {
             fail("<IDIndexPf1> was expected but found " + itr.next().toString());
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -255,7 +255,7 @@ public abstract class NonDistinctOrderByTestImplementation {
           limit = Integer.parseInt(queries[i].substring(indexLimit + 5).trim());
         }
         assertTrue(!limitQuery || rcw.size() <= limit);
-        // assertEquals("Set",rcw.getCollectionType().getSimpleClassName());
+        // assertIndexDetailsEquals("Set",rcw.getCollectionType().getSimpleClassName());
         if (!rcw.getCollectionType().isOrdered()) {
           fail("The collection type="+rcw.getCollectionType().getSimpleClassName()+"  is not ordered");
         }
@@ -269,7 +269,7 @@ public abstract class NonDistinctOrderByTestImplementation {
           if (!(itr.next().toString()).equals("IDIndexPf1")) {
             fail("<IDIndexPf1> was expected but found " + itr.next().toString());
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -368,7 +368,7 @@ public abstract class NonDistinctOrderByTestImplementation {
           if (!(itr.next().toString()).equals("IDIndexPf1")) {
             fail("<IDIndexPf1> was expected but found " + itr.next().toString());
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -468,7 +468,7 @@ public abstract class NonDistinctOrderByTestImplementation {
           if (!(itr.next().toString()).equals("IDIndexPf1")) {
             fail("<IDIndexPf1> was expected but found " + itr.next().toString());
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -571,7 +571,7 @@ public abstract class NonDistinctOrderByTestImplementation {
           if (!(indexUsed).equals("IDIndexPf1")) {
             fail("<IDIndexPf1> was expected but found " + indexUsed);
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -674,7 +674,7 @@ public abstract class NonDistinctOrderByTestImplementation {
           if (!(indexUsed).equals("IDIndexPf1")) {
             fail("<IDIndexPf1> was expected but found " + indexUsed);
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -775,7 +775,7 @@ public abstract class NonDistinctOrderByTestImplementation {
           if (!(indexUsed).equals("PKIDIndexPf1")) {
             fail("<PKIDIndexPf1> was expected but found " + indexUsed);
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/OrderByReplicatedJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/OrderByReplicatedJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/OrderByReplicatedJUnitTest.java
index 84f9350..e1372e9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/OrderByReplicatedJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/OrderByReplicatedJUnitTest.java
@@ -491,7 +491,7 @@ public class OrderByReplicatedJUnitTest extends OrderByTestImplementation {
           if (!(indexUsed).equals("PKIDIndexPf1")) {
             fail("<PKIDIndexPf1> was expected but found " + indexUsed);
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -624,7 +624,7 @@ public class OrderByReplicatedJUnitTest extends OrderByTestImplementation {
           if (!(indexUsed).equals("PKIDIndexPf1")) {
             fail("<PKIDIndexPf1> was expected but found " + indexUsed);
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/OrderByTestImplementation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/OrderByTestImplementation.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/OrderByTestImplementation.java
index 71e2c6d..206346e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/OrderByTestImplementation.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/OrderByTestImplementation.java
@@ -164,7 +164,7 @@ public abstract class OrderByTestImplementation {
             fail("<IDIndexPf1> was expected but found "
                 + itr.next().toString());
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -314,7 +314,7 @@ public abstract class OrderByTestImplementation {
           limit = Integer.parseInt(queries[i].substring(indexLimit+5).trim());
         }
         assertTrue(!limitQuery || rcw.size() <= limit);
-        //assertEquals("Set",rcw.getCollectionType().getSimpleClassName());
+        //assertIndexDetailsEquals("Set",rcw.getCollectionType().getSimpleClassName());
         String colType = rcw.getCollectionType().getSimpleClassName();
         if (!(colType.equals("Ordered") || colType.equals("LinkedHashSet"))) {
           fail("The collection type " + colType + " is not expexted");
@@ -329,7 +329,7 @@ public abstract class OrderByTestImplementation {
             fail("<IDIndexPf1> was expected but found "
                 + itr.next().toString());
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -429,7 +429,7 @@ public abstract class OrderByTestImplementation {
             fail("<IDIndexPf1> was expected but found "
                 + itr.next().toString());
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -512,7 +512,7 @@ public abstract class OrderByTestImplementation {
             fail("<IDIndexPf1> was expected but found "
                 + itr.next().toString());
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -615,7 +615,7 @@ public abstract class OrderByTestImplementation {
             fail("<IDIndexPf1> was expected but found "
                 + indexUsed);
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -699,7 +699,7 @@ public abstract class OrderByTestImplementation {
             fail("<IDIndexPf1> was expected but found "
                 + indexUsed);
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();
@@ -783,7 +783,7 @@ public abstract class OrderByTestImplementation {
             fail("<PKIDIndexPf1> was expected but found "
                 + indexUsed);
           }
-          // assertEquals("statusIndexPf1",itr.next().toString());
+          // assertIndexDetailsEquals("statusIndexPf1",itr.next().toString());
         }
 
         int indxs = observer.indexesUsed.size();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/PdxOrderByJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/PdxOrderByJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/PdxOrderByJUnitTest.java
index a1cbff4..2f0327c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/PdxOrderByJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/PdxOrderByJUnitTest.java
@@ -306,7 +306,7 @@ public class PdxOrderByJUnitTest {
           if (p1 instanceof Struct) {
             Object[] values1 = ((Struct) p1).getFieldValues();
             Object[] values2 = ((Struct) p2).getFieldValues();
-            // test.assertEquals(values1.length, values2.length);
+            // test.assertIndexDetailsEquals(values1.length, values2.length);
             if (values1.length != values2.length) {
               ok = false;
               break ;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/CompiledAggregateFunctionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/CompiledAggregateFunctionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/CompiledAggregateFunctionJUnitTest.java
index fc793bf..c7d83b3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/CompiledAggregateFunctionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/CompiledAggregateFunctionJUnitTest.java
@@ -16,13 +16,14 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
+import static org.junit.Assert.*;
+
 import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.TestCase;
-
 import org.jmock.Mockery;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -45,20 +46,19 @@ import com.gemstone.gemfire.cache.query.internal.aggregate.SumDistinctPRQueryNod
 import com.gemstone.gemfire.cache.query.internal.parse.OQLLexerTokenTypes;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- * 
- *
- */
 @Category(UnitTest.class)
-public class CompiledAggregateFunctionJUnitTest extends TestCase {
+public class CompiledAggregateFunctionJUnitTest {
   
-  Mockery context = new Mockery();
-  private Cache cache = context.mock(Cache.class) ; 
-  private List bucketList = new ArrayList();
+  private Mockery context;
+  private Cache cache;
+  private List bucketList;
   
-  public CompiledAggregateFunctionJUnitTest(String testName) {
-    super(testName);
-    bucketList.add(Integer.valueOf(1)); 
+  @Before
+  public void setUp() throws Exception {
+    context = new Mockery();
+    cache = context.mock(Cache.class);
+    bucketList = new ArrayList();
+    bucketList.add(Integer.valueOf(1));
   }
 
   @Test
@@ -194,6 +194,4 @@ public class CompiledAggregateFunctionJUnitTest extends TestCase {
     MaxMin maxMin1 = (MaxMin) agg1;
     assertFalse(((Boolean) findMax.get(maxMin1)).booleanValue());
   }
-
-  
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/CompiledInJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/CompiledInJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/CompiledInJUnitTest.java
index 4ee2299..b20b365 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/CompiledInJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/CompiledInJUnitTest.java
@@ -16,15 +16,13 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
 import java.util.ArrayList;
 import java.util.Collection;
 
-import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -56,7 +54,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
   
   @Test
@@ -67,7 +65,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
   
   @Test
@@ -78,7 +76,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
   
   @Test
@@ -89,7 +87,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
   
   @Test
@@ -125,7 +123,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -136,7 +134,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -147,7 +145,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -158,7 +156,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -169,7 +167,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -180,7 +178,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -191,7 +189,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -202,7 +200,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -213,7 +211,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -224,7 +222,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -235,7 +233,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -246,7 +244,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -257,7 +255,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -268,7 +266,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -279,7 +277,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -290,7 +288,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -301,7 +299,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -312,7 +310,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -323,7 +321,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -334,7 +332,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -360,7 +358,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -373,7 +371,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -385,7 +383,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   // String form
@@ -399,7 +397,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -412,7 +410,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertFalse((Boolean) result);
+    assertFalse((Boolean) result);
   }
 
   @Test
@@ -425,7 +423,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -437,7 +435,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertTrue((Boolean) result);
+    assertTrue((Boolean) result);
   }
 
   @Test
@@ -446,7 +444,7 @@ public class CompiledInJUnitTest {
 
     CompiledIn compiledIn = new CompiledIn(elm, colln);
     Object result = compiledIn.evaluate(context);
-    Assert.assertNotNull(result);
+    assertNotNull(result);
   }
   
   private PdxInstanceEnumInfo createPdxInstanceEnumInfo(Enum<?> e, int enumId) {
@@ -455,6 +453,4 @@ public class CompiledInJUnitTest {
   }
   
   private enum EnumForTest {ONE, TWO, THREE};
-  
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/NWayMergeResultsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/NWayMergeResultsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/NWayMergeResultsJUnitTest.java
index a4043f0..a39cd8e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/NWayMergeResultsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/NWayMergeResultsJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
+import static org.junit.Assert.*;
+
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -28,10 +30,7 @@ import java.util.NoSuchElementException;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.query.Struct;
@@ -40,22 +39,10 @@ import com.gemstone.gemfire.cache.query.internal.types.StructTypeImpl;
 import com.gemstone.gemfire.cache.query.types.ObjectType;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- * 
- *
- */
 @Category(UnitTest.class)
-public class NWayMergeResultsJUnitTest extends TestCase {
-
-  public NWayMergeResultsJUnitTest(String testName) {
-    super(testName);
-  }
-
-  public static Test suite() {
-    TestSuite suite = new TestSuite(NWayMergeResultsJUnitTest.class);
-    return suite;
-  }
+public class NWayMergeResultsJUnitTest {
 
+  @Test
   public void testNonDistinct() throws Exception {
     final int numSortedLists = 40;
     Collection<List<Integer>> listOfSortedLists = new ArrayList<List<Integer>>();
@@ -100,6 +87,7 @@ public class NWayMergeResultsJUnitTest extends TestCase {
     assertEquals(combinedArray.length, mergedResults.size());
   }
 
+  @Test
   public void testDistinct() throws Exception {
     final int numSortedLists = 40;
     Collection<List<Integer>> listOfSortedLists = new ArrayList<List<Integer>>();
@@ -141,8 +129,8 @@ public class NWayMergeResultsJUnitTest extends TestCase {
     assertEquals(sortedSet.size(), mergedResults.size());
   }
 
+  @Test
   public void testLimitNoDistinct() throws Exception {
-
     final int numSortedLists = 40;
     final int limit = 53;
     Collection<List<Integer>> listOfSortedLists = new ArrayList<List<Integer>>();
@@ -193,6 +181,7 @@ public class NWayMergeResultsJUnitTest extends TestCase {
     assertEquals(limit, mergedResults.size());
   }
 
+  @Test
   public void testLimitDistinct() throws Exception {
     final int numSortedLists = 40;
     final int limit = 53;
@@ -241,6 +230,7 @@ public class NWayMergeResultsJUnitTest extends TestCase {
     assertEquals(limit, mergedResults.size());
   }
 
+  @Test
   public void testNonDistinctStruct() throws Exception {
     final int numSortedLists = 40;
     StructTypeImpl structType = new StructTypeImpl(new String[] { "a", "b" },
@@ -304,6 +294,7 @@ public class NWayMergeResultsJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testDistinctStruct() throws Exception {
     final int numSortedLists = 40;
     StructTypeImpl structType = new StructTypeImpl(new String[] { "a", "b" },
@@ -363,8 +354,8 @@ public class NWayMergeResultsJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testOccurenceNonDistinct() throws Exception {
-
     final int numSortedLists = 40;
     Collection<List<Integer>> listOfSortedLists = new ArrayList<List<Integer>>();
     for (int i = 0; i < numSortedLists; ++i) {
@@ -411,8 +402,8 @@ public class NWayMergeResultsJUnitTest extends TestCase {
     assertEquals(num75, mergedResults.occurrences(Integer.valueOf(75)));
   }
 
+  @Test
   public void testOccurenceDistinct() throws Exception {
-
     final int numSortedLists = 40;
     Collection<List<Integer>> listOfSortedLists = new ArrayList<List<Integer>>();
     for (int i = 0; i < numSortedLists; ++i) {
@@ -484,6 +475,7 @@ public class NWayMergeResultsJUnitTest extends TestCase {
         orderByAttribs, context, structType);
   }
 
+  @Test
   public void testCombination() throws Exception {
     List<String> results1 = new ArrayList<String>();
     results1.add("IBM");
@@ -542,9 +534,6 @@ public class NWayMergeResultsJUnitTest extends TestCase {
         sortedLists1, true, -1);
 
     assertEquals(12, netMergedResults.size());
-
   }
-  
-  
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryFromClauseCanonicalizationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryFromClauseCanonicalizationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryFromClauseCanonicalizationJUnitTest.java
index 22bdf39..8226363 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryFromClauseCanonicalizationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryFromClauseCanonicalizationJUnitTest.java
@@ -201,7 +201,7 @@ public class QueryFromClauseCanonicalizationJUnitTest
 ////    context.setBindArguments(new Object[]{"bindkey"});
 //    sbuff = new StringBuffer();
 //    cop.generateCanonicalizedExpression(sbuff, context);
-//    assertEquals(sbuff.toString(),"iter1.positions.get('bindkey')");
+//    assertIndexDetailsEquals(sbuff.toString(),"iter1.positions.get('bindkey')");
 //    
     
 //    cp = new CompiledPath(new CompiledID("pf"), "getPositions()");
@@ -211,7 +211,7 @@ public class QueryFromClauseCanonicalizationJUnitTest
 //    cop = new CompiledOperation(cp, "get", args);
 //    sbuff = new StringBuffer();
 //    cop.generateCanonicalizedExpression(sbuff, context);
-//    assertEquals(sbuff.toString(),"iter1.positions().get('bindkey')");
+//    assertIndexDetailsEquals(sbuff.toString(),"iter1.positions().get('bindkey')");
 //    
 //    
 //    cp = new CompiledPath(new CompiledID("pf"), "getPositions");
@@ -221,7 +221,7 @@ public class QueryFromClauseCanonicalizationJUnitTest
 //    cop = new CompiledOperation(cp, "get", args);
 //    sbuff = new StringBuffer();
 //    cop.generateCanonicalizedExpression(sbuff, context);
-//    assertEquals(sbuff.toString(),"iter1.positions.get('bindkey')");
+//    assertIndexDetailsEquals(sbuff.toString(),"iter1.positions.get('bindkey')");
     
     cp = new CompiledPath(new CompiledID("pf"), "getPositions");
     CompiledPath cp1 = new CompiledPath(new CompiledID("pf"),"pkid");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryObjectSerializationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryObjectSerializationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryObjectSerializationJUnitTest.java
index 8da72df..b593da5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryObjectSerializationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/QueryObjectSerializationJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInput;
@@ -26,8 +28,9 @@ import java.io.IOException;
 import java.io.Serializable;
 import java.util.Collection;
 
-import junit.framework.TestCase;
-
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.DataSerializer;
@@ -42,36 +45,21 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
  * @since 3.0
  */
 @Category(UnitTest.class)
-public class QueryObjectSerializationJUnitTest extends TestCase implements Serializable {
+public class QueryObjectSerializationJUnitTest implements Serializable {
   
   /** A <code>ByteArrayOutputStream</code> that data is serialized to */
   private transient ByteArrayOutputStream baos;
 
-  public QueryObjectSerializationJUnitTest(String name) {
-    super(name);
-  }
-
-  ////////  Helper Class
-  public static class SimpleObjectType implements ObjectType {
-   public SimpleObjectType() {}
-   public boolean isCollectionType() { return false; }
-   public boolean isMapType() { return false; }
-   public boolean isStructType() { return false; }
-   public String getSimpleClassName() { return "java.lang.Object"; }
-   public Class resolveClass() { return Object.class; }
-   public void toData(DataOutput out) {}
-   public void fromData(DataInput in) {}
-   public boolean equals(Object o) { return o instanceof SimpleObjectType; }
-  }
-
   /**
    * Creates a new <code>ByteArrayOutputStream</code> for this test to
    * work with.
    */
+  @Before
   public void setUp() {
     this.baos = new ByteArrayOutputStream();
   }
 
+  @After
   public void tearDown() {
     this.baos = null;
   }
@@ -79,14 +67,14 @@ public class QueryObjectSerializationJUnitTest extends TestCase implements Seria
   /**
    * Returns a <code>DataOutput</code> to write to
    */
-  protected DataOutputStream getDataOutput() {
+  private DataOutputStream getDataOutput() {
     return new DataOutputStream(this.baos);
   }
 
   /**
    * Returns a <code>DataInput</code> to read from
    */
-  protected DataInputStream getDataInput() {
+  private DataInputStream getDataInput() {
     ByteArrayInputStream bais = new ByteArrayInputStream(this.baos.toByteArray());
     return new DataInputStream(bais);
   }
@@ -96,7 +84,6 @@ public class QueryObjectSerializationJUnitTest extends TestCase implements Seria
    * asserts that the two objects satisfy o1.equals(o2)
    */
   private void checkRoundTrip(Object o1) throws IOException, ClassNotFoundException {
-
     DataOutputStream out = getDataOutput();
     DataSerializer.writeObject(o1, out);
     out.flush();
@@ -108,6 +95,7 @@ public class QueryObjectSerializationJUnitTest extends TestCase implements Seria
   /**
    * Tests the serialization of many, but not all of the possible ResultSets
    */
+  @Test
   public void testSerializationOfQueryResults() throws IOException, ClassNotFoundException {
     Collection data = new java.util.ArrayList();
     data.add(null);
@@ -147,4 +135,16 @@ public class QueryObjectSerializationJUnitTest extends TestCase implements Seria
     //SortedStructSet sssWithoutData = new SortedStructSet();
     //checkRoundTrip(sssWithoutData); 
   }
+
+  private static class SimpleObjectType implements ObjectType {
+    public SimpleObjectType() {}
+    public boolean isCollectionType() { return false; }
+    public boolean isMapType() { return false; }
+    public boolean isStructType() { return false; }
+    public String getSimpleClassName() { return "java.lang.Object"; }
+    public Class resolveClass() { return Object.class; }
+    public void toData(DataOutput out) {}
+    public void fromData(DataInput in) {}
+    public boolean equals(Object o) { return o instanceof SimpleObjectType; }
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagJUnitTest.java
index 181bb82..865651c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagJUnitTest.java
@@ -16,30 +16,30 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
-import java.util.*;
-import java.io.*;
+import static org.junit.Assert.*;
 
-import org.junit.experimental.categories.Category;
+import java.io.DataInputStream;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+import java.util.Set;
 
-import junit.framework.*;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.query.SelectResults;
 import com.gemstone.gemfire.cache.query.internal.types.ObjectTypeImpl;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Test ResultsBag, including null elements
  */
 @Category(UnitTest.class)
-public class ResultsBagJUnitTest extends TestCase {
+public class ResultsBagJUnitTest {
 
-  public ResultsBagJUnitTest(String testName) {
-    super(testName);
-  }
-  
+  @Test
   public void testDuplicates() {
     ResultsBag bag = new ResultsBag();
     bag.add("one");
@@ -56,9 +56,9 @@ public class ResultsBagJUnitTest extends TestCase {
     assertEquals(0, bag.occurrences("one"));
     assertTrue(!bag.remove("one"));
     assertEquals(0, bag.occurrences("one"));
-    
   }
-  
+
+  @Test
   public void testIteration() {
     ResultsBag bag = new ResultsBag();
     bag.add(new Integer(1));
@@ -84,9 +84,9 @@ public class ResultsBagJUnitTest extends TestCase {
     assertEquals(1, numOnes);
     assertEquals(2, numTwos);
   }
-  
-  public void testSerializingSetViewWithNulls()
-  throws ClassNotFoundException, IOException {
+
+  @Test
+  public void testSerializingSetViewWithNulls() throws Exception {
     ResultsBag bag = new ResultsBag();
     bag.add(new Integer(4));
     bag.add(new Integer(2));
@@ -117,7 +117,8 @@ public class ResultsBagJUnitTest extends TestCase {
     assertTrue(setCopy.contains(new Integer(4)));
     assertTrue(setCopy.contains(null));
   }
-    
+
+  @Test
   public void testNulls() {
     ResultsBag bag = new ResultsBag();
     assertTrue(bag.isEmpty());
@@ -172,7 +173,8 @@ public class ResultsBagJUnitTest extends TestCase {
     assertTrue(!bag.remove(null));
     assertEquals(0, bag.occurrences(null));
   }
-  
+
+  @Test
   public void testIterationNullRemoval() {
     ResultsBag bag = new ResultsBag();
     bag.add(null);
@@ -192,7 +194,8 @@ public class ResultsBagJUnitTest extends TestCase {
     assertEquals(3, bag.size());
     assertEquals(0, bag.occurrences(null));
   }
-  
+
+  @Test
   public void testIterationRemoval() {
     ResultsBag bag = new ResultsBag();
     
@@ -205,8 +208,6 @@ public class ResultsBagJUnitTest extends TestCase {
     
     assertEquals(6, bag.size());
     
-//    Integer one = new Integer(1);
-//    Integer two = new Integer(2);
     Iterator itr = bag.iterator();
     for (int i = 0 ; i < 3; i++) {
       itr.next();
@@ -221,7 +222,8 @@ public class ResultsBagJUnitTest extends TestCase {
     assertTrue(bag.isEmpty());
     assertEquals(0, bag.size());
   }
-  
+
+  @Test
   public void testNoSuchElementException() {
     ResultsBag bag = new ResultsBag();
     
@@ -242,7 +244,7 @@ public class ResultsBagJUnitTest extends TestCase {
       itr.next();
       fail("should have thrown a NoSuchElementException");
     }
-    catch (NoSuchElementException e) {
+    catch (NoSuchElementException expected) {
       // pass
     }
     
@@ -257,7 +259,7 @@ public class ResultsBagJUnitTest extends TestCase {
       itr.next();
       fail("should have thrown a NoSuchElementException");
     }
-    catch (NoSuchElementException e) {
+    catch (NoSuchElementException expected) {
       // pass
     }
     
@@ -284,7 +286,7 @@ public class ResultsBagJUnitTest extends TestCase {
       itr.next();
       fail("should have thrown a NoSuchElementException");
     }
-    catch (NoSuchElementException e) {
+    catch (NoSuchElementException expected) {
       // pass
     }
     
@@ -299,7 +301,7 @@ public class ResultsBagJUnitTest extends TestCase {
       itr.next();
       fail("should have thrown a NoSuchElementException");
     }
-    catch (NoSuchElementException e) {
+    catch (NoSuchElementException expected) {
       // pass
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagLimitBehaviourJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagLimitBehaviourJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagLimitBehaviourJUnitTest.java
index aacb00e..e92797d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagLimitBehaviourJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsBagLimitBehaviourJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
@@ -26,8 +28,7 @@ import java.util.List;
 import java.util.NoSuchElementException;
 import java.util.Set;
 
-import junit.framework.TestCase;
-
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.query.Struct;
@@ -36,19 +37,15 @@ import com.gemstone.gemfire.cache.query.types.ObjectType;
 import com.gemstone.gemfire.cache.query.types.StructType;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-// TODO:Asif: Test for null behaviour in various functions
-
 /**
  * Test ResultsBag Limit behaviour
- * 
+ *
+ * TODO: Test for null behaviour in various functions
  */
 @Category(UnitTest.class)
-public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
-
-  public ResultsBagLimitBehaviourJUnitTest(String testName) {
-    super(testName);
-  }
+public class ResultsBagLimitBehaviourJUnitTest {
 
+  @Test
   public void testAsListAndAsSetMethod() {
     ResultsBag bag = getBagObject(String.class);
     bag.add(wrap("one", bag.getCollectionType().getElementType()));
@@ -63,6 +60,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     assertEquals(2, set.size());
   }
 
+  @Test
   public void testOccurence() {
     ResultsBag bag = getBagObject(String.class);
     bag.add(wrap(null, bag.getCollectionType().getElementType()));
@@ -87,6 +85,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     assertEquals(6, total);
   }
 
+  @Test
   public void testIteratorType() {
     ResultsBag bag = getBagObject(String.class);
     bag.add(wrap("one", bag.getCollectionType().getElementType()));
@@ -114,6 +113,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testContains() {
     ResultsBag bag = getBagObject(Integer.class);
     bag.add(wrap(new Integer(1), bag.getCollectionType().getElementType()));
@@ -144,6 +144,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     assertTrue(temp.contains(wrap(null, bag.getCollectionType().getElementType())) == bag.contains(wrap(null, bag.getCollectionType().getElementType())));
   }
 
+  @Test
   public void testAddExceptionIfLimitApplied() {
     ResultsBag bag = getBagObject(String.class);
     bag.add(wrap("one", bag.getCollectionType().getElementType()));
@@ -161,6 +162,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
 
   // Internal method AddAndGetOccurence used for iter evaluating
   // only up till the limit
+  @Test
   public void testAddAndGetOccurence() {
     ResultsBag bag = getBagObject(String.class);
     bag = getBagObject(String.class);
@@ -176,6 +178,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     assertEquals(3, bag.addAndGetOccurence(elementType instanceof StructType ? ((Struct)wrap(null, elementType)).getFieldValues() : wrap(null, elementType)));
   }
 
+  @Test
   public void testSizeWithLimitApplied() {
     ResultsBag bag = getBagObject(String.class);
     bag.add(wrap("two", bag.getCollectionType().getElementType()));
@@ -194,6 +197,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     assertEquals(2, bag.size());
   }
 
+  @Test
   public void testRemove() {
     // Test when actual size in resultset is less than the limit
     ResultsBag bag = getBagObject(String.class);
@@ -280,6 +284,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
 
   }
 
+  @Test
   public void testAddAllExceptionIfLimitApplied() {
     ResultsBag bag = getBagObject(Object.class);
     bag.applyLimit(6);
@@ -292,6 +297,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testToDataFromData() throws Exception {
     // Test with limit specified & limit less than internal size
     ResultsBag toBag = getBagObject(String.class);
@@ -329,6 +335,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     assertFalse(toBag.asList().retainAll(fromBag.asList()));
   }
 
+  @Test
   public void testLimitResultsBagIterator_1() {
     ResultsBag bag = getBagObject(Integer.class);
     bag.add(wrap(null, bag.getCollectionType().getElementType()));
@@ -380,6 +387,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testLimitResultsBagIterator_2() {
     ResultsBag bag = getBagObject(Object.class);
     for (int i = 0; i < 20; ++i) {
@@ -420,6 +428,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     assertEquals(i, 3);
   }
 
+  @Test
   public void testValidExceptionThrown() {
     ResultsBag bag = getBagObject(Integer.class);
     bag.add(wrap(new Integer(1), bag.getCollectionType().getElementType()));
@@ -466,6 +475,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testRemoveAll() {
     ResultsBag bag = getBagObject(Integer.class);
     // Add Integer & null Objects
@@ -502,6 +512,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     assertFalse(itr.hasNext());
   }
 
+  @Test
   public void testRetainAll() {
     ResultsBag bag = getBagObject(Integer.class);
     // Add Integer & null Objects
@@ -540,6 +551,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     assertFalse(itr.hasNext());
   }
 
+  @Test
   public void testContainAll() {
     ResultsBag bag = getBagObject(Integer.class);
     // Add Integer & null Objects
@@ -557,7 +569,7 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     // asList.add(wrap(new
     // Integer(13),bag.getCollectionType().getElementType()));
     assertEquals(4, bag.size());
-    // assertEquals(5,asList.size());
+    // assertIndexDetailsEquals(5,asList.size());
     // Remove all the elements from the list which match the
     // first element pf the list
     int occurence = bag.occurrences(asList.get(0));
@@ -572,12 +584,12 @@ public class ResultsBagLimitBehaviourJUnitTest extends TestCase {
     assertFalse(bag.containsAll(asList));
   }
 
-  public ResultsBag getBagObject(Class clazz) {
+  private ResultsBag getBagObject(Class clazz) {
     ObjectType type = new ObjectTypeImpl(clazz);
     return new ResultsBag(type, null);
   }
 
-  public Object wrap(Object obj, ObjectType elementType) {
+  private Object wrap(Object obj, ObjectType elementType) {
     return obj;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsCollectionWrapperLimitJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsCollectionWrapperLimitJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsCollectionWrapperLimitJUnitTest.java
index b24da54..04c88b6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsCollectionWrapperLimitJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/ResultsCollectionWrapperLimitJUnitTest.java
@@ -19,8 +19,7 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
-import com.gemstone.gemfire.cache.query.internal.types.ObjectTypeImpl;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import static org.junit.Assert.*;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -31,20 +30,16 @@ import java.util.NoSuchElementException;
 import java.util.Set;
 import java.util.TreeSet;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
+import com.gemstone.gemfire.cache.query.internal.types.ObjectTypeImpl;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- * 
- */
 @Category(UnitTest.class)
-public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
-
-  public ResultsCollectionWrapperLimitJUnitTest(String testName) {
-    super(testName);
-  }
+public class ResultsCollectionWrapperLimitJUnitTest {
 
+  @Test
   public void testConstructorBehaviour() {
     // Create a Collection of unordered data elements
     HashSet unordered = new HashSet();
@@ -97,6 +92,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testContains() {
     // Create a Collection of unordered data elements
     HashSet unordered = new HashSet();
@@ -120,6 +116,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     assertTrue(wrapper.contains(new Integer(1)));
   }
 
+  @Test
   public void testContainsAll() {
     List ordered = new ArrayList();
     for (int i = 1; i < 11; ++i) {
@@ -135,6 +132,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     assertTrue(wrapper.containsAll(newList));
   }
 
+  @Test
   public void testEmpty() {
     List ordered = new ArrayList();
     for (int i = 1; i < 11; ++i) {
@@ -145,6 +143,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     assertEquals(0, wrapper.size());
   }
 
+  @Test
   public void testRemove() {
     List ordered = new ArrayList();
     for (int i = 1; i < 11; ++i) {
@@ -163,6 +162,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     assertTrue(wrapper.containsAll(newList));
   }
 
+  @Test
   public void testRemoveAll() {
     List ordered = new ArrayList();
     for (int i = 1; i < 11; ++i) {
@@ -196,6 +196,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     assertFalse(itr.hasNext());
   }
 
+  @Test
   public void testRetainAll() {
     List ordered = new ArrayList();
     for (int i = 1; i < 11; ++i) {
@@ -223,6 +224,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     assertFalse(itr.hasNext());
   }
 
+  @Test
   public void testToArray() {
     List ordered = new ArrayList();
     for (int i = 1; i < 11; ++i) {
@@ -239,6 +241,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     assertFalse(itr.hasNext());
   }
 
+  @Test
   public void testToArrayParameterized() {
     List ordered = new ArrayList();
     for (int i = 1; i < 11; ++i) {
@@ -256,6 +259,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     assertFalse(itr.hasNext());
   }
 
+  @Test
   public void testAsList() {
     List ordered = new ArrayList();
     for (int i = 1; i < 11; ++i) {
@@ -286,6 +290,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     assertTrue(newList.containsAll(toList));
   }
 
+  @Test
   public void testAsSet() {
     Collection ordered = new TreeSet();
     for (int i = 1; i < 11; ++i) {
@@ -315,6 +320,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     assertTrue(newSet.containsAll(toSet));
   }
 
+  @Test
   public void testOccurences() {
     Collection ordered = new TreeSet();
     for (int i = 1; i < 11; ++i) {
@@ -338,6 +344,7 @@ public class ResultsCollectionWrapperLimitJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testLimitIterator() {
     Collection ordered = new TreeSet();
     for (int i = 1; i < 11; ++i) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/SelectResultsComparatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/SelectResultsComparatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/SelectResultsComparatorJUnitTest.java
index d8c2913..0ff6a15 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/SelectResultsComparatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/SelectResultsComparatorJUnitTest.java
@@ -19,34 +19,26 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
+import static org.junit.Assert.*;
+
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.Random;
-import java.util.Collections;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.query.SelectResults;
 import com.gemstone.gemfire.cache.query.internal.parse.OQLLexerTokenTypes;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- *
- */
 @Category(UnitTest.class)
-public class SelectResultsComparatorJUnitTest extends TestCase implements OQLLexerTokenTypes {
-  
-  public SelectResultsComparatorJUnitTest(String testName) {
-    super(testName);
-  }
-  
+public class SelectResultsComparatorJUnitTest implements OQLLexerTokenTypes {
+
+  @Test
   public void testComparatorForSortedSet() throws Exception {
-//    CompiledValue[] operands = new CompiledValue[3];
-//    
-//    CompiledJunction cj = new CompiledJunction(operands, LITERAL_and);
     int sameSizeVar = 0;
     boolean sameSizeVarSetFlag = false;
     SortedSet testSet = 
@@ -85,6 +77,4 @@ public class SelectResultsComparatorJUnitTest extends TestCase implements OQLLex
         fail("This is not expected behaviour");
     }
   }
-  
-    
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/StructBagLimitBehaviourJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/StructBagLimitBehaviourJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/StructBagLimitBehaviourJUnitTest.java
index ea4f5f7..f32f11b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/StructBagLimitBehaviourJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/StructBagLimitBehaviourJUnitTest.java
@@ -19,27 +19,26 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.cache.query.types.ObjectType;
-import com.gemstone.gemfire.cache.query.types.StructType;
-import com.gemstone.gemfire.cache.query.internal.types.*;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import static org.junit.Assert.*;
 
 import java.util.Iterator;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.cache.query.Struct;
+import com.gemstone.gemfire.cache.query.internal.types.ObjectTypeImpl;
+import com.gemstone.gemfire.cache.query.internal.types.StructTypeImpl;
+import com.gemstone.gemfire.cache.query.types.ObjectType;
+import com.gemstone.gemfire.cache.query.types.StructType;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 /**
- * Test StructsBag Limit behaviour
- * 
+ * Test StructBag Limit behaviour
  */
 @Category(UnitTest.class)
 public class StructBagLimitBehaviourJUnitTest extends ResultsBagLimitBehaviourJUnitTest {
 
-  public StructBagLimitBehaviourJUnitTest(String testName) {
-    super(testName);
-  }
-
   public ResultsBag getBagObject(Class clazz) {
     ObjectType[] types = new ObjectType[] { new ObjectTypeImpl(clazz),
         new ObjectTypeImpl(clazz) };
@@ -58,6 +57,7 @@ public class StructBagLimitBehaviourJUnitTest extends ResultsBagLimitBehaviourJU
     }
   }
 
+  @Test
   public void testRemoveAllStructBagSpecificMthod() {
     StructBag bag1 = (StructBag)getBagObject(Integer.class);
     // Add Integer & null Objects
@@ -91,6 +91,7 @@ public class StructBagLimitBehaviourJUnitTest extends ResultsBagLimitBehaviourJU
     assertFalse(itr.hasNext());
   }
 
+  @Test
   public void testRetainAllStructBagSpecific() {
     StructBag bag1 = (StructBag)getBagObject(Integer.class);
     // Add Integer & null Objects

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/StructSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/StructSetJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/StructSetJUnitTest.java
index fd66df8..a1c9703 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/StructSetJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/StructSetJUnitTest.java
@@ -22,10 +22,11 @@
  */
 package com.gemstone.gemfire.cache.query.internal;
 
-import java.util.Iterator;
+import static org.junit.Assert.*;
 
-import junit.framework.TestCase;
+import java.util.Iterator;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.query.SelectResults;
@@ -35,16 +36,10 @@ import com.gemstone.gemfire.cache.query.internal.types.TypeUtils;
 import com.gemstone.gemfire.cache.query.types.ObjectType;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- *
- */
 @Category(UnitTest.class)
-public class StructSetJUnitTest extends TestCase {
-  
-  public StructSetJUnitTest(String testName) {
-    super(testName);
-  }
+public class StructSetJUnitTest {
   
+  @Test
   public void testIntersectionAndRetainAll() {
     String names[] = {"p","pos"};
     ObjectType types[] = {TypeUtils.OBJECT_TYPE, TypeUtils.OBJECT_TYPE};

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/aggregate/AggregatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/aggregate/AggregatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/aggregate/AggregatorJUnitTest.java
index 9645b4e..9eeba95 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/aggregate/AggregatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/aggregate/AggregatorJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.cache.query.internal.aggregate;
 
+import static org.junit.Assert.*;
+
 import java.util.HashSet;
 import java.util.Set;
 
@@ -24,14 +26,8 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-/**
- * 
- *
- */
 @Category(UnitTest.class)
-public class AggregatorJUnitTest extends TestCase{
+public class AggregatorJUnitTest {
 
   @Test
   public void testCount() throws Exception {
@@ -125,9 +121,8 @@ public class AggregatorJUnitTest extends TestCase{
     avg.accumulate(null);
     avg.accumulate(null);
     float expected = (1 + 2+ 3 + 4 + 5 + 6 + 7 +7)/8.0f ;    
-    assertEquals(expected, ((Number)avg.terminate()).floatValue());
+    assertEquals(expected, ((Number)avg.terminate()).floatValue(), 0);
     
-   
     AvgBucketNode abn = new AvgBucketNode();
     abn.accumulate(new Integer(1));
     abn.accumulate(new Integer(2));
@@ -143,14 +138,13 @@ public class AggregatorJUnitTest extends TestCase{
     assertEquals(8, ((Integer)arr[0]).intValue());
     assertEquals(35, ((Number)arr[1]).intValue());
     
-    
     AvgPRQueryNode apqn = new AvgPRQueryNode();
     Object[] val1 = new Object[]{new Integer(7), new Double(43)};
     Object[] val2 = new Object[]{new Integer(5), new Double(273.86)};
     apqn.accumulate(val1);
     apqn.accumulate(val2);
     expected = (43+273.86f)/12.0f ;
-    assertEquals(expected, ((Number)apqn.terminate()).floatValue());    
+    assertEquals(expected, ((Number)apqn.terminate()).floatValue(), 0);
   }
   
   @Test
@@ -170,9 +164,8 @@ public class AggregatorJUnitTest extends TestCase{
     avg.accumulate(null);
     avg.accumulate(null);
     float expected = (1 + 2+ 3 + 4 + 5 + 6 + 7)/7.0f ;    
-    assertEquals(expected, ((Number)avg.terminate()).floatValue());
-    
-   
+    assertEquals(expected, ((Number)avg.terminate()).floatValue(), 0);
+
     AvgDistinctPRQueryNode adpqn = new AvgDistinctPRQueryNode();
     
     Set<Integer> set1 = new HashSet<Integer>();
@@ -191,7 +184,7 @@ public class AggregatorJUnitTest extends TestCase{
     adpqn.accumulate(set2);
    
     expected = (3+4+5+6+7+8)/6.0f ;
-    assertEquals(expected, ((Number)adpqn.terminate()).floatValue());    
+    assertEquals(expected, ((Number)adpqn.terminate()).floatValue(), 0);
   }
   
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
index 18bc54c..cb32555 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
@@ -103,7 +103,7 @@ public class AsynchIndexMaintenanceJUnitTest {
       region.put(""+(i+1), new Portfolio(i+1));
       idSet.add((i+1) + "");
     }    
-    //assertEquals(0, getIndexSize(ri));
+    //assertIndexDetailsEquals(0, getIndexSize(ri));
     region.put("50", new Portfolio(50));
     WaitCriterion ev = new WaitCriterion() {
       public boolean done() {
@@ -129,7 +129,7 @@ public class AsynchIndexMaintenanceJUnitTest {
       idSet.add((i+1) + "");
     }    
 
-    //assertEquals(0, getIndexSize(ri));
+    //assertIndexDetailsEquals(0, getIndexSize(ri));
 
     WaitCriterion evSize = new WaitCriterion() {
       public boolean done() {
@@ -160,7 +160,7 @@ public class AsynchIndexMaintenanceJUnitTest {
       region.put(""+(i+1), new Portfolio(i+1));
       idSet.add((i+1) + "");
     }    
-    //assertEquals(0, getIndexSize(ri));
+    //assertIndexDetailsEquals(0, getIndexSize(ri));
     Wait.waitForCriterion(evSize, 17 * 1000, 200, true);
   }
   
@@ -200,7 +200,7 @@ public class AsynchIndexMaintenanceJUnitTest {
       idSet.add((i+1) + "");
     }    
     Thread.sleep(10000);
-    //assertEquals(0, this.getIndexSize(ri));    
+    //assertIndexDetailsEquals(0, this.getIndexSize(ri));
         
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSetJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSetJUnitTest.java
index de5cebd..7f96fde 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSetJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSetJUnitTest.java
@@ -14,15 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package com.gemstone.gemfire.cache.query.internal.index;
 
+import static org.junit.Assert.*;
 import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -32,7 +29,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.stream.IntStream;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.mockito.invocation.InvocationOnMock;
@@ -49,7 +45,7 @@ public class HashIndexSetJUnitTest {
   Set<Portfolio> portfolioSet;
   HashIndexSet his;
   
-  public void setupHashIndexSet(int numEntries) {
+  private void setupHashIndexSet(int numEntries) {
     his = createHashIndexSet();
     portfoliosMap = createPortfolioObjects(numEntries, 0);
     portfolioSet = new HashSet<Portfolio>(portfoliosMap.values());
@@ -81,9 +77,8 @@ public class HashIndexSetJUnitTest {
    * IDs are startID -> startID + numEntries
    * @param numToCreate how many portfolios to create
    * @param startID the ID value to start incrementing from
-   * @return
    */
-  public Map<Integer, Portfolio> createPortfolioObjects(int numToCreate, int startID) {
+  private Map<Integer, Portfolio> createPortfolioObjects(int numToCreate, int startID) {
     Map<Integer, Portfolio> portfoliosMap = new HashMap<>();
     IntStream.range(0, numToCreate).forEach(e -> {
         Portfolio p = new Portfolio(e + startID);
@@ -98,9 +93,9 @@ public class HashIndexSetJUnitTest {
     int numEntries = 100;
     setupHashIndexSet(numEntries);
     
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.iterator().forEachRemaining((e ->portfolioSet.remove(e)));
-    Assert.assertTrue(portfolioSet.isEmpty());  
+    assertTrue(portfolioSet.isEmpty());  
   }
   
   @Test
@@ -108,26 +103,28 @@ public class HashIndexSetJUnitTest {
     int numEntries = 100;
     setupHashIndexSet(numEntries);
     
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.add(null, new Portfolio(numEntries + 1));
-    Assert.assertEquals(numEntries + 1, his.size());
+    assertEquals(numEntries + 1, his.size());
   }
-  
-  //we have to be sure that we dont cause a compaction or growth or else
-  //removed tokens will be removed and a new backing array created
+
+  /**
+   * we have to be sure that we dont cause a compaction or growth or else
+   * removed tokens will be removed and a new backing array created
+   */
   @Test
   public void testHashIndexSetAddUseRemoveTokenSlot() throws Exception {
     int numEntries = 20;
     setupHashIndexSet(numEntries);
     
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.removeAll(portfolioSet);
-    Assert.assertEquals(numEntries, his._removedTokens);
-    Assert.assertEquals(0, his.size());
+    assertEquals(numEntries, his._removedTokens);
+    assertEquals(0, his.size());
     addPortfoliosToHashIndexSet(portfoliosMap, his);
     
-    Assert.assertEquals(0, his._removedTokens);
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(0, his._removedTokens);
+    assertEquals(numEntries, his.size());
   }
   
   @Test
@@ -135,19 +132,19 @@ public class HashIndexSetJUnitTest {
     int numEntries = 100;    
     setupHashIndexSet(numEntries);
     
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.removeAll(portfolioSet);
-    Assert.assertEquals(numEntries, his._removedTokens);
+    assertEquals(numEntries, his._removedTokens);
     
-    Assert.assertEquals(0, his.size());
+    assertEquals(0, his.size());
     
     //Very very bad but we fake out the number of removed tokens
     his._removedTokens = his._maxSize;
     addPortfoliosToHashIndexSet(portfoliosMap, his);
     
     //compaction should have occured, removed tokens should now be gone
-    Assert.assertEquals(0, his._removedTokens);
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(0, his._removedTokens);
+    assertEquals(numEntries, his.size());
   }
   
   @Test
@@ -155,11 +152,11 @@ public class HashIndexSetJUnitTest {
     int numEntries = 80;
     setupHashIndexSet(numEntries);
     
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.rehash(1000);
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.iterator().forEachRemaining((e ->portfolioSet.remove(e)));
-    Assert.assertTrue(portfolioSet.isEmpty());  
+    assertTrue(portfolioSet.isEmpty());  
   }
   
   @Test
@@ -167,11 +164,11 @@ public class HashIndexSetJUnitTest {
     int numEntries = 20;
     setupHashIndexSet(numEntries);
 
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.rehash(64);
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.iterator().forEachRemaining((e ->portfolioSet.remove(e)));
-    Assert.assertTrue(portfolioSet.isEmpty());  
+    assertTrue(portfolioSet.isEmpty());  
   }
   
   @Test
@@ -179,9 +176,9 @@ public class HashIndexSetJUnitTest {
     int numEntries = 20;
     setupHashIndexSet(numEntries);
 
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.get(1).forEachRemaining((e ->portfolioSet.remove(e)));
-    Assert.assertEquals(numEntries - 1, portfolioSet.size());  
+    assertEquals(numEntries - 1, portfolioSet.size());  
   }
   
   @Test
@@ -195,15 +192,15 @@ public class HashIndexSetJUnitTest {
     addPortfoliosToHashIndexSet(collectionOfPorts1, his);
     addPortfoliosToHashIndexSet(collectionOfPorts2, his);
     
-    Assert.assertEquals(numEntries * 2, his.size());
+    assertEquals(numEntries * 2, his.size());
     Iterator iterator = his.get(keyToLookup);
     int numIterated = 0;
     while (iterator.hasNext()) {
       numIterated ++;
       //verify that the returned values match what we lookedup
-      Assert.assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
+      assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
     }
-    Assert.assertEquals(2, numIterated);  
+    assertEquals(2, numIterated);  
   }
   
   @Test
@@ -219,15 +216,15 @@ public class HashIndexSetJUnitTest {
     addPortfoliosToHashIndexSet(collectionOfPorts2, his);
     addPortfoliosToHashIndexSet(collectionOfPorts3, his);
     
-    Assert.assertEquals(numEntries * 3, his.size());
+    assertEquals(numEntries * 3, his.size());
     Iterator iterator = his.get(keyToLookup);
     int numIterated = 0;
     while (iterator.hasNext()) {
       numIterated ++;
       //verify that the returned values match what we lookedup
-      Assert.assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
+      assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
     }
-    Assert.assertEquals(3, numIterated);  
+    assertEquals(3, numIterated);  
     
     //let's remove the second collision
     his.remove(keyToLookup, collectionOfPorts2.get(keyToLookup));
@@ -237,9 +234,9 @@ public class HashIndexSetJUnitTest {
     while (iterator.hasNext()) {
       numIterated ++;
       //verify that the returned values match what we lookedup
-      Assert.assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
+      assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
     }
-    Assert.assertEquals(2, numIterated);  
+    assertEquals(2, numIterated);  
     
     //Add it back in and make sure we can iterate all 3 again
     his.add(keyToLookup, collectionOfPorts2.get(keyToLookup));
@@ -248,9 +245,9 @@ public class HashIndexSetJUnitTest {
     while (iterator.hasNext()) {
       numIterated ++;
       //verify that the returned values match what we lookedup
-      Assert.assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
+      assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
     }
-    Assert.assertEquals(3, numIterated);  
+    assertEquals(3, numIterated);  
 
   }
   
@@ -264,7 +261,7 @@ public class HashIndexSetJUnitTest {
     addPortfoliosToHashIndexSet(collectionOfPorts1, his);
     addPortfoliosToHashIndexSet(collectionOfPorts2, his);
     
-    Assert.assertEquals(numEntries * 2, his.size());
+    assertEquals(numEntries * 2, his.size());
     List<Integer> keysNotToMatch = new LinkedList<>();
     keysNotToMatch.add(3);
     keysNotToMatch.add(4);
@@ -273,10 +270,10 @@ public class HashIndexSetJUnitTest {
     while (iterator.hasNext()) {
       numIterated ++;
       int idFound = ((Portfolio)iterator.next()).indexKey;
-      Assert.assertTrue(idFound != 3 && idFound != 4);
+      assertTrue(idFound != 3 && idFound != 4);
     }
     //Make sure we iterated all the entries minus the entries that we decided not to match
-    Assert.assertEquals(numEntries * 2 - 4, numIterated);  
+    assertEquals(numEntries * 2 - 4, numIterated);  
   }
   
   @Test
@@ -288,16 +285,18 @@ public class HashIndexSetJUnitTest {
       try {
         int index = his.add(k, portfoliosMap.get(k));
         int foundIndex = his.index(portfoliosMap.get(k));
-        Assert.assertEquals(index, foundIndex);
+        assertEquals(index, foundIndex);
       }
       catch (TypeMismatchException ex) {
         throw new Error(ex);
       }
     });
   }
-  
-  //Add multiple portfolios with the same id
-  //they should collide, we should then be able to look up each one correctly
+
+  /**
+   * Add multiple portfolios with the same id
+   * they should collide, we should then be able to look up each one correctly
+   */
   @Test
   public void testIndexOfObjectWithCollision() throws Exception {
     int numEntries = 10;
@@ -309,7 +308,7 @@ public class HashIndexSetJUnitTest {
       try {
         int index = his.add(k, portfoliosMap1.get(k));
         int foundIndex = his.index(portfoliosMap1.get(k));
-        Assert.assertEquals(index, foundIndex);
+        assertEquals(index, foundIndex);
       }
       catch (TypeMismatchException ex) {
         throw new Error(ex);
@@ -319,65 +318,65 @@ public class HashIndexSetJUnitTest {
       try {
         int index = his.add(k, portfoliosMap2.get(k));
         int foundIndex = his.index(portfoliosMap2.get(k));
-        Assert.assertEquals(index, foundIndex);
+        assertEquals(index, foundIndex);
       }
       catch (TypeMismatchException ex) {
         throw new Error(ex);
       }
     });
   }
-  
-  
+
   @Test
   public void testIndexWhenObjectNotInSet() {
     int numEntries = 10;
     his = createHashIndexSet();
     portfoliosMap = createPortfolioObjects(numEntries, 0);
-    Assert.assertEquals(-1, his.index(portfoliosMap.get(1)));
+    assertEquals(-1, his.index(portfoliosMap.get(1)));
   }
   
   @Test
   public void testIndexWhenObjectNotInSetWhenPopulated() {
     int numEntries = 10;
     this.setupHashIndexSet(numEntries);
-    Assert.assertEquals(-1, his.index(new Portfolio(numEntries+1)));
+    assertEquals(-1, his.index(new Portfolio(numEntries+1)));
   }
-  
-  
+
   @Test
   public void testRemove() throws Exception {
     int numEntries = 20;
     setupHashIndexSet(numEntries);
 
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     portfoliosMap.forEach((k,v) -> his.remove(k, v));
-    Assert.assertEquals(0, his.size());
+    assertEquals(0, his.size());
   }
-  
-  //Test remove where we look for an instance that is not at the specified index slot
+
+  /**
+   * Test remove where we look for an instance that is not at the specified index slot
+   */
   @Test
   public void testRemoveIgnoreSlot() throws Exception {
     int numEntries = 20;
     setupHashIndexSet(numEntries);
 
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     portfoliosMap.forEach((k,v) -> his.remove(k, v, his.index(v)));
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
   }
   
   @Test
   public void testRemoveAtWithNull() throws Exception {
     his = createHashIndexSet();
-    Assert.assertTrue(his.isEmpty());
-    Assert.assertFalse(his.removeAt(0));
+    assertTrue(his.isEmpty());
+    assertFalse(his.removeAt(0));
   }
   
   @Test
   public void testRemoveAtWithRemoveToken() throws Exception {
     his = createHashIndexSet();
     int index = his.add(1, new Portfolio(1));
-    Assert.assertTrue(his.removeAt(index));
-    Assert.assertFalse(his.removeAt(index));
+    assertTrue(his.removeAt(index));
+    assertFalse(his.removeAt(index));
   }
   
   @Test
@@ -385,21 +384,23 @@ public class HashIndexSetJUnitTest {
     int numEntries = 100;
     setupHashIndexSet(numEntries);
     
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.removeAll(portfolioSet);
-    Assert.assertTrue(his.isEmpty());  
+    assertTrue(his.isEmpty());  
   }
-  
-  //Remove all should still remove all portfolios provided, even if there are more provided then contained
+
+  /**
+   * Remove all should still remove all portfolios provided, even if there are more provided then contained
+   */
   @Test
   public void testHashIndexRemoveAllWithAdditionalPortfolios() throws Exception {
     int numEntries = 100;
     setupHashIndexSet(numEntries);
     
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     portfolioSet.add(new Portfolio(numEntries + 1));
     his.removeAll(portfolioSet);
-    Assert.assertTrue(his.isEmpty());  
+    assertTrue(his.isEmpty());  
   }
   
   @Test
@@ -407,8 +408,8 @@ public class HashIndexSetJUnitTest {
     int numEntries = 100;
     setupHashIndexSet(numEntries);
     
-    Assert.assertEquals(numEntries, his.size());
-    Assert.assertTrue(his.containsAll(portfolioSet));
+    assertEquals(numEntries, his.size());
+    assertTrue(his.containsAll(portfolioSet));
   }
   
   @Test
@@ -417,11 +418,11 @@ public class HashIndexSetJUnitTest {
     setupHashIndexSet(numEntries);
     Set subset = new HashSet();
     portfolioSet.forEach(e -> {if (e.indexKey % 2 == 0) {subset.add(e);}});
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.retainAll(subset);
     his.iterator().forEachRemaining((e ->subset.remove(e)));
-    Assert.assertTrue(subset.isEmpty()); 
-    Assert.assertEquals(numEntries/2, his.size());
+    assertTrue(subset.isEmpty()); 
+    assertEquals(numEntries/2, his.size());
   }
   
   @Test
@@ -429,9 +430,9 @@ public class HashIndexSetJUnitTest {
     int numEntries = 100;
     setupHashIndexSet(numEntries);
     
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     portfolioSet.add(new Portfolio(numEntries + 1));
-    Assert.assertFalse(his.containsAll(portfolioSet));
+    assertFalse(his.containsAll(portfolioSet));
   }
   
   @Test
@@ -439,16 +440,16 @@ public class HashIndexSetJUnitTest {
     int numEntries = 100;
     setupHashIndexSet(numEntries);
     
-    Assert.assertEquals(numEntries, his.size());
+    assertEquals(numEntries, his.size());
     his.clear();
-    Assert.assertTrue(his.isEmpty());
-    Assert.assertTrue(his._removedTokens == 0);
+    assertTrue(his.isEmpty());
+    assertTrue(his._removedTokens == 0);
   }
   
   @Test
   public void testAreNullObjectsEqual() throws Exception {
     his = createHashIndexSet();
-    Assert.assertTrue(his.areObjectsEqual(null, null));
+    assertTrue(his.areObjectsEqual(null, null));
   }
   
   @Test
@@ -460,9 +461,9 @@ public class HashIndexSetJUnitTest {
     addPortfoliosToHashIndexSet(portfolioMap, indexSet1);
     addPortfoliosToHashIndexSet(portfolioMap, indexSet2);
  
-    Assert.assertTrue(indexSet1.equals(indexSet2));
-    Assert.assertTrue(indexSet2.equals(indexSet1));
-    Assert.assertEquals(indexSet1.hashCode(), indexSet2.hashCode());
+    assertTrue(indexSet1.equals(indexSet2));
+    assertTrue(indexSet2.equals(indexSet1));
+    assertEquals(indexSet1.hashCode(), indexSet2.hashCode());
   }
   
   @Test
@@ -474,16 +475,16 @@ public class HashIndexSetJUnitTest {
     addPortfoliosToHashIndexSet(portfolioMap, indexSet1);
 
     indexSet2.add(1, portfolioMap.get(1));
-    Assert.assertFalse(indexSet2.equals(indexSet1));
-    Assert.assertFalse(indexSet1.equals(indexSet2));
-    Assert.assertNotEquals(indexSet1.hashCode(), indexSet2.hashCode()); 
+    assertFalse(indexSet2.equals(indexSet1));
+    assertFalse(indexSet1.equals(indexSet2));
+    assertNotEquals(indexSet1.hashCode(), indexSet2.hashCode());
   }
   
   @Test
   public void testIndexSetNotEqualsOtherObjectType() {
     HashIndexSet indexSet = createHashIndexSet();
-    Assert.assertFalse(indexSet.equals("Other type"));
-    Assert.assertFalse(indexSet.equals(new Object()));
+    assertFalse(indexSet.equals("Other type"));
+    assertFalse(indexSet.equals(new Object()));
   }
  
   private static class EvaluateKeyAnswer implements Answer {
@@ -499,6 +500,5 @@ public class HashIndexSetJUnitTest {
     }
     
   }
-  
-  
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArrayJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArrayJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArrayJUnitTest.java
index 91dbf7b..1ac115a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArrayJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexElemArrayJUnitTest.java
@@ -16,11 +16,7 @@
  */
 package com.gemstone.gemfire.cache.query.internal.index;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 import java.util.Arrays;
 import java.util.Collection;
@@ -30,7 +26,7 @@ import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.stream.IntStream;
 
-import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -40,16 +36,15 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class IndexElemArrayJUnitTest {
   
-  private IndexElemArray list = new IndexElemArray(7);
+  private IndexElemArray list;
 
-  @After
-  public void tearDown() {
-    //System.clearProperty("index_elemarray_size");
+  @Before
+  public void setUp() throws Exception {
+    list = new IndexElemArray(7);
   }
-  
+
   @Test
   public void testFunctionality() throws Exception {
-    list.clear();
     boundaryCondition();
     add();
     clearAndAdd();
@@ -63,14 +58,13 @@ public class IndexElemArrayJUnitTest {
     clearAndAdd();
   }
 
-  @Test
   /**
    * This tests concurrent modification of IndexElemArray and to make 
    * sure elementData and size are updated atomically. Ticket# GEODE-106.   
    */
+  @Test
   public void testFunctionalityUsingMultiThread() throws Exception {
-    list.clear();
-    Collection<Callable> callables = new ConcurrentLinkedQueue<>();    
+    Collection<Callable> callables = new ConcurrentLinkedQueue<>();
     IntStream.range(0, 1000).parallel().forEach(i -> {
       callables.add(() -> {
         if (i%3 == 0) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintenanceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintenanceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintenanceJUnitTest.java
index 5616078..e087304 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintenanceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintenanceJUnitTest.java
@@ -1050,18 +1050,18 @@ public class IndexMaintenanceJUnitTest
 //    --ID;
 //    Index i1 = qs.createIndex("Index1", IndexType.FUNCTIONAL, "objs.maap[*]",
 //        "/testRgn objs");
-//    assertEquals(i1.getCanonicalizedIndexedExpression(), "index_iter1.maap[*]");
+//    assertIndexDetailsEquals(i1.getCanonicalizedIndexedExpression(), "index_iter1.maap[*]");
 //    assertTrue(i1 instanceof CompactMapRangeIndex);
 //    CompactMapRangeIndex mri = (CompactMapRangeIndex)i1;
 //    // Test index maintenance
 //    // addition of new Portfolio object
 //    Map<Object, CompactRangeIndex> indxMap = mri.getRangeIndexHolderForTesting();
-//    assertEquals(indxMap.size(), ID);
+//    assertIndexDetailsEquals(indxMap.size(), ID);
 //    for (int j = 1; j <= ID; ++j) {
 //      assertTrue(indxMap.containsKey("key" + j));
 //      CompactRangeIndex rng = indxMap.get("key" + j);
 //      Iterator itr = rng.valueToEntriesMap.values().iterator();
-//      assertEquals(rng.valueToEntriesMap.size(), 1);
+//      assertIndexDetailsEquals(rng.valueToEntriesMap.size(), 1);
 //      assertTrue(rng.valueToEntriesMap.containsKey("val" + j));
 //      Set<Integer> expectedElements = new HashSet<Integer>();
 //      for (int k = j; k <= ID; ++k) {
@@ -1075,7 +1075,7 @@ public class IndexMaintenanceJUnitTest
 //      else if (mapValue instanceof ConcurrentHashSet) {            
 //       size = ((ConcurrentHashSet)mapValue).size();
 //      }
-//      assertEquals(expectedElements.size(), size);
+//      assertIndexDetailsEquals(expectedElements.size(), size);
 //        for (Integer elem : expectedElements) {
 //          RegionEntry re = testRgn.basicGetEntry(elem);
 //          if (mapValue instanceof RegionEntry) {
@@ -1093,18 +1093,18 @@ public class IndexMaintenanceJUnitTest
 //    im.rerunIndexCreationQuery();
 //    ID =5;
 //    i1 =im.getIndex("Index1");
-//    assertEquals(i1.getCanonicalizedIndexedExpression(), "index_iter1.maap[*]");
+//    assertIndexDetailsEquals(i1.getCanonicalizedIndexedExpression(), "index_iter1.maap[*]");
 //    assertTrue(i1 instanceof CompactMapRangeIndex);
 //    mri = (CompactMapRangeIndex)i1;
 //    // Test index maintenance
 //    // addition of new Portfolio object
 //    indxMap = mri.getRangeIndexHolderForTesting();
-//    assertEquals(indxMap.size(), ID);
+//    assertIndexDetailsEquals(indxMap.size(), ID);
 //    for (int j = 1; j <= ID; ++j) {
 //      assertTrue(indxMap.containsKey("key" + j));
 //      CompactRangeIndex rng = indxMap.get("key" + j);
 //      Iterator itr = rng.valueToEntriesMap.values().iterator();
-//      assertEquals(rng.valueToEntriesMap.size(), 1);
+//      assertIndexDetailsEquals(rng.valueToEntriesMap.size(), 1);
 //      assertTrue(rng.valueToEntriesMap.containsKey("val" + j));
 //      Set<Integer> expectedElements = new HashSet<Integer>();
 //      for (int k = j; k <= ID; ++k) {
@@ -1118,7 +1118,7 @@ public class IndexMaintenanceJUnitTest
 //      else if (mapValue instanceof ConcurrentHashSet) {            
 //       size = ((ConcurrentHashSet)mapValue).size();
 //      }
-//      assertEquals(expectedElements.size(), size);
+//      assertIndexDetailsEquals(expectedElements.size(), size);
 //        for (Integer elem : expectedElements) {
 //          RegionEntry re = testRgn.basicGetEntry(elem);
 //          if (mapValue instanceof RegionEntry) {



[25/55] [abbrv] incubator-geode git commit: Moving a distributed lock service unit test to open-source.

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2c148caa/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
old mode 100644
new mode 100755
index f45d2dd..e06958a
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
@@ -92,7 +92,7 @@ public class DUnitLauncher {
   public static final boolean LOCATOR_LOG_TO_DISK = Boolean.getBoolean("locatorLogToDisk");
 
   static final String MASTER_PARAM = "DUNIT_MASTER";
-  static final String RMI_PORT_PARAM = "gemfire.DUnitLauncher.RMI_PORT";
+  public static final String RMI_PORT_PARAM = "gemfire.DUnitLauncher.RMI_PORT";
   static final String VM_NUM_PARAM = "gemfire.DUnitLauncher.VM_NUM";
 
   private static final String LAUNCHED_PROPERTY = "gemfire.DUnitLauncher.LAUNCHED";
@@ -158,6 +158,7 @@ public class DUnitLauncher {
     //create an RMI registry and add an object to share our tests config
     int namingPort = AvailablePortHelper.getRandomAvailableTCPPort();
     Registry registry = LocateRegistry.createRegistry(namingPort);
+    System.setProperty(RMI_PORT_PARAM, ""+namingPort);
 
     final ProcessManager processManager = new ProcessManager(namingPort, registry);
     master = new Master(registry, processManager);


[45/55] [abbrv] incubator-geode git commit: GEODE-699 CI failure PartitionedRegionSingleHopDUnitTest.test_MetadataServiceCallAccuracy

Posted by sa...@apache.org.
GEODE-699 CI failure
PartitionedRegionSingleHopDUnitTest.test_MetadataServiceCallAccuracy

Replace WaitCriterion with Awaitility


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/fe69f0a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/fe69f0a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/fe69f0a8

Branch: refs/heads/feature/GEODE-1153
Commit: fe69f0a8a40a2825c979dab01b66f1c1d5a0b974
Parents: 036c931
Author: Jianxia Chen <jc...@pivotal.io>
Authored: Wed May 11 09:52:26 2016 -0700
Committer: Jianxia Chen <jc...@pivotal.io>
Committed: Wed May 11 09:52:26 2016 -0700

----------------------------------------------------------------------
 .../PartitionedRegionSingleHopDUnitTest.java    | 441 ++++++-------------
 1 file changed, 139 insertions(+), 302 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fe69f0a8/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
index 399f1ca..f79d6c6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
@@ -29,7 +29,10 @@ import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
 
+import com.jayway.awaitility.Awaitility;
+import org.jgroups.blocks.locking.AwaitInfo;
 import org.junit.Ignore;
 import org.junit.experimental.categories.Category;
 
@@ -105,7 +108,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
   private static Cache cache = null;
 
   private static Locator locator = null;
-  
+
   public PartitionedRegionSingleHopDUnitTest(String name) {
     super(name);
   }
@@ -124,7 +127,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
   public final void postTearDownCacheTestCase() throws Exception {
     try {
       closeCacheAndDisconnect();
-      
+
       member0 = null;
       member1 = null;
       member2 = null;
@@ -148,7 +151,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       cacheServer.stop();
     }
   }
-  
+
  public static void startLocatorInVM(final int locatorPort) {
 
     File logFile = new File("locator-" + locatorPort + ".log");
@@ -380,44 +383,21 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.printView());
     final ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     cms.satisfyRefreshMetadata_TEST_ONLY(false);
-    
+
     region.put(new Integer(0), "create0");
     region.put(new Integer(1), "create1");
     region.put(new Integer(2), "create2");
     region.put(new Integer(3), "create3");
-    
-    
-    WaitCriterion wc = new WaitCriterion() {
-      public boolean done() {
-        if (cms.isRefreshMetadataTestOnly()) {
-          return true;
-        }
-        return false;
-      }
 
-      public String description() {
-        return "expected metadataservice to be called atleast once, but it was not called";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> cms.isRefreshMetadataTestOnly() == true);
 
     cms.satisfyRefreshMetadata_TEST_ONLY(false);
     region.put(new Integer(0), "create0");
     region.put(new Integer(1), "create1");
     region.put(new Integer(2), "create2");
     region.put(new Integer(3), "create3");
-    //pause(5000);
-    wc = new WaitCriterion() {
-      public boolean done() {
-        return !cms.isRefreshMetadataTestOnly();
-      }
-
-      public String description() {
-        return "expected no metadata to be refreshed";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
 
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> cms.isRefreshMetadataTestOnly() == false);
   }
 
   public void test_MetadataServiceCallAccuracy_FromDestroyOp() {
@@ -434,26 +414,13 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.printView());
     final ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     cms.satisfyRefreshMetadata_TEST_ONLY(false);
-    
+
     region.destroy(new Integer(0));
     region.destroy(new Integer(1));
     region.destroy(new Integer(2));
     region.destroy(new Integer(3));
-    
-    
-    WaitCriterion wc = new WaitCriterion() {
-      public boolean done() {
-        if (cms.isRefreshMetadataTestOnly()) {
-          return true;
-        }
-        return false;
-      }
 
-      public String description() {
-        return "expected metadataservice to be called atleast once, but it was not called";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> cms.isRefreshMetadataTestOnly() == true);
   }
 
   public void test_MetadataServiceCallAccuracy_FromGetOp() {
@@ -470,26 +437,14 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     final ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     cms.satisfyRefreshMetadata_TEST_ONLY(false);
 
-    
+
 
     region.get(new Integer(0));
     region.get(new Integer(1));
     region.get(new Integer(2));
     region.get(new Integer(3));
 
-    WaitCriterion wc = new WaitCriterion() {
-      public boolean done() {
-        if (cms.isRefreshMetadataTestOnly()) {
-          return true;
-        }
-        return false;
-      }
-
-      public String description() {
-        return "expected metadataservice to be called atleast once, but it was not called";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> cms.isRefreshMetadataTestOnly() == true);
     printMetadata();
     Wait.pause(5000);
     cms.satisfyRefreshMetadata_TEST_ONLY(false);
@@ -521,19 +476,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       region.put(new Integer(i), new Integer(i + 1));
     }
 
-    WaitCriterion wc = new WaitCriterion() {
-      public boolean done() {
-        if (cms.isRefreshMetadataTestOnly()) {
-          return true;
-        }
-        return false;
-      }
-
-      public String description() {
-        return "expected metadataservice to be called atleast once, but it was not called";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> cms.isRefreshMetadataTestOnly() == true);
 
     // kill server
     member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.stopServer());
@@ -580,7 +523,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     }
   }
 
-  
+
   public void test_NoMetadataServiceCall_ForGetOp() {
     Integer port0 = (Integer)member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServer( 0, 4 ));
     Integer port1 = (Integer)member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServer( 0, 4 ));
@@ -623,11 +566,11 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         .invoke(() -> PartitionedRegionSingleHopDUnitTest.putIntoSinglePR());
     ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     cms.satisfyRefreshMetadata_TEST_ONLY(false);
-    
+
     member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.printView());
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.printView());
 
- 
+
     region.put(new Integer(0), "create0");
     final boolean metadataRefreshed_get1 = cms
         .isRefreshMetadataTestOnly();
@@ -690,20 +633,20 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     Integer port2 = (Integer)member2.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServer( 3, 4 ));
     Integer port3 = (Integer)member3.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServer( 3, 4 ));
     createClient(port0, port1, port2, port3);
-    putIntoPartitionedRegions();    
+    putIntoPartitionedRegions();
     getFromPartitionedRegions();
     Wait.pause(5000);
     ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
-    Map<String, ClientPartitionAdvisor> regionMetaData = cms.getClientPRMetadata_TEST_ONLY();    
+    Map<String, ClientPartitionAdvisor> regionMetaData = cms.getClientPRMetadata_TEST_ONLY();
     assertEquals(4, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
     assertTrue(regionMetaData.containsKey(customerRegion.getFullPath()));
     assertTrue(regionMetaData.containsKey(orderRegion.getFullPath()));
     assertTrue(regionMetaData.containsKey(shipmentRegion.getFullPath()));
-    
-    ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath()); 
+
+    ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
     assertEquals(4/*numBuckets*/, prMetaData.getBucketServerLocationsMap_TEST_ONLY().size());
-    
+
     for (Entry entry : prMetaData.getBucketServerLocationsMap_TEST_ONLY().entrySet()) {
       assertEquals(4, ((List)entry.getValue()).size());
     }
@@ -714,7 +657,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     verifyDeadServer(regionMetaData, customerRegion, port0, port1);
     verifyDeadServer(regionMetaData, region, port0, port1);
   }
-  
+
   public void testMetadataFetchOnlyThroughFunctions() {
     //Workaround for 52004
     IgnoredException.addIgnoredException("InternalFunctionInvocationTargetException");
@@ -726,23 +669,14 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     executeFunctions();
     ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     final Map<String, ClientPartitionAdvisor> regionMetaData = cms.getClientPRMetadata_TEST_ONLY();
-    
-    WaitCriterion wc = new WaitCriterion() {
-      public boolean done() {
-        return (regionMetaData.size() == 1);
-      }
 
-      public String description() {
-        return "expected no metadata to be refreshed";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
-    
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> regionMetaData.size() == 1);
+
     assertEquals(1, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
-    
-    final ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath()); 
-    
+
+    final ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
+
     //Fixes a race condition in GEODE-414 by retrying as 
     //region.clientMetaDataLock.tryLock() may prevent fetching the 
     //metadata through functional calls as only limited functions are executed in the test.
@@ -760,17 +694,8 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         break;
       }
     } while (System.currentTimeMillis() - start < 60000);
-    
-    wc = new WaitCriterion() {
-      public boolean done() {
-        return (prMetaData.getBucketServerLocationsMap_TEST_ONLY().size() == 4);
-      }
 
-      public String description() {
-        return "expected no metadata to be refreshed";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> (prMetaData.getBucketServerLocationsMap_TEST_ONLY().size() == 4));
 //    assertIndexDetailsEquals(4/*numBuckets*/, prMetaData.getBucketServerLocationsMap_TEST_ONLY().size());
   }
 
@@ -782,35 +707,18 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     createClient(port0, port1, port2, port3);
     putAll();
     ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
-    final Map<String, ClientPartitionAdvisor> regionMetaData = cms.getClientPRMetadata_TEST_ONLY();    
-    WaitCriterion wc = new WaitCriterion() {
-      public boolean done() {
-        return (regionMetaData.size() == 1);
-      }
+    final Map<String, ClientPartitionAdvisor> regionMetaData = cms.getClientPRMetadata_TEST_ONLY();
 
-      public String description() {
-        return "expected no metadata to be refreshed";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
-    
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> (regionMetaData.size() == 1));
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
-    
-    final ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath()); 
-    wc = new WaitCriterion() {
-      public boolean done() {
-        return (prMetaData.getBucketServerLocationsMap_TEST_ONLY().size() == 4);
-      }
 
-      public String description() {
-        return "expected no metadata to be refreshed";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);  
+    final ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
+
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> (prMetaData.getBucketServerLocationsMap_TEST_ONLY().size() == 4));
   }
-  
-  
-  
+
+
+
   @Ignore("Bug 47950")
   public void DISABLED_testMetadataIsSameOnAllServersAndClients() {
     Integer port0 = (Integer)member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServer( 3, 4 ));
@@ -823,15 +731,15 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
     member2.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
     member3.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
-    
-    
+
+
     ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     cms.getClientPRMetadata((LocalRegion)region);
-    
-    Map<String, ClientPartitionAdvisor> regionMetaData = cms.getClientPRMetadata_TEST_ONLY();    
+
+    Map<String, ClientPartitionAdvisor> regionMetaData = cms.getClientPRMetadata_TEST_ONLY();
     assertEquals(1, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
-    
+
     ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
     final Map<Integer, List<BucketServerLocation66>> clientMap  = prMetaData.getBucketServerLocationsMap_TEST_ONLY();
     WaitCriterion wc = new WaitCriterion() {
@@ -843,7 +751,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    Wait.waitForCriterion(wc, 60000, 1000, true); 
+    Wait.waitForCriterion(wc, 60000, 1000, true);
     for (Entry entry : clientMap.entrySet()) {
       assertEquals(4, ((List)entry.getValue()).size());
     }
@@ -851,10 +759,10 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.verifyMetadata(clientMap));
     member2.invoke(() -> PartitionedRegionSingleHopDUnitTest.verifyMetadata(clientMap));
     member3.invoke(() -> PartitionedRegionSingleHopDUnitTest.verifyMetadata(clientMap));
-    
+
     member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.stopServer());
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.stopServer());
-    
+
     member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.startServerOnPort( port0 ));
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.startServerOnPort( port1 ));
     put();
@@ -862,15 +770,15 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
     member2.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
     member3.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
-    
+
     cms = ((GemFireCacheImpl)cache).getClientMetadataService();
-    
+
     wc = new WaitCriterion() {
       public boolean done() {
-        ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();    
-        Map<String, ClientPartitionAdvisor>  regionMetaData = cms.getClientPRMetadata_TEST_ONLY();    
+        ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
+        Map<String, ClientPartitionAdvisor>  regionMetaData = cms.getClientPRMetadata_TEST_ONLY();
         assertEquals(1, regionMetaData.size());
-        assertTrue(regionMetaData.containsKey(region.getFullPath()));    
+        assertTrue(regionMetaData.containsKey(region.getFullPath()));
         ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
         Map<Integer, List<BucketServerLocation66>> clientMap  = prMetaData.getBucketServerLocationsMap_TEST_ONLY();
         assertEquals(4/*numBuckets*/, clientMap.size());
@@ -892,11 +800,11 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     Wait.waitForCriterion(wc, 60000, 400, true);
     cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     cms.getClientPRMetadata((LocalRegion)region);
-    
-    regionMetaData = cms.getClientPRMetadata_TEST_ONLY();    
+
+    regionMetaData = cms.getClientPRMetadata_TEST_ONLY();
     assertEquals(1, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
-    
+
     prMetaData = regionMetaData.get(region.getFullPath());
     final Map<Integer, List<BucketServerLocation66>> clientMap2  = prMetaData.getBucketServerLocationsMap_TEST_ONLY();
     wc = new WaitCriterion() {
@@ -908,19 +816,19 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
         return "expected no metadata to be refreshed";
       }
     };
-    Wait.waitForCriterion(wc, 60000, 1000, true); 
+    Wait.waitForCriterion(wc, 60000, 1000, true);
     for (Entry entry : clientMap.entrySet()) {
       assertEquals(4, ((List)entry.getValue()).size());
     }
-    
+
     member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.verifyMetadata(clientMap));
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.verifyMetadata(clientMap));
     member2.invoke(() -> PartitionedRegionSingleHopDUnitTest.verifyMetadata(clientMap));
     member3.invoke(() -> PartitionedRegionSingleHopDUnitTest.verifyMetadata(clientMap));
-    
+
     member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.closeCacheAndDisconnect());
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.closeCacheAndDisconnect());
-    
+
 //    member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServerOnPort(3,4,port0 ));
 //    member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServerOnPort(3,4,port1 ));
     put();
@@ -932,7 +840,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
             .getRegionAdvisor().getAllClientBucketProfilesTest();
       }
     });
-    
+
     member3.invoke(new CacheSerializableRunnable("aba") {
       @Override
       public void run2() throws CacheException {
@@ -941,31 +849,22 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
             .getRegionAdvisor().getAllClientBucketProfilesTest();
       }
     });
-    
+
 //    member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
 //    member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
     member2.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
     member3.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
-    
+
     cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     cms.getClientPRMetadata((LocalRegion)region);
-    
-    regionMetaData = cms.getClientPRMetadata_TEST_ONLY();    
+
+    regionMetaData = cms.getClientPRMetadata_TEST_ONLY();
     assertEquals(1, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
-    
+
     prMetaData = regionMetaData.get(region.getFullPath());
     final Map<Integer, List<BucketServerLocation66>> clientMap3  = prMetaData.getBucketServerLocationsMap_TEST_ONLY();
-    wc = new WaitCriterion() {
-      public boolean done() {
-        return (clientMap3.size() == 4);
-      }
-
-      public String description() {
-        return "expected no metadata to be refreshed";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true); 
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> (clientMap3.size() == 4));
     for (Entry entry : clientMap.entrySet()) {
       assertEquals(2, ((List)entry.getValue()).size());
     }
@@ -988,36 +887,28 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       public String description() {
         return "verification of metadata on all members";
       }
-      
+
     }, 20000, 2000, true);
+
   }
-  
+
   public void testMetadataIsSameOnAllServersAndClientsHA() {
     Integer port0 = (Integer)member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServer( 2, 4 ));
     Integer port1 = (Integer)member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServer( 2, 4 ));
-    
+
     createClient(port0, port1, port0, port1);
     put();
-    
+
     ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     cms.getClientPRMetadata((LocalRegion)region);
-    
-    final Map<String, ClientPartitionAdvisor> regionMetaData = cms.getClientPRMetadata_TEST_ONLY();    
-    
-    WaitCriterion wc = new WaitCriterion() {
-      public boolean done() {
-        return (regionMetaData.size() == 1);
-      }
 
-      public String description() {
-        return "expected metadata is ready";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
-    
+    final Map<String, ClientPartitionAdvisor> regionMetaData = cms.getClientPRMetadata_TEST_ONLY();
+
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> (regionMetaData.size() == 1));
+
     assertEquals(1, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
-    
+
     member0.invoke(new CacheSerializableRunnable("aba") {
       @Override
       public void run2() throws CacheException {
@@ -1026,7 +917,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
             .getRegionAdvisor().getAllClientBucketProfilesTest();
       }
     });
-    
+
     member1.invoke(new CacheSerializableRunnable("aba") {
       @Override
       public void run2() throws CacheException {
@@ -1035,73 +926,55 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
             .getRegionAdvisor().getAllClientBucketProfilesTest();
       }
     });
-    
+
     ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
     final Map<Integer, List<BucketServerLocation66>> clientMap  = prMetaData.getBucketServerLocationsMap_TEST_ONLY();
-    wc = new WaitCriterion() {
-      public boolean done() {
-        return (clientMap.size() == 4);
-      }
-
-      public String description() {
-        return "expected no metadata to be refreshed";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true); 
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> (clientMap.size() == 4));
     for (Entry entry : clientMap.entrySet()) {
       assertEquals(2, ((List)entry.getValue()).size());
     }
     member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.verifyMetadata(clientMap));
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.verifyMetadata(clientMap));
-    
+
     member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.stopServer());
-    
+
     put();
-    
+
     cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     cms.getClientPRMetadata((LocalRegion)region);
-    
+
     //member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.verifyMetadata(clientMap));
-    
+
     assertEquals(4/*numBuckets*/, clientMap.size());
     for (Entry entry : clientMap.entrySet()) {
       assertEquals(1, ((List)entry.getValue()).size());
     }
-    
-    wc = new WaitCriterion() {
-      private int bucketId;
-      private int size;
+
+    assertEquals(1, regionMetaData.size());
+    assertTrue(regionMetaData.containsKey(region.getFullPath()));
+    assertEquals(4/*numBuckets*/, clientMap.size());
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> {
+      int bucketId = -1;
+      int size = -1;
       List globalList = new ArrayList();
-      public boolean done() {
-        ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();    
-        Map<String, ClientPartitionAdvisor>  regionMetaData = cms.getClientPRMetadata_TEST_ONLY();    
-        assertEquals(1, regionMetaData.size());
-        assertTrue(regionMetaData.containsKey(region.getFullPath()));    
-        ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
-        Map<Integer, List<BucketServerLocation66>> clientMap  = prMetaData.getBucketServerLocationsMap_TEST_ONLY();
-        assertEquals(4/*numBuckets*/, clientMap.size());
-        boolean finished = true;
-        for (Entry entry : clientMap.entrySet()) {
-          List list = (List)entry.getValue();
-          if(list.size() != 1){
-            size = list.size();
-            globalList = list;
-            bucketId = (Integer)entry.getKey();
-            finished = false;
-          }
+      boolean finished = true;
+      for (Entry entry : clientMap.entrySet()) {
+        List list = (List) entry.getValue();
+        if (list.size() != 1) {
+          size = list.size();
+          globalList = list;
+          bucketId = (Integer) entry.getKey();
+          finished = false;
+          System.out.println("bucket copies are not created, the locations size for bucket id : "
+              + bucketId + " size : " + size + " the list is " + globalList);
         }
-        return finished;
       }
-      public String description() {
-        return "bucket copies are not created, the locations size for bucket id : "
-            + bucketId + " size : " + size + " the list is " + globalList;
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 400, true);
+      return finished;
+    });
   }
 
   //TODO This is failing in WAN_Dev_Dec11 branch after downmerge from trunk revision 34709
-  
+
   // This test is disabled due to intermittent failures in unit test runs
   // Please see ticket #52203
   public void disabledtestClientMetadataForPersistentPrs() throws Exception {
@@ -1109,14 +982,14 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     Integer port1 = (Integer)member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.createPersistentPrsAndServer( 3, 4 ));
     Integer port2 = (Integer)member2.invoke(() -> PartitionedRegionSingleHopDUnitTest.createPersistentPrsAndServer( 3, 4 ));
     Integer port3 = (Integer)member3.invoke(() -> PartitionedRegionSingleHopDUnitTest.createPersistentPrsAndServer( 3, 4 ));
-    
+
     member3.invoke(() -> PartitionedRegionSingleHopDUnitTest.putIntoPartitionedRegions());
-    
+
     member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
     member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
     member2.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
     member3.invoke(() -> PartitionedRegionSingleHopDUnitTest.waitForLocalBucketsCreation(4));
-    
+
     createClient(port0, port1, port2, port3);
     fetchAndValidateMetadata();
     member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.closeCacheAndDisconnect());
@@ -1134,8 +1007,8 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     m0.join();
     fetchAndValidateMetadata();
   }
-  
-  
+
+
   private void fetchAndValidateMetadata() {
     ClientMetadataService service = ((GemFireCacheImpl)this.cache)
         .getClientMetadataService();
@@ -1156,14 +1029,14 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       if (servers.size() < 4) {
         fail("Servers size is " +servers.size() + " less than expected 4.");
       }
-    }   
+    }
   }
-  
+
   public static void verifyMetadata(Map<Integer, List<BucketServerLocation66>> clientMap){
     final PartitionedRegion pr = (PartitionedRegion)region;
     ConcurrentHashMap<Integer, Set<ServerBucketProfile>> serverMap = pr.getRegionAdvisor().getAllClientBucketProfilesTest();
     assertEquals(clientMap.size(), serverMap.size());
-    assertTrue(clientMap.keySet().containsAll(serverMap.keySet()));    
+    assertTrue(clientMap.keySet().containsAll(serverMap.keySet()));
     for(Map.Entry<Integer, List<BucketServerLocation66>> entry : clientMap.entrySet()){
       int bucketId = entry.getKey();
       List<BucketServerLocation66> list = entry.getValue();
@@ -1191,7 +1064,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       assertTrue(primaryCnt==1);
     }
   }
-  
+
   public static void waitForLocalBucketsCreation(final int numBuckets){
     final PartitionedRegion pr = (PartitionedRegion)region;
     WaitCriterion wc = new WaitCriterion() {
@@ -1211,37 +1084,21 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     };
     Wait.waitForCriterion(wc, 60000, 400, true);
   }
-  
-  public static void waitForBucketsCreation(){
-    final PartitionedRegion pr = (PartitionedRegion)region;
-    WaitCriterion wc = new WaitCriterion() {
-      public boolean done() {
-        if (pr.getDataStore().getAllLocalBuckets().size() == 2) {
-          return true;
-        }
-        return false;
-      }
-      public String description() {
-        return "bucket copies are not created";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 400, true);
-  }
-  
+
   private void verifyDeadServer(Map<String, ClientPartitionAdvisor> regionMetaData, Region region, int port0, int port1) {
-    
+
     ServerLocation sl0 = new ServerLocation("localhost", port0);
     ServerLocation sl1 = new ServerLocation("localhost", port1);
-    
-    final ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath()); 
-    
+
+    final ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
+
     for (Entry entry : prMetaData.getBucketServerLocationsMap_TEST_ONLY().entrySet()) {
       List servers = (List)entry.getValue();
       assertFalse( servers.contains(sl0) );
       assertFalse( servers.contains(sl1) );
     }
   }
-  
+
   public static void createClientWithoutPRSingleHopEnabled(int port0) {
     Properties props = new Properties();
     props = new Properties();
@@ -1267,7 +1124,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 
     createRegionsInClientCache(p.getName());
   }
-  
+
   public static int createAccessorServer() {
     CacheTestCase test = new PartitionedRegionSingleHopDUnitTest(
         "PartitionedRegionSingleHopDUnitTest");
@@ -1405,13 +1262,13 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     assertNotNull(shipmentRegion);
     LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
-            + shipmentRegion.toString());    
-    
+            + shipmentRegion.toString());
+
     replicatedRegion = cache.createRegion("rr", new AttributesFactory().create());
 
     return port;
   }
-  
+
   public static int createPersistentPrsAndServer(int redundantCopies, int totalNoofBuckets) {
     CacheTestCase test = new PartitionedRegionSingleHopDUnitTest(
         "PartitionedRegionSingleHopDUnitTest");
@@ -1481,8 +1338,8 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     assertNotNull(shipmentRegion);
     LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
-            + shipmentRegion.toString());    
-    
+            + shipmentRegion.toString());
+
     replicatedRegion = cache.createRegion("rr", new AttributesFactory().create());
     CacheServer server = cache.addCacheServer();
     int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
@@ -1565,8 +1422,8 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     assertNotNull(shipmentRegion);
     LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
-            + shipmentRegion.toString());    
-    
+            + shipmentRegion.toString());
+
     replicatedRegion = cache.createRegion("rr", new AttributesFactory().create());
     CacheServer server = cache.addCacheServer();
     server.setPort(port);
@@ -1645,12 +1502,12 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     assertNotNull(shipmentRegion);
     LogWriterUtils.getLogWriter().info(
         "Partitioned Region SHIPMENT created Successfully :"
-            + shipmentRegion.toString());    
-    
+            + shipmentRegion.toString());
+
     replicatedRegion = cache.createRegion("rr", new AttributesFactory().create());
 
   }
-  
+
   public static void startServerOnPort(int port) {
     CacheTestCase test = new PartitionedRegionSingleHopDUnitTest(
         "PartitionedRegionSingleHopDUnitTest");
@@ -1665,7 +1522,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       Assert.fail("Failed to start server ", e);
     }
   }
-  
+
 
   public static void createPeer() {
     CacheTestCase test = new PartitionedRegionSingleHopDUnitTest(
@@ -1826,7 +1683,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 
     createRegionsInClientCache(p.getName());
   }
-  
+
   private static void createRegionsInClientCache(String poolName) {
     AttributesFactory factory = new AttributesFactory();
     factory.setPoolName(poolName);
@@ -1876,7 +1733,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     factory.setPoolName(poolName);
     replicatedRegion = cache.createRegion("rr", factory.create());
   }
-  
+
   public static void putIntoPartitionedRegions() {
     for (int i = 0; i <= 3; i++) {
       CustId custid = new CustId(i);
@@ -1948,7 +1805,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
       return true;
     }
   }
-  
+
   public static void executeFunctions() {
     Set filter = new HashSet();
     filter.add(0);
@@ -1960,7 +1817,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     FunctionService.onRegion(region).withFilter(filter).execute(new MyFunctionAdapter()).getResult();
     FunctionService.onRegion(region).execute(new MyFunctionAdapter()).getResult();
   }
-  
+
   public static void putAll() {
     Map map = new HashMap();
     map.put(0, 0);
@@ -1971,8 +1828,8 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     region.putAll(map);
     region.putAll(map);
     region.putAll(map);
-  }  
-  
+  }
+
   public static void put() {
 
     region.put(new Integer(0), "create0");
@@ -1992,7 +1849,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     region.put(new Integer(1), "update11");
     region.put(new Integer(2), "update22");
     region.put(new Integer(3), "update33");
-*/  }  
+*/  }
 
   public static void getFromPartitionedRegions() {
     for (int i = 0; i <= 3; i++) {
@@ -2052,7 +1909,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     cms.satisfyRefreshMetadata_TEST_ONLY(false);
     region.put(new Integer(0), "update0");
     assertEquals(false, cms.isRefreshMetadataTestOnly());
-    
+
 
     region.put(new Integer(1), "update1");
     assertEquals(false, cms.isRefreshMetadataTestOnly());
@@ -2118,31 +1975,11 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
     final Map<String, ClientPartitionAdvisor> regionMetaData = cms
         .getClientPRMetadata_TEST_ONLY();
-    
-    WaitCriterion wc = new WaitCriterion() {
-      public boolean done() {
-        return (regionMetaData.size() == 4);
-      }
-
-      public String description() {
-        return "expected PRAdvisor to be ready";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
-    
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> (regionMetaData.size() == 4));
     assertEquals(4, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
     final ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
-    wc = new WaitCriterion() {
-      public boolean done() {
-        return (prMetaData.getBucketServerLocationsMap_TEST_ONLY().size() == 4);
-      }
-
-      public String description() {
-        return "expected no metadata to be refreshed";
-      }
-    };
-    Wait.waitForCriterion(wc, 60000, 1000, true);
+    Awaitility.waitAtMost(60, TimeUnit.SECONDS).until(() -> (prMetaData.getBucketServerLocationsMap_TEST_ONLY().size() == 4));
   }
 }
 



[55/55] [abbrv] incubator-geode git commit: fixed a persistent test failure

Posted by sa...@apache.org.
fixed a persistent test failure


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/df620989
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/df620989
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/df620989

Branch: refs/heads/feature/GEODE-93
Commit: df6209894a984c7453ec4e41bed8fd91b5c22e61
Parents: 8694c55
Author: Sai Boorlagadda <sb...@pivotal.io>
Authored: Tue May 24 11:24:48 2016 -0700
Committer: Sai Boorlagadda <sb...@pivotal.io>
Committed: Tue May 24 11:24:48 2016 -0700

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/internal/cache/DiskEntry.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/df620989/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
index b530f8b..7fa0c42 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
@@ -1083,10 +1083,10 @@ public interface DiskEntry extends RegionEntry {
               incrementBucketStats(region, 1/*InVM*/, -1/*OnDisk*/, -oldValueLength);
             } else if(oldValue != null && newValue == Token.TOMBSTONE) {
               dr.incNumEntriesInVM(-1L);
-              if(dr.isBackup()) {
-                dr.incNumOverflowBytesOnDisk(-oldValueLength);
-                incrementBucketStats(region, -1/*InVM*/, 0/*OnDisk*/, -oldValueLength);
-              }
+              //if(dr.isBackup()) {
+              //  dr.incNumOverflowBytesOnDisk(-oldValueLength);
+              //  incrementBucketStats(region, -1/*InVM*/, 0/*OnDisk*/, -oldValueLength);
+              //}
             } else if(oldValue == Token.TOMBSTONE && newValue != Token.TOMBSTONE) {
               dr.incNumEntriesInVM(1L);
               incrementBucketStats(region, 1/*InVM*/, 0/*OnDisk*/, 0/*overflowBytesOnDisk*/);


[40/55] [abbrv] incubator-geode git commit: GEODE-1360: Enabling to specify log4j2.xml for test in gradle

Posted by sa...@apache.org.
GEODE-1360: Enabling to specify log4j2.xml for test in gradle

Product code has built in log4j's trace log. However there's no command line
parameter to turn on it. This fix let gradlew to transfer the system property
to unit test framework, and let unit test framework to set it in run-time jvm.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/036c9317
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/036c9317
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/036c9317

Branch: refs/heads/feature/GEODE-1153
Commit: 036c931705fab5122a81a446d67e4ab5bc6620b7
Parents: 9a77054
Author: zhouxh <gz...@pivotal.io>
Authored: Mon May 9 17:03:15 2016 -0700
Committer: zhouxh <gz...@pivotal.io>
Committed: Tue May 10 14:21:39 2016 -0700

----------------------------------------------------------------------
 .../test/dunit/standalone/DUnitLauncher.java    |  2 +
 .../test/dunit/standalone/ProcessManager.java   | 45 ++++++++++++--------
 gradle/test.gradle                              |  4 ++
 3 files changed, 34 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/036c9317/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
index 0c294ec..4e7095c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
@@ -76,6 +76,8 @@ public class DUnitLauncher {
   /** change this to use a different log level in unit tests */
   public static final String LOG_LEVEL = System.getProperty("logLevel", "info");
   
+  public static final String LOG4J = System.getProperty("log4j.configurationFile");
+  
   static int locatorPort;
 
   private static final int NUM_VMS = 4;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/036c9317/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
index dd532c4..5dbdfd6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
@@ -28,6 +28,7 @@ import java.rmi.AccessException;
 import java.rmi.NotBoundException;
 import java.rmi.RemoteException;
 import java.rmi.registry.Registry;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
@@ -161,23 +162,33 @@ public class ProcessManager {
     }
 
     String jdkSuspend = vmNum == suspendVM ? "y" : "n";
-
-    return new String[] {
-      cmd, "-classpath", classPath,
-      "-D" + DUnitLauncher.RMI_PORT_PARAM + "=" + namingPort,
-      "-D" + DUnitLauncher.VM_NUM_PARAM + "=" + vmNum,
-      "-D" + DUnitLauncher.WORKSPACE_DIR_PARAM + "=" + new File(".").getAbsolutePath(),
-      "-DlogLevel=" + DUnitLauncher.LOG_LEVEL,
-      "-Djava.library.path=" + System.getProperty("java.library.path"),
-      "-Xrunjdwp:transport=dt_socket,server=y,suspend=" + jdkSuspend + jdkDebug,
-      "-XX:+HeapDumpOnOutOfMemoryError",
-      "-Xmx512m",
-      "-Dgemfire.DEFAULT_MAX_OPLOG_SIZE=10",
-      "-Dgemfire.disallowMcastDefaults=true",
-      "-ea", "-XX:+PrintGC", "-XX:+PrintGCDetails","-XX:+PrintGCTimeStamps",
-      agent,
-      ChildVM.class.getName()
-    };
+    ArrayList<String> cmds = new ArrayList<String>();
+    cmds.add(cmd);
+    cmds.add("-classpath"); 
+    cmds.add(classPath);
+    cmds.add("-D" + DUnitLauncher.RMI_PORT_PARAM + "=" + namingPort);
+    cmds.add("-D" + DUnitLauncher.VM_NUM_PARAM + "=" + vmNum);
+    cmds.add("-D" + DUnitLauncher.WORKSPACE_DIR_PARAM + "=" + new File(".").getAbsolutePath());
+    cmds.add("-DlogLevel=" + DUnitLauncher.LOG_LEVEL);
+    if (DUnitLauncher.LOG4J!=null) {
+      cmds.add("-Dlog4j.configurationFile="+DUnitLauncher.LOG4J);
+    }
+    cmds.add("-Djava.library.path=" + System.getProperty("java.library.path"));
+    cmds.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=" + jdkSuspend + jdkDebug);
+    cmds.add("-XX:+HeapDumpOnOutOfMemoryError");
+    cmds.add("-Xmx512m");
+    cmds.add("-Dgemfire.DEFAULT_MAX_OPLOG_SIZE=10");
+    cmds.add("-Dgemfire.disallowMcastDefaults=true");
+    cmds.add("-ea");
+    cmds.add("-XX:+PrintGC");
+    cmds.add("-XX:+PrintGCDetails");
+    cmds.add("-XX:+PrintGCTimeStamps");
+    cmds.add(agent);
+    cmds.add(ChildVM.class.getName());
+    String[] rst = new String[cmds.size()];
+    cmds.toArray(rst);
+    
+    return rst;
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/036c9317/gradle/test.gradle
----------------------------------------------------------------------
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 2dd7521..96fbfc5 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -211,6 +211,10 @@ subprojects {
         if (logLevel != null) {
           systemProperty 'logLevel', logLevel
         }
+        def log4jLocation = System.getProperty('log4j.configurationFile')
+        if (log4jLocation != null) {
+          systemProperty 'log4j.configurationFile', log4jLocation
+        }
 
         def eol = System.getProperty('line.separator')
         def progress = new File(resultsDir, "$test.name-progress.txt")


[47/55] [abbrv] incubator-geode git commit: GEODE-1282: fix wan off-heap leak

Posted by sa...@apache.org.
GEODE-1282: fix wan off-heap leak

destroyFromTempQueue now releases GatewaySenderEventImpl when it is removed from the tempQueue


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/463ae16a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/463ae16a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/463ae16a

Branch: refs/heads/feature/GEODE-1153
Commit: 463ae16a7c0b762abdf33d2aad1002721cccb53a
Parents: 9d28009
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Mon May 9 10:23:25 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed May 11 10:11:16 2016 -0700

----------------------------------------------------------------------
 .../internal/cache/wan/parallel/ParallelQueueRemovalMessage.java    | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/463ae16a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
index 09f70a6..14d2f20 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
@@ -237,6 +237,7 @@ public class ParallelQueueRemovalMessage extends PooledDistributionMessage {
           afterAckForSecondary_EventInTempQueue(qPR.getParallelGatewaySender(), eventForFilter);
           if (eventForFilter.getShadowKey().equals(key)) {
             itr.remove();
+            eventForFilter.release(); // GEODE-1282
             isDestroyed = true;
           }
         }


[26/55] [abbrv] incubator-geode git commit: Moving a distributed lock service unit test to open-source.

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2c148caa/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockServiceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockServiceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockServiceDUnitTest.java
new file mode 100755
index 0000000..42c3f01
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedLockServiceDUnitTest.java
@@ -0,0 +1,3246 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import junit.framework.Assert;
+import junit.framework.AssertionFailedError;
+
+import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.DistributionMessage;
+import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
+import com.gemstone.gemfire.distributed.internal.locks.DLockGrantor;
+import com.gemstone.gemfire.distributed.internal.locks.DLockRemoteToken;
+import com.gemstone.gemfire.distributed.internal.locks.DLockRequestProcessor;
+import com.gemstone.gemfire.distributed.internal.locks.DLockRequestProcessor.DLockRequestMessage;
+import com.gemstone.gemfire.distributed.internal.locks.DLockRequestProcessor.DLockResponseMessage;
+import com.gemstone.gemfire.distributed.internal.locks.DLockService;
+import com.gemstone.gemfire.distributed.internal.locks.DLockToken;
+import com.gemstone.gemfire.distributed.internal.locks.RemoteThread;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.internal.util.StopWatch;
+import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.RMIException;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+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;
+
+/**
+ * This class tests distributed ownership via the DistributedLockService api.
+ */
+public class DistributedLockServiceDUnitTest extends DistributedTestCase {
+  
+	protected static DistributedSystem dlstSystem;
+  private static DistributedLockBlackboard blackboard;
+  protected static Object monitor = new Object();
+
+  private int hits = 0;
+  private int completes = 0;
+  private boolean done;
+  private boolean got;
+
+
+  public DistributedLockServiceDUnitTest(String name) {
+    super(name);
+    if (blackboard == null) {
+      try {
+        blackboard = DistributedLockBlackboardImpl.getInstance();
+      } catch (Exception e) {
+        throw new RuntimeException("initialization error", e);
+      }
+    }
+  }
+  
+  /////////// Test lifecycle //////////
+ 
+  public static void caseSetUp() throws Exception {
+    disconnectAllFromDS();
+  }
+  
+  public static void caseTearDown() throws Exception {
+    disconnectAllFromDS();
+  }
+  
+  /**
+   * Returns a previously created (or new, if this is the first
+   * time this method is called in this VM) distributed system
+   * which is somewhat configurable via hydra test parameters.
+   */
+  @Override
+  public final void postSetUp() throws Exception {
+    // Create a DistributedSystem in every VM
+    connectDistributedSystem();
+
+    for (int h = 0; h < Host.getHostCount(); h++) {
+      Host host = Host.getHost(h);
+
+      for (int v = 0; v < host.getVMCount(); v++) {
+        host.getVM(v).invoke(
+          DistributedLockServiceDUnitTest.class, "connectDistributedSystem", null);
+      }
+    }
+  }
+
+  @Override
+  public final void preTearDown() throws Exception {
+    Invoke.invokeInEveryVM(DistributedLockServiceDUnitTest.class,
+                    "destroyAllDLockServices"); 
+//    invokeInEveryVM(DistributedLockServiceDUnitTest.class,
+//                    "remoteDumpAllDLockServices"); 
+                    
+    //InternalDistributedLockService.destroyAll();
+    
+//     // Disconnects the DistributedSystem in every VM - since
+//     // each test randomly chooses whether shared memory is used
+//     disconnectAllFromDS();
+    
+    this.lockGrantor = null;
+  }
+  
+  public static void destroyAllDLockServices() {
+    DLockService.destroyAll();
+    dlstSystem = null;
+  }
+
+  public static void remoteDumpAllDLockServices() {
+    DLockService.dumpAllServices();
+  }
+
+  ///////// Remote setup/teardown support
+
+  /**
+   * Connects a DistributedSystem, saves it in static variable "system"
+   */
+  protected static void connectDistributedSystem() {
+    dlstSystem = (new DistributedLockServiceDUnitTest("dummy")).getSystem();
+  }
+
+  /////////  Public test methods
+  
+  public void testBasic() {
+    String serviceName = getUniqueName();
+    String objectName = "object";
+    
+    // Create service
+    DistributedLockService service = DistributedLockService.create(serviceName, dlstSystem);
+    
+    // Not locked initially
+    assertFalse(service.isHeldByCurrentThread(objectName));
+
+    // Get lock
+    assertTrue(service.lock(objectName, 3000, -1));
+    assertTrue(service.isHeldByCurrentThread(objectName));
+    assertTrue(service.lock(objectName, 3000, -1));
+    assertTrue(service.isHeldByCurrentThread(objectName));
+    
+    // Release lock
+    service.unlock(objectName);
+    assertTrue(service.isHeldByCurrentThread(objectName));
+    service.unlock(objectName);
+    assertFalse(service.isHeldByCurrentThread(objectName));
+    
+    // Destroy service
+    DistributedLockService.destroy(serviceName);
+  }
+  
+  public void testCreateDestroy() throws Exception {
+    final String serviceName = getUniqueName();
+    final String abc = "abc";
+    
+    // create and destroy dls
+    assertNull(DistributedLockService.getServiceNamed(serviceName));
+    DistributedLockService service = DistributedLockService.create(serviceName, getSystem());
+    assertSame(service, DistributedLockService.getServiceNamed(serviceName));
+    DistributedLockService.destroy(serviceName);
+    
+    // assert attempt to use dls throws LockServiceDestroyedException
+    try {
+      service.lock(abc, -1, -1);
+      fail("didn't get LockServiceDestroyedException");
+    } catch (LockServiceDestroyedException ex) {
+    }
+    
+    // assert that destroyed dls is no longer available
+    service = DistributedLockService.getServiceNamed(serviceName);
+    assertNull("" + service, service);
+    
+    // recreate the dls
+    service = DistributedLockService.create(serviceName, getSystem());
+    assertTrue(!((DLockService)service).isDestroyed());
+    ((DLockService)service).checkDestroyed();
+    
+    // get the same dls from another thread and hold a lock
+    Thread thread = new Thread(new Runnable() {
+      public void run() {
+        DistributedLockService dls = 
+            DistributedLockService.getServiceNamed(serviceName);
+        assertTrue(!((DLockService)dls).isDestroyed());
+        ((DLockService)dls).checkDestroyed();
+        dls.lock(abc, -1, -1); // get lock on abc and hold it
+      }
+    });
+    thread.start();
+    ThreadUtils.join(thread, 30 * 1000);
+    
+    // start a new thread to wait for lock on abc
+    AsyncInvocation remoteWaitingThread = 
+      Host.getHost(0).getVM(0).invokeAsync(new SerializableRunnable() {
+      public void run() {
+        DistributedLockService dls = 
+            DistributedLockService.create(serviceName, getSystem());
+        try {
+          dls.lock(abc, -1, -1); // waiting to get lock abc
+          fail("remoteWaitingThread got lock after dls destroyed");
+        }
+        catch (LockServiceDestroyedException expected) {
+          return;
+        }
+        fail("remoteWaitingThread lock failed to throw LockServiceDestroyedException");
+      }
+    });
+    
+    // loop will handle race condition with 1 sec sleep and retry
+    int retry = 10;
+    for (int i = 0; i < retry; i++) {
+      try {
+        // destroy DLS and free up remoteWaitingThread
+        Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
+          public void run() {
+            DistributedLockService.destroy(serviceName);
+          }
+        });
+      }
+      catch (RMIException e) {
+        // race condition: remoteWaitingThread probably hasn't created DLS yet
+        if (i < retry && e.getCause() instanceof IllegalArgumentException) {
+          sleep(1000);
+          continue;
+        }
+        else {
+          throw e;
+        }
+      }
+      break; // completed so break out of loop
+    }
+    
+    DistributedLockService.destroy(serviceName);
+    
+    // make sure remoteWaitingThread stopped waiting and threw LockServiceDestroyedException
+    ThreadUtils.join(remoteWaitingThread, 10 * 1000);
+    if (remoteWaitingThread.exceptionOccurred()) {
+      Throwable e = remoteWaitingThread.getException();
+      com.gemstone.gemfire.test.dunit.Assert.fail(e.getMessage(), e);
+    }
+    
+    // make sure LockServiceDestroyedException is thrown
+    try {
+      service.lock(abc, -1, -1);
+      fail("didn't get LockServiceDestroyedException");
+    } catch (LockServiceDestroyedException ex) {
+    }
+    
+    // make sure getServiceNamed returns null
+    service = DistributedLockService.getServiceNamed(serviceName);
+    assertNull("" + service, service);
+  }
+
+  protected static DistributedLockService dls_testFairness;
+  protected static int count_testFairness[] = new int[16];
+  protected static volatile boolean stop_testFairness;
+  protected static volatile boolean[] done_testFairness = new boolean[16];
+  static { Arrays.fill(done_testFairness, true); }
+  public void testFairness() throws Exception {
+    final String serviceName = "testFairness_" + getUniqueName();
+    final Object lock = "lock";
+    
+    // get the lock and hold it until all threads are ready to go
+    DistributedLockService service = 
+        DistributedLockService.create(serviceName, dlstSystem);
+    assertTrue(service.lock(lock, -1, -1));
+    
+    final int[] vmThreads = new int[] { 1, 4, 8, 16 };
+    forNumVMsInvoke(vmThreads.length,
+                    "remoteCreateService", 
+                    new Object[] { serviceName });
+    sleep(100);
+
+    // line up threads for the fairness race...
+    for (int i = 0; i < vmThreads.length; i++) {
+      final int vm = i;
+      LogWriterUtils.getLogWriter().info("[testFairness] lining up " + vmThreads[vm] + 
+                          " threads in vm " + vm); 
+                          
+      for (int j = 0; j < vmThreads[vm]; j++) {
+        final int thread = j;
+        /*getLogWriter().info("[testFairness] setting up thread " + thread +
+                            " in vm " + vm);*/
+        
+        Host.getHost(0).getVM(vm).invokeAsync(new SerializableRunnable() {
+          public void run() {
+            // lock, inc count, and unlock until stop_testFairness is set true
+            try {
+              done_testFairness[thread] = false;
+              dls_testFairness = DistributedLockService.getServiceNamed(serviceName);
+              while (!stop_testFairness) {
+                assertTrue(dls_testFairness.lock(lock, -1, -1));
+                count_testFairness[thread]++;
+                dls_testFairness.unlock(lock);
+              }
+              done_testFairness[thread] = true;
+            }
+            catch (VirtualMachineError e) {
+              SystemFailure.initiateFailure(e);
+              throw e;
+            }
+            catch (Throwable t) {
+              LogWriterUtils.getLogWriter().warning(t);
+              fail(t.getMessage());
+            }
+          }
+        });
+      }
+    }
+    sleep(500); // 500 ms
+    
+    // start the race!
+    service.unlock(lock);
+    sleep(1000 * 5); // 5 seconds
+    assertTrue(service.lock(lock, -1, -1));
+    
+    // stop the race...
+    for (int i = 0; i < vmThreads.length; i++) {
+      final int vm = i;
+      Host.getHost(0).getVM(vm).invoke(new SerializableRunnable() {
+        public void run() {
+          stop_testFairness = true;
+        }
+      });
+    }
+    service.unlock(lock);
+    for (int i = 0; i < vmThreads.length; i++) {
+      final int vm = i;
+      Host.getHost(0).getVM(vm).invoke(new SerializableRunnable() {
+        public void run() {
+          try {
+            boolean testIsDone = false;
+            while (!stop_testFairness || !testIsDone) {
+              testIsDone = true;
+              for (int i2 = 0; i2 < done_testFairness.length; i2++) {
+                if (!done_testFairness[i2]) testIsDone = false;
+              }
+            }
+            DistributedLockService.destroy(serviceName);
+          }
+          catch (VirtualMachineError e) {
+            SystemFailure.initiateFailure(e);
+            throw e;
+          }
+          catch (Throwable t) {
+            fail(t.getMessage());
+          }
+        }
+      });
+    }
+    
+    // calc total locks granted...
+    int totalLocks = 0;
+    int minLocks = Integer.MAX_VALUE;
+    int maxLocks = 0;
+
+    // add up total locks across all vms and threads...
+    int numThreads = 0;
+    for (int i = 0; i < vmThreads.length; i++) {
+      final int vm = i;
+      for (int j = 0; j < vmThreads[vm]; j++) {
+        final int thread = j;
+        Integer count = (Integer)Host.getHost(0).getVM(vm).invoke(() -> DistributedLockServiceDUnitTest.get_count_testFairness( new Integer(thread) ));
+        int numLocks = count.intValue();
+        if (numLocks < minLocks) minLocks = numLocks;
+        if (numLocks > maxLocks) maxLocks = numLocks;
+        totalLocks = totalLocks + numLocks;
+        numThreads++;
+      }
+    }
+
+    LogWriterUtils.getLogWriter().info("[testFairness] totalLocks=" + totalLocks + 
+                        " minLocks=" + minLocks +
+                        " maxLocks=" + maxLocks);
+
+    int expectedLocks = (totalLocks / numThreads) + 1;
+    
+    int deviation = (int)(expectedLocks * 0.3);
+    int lowThreshold = expectedLocks - deviation;
+    int highThreshold = expectedLocks + deviation;
+
+    LogWriterUtils.getLogWriter().info("[testFairness] deviation=" + deviation +
+                        " expectedLocks=" + expectedLocks + 
+                        " lowThreshold=" + lowThreshold +
+                        " highThreshold=" + highThreshold);
+                        
+    assertTrue("minLocks is less than lowThreshold",
+               minLocks >= lowThreshold);
+    assertTrue("maxLocks is greater than highThreshold",
+               maxLocks <= highThreshold);
+  }
+  
+  /**
+   * Accessed by reflection.  DO NOT REMOVE
+   * @param i
+   * @return
+   */
+  public static Integer get_count_testFairness(Integer i) {
+    return new Integer(count_testFairness[i.intValue()]);
+  }
+  
+  public void testOneGetsAndOthersTimeOut() throws Exception {
+    doOneGetsAndOthersTimeOut(1, 1);
+//     doOneGetsAndOthersTimeOut(2, 2);
+//     doOneGetsAndOthersTimeOut(3, 2);
+    doOneGetsAndOthersTimeOut(4, 3);
+  }
+  
+  private InternalDistributedMember lockGrantor;
+  private synchronized void assertGrantorIsConsistent(InternalDistributedMember id) {
+    if (this.lockGrantor == null) {
+      this.lockGrantor = id;
+    } else {
+      assertEquals("assertGrantorIsConsistent failed", lockGrantor, id);
+    }
+  }
+  
+  /**
+   * Accessed via reflection.  DO NOT REMOVE
+   * @param serviceName
+   * @return
+   */
+  public static InternalDistributedMember identifyLockGrantor(String serviceName) {
+    DLockService service = (DLockService)
+        DistributedLockService.getServiceNamed(serviceName);
+    assertNotNull(service);
+    InternalDistributedMember grantor = service.getLockGrantorId().getLockGrantorMember();
+    assertNotNull(grantor);
+    logInfo("In identifyLockGrantor - grantor is " + grantor);
+    return grantor;
+  }
+  
+  /**
+   * Accessed via reflection.  DO NOT REMOVE.
+   * @param serviceName
+   * @return
+   */
+  public static Boolean isLockGrantor(String serviceName) {
+    DLockService service = (DLockService)
+        DistributedLockService.getServiceNamed(serviceName);
+    assertNotNull(service);
+    Boolean result = Boolean.valueOf(service.isLockGrantor());
+    logInfo("In isLockGrantor: " + result);
+    return result;
+  }
+
+  /**
+   * Accessed via reflection.  DO NOT REMOVE.
+   * @param serviceName
+   */
+  protected static void becomeLockGrantor(String serviceName) {
+    DLockService service = (DLockService)
+        DistributedLockService.getServiceNamed(serviceName);
+    assertNotNull(service);
+    logInfo("About to call becomeLockGrantor...");
+    service.becomeLockGrantor();
+  }
+  
+  public void testGrantorSelection() {
+    // TODO change distributedCreateService usage to be concurrent threads
+    
+    // bring up 4 members and make sure all identify one as grantor
+    int numVMs = 4;
+    final String serviceName = "testGrantorSelection_" + getUniqueName();
+    distributedCreateService(numVMs, serviceName);
+    try {
+      Thread.sleep(100);
+    }
+    catch (InterruptedException ignore) {fail("interrupted");}
+
+    final Object[] args = new Object[] {serviceName};
+    final Host host = Host.getHost(0);
+    for (int vm=0; vm<numVMs; vm++) {
+      final int finalvm = vm;
+      logInfo("VM " + finalvm + " in " + serviceName + " about to invoke");
+      InternalDistributedMember id = (InternalDistributedMember)host.getVM(finalvm).invoke(
+          DistributedLockServiceDUnitTest.class, 
+          "identifyLockGrantor", 
+          args);
+      logInfo("VM " + finalvm + " in " + serviceName + " got " + id);
+      assertGrantorIsConsistent(id);
+    }
+  }
+  
+  public void testBasicGrantorRecovery() {
+    //DLockGrantor.setUncleanDestroyEnabled(true);
+//    try {
+      // 1) start up 4 VM members...
+      int numVMs = 4;
+      final String serviceName = "testBasicGrantorRecovery_" + getUniqueName();
+      distributedCreateService(numVMs, serviceName);
+      try {
+        Thread.sleep(100);
+      }
+      catch (InterruptedException ignore) {fail("interrupted");}
+      
+      final Object[] args = new Object[] {serviceName};
+      final Host host = Host.getHost(0);
+      
+      int originalGrantor = 3;
+      host.getVM(originalGrantor).invoke(
+          DistributedLockServiceDUnitTest.class, "identifyLockGrantor", args);
+            
+      // 2) find the grantor and disconnect him...
+      int originalVM = -1;
+      InternalDistributedMember oldGrantor = null;
+      for (int vm = 0; vm < numVMs; vm++) {
+        final int finalvm = vm;
+        Boolean isGrantor = (Boolean)host.getVM(finalvm).invoke(
+            DistributedLockServiceDUnitTest.class, "isLockGrantor", args);
+        if (isGrantor.booleanValue()) {
+          originalVM = vm;
+          oldGrantor = (InternalDistributedMember)host.getVM(finalvm).invoke(
+            DistributedLockServiceDUnitTest.class, "identifyLockGrantor", args);
+          break;
+        }
+      }
+      
+      assertTrue(originalVM == originalGrantor);
+      
+      host.getVM(originalVM).invoke(new SerializableRunnable() {
+        public void run() {
+          disconnectFromDS();
+        }
+      });
+      
+      try {
+        Thread.sleep(100);
+      }
+      catch (InterruptedException ignore) {fail("interrupted");}
+        
+      // 3) verify that another member recovers for grantor
+      int attempts = 3;
+      for (int attempt = 0; attempt < attempts; attempt++) {
+        try {
+          for (int vm = 0; vm < numVMs; vm++) {
+            if (vm == originalVM) continue; // skip because he's disconnected
+            final int finalvm = vm;
+            logInfo("[testBasicGrantorRecovery] VM " + finalvm + 
+                    " in " + serviceName + " about to invoke");
+            InternalDistributedMember id = (InternalDistributedMember)host.getVM(finalvm).invoke(
+                DistributedLockServiceDUnitTest.class, 
+                "identifyLockGrantor", 
+                args);
+            logInfo("[testBasicGrantorRecovery] VM " + finalvm + 
+                    " in " + serviceName + " got " + id);
+            assertGrantorIsConsistent(id);
+            logInfo("[testBasicGrantorRecovery] new grantor " + id + 
+                    " is not old grantor " + oldGrantor);
+            assertEquals("New grantor must not equal the old grantor", true,
+                         !id.equals(oldGrantor)); // new grantor != old grantor
+          } // loop thru vms
+          logInfo("[testBasicGrantorRecovery] succeeded attempt " + attempt);
+          break; // success
+        }
+        catch (AssertionFailedError e) {
+          logInfo("[testBasicGrantorRecovery] failed attempt " + attempt);
+          if (attempt == attempts-1) throw e;
+        }
+      } // loop thru attempts
+//    }
+//    finally {
+      //DLockGrantor.setUncleanDestroyEnabled(false);
+//    }
+  }
+  
+  public void testLockFailover() {
+    final int originalGrantorVM = 0;
+    final int oneVM = 1;
+    final int twoVM = 2;
+    final String serviceName = "testLockFailover-" + getUniqueName();
+    
+    // create lock services...
+    LogWriterUtils.getLogWriter().fine("[testLockFailover] create services");
+    
+    Host.getHost(0).getVM(originalGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.remoteCreateService( serviceName ));
+    
+    Host.getHost(0).getVM(oneVM).invoke(() -> DistributedLockServiceDUnitTest.remoteCreateService( serviceName ));
+    
+    Host.getHost(0).getVM(twoVM).invoke(() -> DistributedLockServiceDUnitTest.remoteCreateService( serviceName ));
+    
+    Host.getHost(0).getVM(originalGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.identifyLockGrantor( serviceName ));
+        
+    Boolean isGrantor = (Boolean) Host.getHost(0).getVM(originalGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.isLockGrantor( serviceName ));
+    assertEquals("First member calling getLockGrantor failed to become grantor", 
+                 Boolean.TRUE, isGrantor);
+
+    // get locks...
+    LogWriterUtils.getLogWriter().fine("[testLockFailover] get lock");
+    
+    Boolean locked = (Boolean) Host.getHost(0).getVM(originalGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.lock( serviceName, "KEY-"+originalGrantorVM ));
+    assertEquals("Failed to get lock in testLockFailover", 
+                 Boolean.TRUE, locked);
+                 
+    locked = (Boolean) Host.getHost(0).getVM(twoVM).invoke(() -> DistributedLockServiceDUnitTest.lock( serviceName, "KEY-"+twoVM ));
+    assertEquals("Failed to get lock in testLockFailover", 
+                 Boolean.TRUE, locked);
+                 
+    locked = (Boolean) Host.getHost(0).getVM(oneVM).invoke(() -> DistributedLockServiceDUnitTest.lock( serviceName, "KEY-"+oneVM ));
+    assertEquals("Failed to get lock in testLockFailover", 
+                 Boolean.TRUE, locked);
+                 
+    // disconnect originalGrantorVM...
+    LogWriterUtils.getLogWriter().fine("[testLockFailover] disconnect originalGrantorVM");
+
+    Host.getHost(0).getVM(originalGrantorVM).invoke(new SerializableRunnable() {
+      public void run() {
+        disconnectFromDS();
+      }
+    });
+    
+    try {
+      Thread.sleep(100);
+    }
+    catch (InterruptedException ignore) {fail("interrupted");}
+                 
+    // verify locks by unlocking...
+    LogWriterUtils.getLogWriter().fine("[testLockFailover] release locks");
+                 
+    Boolean unlocked = (Boolean) Host.getHost(0).getVM(twoVM).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "KEY-"+twoVM ));
+    assertEquals("Failed to release lock in testLockFailover", 
+                 Boolean.TRUE, unlocked);
+
+    unlocked = (Boolean) Host.getHost(0).getVM(oneVM).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "KEY-"+oneVM ));
+    assertEquals("Failed to release lock in testLockFailover", 
+                 Boolean.TRUE, unlocked);
+
+    // switch locks...
+    locked = (Boolean) Host.getHost(0).getVM(oneVM).invoke(() -> DistributedLockServiceDUnitTest.lock( serviceName, "KEY-"+twoVM ));
+    assertEquals("Failed to get lock in testLockFailover", 
+                 Boolean.TRUE, locked);
+                 
+    locked = (Boolean) Host.getHost(0).getVM(twoVM).invoke(() -> DistributedLockServiceDUnitTest.lock( serviceName, "KEY-"+oneVM ));
+    assertEquals("Failed to get lock in testLockFailover", 
+                 Boolean.TRUE, locked);
+                 
+    unlocked = (Boolean) Host.getHost(0).getVM(oneVM).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "KEY-"+twoVM ));
+    assertEquals("Failed to release lock in testLockFailover", 
+                 Boolean.TRUE, unlocked);
+
+    unlocked = (Boolean) Host.getHost(0).getVM(twoVM).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "KEY-"+oneVM ));
+    assertEquals("Failed to release lock in testLockFailover", 
+                 Boolean.TRUE, unlocked);
+                 
+    // verify grantor is unique...
+    LogWriterUtils.getLogWriter().fine("[testLockFailover] verify grantor identity");
+    
+    InternalDistributedMember oneID = (InternalDistributedMember)Host.getHost(0).getVM(oneVM).invoke(() -> DistributedLockServiceDUnitTest.identifyLockGrantor(serviceName));
+    InternalDistributedMember twoID = (InternalDistributedMember)Host.getHost(0).getVM(twoVM).invoke(() -> DistributedLockServiceDUnitTest.identifyLockGrantor(serviceName));
+    assertTrue("Failed to identifyLockGrantor in testLockFailover",
+               oneID != null && twoID != null);
+    assertEquals("Failed grantor uniqueness in testLockFailover", 
+                 oneID, twoID);
+  }
+  
+  public void testLockThenBecomeLockGrantor() {
+    final int originalGrantorVM = 0;
+    final int becomeGrantorVM = 1;
+    final int thirdPartyVM = 2;
+    final String serviceName = "testLockThenBecomeLockGrantor-" + getUniqueName();
+    
+    // create lock services...
+    LogWriterUtils.getLogWriter().fine("[testLockThenBecomeLockGrantor] create services");
+    
+    Host.getHost(0).getVM(originalGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.remoteCreateService( serviceName ));
+    
+    try {
+      Thread.sleep(20);
+    } catch (InterruptedException ignore) {fail("interrupted");}
+
+    Host.getHost(0).getVM(becomeGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.remoteCreateService( serviceName ));
+    
+    Host.getHost(0).getVM(thirdPartyVM).invoke(() -> DistributedLockServiceDUnitTest.remoteCreateService( serviceName ));
+    
+    Host.getHost(0).getVM(originalGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.identifyLockGrantor( serviceName ));
+        
+    Boolean isGrantor = (Boolean) Host.getHost(0).getVM(originalGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.isLockGrantor( serviceName ));
+    assertEquals("First member calling getLockGrantor failed to become grantor", 
+                 Boolean.TRUE, isGrantor);
+
+    // control...
+    LogWriterUtils.getLogWriter().fine("[testLockThenBecomeLockGrantor] check control");
+    Boolean check = (Boolean) Host.getHost(0).getVM(becomeGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "KEY-"+becomeGrantorVM ));
+    assertEquals("Check of control failed... unlock succeeded but nothing locked", 
+                 Boolean.FALSE, check);
+                 
+    // get locks...
+    LogWriterUtils.getLogWriter().fine("[testLockThenBecomeLockGrantor] get lock");
+    
+    Boolean locked = (Boolean) Host.getHost(0).getVM(originalGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.lock( serviceName, "KEY-"+originalGrantorVM ));
+    assertEquals("Failed to get lock in testLockThenBecomeLockGrantor", 
+                 Boolean.TRUE, locked);
+                 
+    locked = (Boolean) Host.getHost(0).getVM(thirdPartyVM).invoke(() -> DistributedLockServiceDUnitTest.lock( serviceName, "KEY-"+thirdPartyVM ));
+    assertEquals("Failed to get lock in testLockThenBecomeLockGrantor", 
+                 Boolean.TRUE, locked);
+                 
+    locked = (Boolean) Host.getHost(0).getVM(becomeGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.lock( serviceName, "KEY-"+becomeGrantorVM ));
+    assertEquals("Failed to get lock in testLockThenBecomeLockGrantor", 
+                 Boolean.TRUE, locked);
+                 
+    // become lock grantor...
+    LogWriterUtils.getLogWriter().fine("[testLockThenBecomeLockGrantor] become lock grantor");
+    
+    Host.getHost(0).getVM(becomeGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.becomeLockGrantor( serviceName ));
+        
+    try {
+      Thread.sleep(20);
+    } catch (InterruptedException ignore) {fail("interrupted");}
+    
+    isGrantor = (Boolean) Host.getHost(0).getVM(becomeGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.isLockGrantor( serviceName ));
+    assertEquals("Failed to become lock grantor", 
+                 Boolean.TRUE, isGrantor);    
+
+    // verify locks by unlocking...
+    LogWriterUtils.getLogWriter().fine("[testLockThenBecomeLockGrantor] release locks");
+                 
+    Boolean unlocked = (Boolean) Host.getHost(0).getVM(originalGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "KEY-"+originalGrantorVM ));
+    assertEquals("Failed to release lock in testLockThenBecomeLockGrantor", 
+                 Boolean.TRUE, unlocked);
+                 
+    unlocked = (Boolean) Host.getHost(0).getVM(thirdPartyVM).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "KEY-"+thirdPartyVM ));
+    assertEquals("Failed to release lock in testLockThenBecomeLockGrantor", 
+                 Boolean.TRUE, unlocked);
+
+    unlocked = (Boolean) Host.getHost(0).getVM(becomeGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "KEY-"+becomeGrantorVM ));
+    assertEquals("Failed to release lock in testLockThenBecomeLockGrantor", 
+                 Boolean.TRUE, unlocked);
+
+    // test for bug in which transferred token gets re-entered causing lock recursion
+    unlocked = (Boolean) Host.getHost(0).getVM(becomeGrantorVM).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "KEY-"+becomeGrantorVM ));
+    assertEquals("Transfer of tokens caused lock recursion in held lock", 
+                 Boolean.FALSE, unlocked);
+  }
+  
+  public void testBecomeLockGrantor() {
+    // create lock services...
+    int numVMs = 4;
+    final String serviceName = "testBecomeLockGrantor-" + getUniqueName();
+    distributedCreateService(numVMs, serviceName);
+    
+    // each one gets a lock...
+    for (int vm = 0; vm < numVMs; vm++) {
+      final int finalvm = vm;
+      Boolean locked = Host.getHost(0).getVM(finalvm).invoke(() -> DistributedLockServiceDUnitTest.lock( serviceName, "obj-"+finalvm ));
+      assertEquals("Failed to get lock in testBecomeLockGrantor", 
+                   Boolean.TRUE, locked);
+    }
+    
+    // find the grantor...
+    final Object[] args = new Object[] {serviceName};
+    int originalVM = -1;
+    InternalDistributedMember oldGrantor = null;
+    for (int vm = 0; vm < numVMs; vm++) {
+      final int finalvm = vm;
+      Boolean isGrantor = (Boolean)Host.getHost(0).getVM(finalvm).invoke(
+          DistributedLockServiceDUnitTest.class, "isLockGrantor", args);
+      if (isGrantor.booleanValue()) {
+        originalVM = vm;
+        oldGrantor = (InternalDistributedMember)Host.getHost(0).getVM(finalvm).invoke(
+          DistributedLockServiceDUnitTest.class, "identifyLockGrantor", args);
+        break;
+      }
+    }
+    
+    LogWriterUtils.getLogWriter().fine("[testBecomeLockGrantor] original grantor is " + oldGrantor);
+    
+    // have one call becomeLockGrantor
+    for (int vm = 0; vm < numVMs; vm++) {
+      if (vm != originalVM) {
+        final int finalvm = vm;
+        Host.getHost(0).getVM(finalvm).invoke(
+            DistributedLockServiceDUnitTest.class, "becomeLockGrantor", args);
+        Boolean isGrantor = (Boolean)Host.getHost(0).getVM(finalvm).invoke(
+            DistributedLockServiceDUnitTest.class, "isLockGrantor", args);
+        assertEquals("isLockGrantor is false after calling becomeLockGrantor", 
+                     Boolean.TRUE, isGrantor);
+        break;
+      }
+    }
+    
+    LogWriterUtils.getLogWriter().fine("[testBecomeLockGrantor] one vm has called becomeLockGrantor...");
+    
+    InternalDistributedMember newGrantor = null;
+    for (int vm = 0; vm < numVMs; vm++) {
+      final int finalvm = vm;
+      Boolean isGrantor = (Boolean)Host.getHost(0).getVM(finalvm).invoke(
+          DistributedLockServiceDUnitTest.class, "isLockGrantor", args);
+      if (isGrantor.booleanValue()) {
+        newGrantor = (InternalDistributedMember)Host.getHost(0).getVM(finalvm).invoke(
+          DistributedLockServiceDUnitTest.class, "identifyLockGrantor", args);
+        break;
+      }
+    }
+    LogWriterUtils.getLogWriter().fine("[testBecomeLockGrantor] new Grantor is " + newGrantor);
+    assertEquals(false, newGrantor.equals(oldGrantor));
+    
+    // verify locks still held by unlocking
+    // each one unlocks...
+    for (int vm = 0; vm < numVMs; vm++) {
+      final int finalvm = vm;
+      Boolean unlocked = (Boolean) Host.getHost(0).getVM(finalvm).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "obj-"+finalvm ));
+      assertEquals("Failed to unlock in testBecomeLockGrantor", 
+                   Boolean.TRUE, unlocked);
+    }
+    
+    LogWriterUtils.getLogWriter().fine("[testBecomeLockGrantor] finished");
+    
+    // verify that pending requests are granted by unlocking them also
+  }
+
+  public void testTryLock() {
+    final Long waitMillis = new Long(100);
+    
+    // create lock services...
+    LogWriterUtils.getLogWriter().fine("[testTryLock] create lock services");
+    final String serviceName = "testTryLock-" + getUniqueName();
+    distributedCreateService(4, serviceName);
+    
+    // all 4 vms scramble to get tryLock but only one should succeed...
+    LogWriterUtils.getLogWriter().fine("[testTryLock] attempt to get tryLock");
+    int lockCount = 0;
+    for (int vm = 0; vm < 4; vm++) {
+      final int finalvm = vm;
+      Boolean locked = (Boolean) Host.getHost(0).getVM(finalvm).invoke(() -> DistributedLockServiceDUnitTest.tryLock( serviceName, "KEY", waitMillis ));
+      if (locked.booleanValue()) lockCount++;
+    }
+
+    assertEquals("More than one vm acquired the tryLock", 
+                 1, lockCount);    
+
+    LogWriterUtils.getLogWriter().fine("[testTryLock] unlock tryLock");
+    int unlockCount = 0;
+    for (int vm = 0; vm < 4; vm++) {
+      final int finalvm = vm;
+      Boolean unlocked = (Boolean) Host.getHost(0).getVM(finalvm).invoke(() -> DistributedLockServiceDUnitTest.unlock( serviceName, "KEY" ));
+      if (unlocked.booleanValue()) unlockCount++;
+    }
+
+    assertEquals("More than one vm unlocked the tryLock", 
+                 1, unlockCount);    
+  }
+  
+  public void testOneGetsThenOtherGets()  throws Exception  { // (numVMs, numThreadsPerVM)
+    doOneGetsThenOtherGets(1, 1);
+//     doOneGetsThenOtherGets(2, 2);
+//     doOneGetsThenOtherGets(3, 3);
+    doOneGetsThenOtherGets(4, 3);
+  }
+  
+  public void testLockDifferentNames() throws Exception  {
+    String serviceName = getUniqueName();
+
+    // Same VM
+    remoteCreateService(serviceName);
+    DistributedLockService service = DistributedLockService.getServiceNamed(serviceName);
+    assertTrue(service.lock("obj1", -1, -1));
+    assertTrue(service.lock("obj2", -1, -1));
+    service.unlock("obj1");
+    service.unlock("obj2");
+    
+    // Different VMs
+    VM vm = Host.getHost(0).getVM(0);
+    vm.invoke(() -> this.remoteCreateService(serviceName));
+    assertTrue(service.lock("masterVMobj", -1, -1));
+    
+    assertEquals(Boolean.TRUE, vm.invoke(() -> this.getLockAndIncrement(
+        serviceName, "otherVMobj", new Integer(-1), new Integer(0)
+      )));
+    
+    service.unlock("masterVMobj");
+  }
+  
+  public void testLocalGetLockAndIncrement()  throws Exception {
+    String serviceName = getUniqueName();
+    remoteCreateService(serviceName);
+    DistributedLockService.getServiceNamed(serviceName);
+    assertEquals(Boolean.TRUE, 
+                 getLockAndIncrement(serviceName, "localVMobj", -1, 0));
+  }
+  public void testRemoteGetLockAndIncrement() {
+    String serviceName = getUniqueName();
+    VM vm = Host.getHost(0).getVM(0);
+    vm.invoke(() -> this.remoteCreateService(serviceName));
+    assertEquals(Boolean.TRUE, vm.invoke(() -> this.getLockAndIncrement(
+        serviceName, "remoteVMobj", new Integer(-1), new Integer(0)
+      )));
+  }
+  
+  public void testLockSameNameDifferentService() 
+  {
+    String serviceName1 = getUniqueName() + "_1";
+    String serviceName2 = getUniqueName() + "_2";
+    String objName = "obj";
+
+    // Same VM
+    remoteCreateService(serviceName1);
+    remoteCreateService(serviceName2);
+    DistributedLockService service1 = DistributedLockService.getServiceNamed(serviceName1);
+    DistributedLockService service2 = DistributedLockService.getServiceNamed(serviceName2);
+    assertTrue(service1.lock(objName, -1, -1));
+    assertTrue(service2.lock(objName, -1, -1));
+    service1.unlock(objName);
+    service2.unlock(objName);
+    
+    // Different VMs
+    VM vm = Host.getHost(0).getVM(0);
+    vm.invoke(() -> this.remoteCreateService(serviceName1));
+    vm.invoke(() -> this.remoteCreateService(serviceName2));
+    assertTrue(service1.lock(objName, -1, -1));
+    assertEquals(Boolean.TRUE, vm.invoke(() -> this.getLockAndIncrement(
+        serviceName2, objName, new Integer(-1), new Integer(0)
+      )));
+    service1.unlock(objName);
+  }
+  
+  public void testLeaseDoesntExpire()
+  throws InterruptedException
+  {
+    String serviceName = getUniqueName();
+    final Object objName = new Integer(3);
+
+    // Same VM
+    remoteCreateService(serviceName);
+    final DistributedLockService service = DistributedLockService.getServiceNamed(serviceName);
+    // lock objName with a sufficiently long lease
+    assertTrue(service.lock(objName, -1, 60000));
+    // try to lock in another thread, with a timeout shorter than above lease
+    final boolean[] resultHolder = new boolean[] { false };
+    Thread thread = new Thread(new Runnable() {
+      public void run() {
+        resultHolder[0] = !service.lock(objName, 1000, -1);
+      }
+    });
+    thread.start();
+    ThreadUtils.join(thread, 30 * 1000);
+    assertTrue(resultHolder[0]);
+    // the unlock should succeed without throwing LeaseExpiredException
+    service.unlock(objName);
+    
+    // Different VM
+    VM vm = Host.getHost(0).getVM(0);
+    vm.invoke(() -> this.remoteCreateService(serviceName));
+    // lock objName in this VM with a sufficiently long lease
+    assertTrue(service.lock(objName, -1, 60000));
+    // try to lock in another VM, with a timeout shorter than above lease
+    assertEquals(Boolean.FALSE, vm.invoke(() -> this.getLockAndIncrement(
+        serviceName, objName, new Long(1000), new Long(0)
+      )));
+    // the unlock should succeed without throwing LeaseExpiredException
+    service.unlock(objName);
+  }
+
+  public void testLockUnlock() {
+    String serviceName = getUniqueName();
+    Object objName = new Integer(42);
+    
+    remoteCreateService(serviceName);
+    DistributedLockService service = 
+        DistributedLockService.getServiceNamed(serviceName);
+
+    Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+    
+    service.lock(objName, -1, -1);
+    Assert.assertTrue(service.isHeldByCurrentThread(objName));
+    
+    service.unlock(objName);
+    Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+  }
+  
+  public void testLockExpireUnlock() {
+    long leaseMs = 200;
+    long waitBeforeLockingMs = 210;
+    
+    String serviceName = getUniqueName();
+    Object objName = new Integer(42);
+    
+    remoteCreateService(serviceName);
+    DistributedLockService service = 
+        DistributedLockService.getServiceNamed(serviceName);
+
+    assertTrue(!service.isHeldByCurrentThread(objName));
+    
+    assertTrue(service.lock(objName, -1, leaseMs));
+    assertTrue(service.isHeldByCurrentThread(objName));
+    
+    sleep(waitBeforeLockingMs); // should expire...
+    assertTrue(!service.isHeldByCurrentThread(objName));
+   
+    try {
+      service.unlock(objName);
+      fail("unlock should have thrown LeaseExpiredException");
+    } catch (LeaseExpiredException ex) {
+    }
+  }
+  
+  public void testLockRecursion() {
+    String serviceName = getUniqueName();
+    Object objName = new Integer(42);
+    
+    remoteCreateService(serviceName);
+    DistributedLockService service = 
+        DistributedLockService.getServiceNamed(serviceName);
+
+    Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+    
+    // initial lock...
+    Assert.assertTrue(service.lock(objName, -1, -1));
+    Assert.assertTrue(service.isHeldByCurrentThread(objName));
+
+    // recursion +1...
+    Assert.assertTrue(service.lock(objName, -1, -1));
+
+    // recursion -1...    
+    service.unlock(objName);
+    Assert.assertTrue(service.isHeldByCurrentThread(objName));
+
+    // and unlock...    
+    service.unlock(objName);
+    Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+  }
+  
+  public void testLockRecursionWithExpiration() {
+    long leaseMs = 500;
+    long waitBeforeLockingMs = 750;
+    
+    String serviceName = getUniqueName();
+    Object objName = new Integer(42);
+    
+    remoteCreateService(serviceName);
+    DistributedLockService service = 
+        DistributedLockService.getServiceNamed(serviceName);
+
+    Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+    
+    // initial lock...
+    Assert.assertTrue(service.lock(objName, -1, leaseMs));
+    Assert.assertTrue(service.isHeldByCurrentThread(objName));
+
+    // recursion +1...
+    Assert.assertTrue(service.lock(objName, -1, leaseMs));
+    Assert.assertTrue(service.isHeldByCurrentThread(objName));
+    
+    // expire...
+    sleep(waitBeforeLockingMs);
+    Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+
+    // should fail...
+    try {
+      service.unlock(objName);
+      fail("unlock should have thrown LeaseExpiredException");
+    } catch (LeaseExpiredException ex) {
+    }
+    
+    // relock it...
+    Assert.assertTrue(service.lock(objName, -1, leaseMs));
+    Assert.assertTrue(service.isHeldByCurrentThread(objName));
+
+    // and unlock to verify no recursion...    
+    service.unlock(objName);
+    Assert.assertTrue(!service.isHeldByCurrentThread(objName)); // throws failure!!
+    
+    // go thru again in different order...
+    Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+    
+    // initial lock...
+    Assert.assertTrue(service.lock(objName, -1, leaseMs));
+    Assert.assertTrue(service.isHeldByCurrentThread(objName));
+
+    // expire...
+    sleep(waitBeforeLockingMs);
+    Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+
+    // relock it...
+    Assert.assertTrue(service.lock(objName, -1, leaseMs));
+    Assert.assertTrue(service.isHeldByCurrentThread(objName));
+    
+    // and unlock to verify no recursion...    
+    service.unlock(objName);
+    Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+  }
+  
+  public void testLeaseExpiresBeforeOtherLocks()
+  throws InterruptedException 
+  {
+    leaseExpiresTest(false);
+  }
+  
+  public void testLeaseExpiresWhileOtherLocks()
+  throws InterruptedException 
+  {
+    leaseExpiresTest(true);
+  }
+  
+  private void leaseExpiresTest(boolean tryToLockBeforeExpiration)
+  throws InterruptedException
+  {
+    LogWriterUtils.getLogWriter().fine("[testLeaseExpires] prepping");
+    long leaseMs = 100;
+    long waitBeforeLockingMs = tryToLockBeforeExpiration ? 50 : 110;
+
+    final String serviceName = getUniqueName();
+    final Object objName = new Integer(3);
+
+    // Same VM
+    remoteCreateService(serviceName);
+    final DistributedLockService service = DistributedLockService.getServiceNamed(serviceName);
+    
+    LogWriterUtils.getLogWriter().fine("[testLeaseExpires] acquire first lock");
+    // lock objName with a short lease
+    assertTrue(service.lock(objName, -1, leaseMs));
+    sleep(waitBeforeLockingMs);
+
+    if (waitBeforeLockingMs > leaseMs) {
+      Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+    }
+    
+    LogWriterUtils.getLogWriter().fine("[testLeaseExpires] acquire lock that expired");
+    // try to lock in another thread - lease should have expired
+    final boolean[] resultHolder = new boolean[] { false };
+    Thread thread = new Thread(new Runnable() {
+      public void run() {
+        resultHolder[0] = service.lock(objName, -1, -1);
+        service.unlock(objName);
+        Assert.assertTrue(!service.isHeldByCurrentThread(objName));
+      }
+    });
+    thread.start();
+    ThreadUtils.join(thread, 30 * 1000);
+    assertTrue(resultHolder[0]);
+    
+    LogWriterUtils.getLogWriter().fine("[testLeaseExpires] unlock should throw LeaseExpiredException");
+    // this thread's unlock should throw LeaseExpiredException
+    try {
+      service.unlock(objName);
+      fail("unlock should have thrown LeaseExpiredException");
+    } catch (LeaseExpiredException ex) {
+    }
+    
+    LogWriterUtils.getLogWriter().fine("[testLeaseExpires] create service in other vm");
+    // Different VM
+    VM vm = Host.getHost(0).getVM(0);
+    vm.invoke(() -> this.remoteCreateService(serviceName));
+    
+    LogWriterUtils.getLogWriter().fine("[testLeaseExpires] acquire lock again and expire");
+    // lock objName in this VM with a short lease
+    assertTrue(service.lock(objName, -1, leaseMs));
+    sleep(waitBeforeLockingMs);
+    
+    LogWriterUtils.getLogWriter().fine("[testLeaseExpires] succeed lock in other vm");
+    // try to lock in another VM - should succeed
+    assertEquals(Boolean.TRUE, vm.invoke(() -> this.getLockAndIncrement(
+        serviceName, objName, new Long(-1), new Long(0)
+      )));
+      
+    LogWriterUtils.getLogWriter().fine("[testLeaseExpires] unlock should throw LeaseExpiredException again");
+    // this VMs unlock should throw LeaseExpiredException
+    try {
+      service.unlock(objName);
+      fail("unlock should have thrown LeaseExpiredException");
+    } catch (LeaseExpiredException ex) {
+    }
+  }
+
+  public void testSuspendLockingAfterExpiration() throws Exception {
+    LogWriterUtils.getLogWriter().fine("[leaseExpiresThenSuspendTest]");
+    
+    final long leaseMillis = 100;
+    final long suspendWaitMillis = 10000;
+
+    final String serviceName = getUniqueName();
+    final Object key = new Integer(3);
+
+    // controller locks key and then expires - controller is grantor
+    
+    DistributedLockService dls 
+        = DistributedLockService.create(serviceName, getSystem());
+    
+    assertTrue(dls.lock(key, -1, leaseMillis));
+    
+    // wait for expiration
+    sleep(leaseMillis*2);
+    
+    LogWriterUtils.getLogWriter().fine("[leaseExpiresThenSuspendTest] unlock should throw LeaseExpiredException");
+    // this thread's unlock should throw LeaseExpiredException
+    try {
+      dls.unlock(key);
+      fail("unlock should have thrown LeaseExpiredException");
+    } catch (LeaseExpiredException ex) {
+    }
+    
+    // other vm calls suspend 
+    
+    LogWriterUtils.getLogWriter().fine("[leaseExpiresThenSuspendTest] call to suspend locking");
+    Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
+      public void run() {
+        final DistributedLockService dlock 
+            = DistributedLockService.create(serviceName, getSystem());
+        dlock.suspendLocking(suspendWaitMillis);
+        dlock.resumeLocking();
+        assertTrue(dlock.lock(key, -1, leaseMillis));
+        dlock.unlock(key);
+      }
+    });
+  }
+  
+  volatile boolean started = false;
+  volatile boolean gotLock = false;
+  volatile Throwable exception = null;
+  volatile Throwable throwable = null;
+
+  public void testLockInterruptiblyIsInterruptible() {
+    started = false;
+    gotLock = false;
+    exception = null;
+    throwable = null;
+
+    // Lock entire service in first thread
+    LogWriterUtils.getLogWriter().info("[testLockInterruptiblyIsInterruptible] get and hold the lock");
+    final String serviceName = getUniqueName();
+    final DistributedLockService service = 
+      DistributedLockService.create(serviceName, dlstSystem);
+    service.becomeLockGrantor();
+    assertTrue(service.lock("obj", 1000, -1));
+
+    // Start second thread that tries to lock in second thread
+    LogWriterUtils.getLogWriter().info("[testLockInterruptiblyIsInterruptible] call lockInterruptibly");
+    Thread thread2 = new Thread(new Runnable() {
+      public void run() {
+        try {
+          started = true;
+          gotLock = service.lockInterruptibly("obj", -1, -1);
+        } catch (InterruptedException ex) {
+          exception = ex;
+        } 
+        catch (VirtualMachineError e) {
+          SystemFailure.initiateFailure(e);
+          throw e;
+        }
+        catch (Throwable t) {
+          throwable = t;
+        }
+      }
+    });
+    thread2.start();
+    
+    // Interrupt second thread
+    LogWriterUtils.getLogWriter().info("[testLockInterruptiblyIsInterruptible] interrupt calling thread");
+    while (!started) Thread.yield();
+    thread2.interrupt();
+    ThreadUtils.join(thread2, 20 * 1000);
+
+    // Expect it got InterruptedException and didn't lock the service
+    LogWriterUtils.getLogWriter().info("[testLockInterruptiblyIsInterruptible] verify failed to get lock");
+    assertFalse(gotLock);
+    if (throwable != null) {
+      LogWriterUtils.getLogWriter().warning(
+        "testLockInterruptiblyIsInterruptible threw unexpected Throwable", 
+        throwable);
+    }
+    assertNotNull(exception);
+
+    // Unlock "obj" in first thread
+    LogWriterUtils.getLogWriter().info("[testLockInterruptiblyIsInterruptible] unlock the lock");
+    service.unlock("obj");
+
+    // Make sure it didn't get locked by second thread
+    LogWriterUtils.getLogWriter().info("[testLockInterruptiblyIsInterruptible] try to get lock with timeout should not fail");
+    assertTrue(service.lock("obj", 5000, -1));
+    DistributedLockService.destroy(serviceName);
+  }
+  
+  volatile boolean wasFlagSet = false;
+
+  public void testLockIsNotInterruptible() {
+    // Lock entire service in first thread
+    LogWriterUtils.getLogWriter().fine("[testLockIsNotInterruptible] lock in first thread");
+    started = false;
+    gotLock = false;
+    exception = null;
+    wasFlagSet = false;
+    
+    final String serviceName = getUniqueName();
+    final DistributedLockService service = 
+      DistributedLockService.create(serviceName, dlstSystem);
+    assertTrue(service.lock("obj", 1000, -1));
+
+    // Start second thread that tries to lock in second thread
+    LogWriterUtils.getLogWriter().fine("[testLockIsNotInterruptible] attempt lock in second thread");
+    Thread thread2 = new Thread(new Runnable() {
+      public void run() {
+        try {
+          started = true;
+          gotLock = service.lock("obj", -1, -1);
+          LogWriterUtils.getLogWriter().fine("[testLockIsNotInterruptible] thread2 finished lock() - got " + gotLock);
+        } 
+        catch (VirtualMachineError e) {
+          SystemFailure.initiateFailure(e);
+          throw e;
+        }
+        catch (Throwable ex) {
+          LogWriterUtils.getLogWriter().warning("[testLockIsNotInterruptible] Caught...", ex);
+          exception = ex;
+        }
+        wasFlagSet = Thread.currentThread().isInterrupted();
+      }
+    });
+    thread2.start();
+    
+    // Interrupt second thread
+    LogWriterUtils.getLogWriter().fine("[testLockIsNotInterruptible] interrupt second thread");
+    while (!started) Thread.yield();
+    sleep(500);
+    thread2.interrupt();
+    // Expect it didn't get an exception and didn't lock the service
+    sleep(500);
+    assertFalse(gotLock);
+    assertNull(exception);
+
+    // Unlock entire service in first thread
+    LogWriterUtils.getLogWriter().fine("[testLockIsNotInterruptible] unlock in first thread");
+    service.unlock("obj");
+    sleep(500);
+
+    // Expect that thread2 should now complete execution.
+    ThreadUtils.join(thread2, 20 * 1000);
+
+    // Now thread2 should have gotten the lock, not the exception, but the
+    // thread's flag should be set
+    LogWriterUtils.getLogWriter().fine("[testLockIsNotInterruptible] verify second thread got lock");
+    assertNull(exception);
+    assertTrue(gotLock);
+    assertTrue(wasFlagSet);
+  }
+  
+  /**
+   * Test DistributedLockService.acquireExclusiveLocking(), releaseExclusiveLocking()
+   */
+  public void testSuspendLockingBasic() 
+  throws InterruptedException {
+    final DistributedLockService service = 
+      DistributedLockService.create(getUniqueName(), dlstSystem);
+
+    try {
+      service.resumeLocking();
+      fail("Didn't throw LockNotHeldException");
+    } catch (LockNotHeldException ex) {
+      // expected
+    }
+
+    assertTrue(service.suspendLocking(-1));
+    service.resumeLocking();
+
+    // It's not reentrant
+    assertTrue(service.suspendLocking(1000));
+    try {
+      service.suspendLocking(1);
+      fail("didn't get IllegalStateException");
+    } catch (IllegalStateException ex) {
+      // expected
+    }
+    service.resumeLocking();
+    
+    // Get "false" if another thread is holding it
+    Thread thread = new Thread(new Runnable() {
+      public void run() {
+        logInfo("new thread about to suspendLocking()");
+        assertTrue(service.suspendLocking(1000));
+      }
+    });
+    thread.start();
+    ThreadUtils.join(thread, 30 * 1000);
+    logInfo("main thread about to suspendLocking");
+    assertTrue(!service.suspendLocking(1000));
+  }
+
+  /**
+   * Test that exlusive locking prohibits locking activity
+   */
+  public void testSuspendLockingProhibitsLocking() 
+  {
+    final String name = getUniqueName();
+    distributedCreateService(2, name);
+    DistributedLockService service = 
+      DistributedLockService.getServiceNamed(name);
+    
+    // Should be able to lock from other VM
+    VM vm1 = Host.getHost(0).getVM(1);
+    assertTrue(vm1.invoke(() -> DistributedLockServiceDUnitTest.tryToLock( name )));
+
+    assertTrue(service.suspendLocking(1000));
+    
+    // vm1 is the grantor... use debugHandleSuspendTimeouts
+    vm1.invoke(new SerializableRunnable("setDebugHandleSuspendTimeouts") {
+      public void run() {
+        DLockService dls = 
+          (DLockService) DistributedLockService.getServiceNamed(name);
+        assertTrue(dls.isLockGrantor());
+        DLockGrantor grantor = dls.getGrantorWithNoSync();
+        grantor.setDebugHandleSuspendTimeouts(5000);
+      }
+    });
+    
+    // Shouldn't be able to lock a name from another VM
+    assertTrue(!vm1.invoke(() -> DistributedLockServiceDUnitTest.tryToLock( name )));
+    
+    service.resumeLocking();
+
+    vm1.invoke(new SerializableRunnable("unsetDebugHandleSuspendTimeouts") {
+      public void run() {
+        DLockService dls = 
+          (DLockService) DistributedLockService.getServiceNamed(name);
+        assertTrue(dls.isLockGrantor());
+        DLockGrantor grantor = dls.getGrantorWithNoSync();
+        grantor.setDebugHandleSuspendTimeouts(0);
+      }
+    });
+    
+    // Should be able to lock again
+    assertTrue(vm1.invoke(() -> DistributedLockServiceDUnitTest.tryToLock( name )));
+    
+  }
+
+  /**
+   * Test that suspend locking behaves under various usage patterns. This
+   * ensures that suspend and regular locks behave as ReadWriteLocks and
+   * processing occurs in order.
+   */
+  public void notestSuspendLockingBehaves() throws Exception {
+    try {
+      doTestSuspendLockingBehaves();
+    }
+    finally {
+      Invoke.invokeInEveryVM(new SerializableRunnable() {
+        public void run() {
+          try {
+            if (suspendClientSuspendLockingBehaves != null) {
+              suspendClientSuspendLockingBehaves.stop();
+              suspendClientSuspendLockingBehaves = null;
+            }
+          }
+          catch (VirtualMachineError e) {
+            SystemFailure.initiateFailure(e);
+            throw e;
+          }
+          catch (Throwable t) {
+            LogWriterUtils.getLogWriter().error("Error in testSuspendLockingBehaves finally", t);
+          }
+          try {
+            if (lockClientSuspendLockingBehaves != null) {
+              lockClientSuspendLockingBehaves.stop();
+              lockClientSuspendLockingBehaves = null;
+            }
+          }
+          catch (VirtualMachineError e) {
+            SystemFailure.initiateFailure(e);
+            throw e;
+          }
+          catch (Throwable t) {
+            LogWriterUtils.getLogWriter().error("Error in testSuspendLockingBehaves finally", t);
+          }
+        }
+      });
+    }
+  }
+  private void doTestSuspendLockingBehaves() throws Exception {
+    final String dlsName = getUniqueName();
+    final VM vmGrantor = Host.getHost(0).getVM(0);
+    final VM vmOne = Host.getHost(0).getVM(1);
+    final VM vmTwo = Host.getHost(0).getVM(2);
+    final VM vmThree = Host.getHost(0).getVM(3);
+    final String key1 = "key1";
+    
+    // TODO: make sure suspend thread can get other locks
+    
+    // TODO: test local (in grantor) locks and suspends also
+    
+    // define some SerializableRunnables
+    final SerializableRunnable createDLS = 
+    new SerializableRunnable("Create "+dlsName) {
+      public void run() {
+        DistributedLockService.create(dlsName, getSystem());
+        lockClientSuspendLockingBehaves = new BasicLockClient(dlsName, key1);
+        suspendClientSuspendLockingBehaves = new BasicLockClient(dlsName, key1);
+        assertFalse(isLockGrantor(dlsName).booleanValue());
+      }
+    };
+    final SerializableRunnable suspendLocking = 
+    new SerializableRunnable("Suspend locking "+dlsName) {
+      public void run() {
+        suspendClientSuspendLockingBehaves.suspend();
+      }
+    };
+    final SerializableRunnable resumeLocking = 
+    new SerializableRunnable("Resume locking "+dlsName) {
+      public void run() {
+        suspendClientSuspendLockingBehaves.resume();
+      }
+    };
+    final SerializableRunnable lockKey = 
+    new SerializableRunnable("Get lock "+dlsName) {
+      public void run() {
+        lockClientSuspendLockingBehaves.lock();
+      }
+    };
+    final SerializableRunnable unlockKey = 
+    new SerializableRunnable("Unlock "+dlsName) {
+      public void run() {
+        lockClientSuspendLockingBehaves.unlock();
+      }
+    };
+    
+    // create grantor
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] Create grantor "+dlsName);
+    vmGrantor.invoke(new SerializableRunnable("Create grantor "+dlsName) {
+      public void run() {
+        DistributedLockService.create(dlsName, getSystem());
+        DistributedLockService.getServiceNamed(dlsName).lock(key1, -1, -1);
+        DistributedLockService.getServiceNamed(dlsName).unlock(key1);
+        assertTrue(isLockGrantor(dlsName).booleanValue());
+      }
+    });
+
+    // create dls in other vms
+//    getLogWriter().info("[testSuspendLockingBehaves] Create DLS in vmOne");
+    vmOne.invoke(createDLS);
+//    getLogWriter().info("[testSuspendLockingBehaves] Create DLS in vmTwo");
+    vmTwo.invoke(createDLS);
+//    getLogWriter().info("[testSuspendLockingBehaves] Create DLS in vmThree");
+    vmThree.invoke(createDLS);
+    
+    // get a lock
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] line up vms for lock");
+//    getLogWriter().info("[testSuspendLockingBehaves] vmOne lock");
+    vmOne.invoke(lockKey);
+//    getLogWriter().info("[testSuspendLockingBehaves] start vmTwoLocking");
+    AsyncInvocation vmTwoLocking =  vmTwo.invokeAsync(lockKey);
+    Wait.pause(2000); // make sure vmTwo is first in line
+//    getLogWriter().info("[testSuspendLockingBehaves] start vmThreeLocking");
+    AsyncInvocation vmThreeLocking = vmThree.invokeAsync(lockKey);
+    Wait.pause(2000);
+    
+    // make sure vmTwo and vmThree are still waiting for lock on key1
+//    getLogWriter().info("[testSuspendLockingBehaves] assert vmTwoLocking still alive");
+    Wait.pause(100);
+    assertTrue(vmTwoLocking.isAlive());
+//    getLogWriter().info("[testSuspendLockingBehaves] assert vmThreeLocking still alive");
+    Wait.pause(100);
+    assertTrue(vmThreeLocking.isAlive());
+    
+    // let vmTwo get key
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] unlock so vmTwo can get key");
+//    getLogWriter().info("[testSuspendLockingBehaves] vmOne unlock");
+    vmOne.invoke(unlockKey);
+    ThreadUtils.join(vmTwoLocking, 10 * 1000);
+
+    // start suspending in vmOne and vmTwo
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] start suspending requests");
+//    getLogWriter().info("[testSuspendLockingBehaves] start vmOneSuspending");
+    AsyncInvocation vmOneSuspending = vmOne.invokeAsync(suspendLocking);
+    Wait.pause(2000); // make sure vmOne is first in line
+//    getLogWriter().info("[testSuspendLockingBehaves] start vmTwoSuspending");
+    AsyncInvocation vmTwoSuspending  = vmTwo.invokeAsync(suspendLocking);
+    Wait.pause(2000); 
+    
+    // let vmThree finish locking key
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] unlock so vmThree can get key");
+//    getLogWriter().info("[testSuspendLockingBehaves] vmTwo unlock");
+    vmTwo.invoke(unlockKey);
+    ThreadUtils.join(vmThreeLocking, 10 * 1000);
+    
+    // have vmOne get back in line for locking key
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] start another lock request");
+//    getLogWriter().info("[testSuspendLockingBehaves] start vmOneLockingAgain");
+    AsyncInvocation vmOneLockingAgain = vmOne.invokeAsync(lockKey);
+    Wait.pause(2000); 
+    
+    // let vmOne suspend locking
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] let vmOne suspend locking");
+//    getLogWriter().info("[testSuspendLockingBehaves] assert vmOneSuspending still alive");
+    Wait.pause(100);
+    assertTrue(vmOneSuspending.isAlive());
+//    getLogWriter().info("[testSuspendLockingBehaves] vmThree unlock");
+    vmThree.invoke(unlockKey);
+    ThreadUtils.join(vmOneSuspending, 10 * 1000);
+    
+    // start suspending in vmThree
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] line up vmThree for suspending");
+//    getLogWriter().info("[testSuspendLockingBehaves] start vmThreeSuspending");
+    AsyncInvocation vmThreeSuspending  = vmThree.invokeAsync(suspendLocking);
+    Wait.pause(2000); 
+
+    // let vmTwo suspend locking
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] let vmTwo suspend locking");
+//    getLogWriter().info("[testSuspendLockingBehaves] assert vmTwoSuspending still alive");
+    Wait.pause(100);
+    assertTrue(vmTwoSuspending.isAlive());
+//    getLogWriter().info("[testSuspendLockingBehaves] vmOne resumes locking");
+    vmOne.invoke(resumeLocking);
+    ThreadUtils.join(vmTwoSuspending, 10 * 1000);
+    
+    // let vmOne get that lock
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] let vmOne get that lock");
+//    getLogWriter().info("[testSuspendLockingBehaves] assert vmOneLockingAgain still alive");
+    Wait.pause(100);
+    assertTrue(vmOneLockingAgain.isAlive());
+//    getLogWriter().info("[testSuspendLockingBehaves] vmTwo resumes locking");
+    vmTwo.invoke(resumeLocking);
+    ThreadUtils.join(vmOneLockingAgain, 10 * 1000);
+    
+    // let vmThree suspend locking
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingBehaves] let vmThree suspend locking");
+//    getLogWriter().info("[testSuspendLockingBehaves] assert vmThreeSuspending still alive");
+    Wait.pause(100);
+    assertTrue(vmThreeSuspending.isAlive());
+//    getLogWriter().info("[testSuspendLockingBehaves] vmOne unlocks again");
+    vmOne.invoke(unlockKey);
+    ThreadUtils.join(vmThreeSuspending, 10 * 1000);
+
+    // done
+//    getLogWriter().info("[testSuspendLockingBehaves] vmThree resumes locking");
+    vmThree.invoke(resumeLocking);
+  }
+  protected static BasicLockClient suspendClientSuspendLockingBehaves;
+  protected static BasicLockClient lockClientSuspendLockingBehaves;
+  
+  /**
+   * Test that exlusive locking prohibits locking activity
+   */
+  public void testSuspendLockingBlocksUntilNoLocks() 
+  throws InterruptedException
+  {
+
+    final String name = getUniqueName();
+    distributedCreateService(2, name);
+    final DistributedLockService service = 
+      DistributedLockService.getServiceNamed(name);
+    
+    // Get lock from other VM.  Since same thread needs to lock and unlock,
+    // invoke asynchronously, get lock, wait to be notified, then unlock.
+    VM vm1 = Host.getHost(0).getVM(1);
+    vm1.invokeAsync(new SerializableRunnable("Lock & unlock in vm1") {
+      public void run() {
+        DistributedLockService service2 = 
+          DistributedLockService.getServiceNamed(name);
+        assertTrue(service2.lock("lock", -1, -1));
+        synchronized (monitor) {
+          try {
+            monitor.wait();
+          } catch (InterruptedException ex) {
+            System.out.println("Unexpected InterruptedException");
+            fail("interrupted");
+          }
+        }
+        service2.unlock("lock");
+      }
+    });
+    // Let vm1's thread get the lock and go into wait()
+    Thread.sleep(100);
+    
+    Thread thread = new Thread(new Runnable() {
+      public void run() {
+        setGot(service.suspendLocking(-1));
+        setDone(true);
+        service.resumeLocking();
+      }
+    });
+    setGot(false);
+    setDone(false);
+    thread.start();
+    
+    // Let thread start, make sure it's blocked in suspendLocking
+    Thread.sleep(100);
+    assertFalse("Before release, got: " + getGot() + ", done: " + getDone(), getGot() || getDone());
+    
+    vm1.invoke(new SerializableRunnable("notify vm1 to unlock") {
+      public void run() {
+        synchronized (monitor) {
+          monitor.notify();
+        }
+      }
+    });
+
+    // Let thread finish, make sure it successfully suspended and is done
+    WaitCriterion ev = new WaitCriterion() {
+      public boolean done() {
+        return getDone();
+      }
+      public String description() {
+        return null;
+      }
+    };
+    Wait.waitForCriterion(ev, 30 * 1000, 200, true);
+    if (!getGot() || !getDone()) {
+      ThreadUtils.dumpAllStacks();
+    }
+    assertTrue("After release, got: " + getGot() + ", done: " + getDone(), getGot() && getDone());
+    
+  }
+  
+  public void testSuspendLockingInterruptiblyIsInterruptible() {
+    
+    started = false;
+    gotLock = false;
+    exception = null;
+
+    // Lock entire service in first thread
+    final String name = getUniqueName();
+    final DistributedLockService service = 
+      DistributedLockService.create(name, dlstSystem);
+    assertTrue(service.suspendLocking(1000));
+
+    // Start second thread that tries to lock in second thread
+    Thread thread2 = new Thread(new Runnable() {
+      public void run() {
+        try {
+          started = true;
+          gotLock = service.suspendLockingInterruptibly(-1);
+        } catch (InterruptedException ex) {
+          exception = ex;
+        }
+      }
+    });
+    thread2.start();
+    
+    // Interrupt second thread
+    while (!started) Thread.yield();
+    thread2.interrupt();
+    ThreadUtils.join(thread2, 20 * 1000);
+
+    // Expect it got InterruptedException and didn't lock the service
+    sleep(500);
+    assertFalse(gotLock);
+    assertNotNull(exception);
+
+    // Unlock entire service in first thread
+    service.resumeLocking();
+    sleep(500);
+
+    // Make sure it didn't get locked by second thread
+    assertTrue(service.suspendLocking(1000));
+    DistributedLockService.destroy(name);
+  }
+  
+  public void testSuspendLockingIsNotInterruptible() {
+    
+    started = false;
+    gotLock = false;
+    exception = null;
+    wasFlagSet = false;
+
+    // Lock entire service in first thread
+    final String name = getUniqueName();
+    final DistributedLockService service = 
+      DistributedLockService.create(name, dlstSystem);
+    assertTrue(service.suspendLocking(1000));
+
+    // Start second thread that tries to lock in second thread
+    Thread thread2 = new Thread(new Runnable() {
+      public void run() {
+        try {
+          started = true;
+          gotLock = service.suspendLocking(-1);
+        } 
+        catch (VirtualMachineError e) {
+          SystemFailure.initiateFailure(e);
+          throw e;
+        }
+        catch (Throwable ex) {
+          exception = ex;
+        }
+        wasFlagSet = Thread.currentThread().isInterrupted();
+     }
+    });
+    thread2.start();
+    
+    // Interrupt second thread
+    while (!started) Thread.yield();
+    thread2.interrupt();
+    // Expect it didn't get an exception and didn't lock the service
+    sleep(500);
+    assertFalse(gotLock);
+    assertNull(exception);
+
+    // Unlock entire service in first thread
+    service.resumeLocking();
+    ThreadUtils.join(thread2, 20 * 1000);
+
+    // Now thread2 should have gotten the lock, not the exception, but the
+    // thread's flag should be set
+    LogWriterUtils.getLogWriter().info("[testSuspendLockingIsNotInterruptible]" +
+      " gotLock=" + gotLock +
+      " wasFlagSet=" + wasFlagSet +
+      " exception=" + exception, exception);
+    assertTrue(gotLock);
+    assertNull(exception);
+    assertTrue(wasFlagSet);
+  }
+  
+  /**
+   * Tests what happens when you attempt to lock a name on a lock
+   * service that has been destroyed.
+   *
+   * @author David Whitlock
+   */
+  public void testLockDestroyedService() {
+    String serviceName = this.getUniqueName();
+    DistributedLockService service =
+      DistributedLockService.create(serviceName, dlstSystem);
+    DistributedLockService.destroy(serviceName);
+    try {
+      boolean locked = service.lock("TEST", -1, -1);
+      fail("Lock of destroyed service returned: " + locked);
+
+    } catch (LockServiceDestroyedException ex) {
+      // pass...
+    }
+  }
+  
+  public void testDepartedLastOwnerWithLease() {
+    final String serviceName = this.getUniqueName();
+
+    // Create service in this VM
+    DistributedLockService service =
+      DistributedLockService.create(serviceName, dlstSystem);
+    assertTrue(service.lock("key", -1, -1));
+    service.unlock("key");
+    
+    // Create service in other VM
+    VM otherVm = Host.getHost(0).getVM(0);
+    otherVm.invoke(new SerializableRunnable() {
+      public void run() {
+        DistributedLockService service2 =
+          DistributedLockService.create(serviceName, dlstSystem);
+        service2.lock("key", -1, 360000);
+        service2.unlock("key");
+        // Wait for asynchronous messaging to complete
+        try {
+          Thread.sleep(100);
+        } catch (InterruptedException ex) {
+          fail("interrupted");
+        }
+        disconnectFromDS();
+      }
+    });
+    
+    // Now lock back in this VM
+    assertTrue(service.lock("key", -1, -1));
+    
+  }
+  
+  public void testDepartedLastOwnerNoLease() {
+    final String serviceName = this.getUniqueName();
+
+    // Create service in this VM
+    DistributedLockService service =
+      DistributedLockService.create(serviceName, dlstSystem);
+    assertTrue(service.lock("key", -1, -1));
+    service.unlock("key");
+    
+    // Create service in other VM
+    VM otherVm = Host.getHost(0).getVM(0);
+    otherVm.invoke(new SerializableRunnable() {
+      public void run() {
+        DistributedLockService service2 =
+          DistributedLockService.create(serviceName, dlstSystem);
+        service2.lock("key", -1, -1);
+        service2.unlock("key");
+        // Wait for asynchronous messaging to complete
+        try {
+          Thread.sleep(100);
+        } catch (InterruptedException ex) {
+          fail("interrupted");
+        }
+        disconnectFromDS();
+      }
+    });
+    
+    // Now lock back in this VM
+    assertTrue(service.lock("key", -1, -1));
+    
+  }
+  
+  /** 
+   * Tests for 32461 R3 StuckLocks can occur on locks with an expiration lease
+   * <p>
+   * VM-A locks/unlocks "lock", VM-B leases "lock" and disconnects, VM-C
+   * attempts to lock "lock" and old dlock throws StuckLockException. VM-C
+   * should now succeed in acquiring the lock.
+   */
+  public void testBug32461() throws Exception {
+    LogWriterUtils.getLogWriter().fine("[testBug32461] prepping");
+
+    final String serviceName = getUniqueName();
+    final Object objName = "32461";
+    final int VM_A = 0;
+    final int VM_B = 1;
+    final int VM_C = 2;
+
+    // VM-A locks/unlocks "lock"...
+    LogWriterUtils.getLogWriter().fine("[testBug32461] VM-A locks/unlocks '32461'");
+    
+    Host.getHost(0).getVM(VM_A).invoke(new SerializableRunnable() {
+      public void run() {
+        remoteCreateService(serviceName);
+        final DistributedLockService service = 
+            DistributedLockService.getServiceNamed(serviceName);
+        assertTrue(service.lock(objName, -1, Long.MAX_VALUE));
+        service.unlock(objName);
+      }
+    });
+    
+    // VM-B leases "lock" and disconnects,
+    LogWriterUtils.getLogWriter().fine("[testBug32461] VM_B leases '32461' and disconnects");
+    
+    Host.getHost(0).getVM(VM_B).invoke(new SerializableRunnable() {
+      public void run() {
+        remoteCreateService(serviceName);
+        final DistributedLockService service = 
+            DistributedLockService.getServiceNamed(serviceName);
+        assertTrue(service.lock(objName, -1, Long.MAX_VALUE));
+        DistributedLockService.destroy(serviceName);
+        disconnectFromDS();
+      }
+    });
+    
+    LogWriterUtils.getLogWriter().fine("[testBug32461] VM_C attempts to lock '32461'");
+
+    Host.getHost(0).getVM(VM_C).invoke(new SerializableRunnable() {
+      public void run() {
+        remoteCreateService(serviceName);
+        final DistributedLockService service = 
+            DistributedLockService.getServiceNamed(serviceName);
+        assertTrue(service.lock(objName, -1, -1));
+        service.unlock(objName);
+      }
+    });
+  }
+  
+  public void testNoStuckLock() {
+    final String serviceName = this.getUniqueName();
+    final Object keyWithLease = "key-with-lease";
+    final Object keyNoLease = "key-no-lease";
+
+    // Create service in this VM
+    DistributedLockService service =
+      DistributedLockService.create(serviceName, dlstSystem);
+
+    assertTrue(service.lock(keyWithLease, -1, -1));
+    service.unlock(keyWithLease);
+
+    assertTrue(service.lock(keyNoLease, -1, -1));
+    service.unlock(keyNoLease);
+    
+    // Create service in other VM
+    VM otherVm = Host.getHost(0).getVM(0);
+    otherVm.invoke(new SerializableRunnable() {
+      public void run() {
+        DistributedLockService service2 =
+          DistributedLockService.create(serviceName, dlstSystem);
+        service2.lock(keyWithLease, -1, 360000);
+        service2.lock(keyNoLease, -1, -1);
+        disconnectFromDS();
+      }
+    });
+    
+    // Now lock back in this VM... no stuck locks anymore
+    assertTrue(service.lock(keyWithLease, -1, -1));
+    service.unlock(keyWithLease);
+    assertTrue(service.lock(keyNoLease, -1, -1));
+    service.unlock(keyNoLease);
+  }
+  
+  volatile boolean startedThread1_testReleaseOrphanedGrant;
+  volatile boolean releaseThread1_testReleaseOrphanedGrant;
+  volatile boolean startedThread2_testReleaseOrphanedGrant;
+  volatile boolean gotLockThread2_testReleaseOrphanedGrant;
+  /**
+   * Client requests lock and then interrupts lock request before processing
+   * the grant reply. This causes the Client to send a release msg to the
+   * grantor.
+   */
+  public void testReleaseOrphanedGrant_Local() {
+    DLockRequestProcessor.setDebugReleaseOrphanedGrant(true);
+    DLockRequestProcessor.setWaitToProcessDLockResponse(false);
+    try {
+      startedThread2_testReleaseOrphanedGrant = false;
+      gotLockThread2_testReleaseOrphanedGrant = false;
+      releaseThread1_testReleaseOrphanedGrant = false;
+      
+      LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Local] create lock service");
+      final String serviceName = getUniqueName();
+      final DistributedLockService service = 
+        DistributedLockService.create(serviceName, dlstSystem);
+      
+      // thread to get lock and wait and then unlock
+      final Thread thread1 = new Thread(new Runnable() {
+        public void run() {
+          LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Local] get the lock");
+          assertTrue(service.lock("obj", -1, -1));
+          DLockRequestProcessor.setWaitToProcessDLockResponse(true);
+          startedThread1_testReleaseOrphanedGrant = true;
+          synchronized(Thread.currentThread()) {
+            while (!releaseThread1_testReleaseOrphanedGrant) {
+              try {
+                Thread.currentThread().wait();
+              } catch (InterruptedException ignore) {fail("interrupted");}
+            }
+          }
+          LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Local] unlock the lock");
+          service.unlock("obj");
+        }
+      });
+      thread1.start();
+      while (!startedThread1_testReleaseOrphanedGrant) {
+        Thread.yield();
+      }
+      
+      // thread to interrupt lockInterruptibly call to cause zombie grant
+      final Thread thread2 = new Thread(new Runnable() {
+        public void run() {
+          try {
+            LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Local] call lockInterruptibly");
+            startedThread2_testReleaseOrphanedGrant = true;
+            assertFalse(service.lockInterruptibly("obj", -1, -1));
+          } catch (InterruptedException expected) {
+            Thread.currentThread().interrupt();
+          }
+        }
+      });
+      thread2.start();
+      while (!startedThread2_testReleaseOrphanedGrant) {
+        Thread.yield();
+      }
+          
+      // release first thread to unlock
+      LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Local] release 1st thread");
+      sleep(500);
+      synchronized(thread1) {
+        releaseThread1_testReleaseOrphanedGrant = true;
+        thread1.notifyAll();
+      }
+      sleep(500);
+  
+      // while first thread is stuck on waitToProcessDLockResponse,
+      //   interrupt 2nd thread
+      LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Local] interrupt 2nd thread");
+      thread2.interrupt();
+      ThreadUtils.join(thread2, 20 * 1000);
+  
+      // release waitToProcessDLockResponse
+      LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Local] process lock response");
+      sleep(500);
+      DLockRequestProcessor.setWaitToProcessDLockResponse(false);
+      
+      // relock obj to make sure zombie release worked
+      LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Local] verify lock not held");
+      assertTrue(service.lock("obj", 1000, -1));
+    }
+    finally {
+      DLockRequestProcessor.setDebugReleaseOrphanedGrant(false);
+      DLockRequestProcessor.setWaitToProcessDLockResponse(false);
+    }
+  }
+  
+  static volatile Thread threadVM1_testReleaseOrphanedGrant_Remote;
+  static volatile Thread threadVM2_testReleaseOrphanedGrant_Remote;
+  static volatile boolean startedThreadVM1_testReleaseOrphanedGrant_Remote;
+  static volatile boolean releaseThreadVM1_testReleaseOrphanedGrant_Remote;
+  static volatile boolean unlockedThreadVM1_testReleaseOrphanedGrant_Remote;
+  static volatile boolean startedThreadVM2_testReleaseOrphanedGrant_Remote;
+  static volatile boolean gotLockThreadVM2_testReleaseOrphanedGrant_Remote;
+  public void testReleaseOrphanedGrant_Remote() {
+    doTestReleaseOrphanedGrant_Remote(false);
+  }
+  public void testReleaseOrphanedGrant_RemoteWithDestroy() {
+    doTestReleaseOrphanedGrant_Remote(true);
+  }
+  public void doTestReleaseOrphanedGrant_Remote(final boolean destroyLockService) {
+    final VM vm1 = Host.getHost(0).getVM(0);
+    final VM vm2 = Host.getHost(0).getVM(1);
+
+    try {
+      LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Remote] create lock service");
+      final String serviceName = getUniqueName();
+      final DistributedLockService service = 
+        DistributedLockService.create(serviceName, dlstSystem);
+        
+      // lock and unlock to make sure this vm is grantor
+      assertTrue(service.lock("obj", -1, -1));
+      service.unlock("obj");
+      
+      // thread to get lock and wait and then unlock
+      vm1.invokeAsync(new SerializableRunnable() {
+        public void run() {
+          LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Remote] get the lock");
+          threadVM1_testReleaseOrphanedGrant_Remote = Thread.currentThread();
+          connectDistributedSystem();
+          DistributedLockService service_vm1 =
+            DistributedLockService.create(serviceName, getSystem());
+          assertTrue(service_vm1.lock("obj", -1, -1));
+          synchronized(threadVM1_testReleaseOrphanedGrant_Remote) {
+            while (!releaseThreadVM1_testReleaseOrphanedGrant_Remote) {
+              try {
+                startedThreadVM1_testReleaseOrphanedGrant_Remote = true;
+                Thread.currentThread().wait();
+              } catch (InterruptedException ignore) {fail("interrupted");}
+            }
+          }
+          LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Remote] unlock the lock");
+          service_vm1.unlock("obj");
+          unlockedThreadVM1_testReleaseOrphanedGrant_Remote = true;
+        }
+      });
+      vm1.invoke(new SerializableRunnable() {
+        public void run() {
+          while (!startedThreadVM1_testReleaseOrphanedGrant_Remote) {
+            Thread.yield();
+          }
+        }
+      });
+      sleep(500);
+      
+      // thread to interrupt lockInterruptibly call to cause zombie grant
+      vm2.invokeAsync(new SerializableRunnable() {
+        public void run() {
+          LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Remote] call lockInterruptibly");
+          threadVM2_testReleaseOrphanedGrant_Remote = Thread.currentThread();
+          DistributedLockService service_vm2 =
+            DistributedLockService.create(serviceName, getSystem());
+          startedThreadVM2_testReleaseOrphanedGrant_Remote = true;
+          try {
+            DLockRequestProcessor.setDebugReleaseOrphanedGrant(true);
+            DLockRequestProcessor.setWaitToProcessDLockResponse(true);
+            assertFalse(service_vm2.lockInterruptibly("obj", -1, -1));
+          } catch (InterruptedException expected) {Thread.currentThread().interrupt();}
+        }
+      });
+      vm2.invoke(new SerializableRunnable() {
+        public void run() {
+          while (!startedThreadVM2_testReleaseOrphanedGrant_Remote) {
+            Thread.yield();
+          }
+        }
+      });
+      sleep(500);
+          
+      // release first thread to unlock
+      vm1.invoke(new SerializableRunnable() {
+        public void run() {
+          LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Remote] release 1st thread");
+          synchronized(threadVM1_testReleaseOrphanedGrant_Remote) {
+            releaseThreadVM1_testReleaseOrphanedGrant_Remote = true;
+            threadVM1_testReleaseOrphanedGrant_Remote.notifyAll();
+          }
+        }
+      });
+      sleep(500); // lock is being released, grantor will grant lock to vm2
+  
+      // while first thread is stuck on waitToProcessDLockResponse,
+      //   interrupt 2nd thread
+      vm2.invoke(new SerializableRunnable() {
+        public void run() {
+          LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Remote] interrupt 2nd thread");
+          threadVM2_testReleaseOrphanedGrant_Remote.interrupt();
+          ThreadUtils.join(threadVM2_testReleaseOrphanedGrant_Remote, 
+              5 * 60 * 1000);
+          if (destroyLockService) {
+            LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Remote] destroy lock service");
+            DistributedLockService.destroy(serviceName);
+            assertNull(DistributedLockService.getServiceNamed(serviceName));
+          }
+        }
+      });
+      sleep(500); // grant is blocked while reply processor is being destroyed
+  
+      // release waitToProcessDLockResponse
+      vm2.invoke(new SerializableRunnable() {
+        public void run() {
+          LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Remote] process lock response");
+          DLockRequestProcessor.setWaitToProcessDLockResponse(false);
+        }
+      });
+      sleep(500); // process grant and send zombie release to grantor
+      
+      // relock obj to make sure zombie release worked
+      LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Remote] verify lock not held");
+      assertTrue(service.lock("obj", 1000, -1));
+    }
+    finally {
+      vm2.invoke(new SerializableRunnable() {
+        public void run() {
+          LogWriterUtils.getLogWriter().info("[testReleaseOrphanedGrant_Remote] clean up DebugReleaseOrphanedGrant");
+          DLockRequestProcessor.setDebugReleaseOrphanedGrant(false);
+          DLockRequestProcessor.setWaitToProcessDLockResponse(false);
+        }
+      });
+    }
+  }
+  
+  public void testDestroyLockServiceAfterGrantResponse() throws Throwable {
+    Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    
+    final String serviceName = getUniqueName();
+
+    vm0.invoke(new SerializableRunnable("Create the grantor") {
+      
+      public void run() {
+        connectDistributedSystem();
+        final DistributedLockService service = 
+          DistributedLockService.create(serviceName, dlstSystem);
+          
+        // lock and unlock to make sure this vm is grantor
+        assertTrue(service.lock("obj", -1, -1));
+        service.unlock("obj");
+      }
+    });
+    
+    DistributionMessageObserver.setInstance(new DistributionMessageObserver() {
+
+      @Override
+      public void beforeProcessMessage(DistributionManager dm,
+          DistributionMessage message) {
+        if(message instanceof DLockResponseMessage) {
+          DistributedLockService.destroy(serviceName);  
+        }
+      }
+    });
+
+    connectDistributedSystem();
+    final DistributedLockService service = 
+      DistributedLockService.create(serviceName, dlstSystem);
+    try {
+      service.lock("obj", -1, -1);
+      fail("The lock service should have been destroyed");
+    } catch(LockServiceDestroyedException expected) {
+      //Do nothing
+    }
+
+    vm0.invoke(new SerializableRunnable("check to make sure the lock is not orphaned") {
+
+      public void run() {
+        final DistributedLockService service = 
+          DistributedLockService.getServiceNamed(serviceName);
+
+        // lock and unlock to make sure this vm is grantor
+        assertTrue(service.lock("obj", -1, -1));
+        service.unlock("obj");


<TRUNCATED>


[06/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObjectTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObjectTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObjectTestBase.java
index 24cb2fd..0659b81 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObjectTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObjectTestBase.java
@@ -14,190 +14,186 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.offheap;
 
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-import com.gemstone.gemfire.internal.offheap.StoredObject;
-import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import java.io.DataOutput;
 import java.io.IOException;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
+import org.junit.Test;
+
+import com.gemstone.gemfire.internal.DataSerializableFixedID;
 
 public abstract class AbstractStoredObjectTestBase {
 
-    /* Returns Value as an Object Eg: Integer or UserDefinedRegionValue */
-    protected abstract Object getValue();
+  /* Returns Value as an Object Eg: Integer or UserDefinedRegionValue */
+  protected abstract Object getValue();
 
-    /* Returns Value as an ByteArray (not serialized) */
-    protected abstract byte[] getValueAsByteArray();
+  /* Returns Value as an ByteArray (not serialized) */
+  protected abstract byte[] getValueAsByteArray();
 
-    protected abstract Object convertByteArrayToObject(byte[] valueInByteArray);
+  protected abstract Object convertByteArrayToObject(byte[] valueInByteArray);
 
-    protected abstract Object convertSerializedByteArrayToObject(byte[] valueInSerializedByteArray);
+  protected abstract Object convertSerializedByteArrayToObject(byte[] valueInSerializedByteArray);
 
-    protected abstract StoredObject createValueAsUnserializedStoredObject(Object value);
+  protected abstract StoredObject createValueAsUnserializedStoredObject(Object value);
 
-    protected abstract StoredObject createValueAsSerializedStoredObject(Object value);
+  protected abstract StoredObject createValueAsSerializedStoredObject(Object value);
 
-    @Test
-    public void getValueAsDeserializedHeapObjectShouldReturnDeserializedValueIfValueIsSerialized() {
-        Object regionEntryValue = getValue();
-        StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
+  @Test
+  public void getValueAsDeserializedHeapObjectShouldReturnDeserializedValueIfValueIsSerialized() {
+    Object regionEntryValue = getValue();
+    StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
 
-        Object actualRegionEntryValue = storedObject.getValueAsDeserializedHeapObject();
-        assertEquals(regionEntryValue, actualRegionEntryValue);
-    }
+    Object actualRegionEntryValue = storedObject.getValueAsDeserializedHeapObject();
+    assertEquals(regionEntryValue, actualRegionEntryValue);
+  }
 
-    @Test
-    public void getValueAsDeserializedHeapObjectShouldReturnValueAsIsIfNotSerialized() {
-        byte[] regionEntryValue = getValueAsByteArray();
-        StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
+  @Test
+  public void getValueAsDeserializedHeapObjectShouldReturnValueAsIsIfNotSerialized() {
+    byte[] regionEntryValue = getValueAsByteArray();
+    StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
 
-        byte[] deserializedValue = (byte[]) storedObject.getValueAsDeserializedHeapObject();
-        assertArrayEquals(regionEntryValue, deserializedValue);
-    }
+    byte[] deserializedValue = (byte[]) storedObject.getValueAsDeserializedHeapObject();
+    assertArrayEquals(regionEntryValue, deserializedValue);
+  }
 
-    @Test
-    public void getValueAsHeapByteArrayShouldReturnSerializedByteArrayIfValueIsSerialized() {
-        Object regionEntryValue = getValue();
-        StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
+  @Test
+  public void getValueAsHeapByteArrayShouldReturnSerializedByteArrayIfValueIsSerialized() {
+    Object regionEntryValue = getValue();
+    StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
 
-        byte[] valueInSerializedByteArray = (byte[]) storedObject.getValueAsHeapByteArray();
-        Object actualRegionEntryValue = convertSerializedByteArrayToObject(valueInSerializedByteArray);
+    byte[] valueInSerializedByteArray = (byte[]) storedObject.getValueAsHeapByteArray();
+    Object actualRegionEntryValue = convertSerializedByteArrayToObject(valueInSerializedByteArray);
 
-        assertEquals(regionEntryValue, actualRegionEntryValue);
-    }
+    assertEquals(regionEntryValue, actualRegionEntryValue);
+  }
 
-    @Test
-    public void getValueAsHeapByteArrayShouldReturnDeserializedByteArrayIfValueIsNotSerialized() {
-        Object regionEntryValue = getValue();
+  @Test
+  public void getValueAsHeapByteArrayShouldReturnDeserializedByteArrayIfValueIsNotSerialized() {
+    Object regionEntryValue = getValue();
 
-        StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
+    StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
 
-        byte[] valueInByteArray = (byte[]) storedObject.getValueAsHeapByteArray();
+    byte[] valueInByteArray = (byte[]) storedObject.getValueAsHeapByteArray();
 
-        Object actualRegionEntryValue = convertByteArrayToObject(valueInByteArray);
+    Object actualRegionEntryValue = convertByteArrayToObject(valueInByteArray);
 
-        assertEquals(regionEntryValue, actualRegionEntryValue);
-    }
+    assertEquals(regionEntryValue, actualRegionEntryValue);
+  }
 
-    @Test
-    public void getStringFormShouldReturnStringFromDeserializedValue() {
-        Object regionEntryValue = getValue();
-        StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
+  @Test
+  public void getStringFormShouldReturnStringFromDeserializedValue() {
+    Object regionEntryValue = getValue();
+    StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
 
-        String stringForm = storedObject.getStringForm();
-        assertEquals(String.valueOf(regionEntryValue), stringForm);
-    }
+    String stringForm = storedObject.getStringForm();
+    assertEquals(String.valueOf(regionEntryValue), stringForm);
+  }
 
-    @Test
-    public void getValueShouldReturnSerializedValue() {
-        Object regionEntryValue = getValue();
-        StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
+  @Test
+  public void getValueShouldReturnSerializedValue() {
+    Object regionEntryValue = getValue();
+    StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
 
-        byte[] valueAsSerializedByteArray = (byte[]) storedObject.getValue();
+    byte[] valueAsSerializedByteArray = (byte[]) storedObject.getValue();
 
-        Object actualValue = convertSerializedByteArrayToObject(valueAsSerializedByteArray);
+    Object actualValue = convertSerializedByteArrayToObject(valueAsSerializedByteArray);
 
-        assertEquals(regionEntryValue, actualValue);
-    }
+    assertEquals(regionEntryValue, actualValue);
+  }
 
-    @Test(expected = IllegalStateException.class)
-    public void getValueShouldThrowExceptionIfValueIsNotSerialized() {
-        Object regionEntryValue = getValue();
-        StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
+  @Test(expected = IllegalStateException.class)
+  public void getValueShouldThrowExceptionIfValueIsNotSerialized() {
+    Object regionEntryValue = getValue();
+    StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
 
-        byte[] deserializedValue = (byte[]) storedObject.getValue();
-    }
+    byte[] deserializedValue = (byte[]) storedObject.getValue();
+  }
 
-    @Test
-    public void getDeserializedWritableCopyShouldReturnDeserializedValue() {
-        byte[] regionEntryValue = getValueAsByteArray();
-        StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
+  @Test
+  public void getDeserializedWritableCopyShouldReturnDeserializedValue() {
+    byte[] regionEntryValue = getValueAsByteArray();
+    StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
 
-        assertArrayEquals(regionEntryValue, (byte[]) storedObject.getDeserializedWritableCopy(null, null));
-    }
+    assertArrayEquals(regionEntryValue, (byte[]) storedObject.getDeserializedWritableCopy(null, null));
+  }
 
-    @Test
-    public void writeValueAsByteArrayWritesToProvidedDataOutput() throws IOException {
-        byte[] regionEntryValue = getValueAsByteArray();
-        StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
+  @Test
+  public void writeValueAsByteArrayWritesToProvidedDataOutput() throws IOException {
+    byte[] regionEntryValue = getValueAsByteArray();
+    StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
 
-        DataOutput dataOutput = mock(DataOutput.class);
-        storedObject.writeValueAsByteArray(dataOutput);
+    DataOutput dataOutput = mock(DataOutput.class);
+    storedObject.writeValueAsByteArray(dataOutput);
 
-        verify(dataOutput, times(1)).write(storedObject.getSerializedValue(), 0 , storedObject.getSerializedValue().length);
-    }
+    verify(dataOutput, times(1)).write(storedObject.getSerializedValue(), 0, storedObject.getSerializedValue().length);
+  }
 
-    @Test
-    public void sendToShouldWriteSerializedValueToDataOutput() throws IOException {
-        Object regionEntryValue = getValue();
-        StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
+  @Test
+  public void sendToShouldWriteSerializedValueToDataOutput() throws IOException {
+    Object regionEntryValue = getValue();
+    StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
 
-        DataOutput dataOutput = mock(DataOutput.class);
-        storedObject.sendTo(dataOutput);
+    DataOutput dataOutput = mock(DataOutput.class);
+    storedObject.sendTo(dataOutput);
 
-        verify(dataOutput, times(1)).write(storedObject.getSerializedValue());
-    }
+    verify(dataOutput, times(1)).write(storedObject.getSerializedValue());
+  }
 
-    @Test
-    public void sendToShouldWriteDeserializedObjectToDataOutput() throws IOException {
-        byte[] regionEntryValue = getValueAsByteArray();
-        StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
+  @Test
+  public void sendToShouldWriteDeserializedObjectToDataOutput() throws IOException {
+    byte[] regionEntryValue = getValueAsByteArray();
+    StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
 
-        DataOutput dataOutput = mock(DataOutput.class);
-        storedObject.sendTo(dataOutput);
+    DataOutput dataOutput = mock(DataOutput.class);
+    storedObject.sendTo(dataOutput);
 
-        verify(dataOutput, times(1)).write(regionEntryValue, 0, regionEntryValue.length);
-    }
+    verify(dataOutput, times(1)).write(regionEntryValue, 0, regionEntryValue.length);
+  }
 
-    @Test
-    public void sendAsByteArrayShouldWriteSerializedValueToDataOutput() throws IOException {
-        Object regionEntryValue = getValue();
-        StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
+  @Test
+  public void sendAsByteArrayShouldWriteSerializedValueToDataOutput() throws IOException {
+    Object regionEntryValue = getValue();
+    StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
 
-        DataOutput dataOutput = mock(DataOutput.class);
-        storedObject.sendAsByteArray(dataOutput);
+    DataOutput dataOutput = mock(DataOutput.class);
+    storedObject.sendAsByteArray(dataOutput);
 
-        verify(dataOutput, times(1)).write(storedObject.getSerializedValue(), 0, storedObject.getSerializedValue().length);
-    }
+    verify(dataOutput, times(1)).write(storedObject.getSerializedValue(), 0, storedObject.getSerializedValue().length);
+  }
 
-    @Test
-    public void sendAsByteArrayShouldWriteDeserializedObjectToDataOutput() throws IOException {
-        byte[] regionEntryValue = getValueAsByteArray();
-        StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
+  @Test
+  public void sendAsByteArrayShouldWriteDeserializedObjectToDataOutput() throws IOException {
+    byte[] regionEntryValue = getValueAsByteArray();
+    StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
 
-        DataOutput dataOutput = mock(DataOutput.class);
-        storedObject.sendAsByteArray(dataOutput);
+    DataOutput dataOutput = mock(DataOutput.class);
+    storedObject.sendAsByteArray(dataOutput);
 
-        verify(dataOutput, times(1)).write(regionEntryValue, 0, regionEntryValue.length);
-    }
+    verify(dataOutput, times(1)).write(regionEntryValue, 0, regionEntryValue.length);
+  }
 
-    @Test
-    public void sendAsCachedDeserializableShouldWriteSerializedValueToDataOutputAndSetsHeader() throws IOException {
-        Object regionEntryValue = getValue();
-        StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
+  @Test
+  public void sendAsCachedDeserializableShouldWriteSerializedValueToDataOutputAndSetsHeader() throws IOException {
+    Object regionEntryValue = getValue();
+    StoredObject storedObject = createValueAsSerializedStoredObject(regionEntryValue);
 
-        DataOutput dataOutput = mock(DataOutput.class);
-        storedObject.sendAsCachedDeserializable(dataOutput);
+    DataOutput dataOutput = mock(DataOutput.class);
+    storedObject.sendAsCachedDeserializable(dataOutput);
 
-        verify(dataOutput, times(1)).writeByte((DataSerializableFixedID.VM_CACHED_DESERIALIZABLE));
-        verify(dataOutput, times(1)).write(storedObject.getSerializedValue(), 0, storedObject.getSerializedValue().length);
-    }
+    verify(dataOutput, times(1)).writeByte((DataSerializableFixedID.VM_CACHED_DESERIALIZABLE));
+    verify(dataOutput, times(1)).write(storedObject.getSerializedValue(), 0, storedObject.getSerializedValue().length);
+  }
 
-    @Test(expected = IllegalStateException.class)
-    public void sendAsCachedDeserializableShouldThrowExceptionIfValueIsNotSerialized() throws IOException {
-        Object regionEntryValue = getValue();
-        StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
+  @Test(expected = IllegalStateException.class)
+  public void sendAsCachedDeserializableShouldThrowExceptionIfValueIsNotSerialized() throws IOException {
+    Object regionEntryValue = getValue();
+    StoredObject storedObject = createValueAsUnserializedStoredObject(regionEntryValue);
 
-        DataOutput dataOutput = mock(DataOutput.class);
-        storedObject.sendAsCachedDeserializable(dataOutput);
-    }
+    DataOutput dataOutput = mock(DataOutput.class);
+    storedObject.sendAsCachedDeserializable(dataOutput);
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/DataTypeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/DataTypeJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/DataTypeJUnitTest.java
index fe176e0..00ad891 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/DataTypeJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/DataTypeJUnitTest.java
@@ -16,7 +16,9 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import static org.junit.Assert.assertEquals;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import java.io.ByteArrayOutputStream;
 import java.io.DataInput;
@@ -49,12 +51,10 @@ import java.util.concurrent.TimeUnit;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.*;
-import org.powermock.modules.junit4.PowerMockRunner;
 import org.powermock.api.mockito.PowerMockito;
 import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
 
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.Instantiator;
@@ -93,6 +93,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("com.gemstone.gemfire.internal.DataSerializableFixedID:" + ReplyMessage.class.getName(), type);
   }
+
   @Test
   public void testDataSerializableFixedIDShort() throws IOException {
     DataSerializableFixedID value = new ShutdownAllResponse();
@@ -103,14 +104,15 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("com.gemstone.gemfire.internal.DataSerializableFixedID:" + ShutdownAllResponse.class.getName(), type);
   }
+
   @Test
   public void testDataSerializableFixedIDInt() throws IOException, ClassNotFoundException {
     Integer someDSFIDInt = new Integer(1);
-    
+
     PowerMockito.mockStatic(DSFIDFactory.class);
     when(DSFIDFactory.create(eq(someDSFIDInt), any())).thenReturn(someDSFIDInt);
     DSFIDFactory.create(someDSFIDInt, null);
-    
+
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     DataSerializer.writeByte(DSCODE.DS_FIXED_ID_INT, out);
@@ -119,6 +121,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("com.gemstone.gemfire.internal.DataSerializableFixedID:" + Integer.class.getName(), type);
   }
+
   @Test
   public void testDataSerializableFixedIDClass() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -129,6 +132,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("com.gemstone.gemfire.internal.DataSerializableFixedID:" + Integer.class.getName(), type);
   }
+
   @Test
   public void testNull() throws IOException {
     Object value = null;
@@ -139,6 +143,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("null", type);
   }
+
   @Test
   public void testString() throws IOException {
     String value = "this is a string";
@@ -149,6 +154,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.String", type);
   }
+
   @Test
   public void testNullString() throws IOException {
     String value = null;
@@ -159,6 +165,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.String", type);
   }
+
   @Test
   public void testClass() throws IOException {
     Class<?> value = String.class;
@@ -169,9 +176,10 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Class", type);
   }
+
   @Test
   public void testDate() throws IOException {
-    Date value = new Date(); 
+    Date value = new Date();
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     DataSerializer.writeObject(value, out); // NOT writeDate
@@ -179,6 +187,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.Date", type);
   }
+
   @Test
   public void testFile() throws IOException {
     File value = new File("tmp");
@@ -189,6 +198,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.io.File", type);
   }
+
   @Test
   public void testInetAddress() throws IOException {
     InetAddress value = InetAddress.getLocalHost();
@@ -199,6 +209,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.net.InetAddress", type);
   }
+
   @Test
   public void testBoolean() throws IOException {
     Boolean value = Boolean.TRUE;
@@ -209,6 +220,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Boolean", type);
   }
+
   @Test
   public void testCharacter() throws IOException {
     Character value = Character.valueOf('c');
@@ -219,9 +231,10 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Character", type);
   }
+
   @Test
   public void testByte() throws IOException {
-    Byte value = Byte.valueOf((byte)0);
+    Byte value = Byte.valueOf((byte) 0);
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     DataSerializer.writeObject(value, out);
@@ -229,9 +242,10 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Byte", type);
   }
+
   @Test
   public void testShort() throws IOException {
-    Short value = Short.valueOf((short)1);
+    Short value = Short.valueOf((short) 1);
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     DataSerializer.writeObject(value, out);
@@ -239,6 +253,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Short", type);
   }
+
   @Test
   public void testInteger() throws IOException {
     Integer value = Integer.valueOf(1);
@@ -249,6 +264,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Integer", type);
   }
+
   @Test
   public void testLong() throws IOException {
     Long value = Long.valueOf(1);
@@ -259,9 +275,10 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Long", type);
   }
+
   @Test
   public void testFloat() throws IOException {
-    Float value = Float.valueOf((float)1.0);
+    Float value = Float.valueOf((float) 1.0);
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     DataSerializer.writeObject(value, out);
@@ -269,9 +286,10 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Float", type);
   }
+
   @Test
   public void testDouble() throws IOException {
-    Double value = Double.valueOf((double)1.0);
+    Double value = Double.valueOf((double) 1.0);
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     DataSerializer.writeObject(value, out);
@@ -279,6 +297,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Double", type);
   }
+
   @Test
   public void testByteArray() throws IOException {
     byte[] value = new byte[10];
@@ -289,6 +308,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("byte[]", type);
   }
+
   @Test
   public void testByteArrays() throws IOException {
     byte[][] value = new byte[1][1];
@@ -299,6 +319,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("byte[][]", type);
   }
+
   @Test
   public void testShortArray() throws IOException {
     short[] value = new short[1];
@@ -309,6 +330,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("short[]", type);
   }
+
   @Test
   public void testStringArray() throws IOException {
     String[] value = new String[1];
@@ -319,6 +341,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.String[]", type);
   }
+
   @Test
   public void testIntArray() throws IOException {
     int[] value = new int[1];
@@ -329,6 +352,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("int[]", type);
   }
+
   @Test
   public void testFloatArray() throws IOException {
     float[] value = new float[1];
@@ -339,6 +363,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("float[]", type);
   }
+
   @Test
   public void testLongArray() throws IOException {
     long[] value = new long[1];
@@ -349,6 +374,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("long[]", type);
   }
+
   @Test
   public void testDoubleArray() throws IOException {
     double[] value = new double[1];
@@ -359,6 +385,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("double[]", type);
   }
+
   @Test
   public void testBooleanArray() throws IOException {
     boolean[] value = new boolean[1];
@@ -369,6 +396,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("boolean[]", type);
   }
+
   @Test
   public void testCharArray() throws IOException {
     char[] value = new char[1];
@@ -379,6 +407,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("char[]", type);
   }
+
   @Test
   public void testObjectArray() throws IOException {
     Object[] value = new Object[1];
@@ -389,6 +418,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Object[]", type);
   }
+
   @Test
   public void testArrayList() throws IOException {
     ArrayList<Object> value = new ArrayList<Object>();
@@ -399,6 +429,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.ArrayList", type);
   }
+
   @Test
   public void testLinkedList() throws IOException {
     LinkedList<Object> value = new LinkedList<Object>();
@@ -409,6 +440,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.LinkedList", type);
   }
+
   @Test
   public void testHashSet() throws IOException {
     HashSet<Object> value = new HashSet<Object>();
@@ -419,6 +451,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.HashSet", type);
   }
+
   @Test
   public void testLinkedHashSet() throws IOException {
     LinkedHashSet<Object> value = new LinkedHashSet<Object>();
@@ -429,9 +462,10 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.LinkedHashSet", type);
   }
+
   @Test
   public void testHashMap() throws IOException {
-    HashMap<Object,Object> value = new HashMap<Object,Object>();
+    HashMap<Object, Object> value = new HashMap<Object, Object>();
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     DataSerializer.writeObject(value, out);
@@ -439,9 +473,10 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.HashMap", type);
   }
+
   @Test
   public void testIdentityHashMap() throws IOException {
-    IdentityHashMap<Object,Object> value = new IdentityHashMap<Object,Object>();
+    IdentityHashMap<Object, Object> value = new IdentityHashMap<Object, Object>();
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     DataSerializer.writeObject(value, out);
@@ -449,9 +484,10 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.IdentityHashMap", type);
   }
+
   @Test
   public void testHashtable() throws IOException {
-    Hashtable<Object,Object> value = new Hashtable<Object,Object>();
+    Hashtable<Object, Object> value = new Hashtable<Object, Object>();
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     DataSerializer.writeObject(value, out);
@@ -459,9 +495,10 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.Hashtable", type);
   }
+
   @Test
   public void testConcurrentHashMap() throws IOException { // java.io.Serializable (broken)
-    ConcurrentHashMap<Object,Object> value = new ConcurrentHashMap<Object,Object>();
+    ConcurrentHashMap<Object, Object> value = new ConcurrentHashMap<Object, Object>();
     value.put("key1", "value1");
     value.put("key2", "value2");
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -472,6 +509,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.io.Serializable:java.util.concurrent.ConcurrentHashMap", type);
   }
+
   @Test
   public void testProperties() throws IOException {
     Properties value = new Properties();
@@ -482,10 +520,11 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.Properties", type);
   }
+
   @Test
   public void testTimeUnit() throws IOException {
     final EnumSet<TimeUnit> optimizedTimeUnits = EnumSet.range(TimeUnit.NANOSECONDS, TimeUnit.SECONDS);
-    for (TimeUnit v: TimeUnit.values()) {
+    for (TimeUnit v : TimeUnit.values()) {
       ByteArrayOutputStream baos = new ByteArrayOutputStream();
       DataOutputStream out = new DataOutputStream(baos);
       DataSerializer.writeObject(v, out);
@@ -498,6 +537,7 @@ public class DataTypeJUnitTest {
       }
     }
   }
+
   @Test
   public void testVector() throws IOException {
     Vector<Object> value = new Vector<Object>();
@@ -508,6 +548,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.Vector", type);
   }
+
   @Test
   public void testStack() throws IOException {
     Stack<Object> value = new Stack<Object>();
@@ -518,9 +559,10 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.Stack", type);
   }
+
   @Test
   public void testTreeMap() throws IOException {
-    TreeMap<Object,Object> value = new TreeMap<Object,Object>();
+    TreeMap<Object, Object> value = new TreeMap<Object, Object>();
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     DataSerializer.writeObject(value, out);
@@ -528,6 +570,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.TreeMap", type);
   }
+
   @Test
   public void testTreeSet() throws IOException {
     TreeSet<Object> value = new TreeSet<Object>();
@@ -538,6 +581,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.TreeSet", type);
   }
+
   @Test
   public void testBooleanType() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -547,6 +591,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Boolean.class", type);
   }
+
   @Test
   public void testCharacterType() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -556,6 +601,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Character.class", type);
   }
+
   @Test
   public void testByteType() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -565,6 +611,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Byte.class", type);
   }
+
   @Test
   public void testShortType() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -574,6 +621,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Short.class", type);
   }
+
   @Test
   public void testIntegerType() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -583,6 +631,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Integer.class", type);
   }
+
   @Test
   public void testLongType() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -592,6 +641,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Long.class", type);
   }
+
   @Test
   public void testFloatType() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -601,6 +651,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Float.class", type);
   }
+
   @Test
   public void testDoubleType() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -610,6 +661,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Double.class", type);
   }
+
   @Test
   public void testVoidType() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -619,6 +671,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.lang.Void.class", type);
   }
+
   //TODO: these tests have to corrected once USER_CLASS, USER_CLASS_2, USER_CLASS_4 are implemented.
   @Test
   public void getDataTypeShouldReturnUserClass() throws IOException {
@@ -631,6 +684,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertThat(type).isEqualTo("DataSerializer: with Id:" + someUserClassId);
   }
+
   @Test
   public void getDataTypeShouldReturnUserClass2() throws IOException {
     short someUserClass2Id = 1;
@@ -642,6 +696,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertThat(type).isEqualTo("DataSerializer: with Id:" + someUserClass2Id);
   }
+
   @Test
   public void getDataTypeShouldReturnUserClass4() throws IOException {
     int someUserClass4Id = 1;
@@ -653,72 +708,76 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertThat(type).isEqualTo("DataSerializer: with Id:" + someUserClass4Id);
   }
+
   @Test
   public void getDataTypeShouldReturnUserDataSeriazliable() throws IOException {
     Instantiator mockInstantiator = PowerMockito.mock(Instantiator.class);
     doReturn(CustId.class).when(mockInstantiator).getInstantiatedClass();
     mockInstantiator.getInstantiatedClass();
-    
+
     int someClassId = 1;
-    
+
     PowerMockito.mockStatic(InternalInstantiator.class);
     when(InternalInstantiator.getClassId(mockInstantiator.getClass())).thenReturn(someClassId);
     when(InternalInstantiator.getInstantiator(someClassId)).thenReturn(mockInstantiator);
-        
+
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     out.writeByte(DSCODE.USER_DATA_SERIALIZABLE);
     out.writeByte(someClassId);
-    
+
     byte[] bytes = baos.toByteArray();
     String type = DataType.getDataType(bytes);
-    
+
     assertThat(type).isEqualTo("com.gemstone.gemfire.Instantiator:com.gemstone.gemfire.internal.cache.execute.data.CustId");
   }
+
   @Test
   public void getDataTypeShouldReturnUserDataSeriazliable2() throws IOException {
     Instantiator mockInstantiator = PowerMockito.mock(Instantiator.class);
     doReturn(CustId.class).when(mockInstantiator).getInstantiatedClass();
     mockInstantiator.getInstantiatedClass();
-    
+
     int someClassId = 1;
-    
+
     PowerMockito.mockStatic(InternalInstantiator.class);
     when(InternalInstantiator.getClassId(mockInstantiator.getClass())).thenReturn(someClassId);
     when(InternalInstantiator.getInstantiator(someClassId)).thenReturn(mockInstantiator);
-        
+
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     out.writeByte(DSCODE.USER_DATA_SERIALIZABLE_2);
     out.writeShort(someClassId);
-    
+
     byte[] bytes = baos.toByteArray();
     String type = DataType.getDataType(bytes);
-    
+
     assertThat(type).isEqualTo("com.gemstone.gemfire.Instantiator:com.gemstone.gemfire.internal.cache.execute.data.CustId");
   }
+
   @Test
   public void getDataTypeShouldReturnUserDataSeriazliable4() throws IOException {
     Instantiator mockInstantiator = PowerMockito.mock(Instantiator.class);
     doReturn(CustId.class).when(mockInstantiator).getInstantiatedClass();
     mockInstantiator.getInstantiatedClass();
-    
+
     int someClassId = 1;
-    
+
     PowerMockito.mockStatic(InternalInstantiator.class);
     when(InternalInstantiator.getClassId(mockInstantiator.getClass())).thenReturn(someClassId);
     when(InternalInstantiator.getInstantiator(someClassId)).thenReturn(mockInstantiator);
-        
+
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     out.writeByte(DSCODE.USER_DATA_SERIALIZABLE_4);
     out.writeInt(someClassId);
-    
+
     byte[] bytes = baos.toByteArray();
     String type = DataType.getDataType(bytes);
-    
+
     assertThat(type).isEqualTo("com.gemstone.gemfire.Instantiator:com.gemstone.gemfire.internal.cache.execute.data.CustId");
   }
+
   @Test
   public void testDataSerializable() throws IOException {
     DataSerializableImpl value = new DataSerializableImpl(new Random());
@@ -729,6 +788,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("com.gemstone.gemfire.DataSerializable:" + DataSerializableImpl.class.getName(), type);
   }
+
   @Test
   public void testSerializable() throws IOException {
     SerializableClass value = new SerializableClass();
@@ -739,9 +799,11 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.io.Serializable:" + SerializableClass.class.getName(), type);
   }
+
   @SuppressWarnings("serial")
   public static class SerializableClass implements Serializable {
   }
+
   @Test
   public void getDataTypeShouldReturnPDXType() throws IOException {
     int somePdxTypeInt = 1;
@@ -766,11 +828,12 @@ public class DataTypeJUnitTest {
 
     assertThat(type).isEqualTo("com.gemstone.gemfire.pdx.PdxInstance:PDXType");
   }
+
   @Test
   public void getDataTypeShouldReturnUnknownIfPDXTypeIsNull() throws IOException {
     int somePdxTypeInt = 1;
     PdxType somePdxType = null;
-    
+
     TypeRegistry mockTypeRegistry = mock(TypeRegistry.class);
     when(mockTypeRegistry.getType(somePdxTypeInt)).thenReturn(somePdxType);
 
@@ -787,8 +850,9 @@ public class DataTypeJUnitTest {
     byte[] bytes = baos.toByteArray();
     String type = DataType.getDataType(bytes);
 
-    assertThat(type).isEqualTo("com.gemstone.gemfire.pdx.PdxInstance: unknown id="+somePdxTypeInt);
+    assertThat(type).isEqualTo("com.gemstone.gemfire.pdx.PdxInstance: unknown id=" + somePdxTypeInt);
   }
+
   @Test
   public void getDataTypeShouldReturnPDXRegistryClosedForPDXTypeWhenCacheIsClosed() throws IOException {
     int somePdxTypeInt = 1;
@@ -805,6 +869,7 @@ public class DataTypeJUnitTest {
 
     assertThat(type).isEqualTo("com.gemstone.gemfire.pdx.PdxInstance:PdxRegistryClosed");
   }
+
   @Test
   public void getDataTypeShouldReturnPDXEnumType() throws IOException {
     int somePdxEnumId = 1;
@@ -829,6 +894,7 @@ public class DataTypeJUnitTest {
 
     assertThat(type).isEqualTo("PdxRegistry/java.lang.Enum:PDXENUM");
   }
+
   @Test
   public void getDataTypeShouldReturnPDXRegistryClosedForEnumTypeWhenCacheIsClosed() throws IOException {
     int someArrayLength = 1;
@@ -845,6 +911,7 @@ public class DataTypeJUnitTest {
 
     assertThat(type).isEqualTo("PdxRegistry/java.lang.Enum:PdxRegistryClosed");
   }
+
   @Test
   public void getDataTypeShouldReturnGemfireEnum() throws IOException {
     PowerMockito.mockStatic(DataSerializer.class);
@@ -858,6 +925,7 @@ public class DataTypeJUnitTest {
 
     assertThat(type).isEqualTo("java.lang.Enum:GEMFIRE_ENUM");
   }
+
   // TODO:PDX_INLINE_ENUM
   @Test
   public void testBigInteger() throws IOException {
@@ -869,6 +937,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.math.BigInteger", type);
   }
+
   @Test
   public void testBigDecimal() throws IOException {
     BigDecimal value = BigDecimal.ZERO;
@@ -879,6 +948,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.math.BigDecimal", type);
   }
+
   @Test
   public void testUUID() throws IOException {
     UUID value = new UUID(Long.MAX_VALUE, Long.MIN_VALUE);
@@ -889,6 +959,7 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.util.UUID", type);
   }
+
   @Test
   public void testSQLTimestamp() throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -898,10 +969,11 @@ public class DataTypeJUnitTest {
     String type = DataType.getDataType(bytes);
     assertEquals("java.sql.Timestamp", type);
   }
+
   @Test
   public void testUnknownHeaderType() throws IOException {
     byte unknownType = 0;
-    
+
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream out = new DataOutputStream(baos);
     out.writeByte(unknownType);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/DisconnectingOutOfOffHeapMemoryListenerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/DisconnectingOutOfOffHeapMemoryListenerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/DisconnectingOutOfOffHeapMemoryListenerJUnitTest.java
index 671a2b5..05725e4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/DisconnectingOutOfOffHeapMemoryListenerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/DisconnectingOutOfOffHeapMemoryListenerJUnitTest.java
@@ -32,14 +32,15 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class DisconnectingOutOfOffHeapMemoryListenerJUnitTest {
-  @Rule
-  public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
-  
+
   private final InternalDistributedSystem ids = mock(InternalDistributedSystem.class);
   private final OutOfOffHeapMemoryException ex = new OutOfOffHeapMemoryException();
   private final LogWriter lw = mock(LogWriter.class);
   private final DM dm = mock(DM.class);
 
+  @Rule
+  public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
+  
   @Before
   public void setUp() throws Exception {
     when(ids.getLogWriter()).thenReturn(lw);
@@ -81,6 +82,7 @@ public class DisconnectingOutOfOffHeapMemoryListenerJUnitTest {
     listener.outOfOffHeapMemory(ex);
     verify(dm).setRootCause(ex);
   }
+
   @Test
   public void setRootCauseNotCalledWhenGetRootCauseReturnsNonNull() {
     DisconnectingOutOfOffHeapMemoryListener listener = new DisconnectingOutOfOffHeapMemoryListener(ids);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FragmentJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FragmentJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FragmentJUnitTest.java
index 569b003..eac234b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FragmentJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FragmentJUnitTest.java
@@ -14,19 +14,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.offheap;
 
-import static org.junit.Assert.*;
 import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.*;
 
 import java.util.Arrays;
 
 import org.assertj.core.api.JUnitSoftAssertions;
 import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Before;
-import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -39,25 +36,12 @@ public class FragmentJUnitTest {
 
   private SlabImpl[] slabs;
 
-  static {
-    ClassLoader.getSystemClassLoader().setDefaultAssertionStatus(true);
-  }
-  
   @Rule
   public ExpectedException expectedException = ExpectedException.none();
   
   @Rule
   public JUnitSoftAssertions softly = new JUnitSoftAssertions();
 
-
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception {
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception {
-  }
-
   @Before
   public void setUp() throws Exception {
     SlabImpl slab1 = new SlabImpl((int)OffHeapStorage.MIN_SLAB_SIZE);
@@ -71,15 +55,14 @@ public class FragmentJUnitTest {
       slabs[i].free();
     }
   }
-  
-  
+
   @Test
   public void fragmentConstructorThrowsExceptionForNon8ByteAlignedAddress() {
-      expectedException.expect(IllegalStateException.class);
-      expectedException.expectMessage("address was not 8 byte aligned");
+    expectedException.expect(IllegalStateException.class);
+    expectedException.expectMessage("address was not 8 byte aligned");
 
-      new Fragment(slabs[0].getMemoryAddress() + 2, 0);
-      fail("Constructor failed to throw exception for non-8-byte alignment");
+    new Fragment(slabs[0].getMemoryAddress() + 2, 0);
+    fail("Constructor failed to throw exception for non-8-byte alignment");
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
index 28ff3ac..4cf1df0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
@@ -16,10 +16,10 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
 import static com.googlecode.catchexception.CatchException.*;
 import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.*;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -27,10 +27,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray;
 
 import org.apache.logging.log4j.Logger;
 import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -38,23 +35,11 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class FreeListManagerTest {
-  static {
-    ClassLoader.getSystemClassLoader().setDefaultAssertionStatus(true);
-  }
 
   private final int DEFAULT_SLAB_SIZE = 1024*1024*5;
   private final MemoryAllocatorImpl ma = mock(MemoryAllocatorImpl.class);
   private final OffHeapMemoryStats stats = mock(OffHeapMemoryStats.class);
   private TestableFreeListManager freeListManager;
-  
-
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception {
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception {
-  }
 
   @Before
   public void setUp() throws Exception {
@@ -829,9 +814,11 @@ public class FreeListManagerTest {
    */
   private static class TestableFragment extends Fragment {
     private boolean allocateCalled = false;
+
     public TestableFragment(long addr, int size) {
       super(addr, size);
     }
+
     @Override
     public boolean allocate(int oldOffset, int newOffset) {
       if (!allocateCalled) {
@@ -841,9 +828,15 @@ public class FreeListManagerTest {
       return super.allocate(oldOffset, newOffset);
     }
   }
+
   private static class TestableFreeListManager extends FreeListManager {
     private boolean firstTime = true;
-    
+    private boolean firstDefragmentation = true;
+
+    public TestableFreeListManager(MemoryAllocatorImpl ma, Slab[] slabs) {
+      super(ma, slabs);
+    }
+
     @Override
     protected Fragment createFragment(long addr, int size) {
       return new TestableFragment(addr, size);
@@ -861,7 +854,6 @@ public class FreeListManagerTest {
       return super.createFreeListForEmptySlot(freeLists, idx);
     }
 
-    public boolean firstDefragmentation = true;
     @Override
     protected void afterDefragmentationCountFetched() {
       if (this.firstDefragmentation) {
@@ -871,9 +863,5 @@ public class FreeListManagerTest {
       }
     }
     
-    public TestableFreeListManager(MemoryAllocatorImpl ma, Slab[] slabs) {
-      super(ma, slabs);
-    }
-    
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/LifecycleListenerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/LifecycleListenerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/LifecycleListenerJUnitTest.java
index 71d33ab..890bbf3 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/LifecycleListenerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/LifecycleListenerJUnitTest.java
@@ -16,16 +16,12 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
-import java.io.PrintWriter;
-import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.junit.After;
-import org.junit.Assert;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.contrib.java.lang.system.RestoreSystemProperties;
@@ -35,18 +31,18 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Tests LifecycleListener
- * 
  */
 @Category(UnitTest.class)
 public class LifecycleListenerJUnitTest {
-  @Rule
-  public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
 
   private final List<LifecycleListenerCallback> afterCreateCallbacks = new ArrayList<LifecycleListenerCallback>();
   private final List<LifecycleListenerCallback> afterReuseCallbacks = new ArrayList<LifecycleListenerCallback>();
   private final List<LifecycleListenerCallback> beforeCloseCallbacks = new ArrayList<LifecycleListenerCallback>();
   private final TestLifecycleListener listener = new TestLifecycleListener(this.afterCreateCallbacks, this.afterReuseCallbacks, this.beforeCloseCallbacks);
 
+  @Rule
+  public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
+
   @After
   public void tearDown() throws Exception {
     LifecycleListener.removeLifecycleListener(this.listener);
@@ -65,15 +61,15 @@ public class LifecycleListenerJUnitTest {
     MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(),
         new SlabImpl[] { slab });
 
-    Assert.assertEquals(0, this.afterCreateCallbacks.size());
-    Assert.assertEquals(0, this.afterReuseCallbacks.size());
-    Assert.assertEquals(0, this.beforeCloseCallbacks.size());
+    assertEquals(0, this.afterCreateCallbacks.size());
+    assertEquals(0, this.afterReuseCallbacks.size());
+    assertEquals(0, this.beforeCloseCallbacks.size());
 
     ma.close();
 
-    Assert.assertEquals(0, this.afterCreateCallbacks.size());
-    Assert.assertEquals(0, this.afterReuseCallbacks.size());
-    Assert.assertEquals(0, this.beforeCloseCallbacks.size());
+    assertEquals(0, this.afterCreateCallbacks.size());
+    assertEquals(0, this.afterReuseCallbacks.size());
+    assertEquals(0, this.beforeCloseCallbacks.size());
 
     LifecycleListener.removeLifecycleListener(this.listener);
   }
@@ -85,22 +81,21 @@ public class LifecycleListenerJUnitTest {
     MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(),
         new SlabImpl[] { slab });
 
-    Assert.assertEquals(1, this.afterCreateCallbacks.size());
-    Assert.assertEquals(0, this.afterReuseCallbacks.size());
-    Assert.assertEquals(0, this.beforeCloseCallbacks.size());
+    assertEquals(1, this.afterCreateCallbacks.size());
+    assertEquals(0, this.afterReuseCallbacks.size());
+    assertEquals(0, this.beforeCloseCallbacks.size());
 
     closeAndFree(ma);
 
-    Assert.assertEquals(1, this.afterCreateCallbacks.size());
-    Assert.assertEquals(0, this.afterReuseCallbacks.size());
-    Assert.assertEquals(1, this.beforeCloseCallbacks.size());
+    assertEquals(1, this.afterCreateCallbacks.size());
+    assertEquals(0, this.afterReuseCallbacks.size());
+    assertEquals(1, this.beforeCloseCallbacks.size());
     
     LifecycleListener.removeLifecycleListener(this.listener);
   }
 
   @Test
   public void testCallbacksAreCalledAfterReuse() {
-
     LifecycleListener.addLifecycleListener(this.listener);
 
     System.setProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "false");
@@ -108,34 +103,34 @@ public class LifecycleListenerJUnitTest {
     SlabImpl slab = new SlabImpl(1024); // 1k
     MemoryAllocatorImpl ma = createAllocator(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
 
-    Assert.assertEquals(1, this.afterCreateCallbacks.size());
-    Assert.assertEquals(0, this.afterReuseCallbacks.size());
-    Assert.assertEquals(0, this.beforeCloseCallbacks.size());
+    assertEquals(1, this.afterCreateCallbacks.size());
+    assertEquals(0, this.afterReuseCallbacks.size());
+    assertEquals(0, this.beforeCloseCallbacks.size());
 
     ma.close();
 
-    Assert.assertEquals(1, this.afterCreateCallbacks.size());
-    Assert.assertEquals(0, this.afterReuseCallbacks.size());
-    Assert.assertEquals(1, this.beforeCloseCallbacks.size());
+    assertEquals(1, this.afterCreateCallbacks.size());
+    assertEquals(0, this.afterReuseCallbacks.size());
+    assertEquals(1, this.beforeCloseCallbacks.size());
 
     ma = createAllocator(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), null);
 
-    Assert.assertEquals(1, this.afterCreateCallbacks.size());
-    Assert.assertEquals(1, this.afterReuseCallbacks.size());
-    Assert.assertEquals(1, this.beforeCloseCallbacks.size());
+    assertEquals(1, this.afterCreateCallbacks.size());
+    assertEquals(1, this.afterReuseCallbacks.size());
+    assertEquals(1, this.beforeCloseCallbacks.size());
 
     MemoryAllocatorImpl ma2 = createAllocator(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
     assertEquals(null, ma2);
     
-    Assert.assertEquals(1, this.afterCreateCallbacks.size());
-    Assert.assertEquals(1, this.afterReuseCallbacks.size());
-    Assert.assertEquals(1, this.beforeCloseCallbacks.size());
+    assertEquals(1, this.afterCreateCallbacks.size());
+    assertEquals(1, this.afterReuseCallbacks.size());
+    assertEquals(1, this.beforeCloseCallbacks.size());
 
     ma.close();
 
-    Assert.assertEquals(1, this.afterCreateCallbacks.size());
-    Assert.assertEquals(1, this.afterReuseCallbacks.size());
-    Assert.assertEquals(2, this.beforeCloseCallbacks.size());
+    assertEquals(1, this.afterCreateCallbacks.size());
+    assertEquals(1, this.afterReuseCallbacks.size());
+    assertEquals(2, this.beforeCloseCallbacks.size());
   }
 
   private MemoryAllocatorImpl createAllocator(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats ohms, SlabImpl[] slab) {
@@ -157,37 +152,36 @@ public class LifecycleListenerJUnitTest {
   
   @Test
   public void testCallbacksAreCalledAfterReuseWithFreeTrue() {
-
     LifecycleListener.addLifecycleListener(this.listener);
 
     SlabImpl slab = new SlabImpl(1024); // 1k
     MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
 
-    Assert.assertEquals(1, this.afterCreateCallbacks.size());
-    Assert.assertEquals(0, this.afterReuseCallbacks.size());
-    Assert.assertEquals(0, this.beforeCloseCallbacks.size());
+    assertEquals(1, this.afterCreateCallbacks.size());
+    assertEquals(0, this.afterReuseCallbacks.size());
+    assertEquals(0, this.beforeCloseCallbacks.size());
 
     closeAndFree(ma);
 
-    Assert.assertEquals(1, this.afterCreateCallbacks.size());
-    Assert.assertEquals(0, this.afterReuseCallbacks.size());
-    Assert.assertEquals(1, this.beforeCloseCallbacks.size());
+    assertEquals(1, this.afterCreateCallbacks.size());
+    assertEquals(0, this.afterReuseCallbacks.size());
+    assertEquals(1, this.beforeCloseCallbacks.size());
 
     slab = new SlabImpl(1024); // 1k
     MemoryAllocatorImpl ma2 = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
 
-    Assert.assertEquals(2, this.afterCreateCallbacks.size());
-    Assert.assertEquals(0, this.afterReuseCallbacks.size());
-    Assert.assertEquals(1, this.beforeCloseCallbacks.size());
+    assertEquals(2, this.afterCreateCallbacks.size());
+    assertEquals(0, this.afterReuseCallbacks.size());
+    assertEquals(1, this.beforeCloseCallbacks.size());
 
     closeAndFree(ma);
 
-    Assert.assertEquals(2, this.afterCreateCallbacks.size());
-    Assert.assertEquals(0, this.afterReuseCallbacks.size());
-    Assert.assertEquals(2, this.beforeCloseCallbacks.size());
+    assertEquals(2, this.afterCreateCallbacks.size());
+    assertEquals(0, this.afterReuseCallbacks.size());
+    assertEquals(2, this.beforeCloseCallbacks.size());
   }
 
-  static final class LifecycleListenerCallback {
+  private static final class LifecycleListenerCallback {
     private final MemoryAllocatorImpl allocator;
     private final long timeStamp;
     private final Throwable creationTime;
@@ -199,7 +193,7 @@ public class LifecycleListenerJUnitTest {
     }
   }
 
-  static class TestLifecycleListener implements LifecycleListener {
+  private static class TestLifecycleListener implements LifecycleListener {
     private final List<LifecycleListenerCallback> afterCreateCallbacks;
     private final List<LifecycleListenerCallback> afterReuseCallbacks;
     private final List<LifecycleListenerCallback> beforeCloseCallbacks;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
index 0762d67..be1fcad 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
@@ -16,8 +16,8 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import static org.junit.Assert.*;
 import static com.googlecode.catchexception.CatchException.*;
+import static org.junit.Assert.*;
 
 import org.junit.After;
 import org.junit.Before;
@@ -26,8 +26,6 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 /**
  * Tests fill pattern validation for the {@link MemoryAllocatorImpl}.
  */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
index 582e8b9..a70fd8a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
@@ -31,17 +31,21 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.OutOfOffHeapMemoryException;
 import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.internal.logging.NullLogWriter;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class MemoryAllocatorJUnitTest {
+
+  private long expectedMemoryUsage;
+  private boolean memoryUsageEventReceived;
+
   @Rule
   public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
 
   private static int round(int multiple, int v) {
     return ((v+multiple-1)/multiple)*multiple;
   }
+
   @Test
   public void testNullGetAllocator() {
     try {
@@ -50,6 +54,7 @@ public class MemoryAllocatorJUnitTest {
     } catch (CacheClosedException expected) {
     }
   }
+
   @Test
   public void testConstructor() {
     try {
@@ -58,6 +63,7 @@ public class MemoryAllocatorJUnitTest {
     } catch (IllegalArgumentException expected) {
     }
   }
+
   @Test
   public void testCreate() {
     System.setProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "false");
@@ -149,6 +155,7 @@ public class MemoryAllocatorJUnitTest {
       assertTrue(stats.isClosed());
     }
   }
+
   @Test
   public void testBasics() {
     int BATCH_SIZE = 1;
@@ -254,6 +261,7 @@ public class MemoryAllocatorJUnitTest {
     MemoryAllocatorImpl.debugLog("test debug log", false);
     MemoryAllocatorImpl.debugLog("test debug log", true);
   }
+
   @Test
   public void testGetLostChunks() {
     SlabImpl slab = new SlabImpl(1024*1024);
@@ -264,6 +272,7 @@ public class MemoryAllocatorJUnitTest {
       MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
+
   @Test
   public void testFindSlab() {
     final int SLAB_SIZE = 1024*1024;
@@ -286,6 +295,7 @@ public class MemoryAllocatorJUnitTest {
       MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
+
   @Test
   public void testValidateAddressAndSize() {
     final int SLAB_SIZE = 1024*1024;
@@ -323,6 +333,7 @@ public class MemoryAllocatorJUnitTest {
       MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
+
   @Test
   public void testMemoryInspection() {
     final int SLAB_SIZE = 1024*1024;
@@ -502,8 +513,6 @@ public class MemoryAllocatorJUnitTest {
     }
   }
   
-  long expectedMemoryUsage;
-  boolean memoryUsageEventReceived;
   @Test
   public void testUsageEventListener() {
     final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
@@ -551,6 +560,7 @@ public class MemoryAllocatorJUnitTest {
       MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
+
   private void checkMcs(ArrayList<StoredObject> mcs) {
     for (StoredObject mc: mcs) {
       assertEquals(8+8, mc.getSize());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
index f0563ad..7648169 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.offheap;
 
 import static org.junit.Assert.*;
@@ -22,21 +21,18 @@ import static org.mockito.Mockito.*;
 
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
-import java.lang.ClassNotFoundException;
 import java.nio.ByteBuffer;
 
 import org.assertj.core.api.JUnitSoftAssertions;
 import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Before;
-import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
-import org.junit.contrib.java.lang.system.*;
+import org.junit.contrib.java.lang.system.ProvideSystemProperty;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.ExpectedException;
 
-import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.internal.DSCODE;
 import com.gemstone.gemfire.internal.cache.EntryEventImpl;
@@ -55,11 +51,8 @@ public class MemoryBlockNodeJUnitTest {
   };
   private StoredObject storedObject = null;
 
-  static {
-    ClassLoader.getSystemClassLoader().setDefaultAssertionStatus(true);
-  }
-  
-  @Rule public final ProvideSystemProperty myPropertyHasMyValue = new ProvideSystemProperty("gemfire.OFF_HEAP_DO_EXPENSIVE_VALIDATION", "true");
+  @Rule
+  public final ProvideSystemProperty myPropertyHasMyValue = new ProvideSystemProperty("gemfire.OFF_HEAP_DO_EXPENSIVE_VALIDATION", "true");
 
   @Rule
   public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
@@ -70,14 +63,6 @@ public class MemoryBlockNodeJUnitTest {
   @Rule
   public JUnitSoftAssertions softly = new JUnitSoftAssertions();
 
-  @BeforeClass
-  public static void setUpBeforeClass() {
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() {
-  }
-
   @Before
   public void setUp() {
     ooohml = mock(OutOfOffHeapMemoryListener.class);
@@ -89,16 +74,17 @@ public class MemoryBlockNodeJUnitTest {
   public void tearDown() {
     MemoryAllocatorImpl.freeOffHeapMemory();
   }
-  
-  protected Object getValue() {
+
+  private Object getValue() {
     return Long.valueOf(Long.MAX_VALUE);
   }
 
-  protected StoredObject createValueAsUnserializedStoredObject(Object value) {
+  private StoredObject createValueAsUnserializedStoredObject(Object value) {
     StoredObject createdObject = createValueAsUnserializedStoredObject(value, false);
     return createdObject;
   }
-  protected StoredObject createValueAsUnserializedStoredObject(Object value, boolean isCompressed) {
+
+  private StoredObject createValueAsUnserializedStoredObject(Object value, boolean isCompressed) {
     byte[] valueInByteArray;
     if (value instanceof Long) {
       valueInByteArray = convertValueToByteArray(value);
@@ -122,12 +108,12 @@ public class MemoryBlockNodeJUnitTest {
   }
 
 
-  protected StoredObject createValueAsSerializedStoredObject(Object value) {
+  private StoredObject createValueAsSerializedStoredObject(Object value) {
     StoredObject createdObject = createValueAsSerializedStoredObject(value, false);
     return createdObject;
   }
-  
-  protected StoredObject createValueAsSerializedStoredObject(Object value, boolean isCompressed) {
+
+  private StoredObject createValueAsSerializedStoredObject(Object value, boolean isCompressed) {
     byte[] valueInSerializedByteArray = EntryEventImpl.serialize(value);
 
     boolean isSerialized = true;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryInspectorImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryInspectorImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryInspectorImplJUnitTest.java
index b3eb01c..208743f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryInspectorImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryInspectorImplJUnitTest.java
@@ -16,25 +16,24 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import java.util.ArrayList;
 import java.util.List;
 
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- * Created by sbawaskar on 1/15/16.
- */
 @Category(UnitTest.class)
 public class MemoryInspectorImplJUnitTest {
+
   private FreeListManager freeList;
   private MemoryInspector inspector;
+
   @Before
   public void setUp() {
     this.freeList = mock(FreeListManager.class);
@@ -55,6 +54,7 @@ public class MemoryInspectorImplJUnitTest {
   public void getAllocatedBlocksBeforeCreateSnapshotReturnsEmptyList() {
     assertTrue(inspector.getAllocatedBlocks().isEmpty());
   }
+
   @Test
   public void getFirstBlockBeforeCreateSnapshotReturnsNull() {
     assertNull(inspector.getFirstBlock());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
index 595e132..6a9be63 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
@@ -31,15 +31,13 @@ import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.VMCachedDeserializable;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- */
 @Category(UnitTest.class)
 public class OffHeapHelperJUnitTest extends AbstractStoredObjectTestBase {
 
-  private StoredObject storedObject                 = null;
-  private Object                  deserializedRegionEntryValue = null;
-  private byte[]                  serializedRegionEntryValue   = null;
-  private MemoryAllocator         ma;
+  private StoredObject storedObject = null;
+  private Object deserializedRegionEntryValue = null;
+  private byte[] serializedRegionEntryValue   = null;
+  private MemoryAllocator ma;
 
   @Before
   public void setUp() {
@@ -47,7 +45,6 @@ public class OffHeapHelperJUnitTest extends AbstractStoredObjectTestBase {
     OffHeapMemoryStats stats = mock(OffHeapMemoryStats.class);
 
     ma = MemoryAllocatorImpl.create(ooohml, stats, 3, OffHeapStorage.MIN_SLAB_SIZE * 3, OffHeapStorage.MIN_SLAB_SIZE);
-
   }
 
   /**
@@ -79,7 +76,7 @@ public class OffHeapHelperJUnitTest extends AbstractStoredObjectTestBase {
   }
 
   @Override
-  public byte[] getValueAsByteArray() {
+  protected byte[] getValueAsByteArray() {
     return convertValueToByteArray(getValue());
   }
 
@@ -88,12 +85,12 @@ public class OffHeapHelperJUnitTest extends AbstractStoredObjectTestBase {
   }
 
   @Override
-  public Object convertByteArrayToObject(byte[] valueInByteArray) {
+  protected Object convertByteArrayToObject(byte[] valueInByteArray) {
     return ByteBuffer.wrap(valueInByteArray).getLong();
   }
 
   @Override
-  public Object convertSerializedByteArrayToObject(byte[] valueInSerializedByteArray) {
+  protected Object convertSerializedByteArrayToObject(byte[] valueInSerializedByteArray) {
     return EntryEventImpl.deserialize(valueInSerializedByteArray);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
index 5cb6afb..2f33927 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
@@ -16,13 +16,8 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.assertj.core.api.Assertions.*;
+import static org.mockito.Mockito.*;
 
 import java.nio.ByteBuffer;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
index 77b1d8d..2836a38 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
@@ -16,14 +16,9 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.contrib.java.lang.system.RestoreSystemProperties;
@@ -40,37 +35,34 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class OffHeapStorageJUnitTest {
-  @Rule
-  public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
 
   private final static long MEGABYTE = 1024 * 1024;
   private final static long GIGABYTE = 1024 * 1024 * 1024;
 
-  @Before
-  public void setUp() throws Exception {
-  }
-
-  @After
-  public void tearDown() throws Exception {
-  }
+  @Rule
+  public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
 
   @Test
   public void testParseOffHeapMemorySizeNegative() {
     assertEquals(0, OffHeapStorage.parseOffHeapMemorySize("-1"));
   }
+
   @Test
   public void testParseOffHeapMemorySizeNull() {
     assertEquals(0, OffHeapStorage.parseOffHeapMemorySize(null));
   }
+
   @Test
   public void testParseOffHeapMemorySizeEmpty() {
     assertEquals(0, OffHeapStorage.parseOffHeapMemorySize(""));
   }
+
   @Test
   public void testParseOffHeapMemorySizeBytes() {
     assertEquals(MEGABYTE, OffHeapStorage.parseOffHeapMemorySize("1"));
     assertEquals(Integer.MAX_VALUE * MEGABYTE, OffHeapStorage.parseOffHeapMemorySize("" + Integer.MAX_VALUE));
   }
+
   @Test
   public void testParseOffHeapMemorySizeKiloBytes() {
     try {
@@ -80,32 +72,35 @@ public class OffHeapStorageJUnitTest {
       // Expected
     }
   }
+
   @Test
   public void testParseOffHeapMemorySizeMegaBytes() {
     assertEquals(MEGABYTE, OffHeapStorage.parseOffHeapMemorySize("1m"));
     assertEquals(Integer.MAX_VALUE * MEGABYTE, OffHeapStorage.parseOffHeapMemorySize("" + Integer.MAX_VALUE + "m"));
   }
+
   @Test
   public void testParseOffHeapMemorySizeGigaBytes() {
     assertEquals(GIGABYTE, OffHeapStorage.parseOffHeapMemorySize("1g"));
     assertEquals(Integer.MAX_VALUE * GIGABYTE, OffHeapStorage.parseOffHeapMemorySize("" + Integer.MAX_VALUE + "g"));
   }
+
   @Test
   public void testCalcMaxSlabSize() {
     assertEquals(100, OffHeapStorage.calcMaxSlabSize(100L));
     assertEquals(Integer.MAX_VALUE, OffHeapStorage.calcMaxSlabSize(Long.MAX_VALUE));
     try {
       System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "99");
-      assertEquals(99*1024*1024, OffHeapStorage.calcMaxSlabSize(100L*1024*1024));
+      assertEquals(99 * 1024 * 1024, OffHeapStorage.calcMaxSlabSize(100L * 1024 * 1024));
       assertEquals(88, OffHeapStorage.calcMaxSlabSize(88));
       System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "88m");
-      assertEquals(88*1024*1024, OffHeapStorage.calcMaxSlabSize(100L*1024*1024));
+      assertEquals(88 * 1024 * 1024, OffHeapStorage.calcMaxSlabSize(100L * 1024 * 1024));
       System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "77M");
-      assertEquals(77*1024*1024, OffHeapStorage.calcMaxSlabSize(100L*1024*1024));
+      assertEquals(77 * 1024 * 1024, OffHeapStorage.calcMaxSlabSize(100L * 1024 * 1024));
       System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "1g");
-      assertEquals(1*1024*1024*1024, OffHeapStorage.calcMaxSlabSize(2L*1024*1024*1024));
+      assertEquals(1 * 1024 * 1024 * 1024, OffHeapStorage.calcMaxSlabSize(2L * 1024 * 1024 * 1024));
       System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "1G");
-      assertEquals(1L*1024*1024*1024, OffHeapStorage.calcMaxSlabSize(2L*1024*1024*1024+1));
+      assertEquals(1L * 1024 * 1024 * 1024, OffHeapStorage.calcMaxSlabSize(2L * 1024 * 1024 * 1024 + 1));
       System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "foobarG");
       try {
         OffHeapStorage.calcMaxSlabSize(100);
@@ -119,34 +114,38 @@ public class OffHeapStorageJUnitTest {
       System.clearProperty("gemfire.OFF_HEAP_SLAB_SIZE");
     }
   }
+
   @Test
   public void createOffHeapStorageReturnsNullIfForceLocator() {
     System.setProperty(InternalLocator.FORCE_LOCATOR_DM_TYPE, "true");
     assertEquals(null, OffHeapStorage.createOffHeapStorage(null, 1, null));
   }
+
   @Test
   public void createOffHeapStorageReturnsNullIfMemorySizeIsZero() {
     assertEquals(null, OffHeapStorage.createOffHeapStorage(null, 0, null));
   }
+
   @Test
   public void exceptionIfSlabCountTooSmall() {
     StatisticsFactory statsFactory = mock(StatisticsFactory.class);
     try {
-      OffHeapStorage.createOffHeapStorage(statsFactory, OffHeapStorage.MIN_SLAB_SIZE-1, null);
+      OffHeapStorage.createOffHeapStorage(statsFactory, OffHeapStorage.MIN_SLAB_SIZE - 1, null);
     } catch (IllegalArgumentException expected) {
-      expected.getMessage().equals("The amount of off heap memory must be at least " + OffHeapStorage.MIN_SLAB_SIZE + " but it was set to " + (OffHeapStorage.MIN_SLAB_SIZE-1));
+      expected.getMessage().equals("The amount of off heap memory must be at least " + OffHeapStorage.MIN_SLAB_SIZE + " but it was set to " + (OffHeapStorage.MIN_SLAB_SIZE - 1));
     }
   }
+
   @Test
   public void exceptionIfDistributedSystemNull() {
     StatisticsFactory statsFactory = mock(StatisticsFactory.class);
     try {
-      OffHeapStorage.createOffHeapStorage(statsFactory, OffHeapStorage.MIN_SLAB_SIZE, (DistributedSystem)null);
+      OffHeapStorage.createOffHeapStorage(statsFactory, OffHeapStorage.MIN_SLAB_SIZE, (DistributedSystem) null);
     } catch (IllegalArgumentException expected) {
       expected.getMessage().equals("InternalDistributedSystem is null");
     }
   }
-  
+
   @Test
   public void createOffHeapStorageWorks() {
     StatisticsFactory localStatsFactory = new LocalStatisticsFactory(null);
@@ -160,30 +159,30 @@ public class OffHeapStorageJUnitTest {
   public void testCreateOffHeapStorage() {
     StatisticsFactory localStatsFactory = new LocalStatisticsFactory(null);
     OutOfOffHeapMemoryListener ooohml = mock(OutOfOffHeapMemoryListener.class);
-    MemoryAllocator ma = OffHeapStorage.basicCreateOffHeapStorage(localStatsFactory, 1024*1024, ooohml);
+    MemoryAllocator ma = OffHeapStorage.basicCreateOffHeapStorage(localStatsFactory, 1024 * 1024, ooohml);
     try {
       OffHeapMemoryStats stats = ma.getStats();
       assertNotNull(stats.getStats());
-      assertEquals(1024*1024, stats.getFreeMemory());
-      assertEquals(1024*1024, stats.getMaxMemory());
+      assertEquals(1024 * 1024, stats.getFreeMemory());
+      assertEquals(1024 * 1024, stats.getMaxMemory());
       assertEquals(0, stats.getUsedMemory());
       assertEquals(0, stats.getDefragmentations());
       assertEquals(0, stats.getDefragmentationTime());
       assertEquals(0, stats.getFragmentation());
       assertEquals(1, stats.getFragments());
-      assertEquals(1024*1024, stats.getLargestFragment());
+      assertEquals(1024 * 1024, stats.getLargestFragment());
       assertEquals(0, stats.getObjects());
       assertEquals(0, stats.getReads());
 
       stats.incFreeMemory(100);
-      assertEquals(1024*1024+100, stats.getFreeMemory());
+      assertEquals(1024 * 1024 + 100, stats.getFreeMemory());
       stats.incFreeMemory(-100);
-      assertEquals(1024*1024, stats.getFreeMemory());
+      assertEquals(1024 * 1024, stats.getFreeMemory());
 
       stats.incMaxMemory(100);
-      assertEquals(1024*1024+100, stats.getMaxMemory());
+      assertEquals(1024 * 1024 + 100, stats.getMaxMemory());
       stats.incMaxMemory(-100);
-      assertEquals(1024*1024, stats.getMaxMemory());
+      assertEquals(1024 * 1024, stats.getMaxMemory());
 
       stats.incUsedMemory(100);
       assertEquals(100, stats.getUsedMemory());
@@ -210,8 +209,8 @@ public class OffHeapStorageJUnitTest {
 
       stats.setLargestFragment(100);
       assertEquals(100, stats.getLargestFragment());
-      stats.setLargestFragment(1024*1024);
-      assertEquals(1024*1024, stats.getLargestFragment());
+      stats.setLargestFragment(1024 * 1024);
+      assertEquals(1024 * 1024, stats.getLargestFragment());
 
       boolean originalEnableClockStats = DistributionStats.enableClockStats;
       DistributionStats.enableClockStats = true;
@@ -245,14 +244,14 @@ public class OffHeapStorageJUnitTest {
 
       OutOfOffHeapMemoryException ex = null;
       try {
-        ma.allocate(1024*1024+1);
+        ma.allocate(1024 * 1024 + 1);
         fail("expected OutOfOffHeapMemoryException");
       } catch (OutOfOffHeapMemoryException expected) {
         ex = expected;
       }
       verify(ooohml).outOfOffHeapMemory(ex);
       try {
-        ma.allocate(1024*1024+1);
+        ma.allocate(1024 * 1024 + 1);
         fail("expected OutOfOffHeapMemoryException");
       } catch (OutOfOffHeapMemoryException expected) {
         ex = expected;
@@ -268,16 +267,17 @@ public class OffHeapStorageJUnitTest {
       }
     }
   }
+
   @Test
   public void testCalcSlabCount() {
     final long MSS = OffHeapStorage.MIN_SLAB_SIZE;
-    assertEquals(100, OffHeapStorage.calcSlabCount(MSS*4, MSS*4*100));
-    assertEquals(100, OffHeapStorage.calcSlabCount(MSS*4, (MSS*4*100) + (MSS-1)));
-    assertEquals(101, OffHeapStorage.calcSlabCount(MSS*4, (MSS*4*100) + MSS));
+    assertEquals(100, OffHeapStorage.calcSlabCount(MSS * 4, MSS * 4 * 100));
+    assertEquals(100, OffHeapStorage.calcSlabCount(MSS * 4, (MSS * 4 * 100) + (MSS - 1)));
+    assertEquals(101, OffHeapStorage.calcSlabCount(MSS * 4, (MSS * 4 * 100) + MSS));
     assertEquals(Integer.MAX_VALUE, OffHeapStorage.calcSlabCount(MSS, MSS * Integer.MAX_VALUE));
-    assertEquals(Integer.MAX_VALUE, OffHeapStorage.calcSlabCount(MSS, (MSS * Integer.MAX_VALUE) + MSS-1));
+    assertEquals(Integer.MAX_VALUE, OffHeapStorage.calcSlabCount(MSS, (MSS * Integer.MAX_VALUE) + MSS - 1));
     try {
-      OffHeapStorage.calcSlabCount(MSS, (((long)MSS) * Integer.MAX_VALUE) + MSS);
+      OffHeapStorage.calcSlabCount(MSS, (((long) MSS) * Integer.MAX_VALUE) + MSS);
       fail("Expected IllegalArgumentException");
     } catch (IllegalArgumentException expected) {
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
index 1d19854..a6f7f07 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
@@ -20,11 +20,6 @@ import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.logging.log4j.Logger;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.mockito.listeners.InvocationListener;
@@ -34,25 +29,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class OffHeapStoredObjectAddressStackJUnitTest {
-  static {
-    ClassLoader.getSystemClassLoader().setDefaultAssertionStatus(true);
-  }
-
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception {
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception {
-  }
-
-  @Before
-  public void setUp() throws Exception {
-  }
-
-  @After
-  public void tearDown() throws Exception {
-  }
 
   @Test
   public void addressZeroCausesStackToBeEmpty() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
index 85c8d4c..23d72f5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
@@ -14,21 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.offheap;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -54,10 +44,6 @@ public class OffHeapStoredObjectJUnitTest extends AbstractStoredObjectTestBase {
 
   private MemoryAllocator ma;
 
-  static {
-    ClassLoader.getSystemClassLoader().setDefaultAssertionStatus(true);
-  }
-
   @Before
   public void setUp() {
     OutOfOffHeapMemoryListener ooohml = mock(OutOfOffHeapMemoryListener.class);



[13/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberJUnitTest.java
index 606ae1a..7eef594 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberJUnitTest.java
@@ -16,32 +16,32 @@
  */
 package com.gemstone.gemfire.distributed.internal.membership.gms;
 
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import java.net.InetAddress;
 
 import org.jgroups.util.UUID;
-import org.junit.Assert;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-@Category(UnitTest.class)
+@Category({ UnitTest.class, SecurityTest.class })
 public class GMSMemberJUnitTest {
 
   @Test
   public void testEqualsNotSameType() {
     GMSMember member = new GMSMember();
-    Assert.assertFalse(member.equals("Not a GMSMember"));
+    assertFalse(member.equals("Not a GMSMember"));
   }
   
   @Test
   public void testEqualsIsSame() {
     GMSMember member = new GMSMember();
-    Assert.assertTrue(member.equals(member));
+    assertTrue(member.equals(member));
   }
   
   @Test
@@ -49,7 +49,7 @@ public class GMSMemberJUnitTest {
     GMSMember member = new GMSMember();
     UUID uuid = new UUID(0, 0);
     member.setUUID(uuid);
-    Assert.assertEquals(0, member.compareTo(member));
+    assertEquals(0, member.compareTo(member));
   }
   
   private GMSMember createGMSMember(byte[] inetAddress, int viewId, long msb, long lsb) {
@@ -66,84 +66,85 @@ public class GMSMemberJUnitTest {
   public void testCompareToInetAddressIsLongerThan() {
     GMSMember member1 = createGMSMember(new byte[] {1, 1, 1, 1, 1}, 1, 1, 1);
     GMSMember member2 = createGMSMember(new byte[] {1, 1, 1, 1}, 1, 1, 1);
-    Assert.assertEquals(1, member1.compareTo(member2));
+    assertEquals(1, member1.compareTo(member2));
   }
   
   @Test
   public void testCompareToInetAddressIsShorterThan() {
     GMSMember member1 = createGMSMember(new byte[] {1, 1, 1, 1}, 1, 1, 1);
     GMSMember member2 = createGMSMember(new byte[] {1, 1, 1, 1, 1}, 1, 1, 1);
-    Assert.assertEquals(-1, member1.compareTo(member2));
+    assertEquals(-1, member1.compareTo(member2));
   }
   
   @Test
   public void testCompareToInetAddressIsGreater() {
     GMSMember member1 = createGMSMember(new byte[] {1, 2, 1, 1, 1}, 1, 1, 1);
     GMSMember member2 = createGMSMember(new byte[] {1, 1, 1, 1, 1}, 1, 1, 1);
-    Assert.assertEquals(1, member1.compareTo(member2));
+    assertEquals(1, member1.compareTo(member2));
   }
   
   @Test
   public void testCompareToInetAddressIsLessThan() {
     GMSMember member1 = createGMSMember(new byte[] {1, 1, 1, 1, 1}, 1, 1, 1);
     GMSMember member2 = createGMSMember(new byte[] {1, 2, 1, 1, 1}, 1, 1, 1);
-    Assert.assertEquals(-1, member1.compareTo(member2));
+    assertEquals(-1, member1.compareTo(member2));
   }
   
   @Test
   public void testCompareToMyViewIdLarger() {
     GMSMember member1 = createGMSMember(new byte[] {1}, 2, 1, 1);
     GMSMember member2 = createGMSMember(new byte[] {1}, 1, 1, 1);
-    Assert.assertEquals(1, member1.compareTo(member2));
+    assertEquals(1, member1.compareTo(member2));
   }
   
   @Test
   public void testCompareToTheirViewIdLarger() {
     GMSMember member1 = createGMSMember(new byte[] {1}, 1, 1, 1);
     GMSMember member2 = createGMSMember(new byte[] {1}, 2, 1, 1);
-    Assert.assertEquals(-1, member1.compareTo(member2));
+    assertEquals(-1, member1.compareTo(member2));
   }
   
   @Test
   public void testCompareToMyMSBLarger() {
     GMSMember member1 = createGMSMember(new byte[] {1}, 1, 2, 1);
     GMSMember member2 = createGMSMember(new byte[] {1}, 1, 1, 1);
-    Assert.assertEquals(1, member1.compareTo(member2));
+    assertEquals(1, member1.compareTo(member2));
   }
 
   @Test
   public void testCompareToTheirMSBLarger() {
     GMSMember member1 = createGMSMember(new byte[] {1}, 1, 1, 1);
     GMSMember member2 = createGMSMember(new byte[] {1}, 1, 2, 1);
-    Assert.assertEquals(-1, member1.compareTo(member2));
+    assertEquals(-1, member1.compareTo(member2));
   }
 
   @Test
   public void testCompareToMyLSBLarger() {
     GMSMember member1 = createGMSMember(new byte[] {1}, 1, 1, 2);
     GMSMember member2 = createGMSMember(new byte[] {1}, 1, 1, 1);
-    Assert.assertEquals(1, member1.compareTo(member2));
+    assertEquals(1, member1.compareTo(member2));
   }
   
   @Test
   public void testCompareToTheirLSBLarger() {
     GMSMember member1 = createGMSMember(new byte[] {1}, 1, 1, 1);
     GMSMember member2 = createGMSMember(new byte[] {1}, 1, 1, 2);
-    Assert.assertEquals(-1, member1.compareTo(member2));
+    assertEquals(-1, member1.compareTo(member2));
   }
 
-  
-  //Makes sure a NPE is not thrown
+  /**
+   * Makes sure a NPE is not thrown
+   */
   @Test
   public void testNoNPEWhenSetAttributesWithNull() {
     GMSMember member = new GMSMember();
     member.setAttributes(null);
     MemberAttributes attrs = member.getAttributes(); 
     MemberAttributes invalid = MemberAttributes.INVALID;
-    Assert.assertEquals(attrs.getVmKind(), invalid.getVmKind());
-    Assert.assertEquals(attrs.getPort(), invalid.getPort());
-    Assert.assertEquals(attrs.getVmViewId(), invalid.getVmViewId());
-    Assert.assertEquals(attrs.getName(), invalid.getName());
+    assertEquals(attrs.getVmKind(), invalid.getVmKind());
+    assertEquals(attrs.getPort(), invalid.getPort());
+    assertEquals(attrs.getVmViewId(), invalid.getVmViewId());
+    assertEquals(attrs.getName(), invalid.getName());
   }
   
   @Test
@@ -151,7 +152,7 @@ public class GMSMemberJUnitTest {
     GMSMember member = new GMSMember();
     UUID uuid = new UUID(0, 0);
     member.setUUID(uuid);
-    Assert.assertNull(member.getUUID());
+    assertNull(member.getUUID());
   }
   
   @Test
@@ -159,6 +160,6 @@ public class GMSMemberJUnitTest {
     GMSMember member = new GMSMember();
     UUID uuid = new UUID(1, 1);
     member.setUUID(uuid);
-    Assert.assertNotNull(member.getUUID());
+    assertNotNull(member.getUUID());
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
index 8246a43..022d1c7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
@@ -16,6 +16,18 @@
  */
 package com.gemstone.gemfire.distributed.internal.membership.gms.auth;
 
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+
+import java.security.Principal;
+import java.util.Properties;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
@@ -24,45 +36,34 @@ import com.gemstone.gemfire.security.AuthInitialize;
 import com.gemstone.gemfire.security.AuthenticationFailedException;
 import com.gemstone.gemfire.security.Authenticator;
 import com.gemstone.gemfire.security.GemFireSecurityException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import java.security.Principal;
-import java.util.Properties;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-import static org.junit.Assert.*;
-
-@Category(UnitTest.class)
+@Category({ UnitTest.class, SecurityTest.class })
 public class GMSAuthenticatorJUnitTest {
 
-  static String prefix = "com.gemstone.gemfire.distributed.internal.membership.gms.auth.GMSAuthenticatorJUnitTest$";
+  private String prefix;
+  private Properties props;
+  private Services services;
+  private GMSAuthenticator authenticator;
+  private DistributedMember member;
 
-  Properties originalSystemProps = null;
-  Properties props = null;
-  Services services = null;
-  GMSAuthenticator authenticator = null;
-  DistributedMember member = null;
+  @Rule
+  public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
 
   @Before
   public void setUp() throws Exception {
-    originalSystemProps = System.getProperties();
+    prefix = getClass().getName() + "$";
     props = new Properties();
     authenticator = new GMSAuthenticator();
+
     services = mock(Services.class);
     InternalLogWriter securityLog = mock(InternalLogWriter.class);
-    when(services.getSecurityLogWriter()).thenReturn(securityLog);
+    when(services.getSecurityLogWriter()).thenReturn(mock(InternalLogWriter.class));
+
     authenticator.init(services);
-    member = mock(DistributedMember.class);
-  }
 
-  @After
-  public void tearDown() throws Exception {
-    System.setProperties(originalSystemProps);
+    member = mock(DistributedMember.class);
   }
 
   @Test
@@ -126,12 +127,12 @@ public class GMSAuthenticatorJUnitTest {
     verifyNegativeGetCredential(props, "expected get credential error");
   }
 
-  void verifyNegativeGetCredential(Properties props, String expectedError) throws Exception {
+  private void verifyNegativeGetCredential(Properties props, String expectedError) throws Exception {
     try {
       authenticator.getCredentials(member, props);
       fail("should catch: " + expectedError);
-    } catch (GemFireSecurityException e) {
-      assertTrue(e.getMessage().startsWith(expectedError));
+    } catch (GemFireSecurityException expected) {
+      assertTrue(expected.getMessage().startsWith(expectedError));
     }
   }
 
@@ -149,8 +150,8 @@ public class GMSAuthenticatorJUnitTest {
 
   @Test
   public void testAuthenticatorWithNoAuth() throws Exception {
-      String result = authenticator.authenticate(member, props, props, member);
-      assertNull(result);
+    String result = authenticator.authenticate(member, props, props, member);
+    assertNull(result);
   }
 
   @Test
@@ -195,27 +196,29 @@ public class GMSAuthenticatorJUnitTest {
     assertTrue(result, result.startsWith(expectedError));
   }
 
-  // ----------------------------------------
-  //           Test AuthInitialize
-  // ----------------------------------------
-
-  public static class TestAuthInit1 implements AuthInitialize {
+  private static class TestAuthInit1 implements AuthInitialize {
     public static AuthInitialize create() {
       return null;
     }
+    @Override
     public void init(LogWriter systemLogger, LogWriter securityLogger) throws AuthenticationFailedException {
     }
-    public Properties getCredentials(Properties props, DistributedMember server, boolean isPeer)
-        throws AuthenticationFailedException {
+    @Override
+    public Properties getCredentials(Properties props, DistributedMember server, boolean isPeer) throws AuthenticationFailedException {
       throw new AuthenticationFailedException("expected get credential error");
     }
+    @Override
     public void close() {
     }
   }
 
-  public static class TestAuthInit2 extends TestAuthInit1 {
-    static TestAuthInit2 instance = null;
-    static int createCount = 0;
+  private static class TestAuthInit2 extends TestAuthInit1 {
+
+    private static TestAuthInit2 instance = null;
+    private static int createCount = 0;
+
+    boolean closed = false;
+
     public static void setAuthInitialize(TestAuthInit2 auth) {
       instance = auth;
     }
@@ -223,11 +226,11 @@ public class GMSAuthenticatorJUnitTest {
       createCount ++;
       return instance;
     }
-    public Properties getCredentials(Properties props, DistributedMember server, boolean isPeer)
-        throws AuthenticationFailedException {
+    @Override
+    public Properties getCredentials(Properties props, DistributedMember server, boolean isPeer) throws AuthenticationFailedException {
       return props;
     }
-    boolean closed = false;
+    @Override
     public void close() {
       closed = true;
     }
@@ -239,59 +242,66 @@ public class GMSAuthenticatorJUnitTest {
     }
   }
 
-  public static class TestAuthInit3 extends TestAuthInit1 {
+  // used by reflection by test
+  private static class TestAuthInit3 extends TestAuthInit1 {
     public static AuthInitialize create() {
       return new TestAuthInit3();
     }
+    @Override
     public void init(LogWriter systemLogger, LogWriter securityLogger) throws AuthenticationFailedException {
       throw new AuthenticationFailedException("expected init error");
     }
   }
 
-  public static class TestAuthInit4 extends TestAuthInit1 {
+  private static class TestAuthInit4 extends TestAuthInit1 {
     public static AuthInitialize create() {
       return new TestAuthInit4();
     }
   }
 
-  // ----------------------------------------
-  //          Test Authenticator
-  // ----------------------------------------
-
-  public static class TestAuthenticator1 implements Authenticator {
+  private static class TestAuthenticator1 implements Authenticator {
     public static Authenticator create() {
       return null;
     }
+    @Override
     public void init(Properties securityProps, LogWriter systemLogger, LogWriter securityLogger) throws AuthenticationFailedException {
     }
+    @Override
     public Principal authenticate(Properties props, DistributedMember member) throws AuthenticationFailedException {
       return null;
     }
+    @Override
     public void close() {
     }
   }
 
-  public static class TestAuthenticator2 extends TestAuthenticator1 {
+  private static class TestAuthenticator2 extends TestAuthenticator1 {
     public static Authenticator create() {
       return new TestAuthenticator2();
     }
+    @Override
     public void init(Properties securityProps, LogWriter systemLogger, LogWriter securityLogger) throws AuthenticationFailedException {
       throw new AuthenticationFailedException("expected init error");
     }
   }
 
-  public static class TestAuthenticator3 extends TestAuthenticator1 {
+  private static class TestAuthenticator3 extends TestAuthenticator1 {
     public static Authenticator create() {
       return new TestAuthenticator3();
     }
+    @Override
     public Principal authenticate(Properties props, DistributedMember member) throws AuthenticationFailedException {
       throw new AuthenticationFailedException("expected authenticate error");
     }
   }
 
-  public static class TestAuthenticator4 extends TestAuthenticator1 {
-    static Authenticator instance = null;
-    static int createCount = 0;
+  private static class TestAuthenticator4 extends TestAuthenticator1 {
+
+    private static Authenticator instance = null;
+    private static int createCount = 0;
+
+    private boolean closed = false;
+
     public static void setAuthenticator(Authenticator auth) {
       instance = auth;
     }
@@ -299,10 +309,11 @@ public class GMSAuthenticatorJUnitTest {
       createCount ++;
       return instance;
     }
+    @Override
     public Principal authenticate(Properties props, DistributedMember member) throws AuthenticationFailedException {
       return null;
     }
-    boolean closed = false;
+    @Override
     public void close() {
       closed = true;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
index 2d042fc..00d9d05 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
@@ -16,6 +16,20 @@
  */
 package com.gemstone.gemfire.distributed.internal.membership.gms.locator;
 
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
+import java.net.InetAddress;
+import java.util.Properties;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.InternalGemFireException;
 import com.gemstone.gemfire.distributed.Locator;
@@ -30,28 +44,12 @@ import com.gemstone.gemfire.distributed.internal.membership.MemberFactory;
 import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
 import com.gemstone.gemfire.distributed.internal.membership.NetView;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.OSProcess;
 import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.ObjectOutputStream;
-import java.net.InetAddress;
-import java.util.Properties;
-
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class GMSLocatorRecoveryJUnitTest {
 
   File tempStateFile = null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/StatRecorderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/StatRecorderJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/StatRecorderJUnitTest.java
index b7b80ac..ed50a3a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/StatRecorderJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/StatRecorderJUnitTest.java
@@ -16,6 +16,23 @@
  */
 package com.gemstone.gemfire.distributed.internal.membership.gms.membership;
 
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.isA;
+import static org.mockito.Mockito.*;
+
+import java.util.Properties;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.jgroups.Event;
+import org.jgroups.Message;
+import org.jgroups.protocols.UNICAST3.Header;
+import org.jgroups.protocols.pbcast.NakAckHeader2;
+import org.jgroups.stack.Protocol;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
@@ -27,23 +44,6 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.JGroup
 import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.StatRecorder;
 import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import org.jgroups.Event;
-import org.jgroups.Message;
-import org.jgroups.protocols.UNICAST3.Header;
-import org.jgroups.protocols.pbcast.NakAckHeader2;
-import org.jgroups.stack.Protocol;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.util.Properties;
-import java.util.concurrent.RejectedExecutionException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.*;
 
 /**
  * This class tests the GMS StatRecorder class, which records JGroups
@@ -51,18 +51,24 @@ import static org.mockito.Mockito.*;
  */
 @Category(UnitTest.class)
 public class StatRecorderJUnitTest {
-  Protocol mockDownProtocol, mockUpProtocol;
-  StatRecorder recorder;
-  MyStats stats = new MyStats();
-  Services services;
+
+  private Protocol mockDownProtocol;
+  private Protocol mockUpProtocol;
+  private StatRecorder recorder;
+  private MyStats stats;
+  private Services services;
   
   @Before
-  public void initMocks() throws Exception {
+  public void setUp() throws Exception {
+    stats = new MyStats();
+
     // create a StatRecorder that has mock up/down protocols and stats
     mockDownProtocol = mock(Protocol.class);
     mockUpProtocol = mock(Protocol.class);
+
     services = mock(Services.class);
     when(services.getStatistics()).thenReturn(stats);
+
     recorder = new StatRecorder();
     recorder.setServices(services);
     recorder.setUpProtocol(mockUpProtocol);
@@ -105,7 +111,6 @@ public class StatRecorderJUnitTest {
     when(msg.getHeader(any(Short.class))).thenReturn(Header.createDataHeader(1L, (short)1, true));
     when(msg.size()).thenReturn(150L);
 
-
     // GEODE-1178, the TP protocol may throw a RejectedExecutionException & StatRecorder should retry
     when(mockDownProtocol.down(any(Event.class))).thenThrow(new RejectedExecutionException());
 
@@ -161,8 +166,7 @@ public class StatRecorderJUnitTest {
     assertTrue("mcastRetransmits = " + stats.mcastRetransmits,
         stats.mcastRetransmits == 1);
   }
-  
-  
+
   /**
    * Ensure that the messenger JGroups configuration XML strings contain
    * the statistics recorder protocol
@@ -201,7 +205,8 @@ public class StatRecorderJUnitTest {
     assertTrue(jgroupsConfig.contains("gms.messenger.StatRecorder"));
   }
 
-  static class MyStats extends DummyDMStats {
+  private static class MyStats extends DummyDMStats {
+
     public int ucastMessagesReceived;
     public int ucastMessageBytesReceived;
     public int ucastMessagesSent;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumCheckerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumCheckerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumCheckerJUnitTest.java
index 904a206..0e2a617 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumCheckerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumCheckerJUnitTest.java
@@ -16,12 +16,11 @@
  */
 package com.gemstone.gemfire.distributed.internal.membership.gms.messenger;
 
+import static org.junit.Assert.*;
 import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
 import java.io.IOException;
-import java.net.UnknownHostException;
 import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
@@ -33,7 +32,6 @@ import org.jgroups.Message;
 import org.jgroups.Receiver;
 import org.jgroups.stack.IpAddress;
 import org.jgroups.util.UUID;
-import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -44,60 +42,17 @@ import org.mockito.stubbing.Answer;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.distributed.internal.membership.NetView;
-import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class GMSQuorumCheckerJUnitTest {
 
   private InternalDistributedMember[] mockMembers;
-
-  private Services services;
-
   private JChannel channel;
-  
   private JGAddress address;
 
-  private class PingMessageAnswer implements Answer {
-    private int pingCount = 0;
-    private JChannel channel;
-    private GMSPingPonger pingPonger = new GMSPingPonger();
-    private Set<Integer> simulatedPongRespondersByPort;
-    
-    public PingMessageAnswer(JChannel channel, Set<Integer> simulatedPongRespondersByPort) {
-      this.channel = channel;
-      this.simulatedPongRespondersByPort = simulatedPongRespondersByPort;
-    }
-
-    @Override
-    public Object answer(InvocationOnMock invocation) throws Throwable {
-      Object[] args = invocation.getArguments();
-      for (int i = 0; i < args.length; i++) {
-        if (args[i] instanceof Message) {
-          Message msg = (Message) args[i];
-          Object content = null;
-          content = msg.getBuffer();
-          if (content instanceof byte[]) {
-            if (pingPonger.isPingMessage((byte[]) content)) {
-              pingCount++;              
-              if (simulatedPongRespondersByPort.contains(((JGAddress)msg.getDest()).getPort())) {
-                channel.getReceiver().receive(pingPonger.createPongMessage(msg.getDest(), msg.getSrc()));
-              }
-            }
-          }
-        }
-      }
-      return null;
-    }
-    
-    public int getPingCount() {
-      return pingCount;
-    }
-
-  }
-
   @Before
-  public void initMocks() throws UnknownHostException, Exception {
+  public void initMocks() throws Exception {
     mockMembers = new InternalDistributedMember[12];
     for (int i = 0; i < mockMembers.length; i++) {
       mockMembers[i] = new InternalDistributedMember("localhost", 8888 + i);
@@ -111,22 +66,6 @@ public class GMSQuorumCheckerJUnitTest {
     Mockito.doReturn(address).when(channel).down(any(Event.class));
   }
   
-  private NetView prepareView() throws IOException {
-    return prepareView(mockMembers.length);
-  }
-
-  private NetView prepareView(int numMembers) throws IOException {
-    int viewId = 1;
-    List<InternalDistributedMember> mbrs = new LinkedList<InternalDistributedMember>();
-    for (int i = 0; i < numMembers; i++) {
-      mbrs.add(mockMembers[i]);
-    }
-
-    // prepare the view
-    NetView netView = new NetView(mockMembers[0], viewId, mbrs);
-    return netView;
-  }
-
   @Test
   public void testQuorumCheckerAllRespond() throws Exception {
     NetView view = prepareView();
@@ -140,10 +79,10 @@ public class GMSQuorumCheckerJUnitTest {
     GMSQuorumChecker qc = new GMSQuorumChecker(view, 51, channel);
     qc.initialize();
     boolean quorum = qc.checkForQuorum(500);
-    Assert.assertTrue(quorum);
-    Assert.assertSame(view.getMembers().size(), answerer.getPingCount());
-    Assert.assertTrue(qc.checkForQuorum(500));
-    Assert.assertSame(qc.getMembershipInfo(), channel);
+    assertTrue(quorum);
+    assertSame(view.getMembers().size(), answerer.getPingCount());
+    assertTrue(qc.checkForQuorum(500));
+    assertSame(qc.getMembershipInfo(), channel);
   }
   
   @Test
@@ -159,8 +98,8 @@ public class GMSQuorumCheckerJUnitTest {
     GMSQuorumChecker qc = new GMSQuorumChecker(view, 51, channel);
     qc.initialize();
     boolean quorum = qc.checkForQuorum(500);
-    Assert.assertTrue(quorum);
-    Assert.assertSame(view.getMembers().size(), answerer.getPingCount());
+    assertTrue(quorum);
+    assertSame(view.getMembers().size(), answerer.getPingCount());
   }
   
   @Test
@@ -174,8 +113,8 @@ public class GMSQuorumCheckerJUnitTest {
     GMSQuorumChecker qc = new GMSQuorumChecker(view, 51, channel);
     qc.initialize();
     boolean quorum = qc.checkForQuorum(500);
-    Assert.assertFalse(quorum);
-    Assert.assertSame(view.getMembers().size(), answerer.getPingCount());
+    assertFalse(quorum);
+    assertSame(view.getMembers().size(), answerer.getPingCount());
   }
   
   @Test
@@ -188,8 +127,8 @@ public class GMSQuorumCheckerJUnitTest {
     GMSQuorumChecker qc = new GMSQuorumChecker(view, 51, channel);
     qc.initialize();
     boolean quorum = qc.checkForQuorum(500);
-    Assert.assertFalse(quorum);
-    Assert.assertSame(view.getMembers().size(), answerer.getPingCount());
+    assertFalse(quorum);
+    assertSame(view.getMembers().size(), answerer.getPingCount());
   }
   
   @Test
@@ -202,6 +141,7 @@ public class GMSQuorumCheckerJUnitTest {
     for (int i = 0; i < mockMembers.length; i++) {
       pongResponders.add(mockMembers[i].getPort());
     }
+
     //remove 4 servers
     pongResponders.remove(mockMembers[8].getPort());
     pongResponders.remove(mockMembers[9].getPort());
@@ -214,8 +154,8 @@ public class GMSQuorumCheckerJUnitTest {
     GMSQuorumChecker qc = new GMSQuorumChecker(view, 51, channel);
     qc.initialize();
     boolean quorum = qc.checkForQuorum(500);
-    Assert.assertTrue(quorum);
-    Assert.assertSame(view.getMembers().size(), answerer.getPingCount());
+    assertTrue(quorum);
+    assertSame(view.getMembers().size(), answerer.getPingCount());
   }
   
   @Test
@@ -228,23 +168,24 @@ public class GMSQuorumCheckerJUnitTest {
     for (int i = 0; i < mockMembers.length; i++) {
       pongResponders.add(mockMembers[i].getPort());
     }
+
     //remove 4 servers
     pongResponders.remove(mockMembers[8].getPort());
     pongResponders.remove(mockMembers[9].getPort());
     pongResponders.remove(mockMembers[10].getPort());
     pongResponders.remove(mockMembers[11].getPort());
+
     //remove 1 locator
     pongResponders.remove(mockMembers[1].getPort());
 
-    
     PingMessageAnswer answerer = new PingMessageAnswer(channel, pongResponders);
     Mockito.doAnswer(answerer).when(channel).send(any(Message.class));
 
     GMSQuorumChecker qc = new GMSQuorumChecker(view, 51, channel);
     qc.initialize();
     boolean quorum = qc.checkForQuorum(500);
-    Assert.assertTrue(quorum);
-    Assert.assertSame(view.getMembers().size(), answerer.getPingCount());
+    assertTrue(quorum);
+    assertSame(view.getMembers().size(), answerer.getPingCount());
   }
   
   @Test
@@ -257,12 +198,14 @@ public class GMSQuorumCheckerJUnitTest {
     for (int i = 0; i < mockMembers.length; i++) {
       pongResponders.add(mockMembers[i].getPort());
     }
+
     //remove 5 servers
     pongResponders.remove(mockMembers[7].getPort());
     pongResponders.remove(mockMembers[8].getPort());
     pongResponders.remove(mockMembers[9].getPort());
     pongResponders.remove(mockMembers[10].getPort());
     pongResponders.remove(mockMembers[11].getPort());
+
     //remove locators
     pongResponders.remove(mockMembers[0].getPort());
     pongResponders.remove(mockMembers[1].getPort());
@@ -273,8 +216,8 @@ public class GMSQuorumCheckerJUnitTest {
     GMSQuorumChecker qc = new GMSQuorumChecker(view, 51, channel);
     qc.initialize();
     boolean quorum = qc.checkForQuorum(500);
-    Assert.assertFalse(quorum);
-    Assert.assertSame(view.getMembers().size(), answerer.getPingCount());
+    assertFalse(quorum);
+    assertSame(view.getMembers().size(), answerer.getPingCount());
   }
   
   @Test
@@ -303,8 +246,8 @@ public class GMSQuorumCheckerJUnitTest {
     GMSQuorumChecker qc = new GMSQuorumChecker(view, 51, channel);
     qc.initialize();
     boolean quorum = qc.checkForQuorum(500);
-    Assert.assertFalse(quorum);
-    Assert.assertSame(view.getMembers().size(), answerer.getPingCount());
+    assertFalse(quorum);
+    assertSame(view.getMembers().size(), answerer.getPingCount());
   }
   
   @Test
@@ -327,8 +270,8 @@ public class GMSQuorumCheckerJUnitTest {
     GMSQuorumChecker qc = new GMSQuorumChecker(view, 51, channel);
     qc.initialize();
     boolean quorum = qc.checkForQuorum(500);
-    Assert.assertTrue(quorum);
-    Assert.assertSame(view.getMembers().size(), answerer.getPingCount());
+    assertTrue(quorum);
+    assertSame(view.getMembers().size(), answerer.getPingCount());
   }
   
   @Test
@@ -352,8 +295,61 @@ public class GMSQuorumCheckerJUnitTest {
     GMSQuorumChecker qc = new GMSQuorumChecker(view, 51, channel);
     qc.initialize();
     boolean quorum = qc.checkForQuorum(500);
-    Assert.assertFalse(quorum);
-    Assert.assertSame(view.getMembers().size(), answerer.getPingCount());
+    assertFalse(quorum);
+    assertSame(view.getMembers().size(), answerer.getPingCount());
+  }
+
+  private NetView prepareView() throws IOException {
+    return prepareView(mockMembers.length);
+  }
+
+  private NetView prepareView(int numMembers) throws IOException {
+    int viewId = 1;
+    List<InternalDistributedMember> mbrs = new LinkedList<InternalDistributedMember>();
+    for (int i = 0; i < numMembers; i++) {
+      mbrs.add(mockMembers[i]);
+    }
+
+    // prepare the view
+    NetView netView = new NetView(mockMembers[0], viewId, mbrs);
+    return netView;
+  }
+
+  private static class PingMessageAnswer implements Answer {
+
+    private int pingCount = 0;
+    private JChannel channel;
+    private GMSPingPonger pingPonger = new GMSPingPonger();
+    private Set<Integer> simulatedPongRespondersByPort;
+
+    public PingMessageAnswer(JChannel channel, Set<Integer> simulatedPongRespondersByPort) {
+      this.channel = channel;
+      this.simulatedPongRespondersByPort = simulatedPongRespondersByPort;
+    }
+
+    @Override
+    public Object answer(InvocationOnMock invocation) throws Throwable {
+      Object[] args = invocation.getArguments();
+      for (int i = 0; i < args.length; i++) {
+        if (args[i] instanceof Message) {
+          Message msg = (Message) args[i];
+          Object content = null;
+          content = msg.getBuffer();
+          if (content instanceof byte[]) {
+            if (pingPonger.isPingMessage((byte[]) content)) {
+              pingCount++;
+              if (simulatedPongRespondersByPort.contains(((JGAddress)msg.getDest()).getPort())) {
+                channel.getReceiver().receive(pingPonger.createPongMessage(msg.getDest(), msg.getSrc()));
+              }
+            }
+          }
+        }
+      }
+      return null;
+    }
+
+    public int getPingCount() {
+      return pingCount;
+    }
   }
-  
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
index 952f347..a1d7a2d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
@@ -16,18 +16,11 @@
  */
 package com.gemstone.gemfire.distributed.internal.membership.gms.mgr;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -77,6 +70,9 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class GMSMembershipManagerJUnitTest {
+
+  private static final long WAIT_FOR_REPLIES_MILLIS = 2000;
+
   private Services services;
   private ServiceConfig mockConfig;
   private DistributionConfig distConfig;
@@ -88,7 +84,7 @@ public class GMSMembershipManagerJUnitTest {
   private Messenger messenger;
   private JoinLeave joinLeave;
   private Stopper stopper;
-  DistributedMembershipListener listener;
+  private DistributedMembershipListener listener;
   private GMSMembershipManager manager;
   private List<InternalDistributedMember> members;
   private DirectChannel dc;
@@ -107,10 +103,8 @@ public class GMSMembershipManagerJUnitTest {
     nonDefault.put(DistributionConfig.LOCATORS_NAME, "localhost[10344]");
     distConfig = new DistributionConfigImpl(nonDefault);
     distProperties = nonDefault;
-    RemoteTransportConfig tconfig = new RemoteTransportConfig(distConfig,
-        DistributionManager.NORMAL_DM_TYPE);
+    RemoteTransportConfig tconfig = new RemoteTransportConfig(distConfig, DistributionManager.NORMAL_DM_TYPE);
     
-
     mockConfig = mock(ServiceConfig.class);
     when(mockConfig.getDistributionConfig()).thenReturn(distConfig);
     when(mockConfig.getTransport()).thenReturn(tconfig);
@@ -257,7 +251,6 @@ public class GMSMembershipManagerJUnitTest {
     manager.handleOrDeferSurpriseConnect(surpriseMember);
     assertEquals(5, manager.getStartupEvents().size());
 
-    
     // process a new view after we finish joining but before event processing has started
     manager.isJoining = false;
     mockMembers[4].setVmViewId(4);
@@ -296,26 +289,6 @@ public class GMSMembershipManagerJUnitTest {
     verify(listener).memberSuspect(suspectMember, mockMembers[0], "testing");
   }
   
-  /**
-   * Some tests require a DirectChannel mock
-   */
-  private void setUpDirectChannelMock() throws Exception {
-    dc = mock(DirectChannel.class);
-    when(dc.send(any(GMSMembershipManager.class), any(mockMembers.getClass()), any(DistributionMessage.class), anyInt(), anyInt()))
-      .thenReturn(100);
-
-    manager.start();
-    manager.started();
-    
-    manager.setDirectChannel(dc);
-
-    NetView view = new NetView(myMemberId, 1, members);
-    manager.installView(view);
-    when(joinLeave.getView()).thenReturn(view);
-    
-    manager.startEventProcessing();
-  }
-
   @Test
   public void testDirectChannelSend() throws Exception {
     setUpDirectChannelMock();
@@ -357,9 +330,8 @@ public class GMSMembershipManagerJUnitTest {
     when(stopper.cancelInProgress()).thenReturn("stopping for test");
     try {
       manager.directChannelSend(recipients, m, null);
-      throw new RuntimeException("expected directChannelSend to throw an exception");
-    } catch (DistributedSystemDisconnectedException e) {
-      // expected
+      fail("expected directChannelSend to throw an exception");
+    } catch (DistributedSystemDisconnectedException expected) {
     }
   }
   
@@ -427,10 +399,29 @@ public class GMSMembershipManagerJUnitTest {
     mbrs.add(mockMembers[0]);
     ReplyProcessor21 rp = new ReplyProcessor21(dm, mbrs);
     rp.enableSevereAlertProcessing();
-    boolean result = rp.waitForReplies(2000);
+    boolean result = rp.waitForReplies(WAIT_FOR_REPLIES_MILLIS);
     assertFalse(result);  // the wait should have timed out
     verify(healthMonitor, atLeastOnce()).checkIfAvailable(isA(InternalDistributedMember.class), isA(String.class), isA(Boolean.class));
   }
-  
-}
 
+  /**
+   * Some tests require a DirectChannel mock
+   */
+  private void setUpDirectChannelMock() throws Exception {
+    dc = mock(DirectChannel.class);
+    when(dc.send(any(GMSMembershipManager.class), any(mockMembers.getClass()), any(DistributionMessage.class), anyInt(), anyInt()))
+            .thenReturn(100);
+
+    manager.start();
+    manager.started();
+
+    manager.setDirectChannel(dc);
+
+    NetView view = new NetView(myMemberId, 1, members);
+    manager.installView(view);
+    when(joinLeave.getView()).thenReturn(view);
+
+    manager.startEventProcessing();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
index 8723505..5fd0f27 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
@@ -158,8 +158,8 @@ public class TcpServerBackwardCompatDUnitTest extends DistributedTestCase {
           TcpServer.OLDTESTVERSION -= 100;
           TcpServer.getGossipVersionMapForTestOnly().put(TcpServer.TESTVERSION, Version.CURRENT_ORDINAL);
           TcpServer.getGossipVersionMapForTestOnly().put(TcpServer.OLDTESTVERSION, Version.GFE_57.ordinal());
-//          assertEquals("Gossip Version and Test version are not same", TcpServer.GOSSIPVERSION, TcpServer.TESTVERSION);
-//          assertEquals("Previous Gossip Version and Test version are not same", TcpServer.OLDGOSSIPVERSION, TcpServer.OLDTESTVERSION);
+//          assertIndexDetailsEquals("Gossip Version and Test version are not same", TcpServer.GOSSIPVERSION, TcpServer.TESTVERSION);
+//          assertIndexDetailsEquals("Previous Gossip Version and Test version are not same", TcpServer.OLDGOSSIPVERSION, TcpServer.OLDTESTVERSION);
 
           Locator.startLocatorAndDS(port1, logFile1, props);
 
@@ -198,8 +198,8 @@ public class TcpServerBackwardCompatDUnitTest extends DistributedTestCase {
           TcpServer.OLDTESTVERSION -= 100;
           TcpServer.getGossipVersionMapForTestOnly().put(TcpServer.TESTVERSION, Version.CURRENT_ORDINAL);
           TcpServer.getGossipVersionMapForTestOnly().put(TcpServer.OLDTESTVERSION, Version.GFE_57.ordinal());
-//          assertEquals("Gossip Version and Test version are not same", TcpServer.GOSSIPVERSION, TcpServer.TESTVERSION);
-//          assertEquals("Previous Gossip Version and Test version are not same", TcpServer.OLDGOSSIPVERSION, TcpServer.OLDTESTVERSION);
+//          assertIndexDetailsEquals("Gossip Version and Test version are not same", TcpServer.GOSSIPVERSION, TcpServer.TESTVERSION);
+//          assertIndexDetailsEquals("Previous Gossip Version and Test version are not same", TcpServer.OLDGOSSIPVERSION, TcpServer.OLDTESTVERSION);
 
           Locator.startLocatorAndDS(port0, logFile0, props);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
index 4594889..9b1b8d3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
@@ -39,11 +39,9 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.PoolStatHelper;
 import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
 import com.gemstone.gemfire.internal.AvailablePort;
-//import com.gemstone.org.jgroups.stack.GossipClient;
-//import com.gemstone.org.jgroups.stack.IpAddress;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class TcpServerJUnitTest {
   
   protected/*GemStoneAddition*/ InetAddress localhost;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
index 80c92e6..234d032 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
@@ -18,97 +18,74 @@ package com.gemstone.gemfire.internal;
 
 import static org.junit.Assert.*;
 
-import org.apache.logging.log4j.Logger;
-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.TestName;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Map;
-import java.util.Properties;
-import junit.framework.TestCase;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
-public class AbstractConfigJUnitTest extends TestCase  {
+public class AbstractConfigJUnitTest {
 
 	@Test
-	public void testDisplayPropertyValue(){
-		AbstractConfigTestClass actc=new AbstractConfigTestClass();
-        Method method=null;
-        try{
-            method=actc.getClass().getSuperclass().getDeclaredMethod("okToDisplayPropertyValue",String.class);
-            method.setAccessible(true);
-            assertFalse((Boolean) method.invoke(actc, "password"));
-            assertFalse((Boolean)method.invoke(actc,"cluster-ssl-truststore-password"));
-            assertTrue((Boolean) method.invoke(actc, "cluster-ssl-enabled"));
-            assertFalse((Boolean)method.invoke(actc,"gateway-ssl-truststore-password"));
-            assertFalse((Boolean)method.invoke(actc,"server-ssl-keystore-password"));
-            assertTrue((Boolean) method.invoke(actc, "ssl-enabled"));
-            assertTrue((Boolean)method.invoke(actc,"conserve-sockets"));
-            assertFalse((Boolean)method.invoke(actc,"javax.net.ssl.keyStorePassword"));
-            assertFalse((Boolean)method.invoke(actc,"javax.net.ssl.keyStoreType"));
-            assertFalse((Boolean)method.invoke(actc,"sysprop-value"));
-        } catch (NoSuchMethodException e) {
-            e.printStackTrace();
-        } catch (InvocationTargetException e) {
-            e.printStackTrace();
-        } catch (IllegalAccessException e) {
-            e.printStackTrace();
-        } catch(Exception e){
-            e.printStackTrace();
-        }
-    }
-
-}
-
-class AbstractConfigTestClass extends AbstractConfig{
+	public void testDisplayPropertyValue() throws Exception {
+		AbstractConfigTestClass actc = new AbstractConfigTestClass();
+		Method method = actc.getClass().getSuperclass().getDeclaredMethod("okToDisplayPropertyValue", String.class);
+		method.setAccessible(true);
+		assertFalse((Boolean) method.invoke(actc, "password"));
+		assertFalse((Boolean) method.invoke(actc, "cluster-ssl-truststore-password"));
+		assertTrue((Boolean) method.invoke(actc, "cluster-ssl-enabled"));
+		assertFalse((Boolean) method.invoke(actc, "gateway-ssl-truststore-password"));
+		assertFalse((Boolean) method.invoke(actc, "server-ssl-keystore-password"));
+		assertTrue((Boolean) method.invoke(actc, "ssl-enabled"));
+		assertTrue((Boolean) method.invoke(actc, "conserve-sockets"));
+		assertFalse((Boolean) method.invoke(actc, "javax.net.ssl.keyStorePassword"));
+		assertFalse((Boolean) method.invoke(actc, "javax.net.ssl.keyStoreType"));
+		assertFalse((Boolean) method.invoke(actc, "sysprop-value"));
+	}
 
+	private static class AbstractConfigTestClass extends AbstractConfig {
 
-	@Override
-	protected Map getAttDescMap() {
-		return null;
-	}
+		@Override
+		protected Map getAttDescMap() {
+			return null;
+		}
 
-	@Override
-	protected Map<String, ConfigSource> getAttSourceMap() {
-		return null;
-	}
+		@Override
+		protected Map<String, ConfigSource> getAttSourceMap() {
+			return null;
+		}
 
-	@Override
-	public Object getAttributeObject(String attName) {
-		return null;
-	}
+		@Override
+		public Object getAttributeObject(String attName) {
+			return null;
+		}
 
-	@Override
-	public void setAttributeObject(String attName, Object attValue, ConfigSource source) {
+		@Override
+		public void setAttributeObject(String attName, Object attValue, ConfigSource source) {
 
-	}
+		}
 
-	@Override
-	public boolean isAttributeModifiable(String attName) {
-		return false;
-	}
+		@Override
+		public boolean isAttributeModifiable(String attName) {
+			return false;
+		}
 
-	@Override
-	public Class getAttributeType(String attName) {
-		return null;
-	}
+		@Override
+		public Class getAttributeType(String attName) {
+			return null;
+		}
 
-	@Override
-	public String[] getAttributeNames() {
-		return new String[0];
-	}
+		@Override
+		public String[] getAttributeNames() {
+			return new String[0];
+		}
 
-	@Override
-	public String[] getSpecificAttributeNames() {
-		return new String[0];
+		@Override
+		public String[] getSpecificAttributeNames() {
+			return new String[0];
+		}
 	}
 }
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/ArrayEqualsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/ArrayEqualsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/ArrayEqualsJUnitTest.java
deleted file mode 100644
index 714a7fe..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/ArrayEqualsJUnitTest.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal;
-
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-
-/**
- * See bug 52093.
- * Make sure that the contents of arrays are
- * used to test equality on regions ops.
- */
-@Category(UnitTest.class)
-public class ArrayEqualsJUnitTest {
-  private GemFireCacheImpl createCache() {
-    Properties props = new Properties();
-    props.setProperty("locators", "");
-    props.setProperty("mcast-port", "0");
-    GemFireCacheImpl result = (GemFireCacheImpl) new CacheFactory(props).create();
-    return result;
-  }
-  private void closeCache(GemFireCacheImpl gfc) {
-    gfc.close();
-  }
-  
-  private void doOps(Region r) {
-    {
-      byte[] bytesValue = new byte[]{1,2,3,4};
-      r.put("bytesValue", bytesValue.clone());
-      if (r.replace("bytesValue", "", "")) fail("expected replace to fail");
-      if (!r.replace("bytesValue", bytesValue, "")) {
-        fail("expected replace to happen");
-      }
-      r.put("bytesValue", bytesValue.clone());
-      if (r.remove("bytesValue", "")) fail("expected remove to fail");
-      if (!r.remove("bytesValue", bytesValue)) {
-        fail("expected remove to happen");
-      }
-    }
-    {
-      boolean[] booleanValue = new boolean[]{true,false,true,false};
-      r.put("booleanValue", booleanValue.clone());
-      if (r.replace("booleanValue", "", "")) fail("expected replace to fail");
-      if (!r.replace("booleanValue", booleanValue, "")) {
-        fail("expected replace to happen");
-      }
-      r.put("booleanValue", booleanValue.clone());
-      if (r.remove("booleanValue", "")) fail("expected remove to fail");
-      if (!r.remove("booleanValue", booleanValue)) {
-        fail("expected remove to happen");
-      }
-    }
-    {
-      short[] shortValue = new short[]{1,2,3,4};
-      r.put("shortValue", shortValue.clone());
-      if (r.replace("shortValue", "", "")) fail("expected replace to fail");
-      if (!r.replace("shortValue", shortValue, "")) {
-        fail("expected replace to happen");
-      }
-      r.put("shortValue", shortValue.clone());
-      if (r.remove("shortValue", "")) fail("expected remove to fail");
-      if (!r.remove("shortValue", shortValue)) {
-        fail("expected remove to happen");
-      }
-    }
-    {
-      char[] charValue = new char[]{1,2,3,4};
-      r.put("charValue", charValue.clone());
-      if (r.replace("charValue", "", "")) fail("expected replace to fail");
-      if (!r.replace("charValue", charValue, "")) {
-        fail("expected replace to happen");
-      }
-      r.put("charValue", charValue.clone());
-      if (r.remove("charValue", "")) fail("expected remove to fail");
-      if (!r.remove("charValue", charValue)) {
-        fail("expected remove to happen");
-      }
-    }
-    {
-      int[] intValue = new int[]{1,2,3,4};
-      r.put("intValue", intValue.clone());
-      if (r.replace("intValue", "", "")) fail("expected replace to fail");
-      if (!r.replace("intValue", intValue, "")) {
-        fail("expected replace to happen");
-      }
-      r.put("intValue", intValue.clone());
-      if (r.remove("intValue", "")) fail("expected remove to fail");
-      if (!r.remove("intValue", intValue)) {
-        fail("expected remove to happen");
-      }
-    }
-    {
-      long[] longValue = new long[]{1,2,3,4};
-      r.put("longValue", longValue.clone());
-      if (r.replace("longValue", "", "")) fail("expected replace to fail");
-      if (!r.replace("longValue", longValue, "")) {
-        fail("expected replace to happen");
-      }
-      r.put("longValue", longValue.clone());
-      if (r.remove("longValue", "")) fail("expected remove to fail");
-      if (!r.remove("longValue", longValue)) {
-        fail("expected remove to happen");
-      }
-    }
-    {
-      float[] floatValue = new float[]{1,2,3,4};
-      r.put("floatValue", floatValue.clone());
-      if (r.replace("floatValue", "", "")) fail("expected replace to fail");
-      if (!r.replace("floatValue", floatValue, "")) {
-        fail("expected replace to happen");
-      }
-      r.put("floatValue", floatValue.clone());
-      if (r.remove("floatValue", "")) fail("expected remove to fail");
-      if (!r.remove("floatValue", floatValue)) {
-        fail("expected remove to happen");
-      }
-    }
-    {
-      double[] doubleValue = new double[]{1,2,3,4};
-      r.put("doubleValue", doubleValue.clone());
-      if (r.replace("doubleValue", "", "")) fail("expected replace to fail");
-      if (!r.replace("doubleValue", doubleValue, "")) {
-        fail("expected replace to happen");
-      }
-      r.put("doubleValue", doubleValue.clone());
-      if (r.remove("doubleValue", "")) fail("expected remove to fail");
-      if (!r.remove("doubleValue", doubleValue)) {
-        fail("expected remove to happen");
-      }
-    }
-    {
-      Object[] oaValue = new Object[]{new byte[]{1,2,3,4},new short[]{1,2,3,4},new int[]{1,2,3,4}, "hello sweet world!"};
-      r.put("oaValue", oaValue);
-      Object[] deepCloneOaValue = new Object[]{new byte[]{1,2,3,4},new short[]{1,2,3,4},new int[]{1,2,3,4}, "hello sweet world!"};
-      if (r.replace("oaValue", "", "")) fail("expected replace to fail");
-      if (!r.replace("oaValue", deepCloneOaValue, "")) {
-        fail("expected replace to happen");
-      }
-      r.put("oaValue", oaValue);
-      if (r.remove("oaValue", "")) fail("expected remove to fail");
-      if (!r.remove("oaValue", deepCloneOaValue)) {
-        fail("expected remove to happen");
-      }
-    }
-  }
-  
-  @Test
-  public void testPartition() {
-    GemFireCacheImpl gfc = createCache();
-    try {
-      Region r = gfc.createRegionFactory(RegionShortcut.PARTITION).create("ArrayEqualsJUnitTestPartitionRegion");
-      doOps(r);
-    } finally {
-      closeCache(gfc);
-    }
-  }
-  @Test
-  public void testLocal() {
-    GemFireCacheImpl gfc = createCache();
-    try {
-      Region r = gfc.createRegionFactory(RegionShortcut.LOCAL).create("ArrayEqualsJUnitTestLocalRegion");
-      doOps(r);
-    } finally {
-      closeCache(gfc);
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
index 25184de..706702d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
@@ -17,11 +17,6 @@
 package com.gemstone.gemfire.internal;
 
 import static org.junit.Assert.*;
-import static org.junit.Assume.*;
-
-import com.gemstone.gemfire.admin.internal.InetAddressUtil;
-import com.gemstone.gemfire.internal.lang.SystemUtils;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 import java.io.IOException;
 import java.net.InetAddress;
@@ -32,9 +27,13 @@ import org.junit.After;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.admin.internal.InetAddressUtil;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
 /**
+ * multicast availability is tested in JGroupsMessengerJUnitTest
  */
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class AvailablePortJUnitTest {
   
   private ServerSocket socket;
@@ -69,5 +68,4 @@ public class AvailablePortJUnitTest {
     assertFalse(AvailablePort.isPortAvailable(port, AvailablePort.SOCKET));
   }
   
-  // multicast availability is tested in JGroupsMessengerJUnitTest
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderIntegrationTest.java
new file mode 100644
index 0000000..4c836bd
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/ClassPathLoaderIntegrationTest.java
@@ -0,0 +1,503 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal;
+
+import static org.junit.Assert.*;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import org.apache.bcel.Constants;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.generic.ClassGen;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
+
+import com.gemstone.gemfire.internal.ClassPathLoaderTest.BrokenClassLoader;
+import com.gemstone.gemfire.internal.ClassPathLoaderTest.NullClassLoader;
+import com.gemstone.gemfire.internal.ClassPathLoaderTest.SimpleClassLoader;
+
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+/**
+ * Integration tests for {@link ClassPathLoader}.
+ *
+ * Extracted from ClassPathLoaderTest.
+ */
+@Category(IntegrationTest.class)
+public class ClassPathLoaderIntegrationTest {
+
+  private static final int TEMP_FILE_BYTES_COUNT = 256;
+
+  private volatile File tempFile;
+  private volatile File tempFile2;
+
+  @Rule
+  public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
+
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  @Before
+  public void setUp() throws Exception {
+    System.setProperty(ClassPathLoader.EXCLUDE_TCCL_PROPERTY, "false");
+    System.setProperty(ClassPathLoader.EXT_LIB_DIR_PARENT_PROPERTY, this.temporaryFolder.getRoot().getAbsolutePath());
+
+    this.tempFile = this.temporaryFolder.newFile("tempFile1.tmp");
+    FileOutputStream fos = new FileOutputStream(this.tempFile);
+    fos.write(new byte[TEMP_FILE_BYTES_COUNT]);
+    fos.close();
+
+    this.tempFile2 = this.temporaryFolder.newFile("tempFile2.tmp");
+    fos = new FileOutputStream(this.tempFile2);
+    fos.write(new byte[TEMP_FILE_BYTES_COUNT]);
+    fos.close();
+  }
+
+  /**
+   * Verifies that <tt>getResource</tt> works with custom loader from {@link ClassPathLoader}.
+   */
+  @Test
+  public void testGetResourceWithCustomLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceWithCustomLoader");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    dcl = dcl.addOrReplace(new GeneratingClassLoader());
+
+    String resourceToGet = "com/nowhere/testGetResourceWithCustomLoader.rsc";
+    URL url = dcl.getResource(resourceToGet);
+    assertNotNull(url);
+
+    InputStream is = url != null ? url.openStream() : null;
+    assertNotNull(is);
+
+    int totalBytesRead = 0;
+    byte[] input = new byte[128];
+
+    BufferedInputStream bis = new BufferedInputStream(is);
+    for (int bytesRead = bis.read(input); bytesRead > -1;) {
+      totalBytesRead += bytesRead;
+      bytesRead = bis.read(input);
+    }
+    bis.close();
+
+    assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
+  }
+
+  /**
+   * Verifies that <tt>getResources</tt> works with custom loader from {@link ClassPathLoader}.
+   */
+  @Test
+  public void testGetResourcesWithCustomLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceWithCustomLoader");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    dcl = dcl.addOrReplace(new GeneratingClassLoader());
+
+    String resourceToGet = "com/nowhere/testGetResourceWithCustomLoader.rsc";
+    Enumeration<URL> urls = dcl.getResources(resourceToGet);
+    assertNotNull(urls);
+    assertTrue(urls.hasMoreElements());
+
+    URL url = urls.nextElement();
+    InputStream is = url != null ? url.openStream() : null;
+    assertNotNull(is);
+
+    int totalBytesRead = 0;
+    byte[] input = new byte[128];
+
+    BufferedInputStream bis = new BufferedInputStream(is);
+    for (int bytesRead = bis.read(input); bytesRead > -1;) {
+      totalBytesRead += bytesRead;
+      bytesRead = bis.read(input);
+    }
+    bis.close();
+
+    assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
+  }
+
+  /**
+   * Verifies that <tt>getResourceAsStream</tt> works with custom loader from {@link ClassPathLoader}.
+   */
+  @Test
+  public void testGetResourceAsStreamWithCustomLoader() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceAsStreamWithCustomLoader");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    dcl = dcl.addOrReplace(new GeneratingClassLoader());
+
+    String resourceToGet = "com/nowhere/testGetResourceAsStreamWithCustomLoader.rsc";
+    InputStream is = dcl.getResourceAsStream(resourceToGet);
+    assertNotNull(is);
+
+    int totalBytesRead = 0;
+    byte[] input = new byte[128];
+
+    BufferedInputStream bis = new BufferedInputStream(is);
+    for (int bytesRead = bis.read(input); bytesRead > -1;) {
+      totalBytesRead += bytesRead;
+      bytesRead = bis.read(input);
+    }
+    bis.close();
+
+    assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
+  }
+
+  /**
+   * Verifies that <tt>getResource</tt> works with TCCL from {@link ClassPathLoader}.
+   */
+  @Test
+  public void testGetResourceWithTCCL() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceWithTCCL");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+
+    String resourceToGet = "com/nowhere/testGetResourceWithTCCL.rsc";
+    assertNull(dcl.getResource(resourceToGet));
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
+      URL url = dcl.getResource(resourceToGet);
+      assertNotNull(url);
+
+      InputStream is = url.openStream();
+      assertNotNull(is);
+
+      int totalBytesRead = 0;
+      byte[] input = new byte[128];
+
+      BufferedInputStream bis = new BufferedInputStream(is);
+      for (int bytesRead = bis.read(input); bytesRead > -1;) {
+        totalBytesRead += bytesRead;
+        bytesRead = bis.read(input);
+      }
+      bis.close();
+
+      assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  /**
+   * Verifies that <tt>getResources</tt> works with TCCL from {@link ClassPathLoader}.
+   */
+  @Test
+  public void testGetResourcesWithTCCL() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceWithTCCL");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+
+    String resourceToGet = "com/nowhere/testGetResourceWithTCCL.rsc";
+    Enumeration<URL> urls = dcl.getResources(resourceToGet);
+    assertNotNull(urls);
+    assertFalse(urls.hasMoreElements());
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
+      urls = dcl.getResources(resourceToGet);
+      assertNotNull(urls);
+
+      URL url = urls.nextElement();
+      InputStream is = url.openStream();
+      assertNotNull(is);
+
+      int totalBytesRead = 0;
+      byte[] input = new byte[128];
+
+      BufferedInputStream bis = new BufferedInputStream(is);
+      for (int bytesRead = bis.read(input); bytesRead > -1;) {
+        totalBytesRead += bytesRead;
+        bytesRead = bis.read(input);
+      }
+      bis.close();
+
+      assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  /**
+   * Verifies that <tt>getResourceAsStream</tt> works with TCCL from {@link ClassPathLoader}.
+   */
+  @Test
+  public void testGetResourceAsStreamWithTCCL() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceAsStreamWithTCCL");
+
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+
+    String resourceToGet = "com/nowhere/testGetResourceAsStreamWithTCCL.rsc";
+    assertNull(dcl.getResourceAsStream(resourceToGet));
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // ensure that TCCL is only CL that can find this resource
+      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
+      InputStream is = dcl.getResourceAsStream(resourceToGet);
+      assertNotNull(is);
+
+      int totalBytesRead = 0;
+      byte[] input = new byte[128];
+
+      BufferedInputStream bis = new BufferedInputStream(is);
+      for (int bytesRead = bis.read(input); bytesRead > -1;) {
+        totalBytesRead += bytesRead;
+        bytesRead = bis.read(input);
+      }
+      bis.close();
+
+      assertEquals(TEMP_FILE_BYTES_COUNT, totalBytesRead);
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  /**
+   * Verifies that JAR files found in the extlib directory will be correctly
+   * added to the {@link ClassPathLoader}.
+   */
+  @Test
+  public void testJarsInExtLib() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testJarsInExtLib");
+
+    File EXT_LIB_DIR = ClassPathLoader.defineEXT_LIB_DIR();
+    EXT_LIB_DIR.mkdir();
+
+    File subdir = new File(EXT_LIB_DIR, "cplju");
+    subdir.mkdir();
+
+    final ClassBuilder classBuilder = new ClassBuilder();
+
+    writeJarBytesToFile(new File(EXT_LIB_DIR, "ClassPathLoaderJUnit1.jar"),
+            classBuilder.createJarFromClassContent("com/cpljunit1/ClassPathLoaderJUnit1", "package com.cpljunit1; public class ClassPathLoaderJUnit1 {}"));
+    writeJarBytesToFile(new File(subdir, "ClassPathLoaderJUnit2.jar"),
+            classBuilder.createJarFromClassContent("com/cpljunit2/ClassPathLoaderJUnit2", "package com.cpljunit2; public class ClassPathLoaderJUnit2 {}"));
+
+    ClassPathLoader classPathLoader = ClassPathLoader.createWithDefaults(false);
+    try {
+      classPathLoader.forName("com.cpljunit1.ClassPathLoaderJUnit1");
+    } catch (ClassNotFoundException cnfex) {
+      fail("JAR file not correctly added to Classpath");
+    }
+
+    try {
+      classPathLoader.forName("com.cpljunit2.ClassPathLoaderJUnit2");
+    } catch (ClassNotFoundException cnfex) {
+      fail("JAR file not correctly added to Classpath");
+    }
+
+    assertNotNull(classPathLoader.getResource("com/cpljunit2/ClassPathLoaderJUnit2.class"));
+
+    Enumeration<URL> urls = classPathLoader.getResources("com/cpljunit1");
+    if  (!urls.hasMoreElements()) {
+      fail("Resources should return one element");
+    }
+  }
+
+  /**
+   * Verifies that the 3rd custom loader will get the resource. Parent cannot find it and TCCL is broken. This verifies
+   * that all custom loaders are checked and that the custom loaders are all checked before TCCL.
+   */
+  @Test
+  public void testGetResourceAsStreamWithMultipleCustomLoaders() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceAsStreamWithMultipleCustomLoaders");
+
+    // create DCL such that the 3rd loader should find the resource
+    // first custom loader becomes parent which won't find anything
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    dcl = dcl.addOrReplace(new GeneratingClassLoader());
+    dcl = dcl.addOrReplace(new SimpleClassLoader(getClass().getClassLoader()));
+    dcl = dcl.addOrReplace(new NullClassLoader());
+
+    String resourceToGet = "com/nowhere/testGetResourceAsStreamWithMultipleCustomLoaders.rsc";
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // set TCCL to throw errors which makes sure we find before checking TCCL
+      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
+
+      InputStream is = dcl.getResourceAsStream(resourceToGet);
+      assertNotNull(is);
+      is.close();
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  /**
+   * Verifies that the 3rd custom loader will get the resource. Parent cannot find it and TCCL is broken. This verifies
+   * that all custom loaders are checked and that the custom loaders are all checked before TCCL.
+   */
+  @Test
+  public void testGetResourceWithMultipleCustomLoaders() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceWithMultipleCustomLoaders");
+
+    // create DCL such that the 3rd loader should find the resource
+    // first custom loader becomes parent which won't find anything
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    dcl = dcl.addOrReplace(new GeneratingClassLoader());
+    dcl = dcl.addOrReplace(new SimpleClassLoader(getClass().getClassLoader()));
+    dcl = dcl.addOrReplace(new NullClassLoader());
+
+    String resourceToGet = "com/nowhere/testGetResourceWithMultipleCustomLoaders.rsc";
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // set TCCL to throw errors which makes sure we find before checking TCCL
+      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
+
+      URL url = dcl.getResource(resourceToGet);
+      assertNotNull(url);
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  /**
+   * Verifies that the 3rd custom loader will get the resources. Parent cannot find it and TCCL is broken. This verifies
+   * that all custom loaders are checked and that the custom loaders are all checked before TCCL.
+   */
+  @Test
+  public void testGetResourcesWithMultipleCustomLoaders() throws Exception {
+    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceWithMultipleCustomLoaders");
+
+    // create DCL such that the 3rd loader should find the resource
+    // first custom loader becomes parent which won't find anything
+    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);
+    dcl = dcl.addOrReplace(new GeneratingClassLoader());
+    dcl = dcl.addOrReplace(new GeneratingClassLoader2());
+    dcl = dcl.addOrReplace(new SimpleClassLoader(getClass().getClassLoader()));
+    dcl = dcl.addOrReplace(new NullClassLoader());
+
+    String resourceToGet = "com/nowhere/testGetResourceWithMultipleCustomLoaders.rsc";
+
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      // set TCCL to throw errors which makes sure we find before checking TCCL
+      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());
+
+      Enumeration<URL> urls = dcl.getResources(resourceToGet);
+      assertNotNull(urls);
+      assertTrue(urls.hasMoreElements());
+
+      URL url = urls.nextElement();
+      assertNotNull(url);
+
+      // Should find two with unique URLs
+      assertTrue("Did not find all resources.", urls.hasMoreElements());
+      URL url2 = urls.nextElement();
+      assertNotNull(url2);
+      assertTrue("Resource URLs should be unique.", !url.equals(url2));
+
+    } finally {
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  private void writeJarBytesToFile(File jarFile, byte[] jarBytes) throws IOException {
+    final OutputStream outStream = new FileOutputStream(jarFile);
+    outStream.write(jarBytes);
+    outStream.close();
+  }
+
+  /**
+   * Custom class loader which uses BCEL to always dynamically generate a class for any class name it tries to load.
+   */
+  private class GeneratingClassLoader extends ClassLoader {
+
+    /**
+     * Currently unused but potentially useful for some future test. This causes this loader to only generate a class
+     * that the parent could not find.
+     *
+     * @param parent
+     *          the parent class loader to check with first
+     */
+    @SuppressWarnings("unused")
+    public GeneratingClassLoader(ClassLoader parent) {
+      super(parent);
+    }
+
+    /**
+     * Specifies no parent to ensure that this loader generates the named class.
+     */
+    public GeneratingClassLoader() {
+      super(null); // no parent!!
+    }
+
+    @Override
+    protected Class<?> findClass(String name) throws ClassNotFoundException {
+      ClassGen cg = new ClassGen(name, "java.lang.Object", "<generated>", Constants.ACC_PUBLIC | Constants.ACC_SUPER, null);
+      cg.addEmptyConstructor(Constants.ACC_PUBLIC);
+      JavaClass jClazz = cg.getJavaClass();
+      byte[] bytes = jClazz.getBytes();
+      return defineClass(jClazz.getClassName(), bytes, 0, bytes.length);
+    }
+
+    @Override
+    protected URL findResource(String name) {
+      URL url = null;
+      try {
+        url = getTempFile().getAbsoluteFile().toURI().toURL();
+        System.out.println("GeneratingClassLoader#findResource returning " + url);
+      } catch (IOException e) {
+      }
+      return url;
+    }
+
+    @Override
+    protected Enumeration<URL> findResources(String name) throws IOException {
+      URL url = null;
+      try {
+        url = getTempFile().getAbsoluteFile().toURI().toURL();
+        System.out.println("GeneratingClassLoader#findResources returning " + url);
+      } catch (IOException e) {
+      }
+      Vector<URL> urls = new Vector<URL>();
+      urls.add(url);
+      return urls.elements();
+    }
+
+    protected File getTempFile() {
+      return tempFile;
+    }
+  }
+
+  /**
+   * Custom class loader which uses BCEL to always dynamically generate a class for any class name it tries to load.
+   */
+  private class GeneratingClassLoader2 extends GeneratingClassLoader {
+    @Override
+    protected File getTempFile() {
+      return tempFile2;
+    }
+  }
+}


[24/55] [abbrv] incubator-geode git commit: GEODE-1360: Enabling to specify log4j2.xml for junit/dunit/intgrationtest

Posted by sa...@apache.org.
GEODE-1360: Enabling to specify log4j2.xml for junit/dunit/intgrationtest

Product code has built in log4j's trace log. However there's no command line
parameter to turn on it. This fix let gradlew to transfer the system property
to unit test framework, and let unit test framework to set it in run-time jvm.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/717ba5c8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/717ba5c8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/717ba5c8

Branch: refs/heads/feature/GEODE-1153
Commit: 717ba5c8b45394c691b77d6a1bb83318bfa182da
Parents: eaa1593
Author: zhouxh <gz...@pivotal.io>
Authored: Mon May 9 14:04:07 2016 -0700
Committer: zhouxh <gz...@pivotal.io>
Committed: Mon May 9 14:07:18 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java    | 1 +
 .../gemstone/gemfire/test/dunit/standalone/ProcessManager.java   | 1 +
 gradle/test.gradle                                               | 4 ++++
 3 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/717ba5c8/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
index be459b9..f45d2dd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
@@ -75,6 +75,7 @@ public class DUnitLauncher {
 
   /** change this to use a different log level in unit tests */
   public static final String LOG_LEVEL = System.getProperty("logLevel", "info");
+  public static final String LOG4J = System.getProperty("log4j.configurationFile");
   
   static int locatorPort;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/717ba5c8/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
index dd532c4..489f72b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
@@ -172,6 +172,7 @@ public class ProcessManager {
       "-Xrunjdwp:transport=dt_socket,server=y,suspend=" + jdkSuspend + jdkDebug,
       "-XX:+HeapDumpOnOutOfMemoryError",
       "-Xmx512m",
+      DUnitLauncher.LOG4J==null?"":"-Dlog4j.configurationFile="+DUnitLauncher.LOG4J,
       "-Dgemfire.DEFAULT_MAX_OPLOG_SIZE=10",
       "-Dgemfire.disallowMcastDefaults=true",
       "-ea", "-XX:+PrintGC", "-XX:+PrintGCDetails","-XX:+PrintGCTimeStamps",

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/717ba5c8/gradle/test.gradle
----------------------------------------------------------------------
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 2dd7521..96fbfc5 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -211,6 +211,10 @@ subprojects {
         if (logLevel != null) {
           systemProperty 'logLevel', logLevel
         }
+        def log4jLocation = System.getProperty('log4j.configurationFile')
+        if (log4jLocation != null) {
+          systemProperty 'log4j.configurationFile', log4jLocation
+        }
 
         def eol = System.getProperty('line.separator')
         def progress = new File(resultsDir, "$test.name-progress.txt")


[54/55] [abbrv] incubator-geode git commit: GEODE-1371: delete unused xml file from java src set

Posted by sa...@apache.org.
GEODE-1371: delete unused xml file from java src set


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/3222b051
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3222b051
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3222b051

Branch: refs/heads/feature/GEODE-1153
Commit: 3222b0514ba049ee2fdf52685e61a80a92b4eaa3
Parents: 980b492
Author: Kirk Lund <kl...@apache.org>
Authored: Wed May 11 11:23:27 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed May 11 11:23:27 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/test/golden/log4j2-test.xml  | 18 ------------------
 1 file changed, 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3222b051/geode-core/src/test/java/com/gemstone/gemfire/test/golden/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/golden/log4j2-test.xml b/geode-core/src/test/java/com/gemstone/gemfire/test/golden/log4j2-test.xml
deleted file mode 100755
index 6a885ef..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/golden/log4j2-test.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="ERROR" shutdownHook="disable" packages="com.gemstone.org.apache.logging.log4j.core.config.xml,com.gemstone.gemfire.internal.logging.log4j">
-  <Properties>
-    <Property name="gemfire-pattern">[%level{lowerCase=true} %date{yyyy/MM/dd HH:mm:ss.SSS z} &lt;%thread&gt; tid=%tid] %message%n%throwable%n</Property>
-  </Properties>
-  <Appenders>
-    <Console name="STDOUT" target="SYSTEM_OUT">
-      <PatternLayout pattern="${gemfire-pattern}"/>
-    </Console>
-  </Appenders>
-  <Loggers>
-    <Logger name="com.gemstone" level="WARN" additivity="true"/>
-    <Logger name="quickstart" level="WARN" additivity="true"/>
-    <Root level="ERROR">
-      <AppenderRef ref="STDOUT"/>
-    </Root>
-  </Loggers>
-</Configuration>


[30/55] [abbrv] incubator-geode git commit: GEODE-924: added FlakyTest category

Posted by sa...@apache.org.
GEODE-924: added FlakyTest category


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/625d491c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/625d491c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/625d491c

Branch: refs/heads/feature/GEODE-1153
Commit: 625d491c02855ddae04b17b2319f0514b41d6064
Parents: af119cf
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Mon May 9 15:49:00 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Mon May 9 15:49:30 2016 -0700

----------------------------------------------------------------------
 .../test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java  | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/625d491c/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
index 9fa771b..ce46d6b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
@@ -38,6 +38,7 @@ import com.gemstone.gemfire.cache.Region.Entry;
 import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.jayway.awaitility.core.ConditionTimeoutException;
 
@@ -89,6 +90,7 @@ public class Bug44418JUnitTest { // TODO: rename this test to non-ticket descrip
     }
   }
 
+  @Category(FlakyTest.class) // GEODE-924: expiration, time sensitive, expects action in 1 second
   @Test
   public void testGet() throws Exception {
 


[51/55] [abbrv] incubator-geode git commit: GEODE-1289: remove @Retained from getValueInVM

Posted by sa...@apache.org.
GEODE-1289: remove @Retained from getValueInVM

@Retained has been removed from the getValueInVM declaration
and callers have been changed to no longer act as if the result
of getValueInVM might be off-heap.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/3ebcf1f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3ebcf1f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3ebcf1f7

Branch: refs/heads/feature/GEODE-1153
Commit: 3ebcf1f750f3692179219b80737a39289d90c72d
Parents: f4a1679
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Tue May 10 16:12:56 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed May 11 10:40:26 2016 -0700

----------------------------------------------------------------------
 .../query/internal/index/AbstractIndex.java     | 12 +--------
 .../internal/cache/AbstractRegionEntry.java     | 12 +++------
 .../internal/cache/AbstractRegionMap.java       | 26 +++-----------------
 .../gemfire/internal/cache/RegionEntry.java     |  2 --
 4 files changed, 8 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3ebcf1f7/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
index 96e83b2..393428b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
@@ -1472,23 +1472,13 @@ public abstract class AbstractIndex implements IndexProtocol
         valuesInRegion = evaluateIndexIteratorsFromRE(re, context);
         valueInIndex = verifyAndGetPdxDomainObject(value);
       } else{
-        @Released Object val = re.getValueInVM(context.getPartitionedRegion());
-        StoredObject valToFree = null;
-        if (val instanceof StoredObject) {
-          valToFree = (StoredObject)val;
-        }
-        try {
+        Object val = re.getValueInVM(context.getPartitionedRegion());
         if (val instanceof CachedDeserializable) {
           val = ((CachedDeserializable)val).getDeserializedValue(getRegion(), re);
         }
         val = verifyAndGetPdxDomainObject(val);   
         valueInIndex = verifyAndGetPdxDomainObject(value);
         valuesInRegion = evaluateIndexIteratorsFromRE(val, context);
-        } finally {
-          if (valToFree != null) {
-            valToFree.release();
-          }
-        }
       }
     } catch (Exception e) {
       // TODO: Create a new LocalizedString for this.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3ebcf1f7/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
index 481c3be..25cc818 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
@@ -557,20 +557,18 @@ public abstract class AbstractRegionEntry implements RegionEntry,
   }
   
   
-  @Retained
   public final Object getValueInVM(RegionEntryContext context) {
     ReferenceCountHelper.createReferenceCountOwner();
-    @Retained Object v = _getValueRetain(context, true);
+    @Released Object v = _getValueRetain(context, true);
     
     if (v == null) { // should only be possible if disk entry
       v = Token.NOT_AVAILABLE;
     }
-    @Retained Object result = OffHeapHelper.copyAndReleaseIfNeeded(v);
+    Object result = OffHeapHelper.copyAndReleaseIfNeeded(v);
     ReferenceCountHelper.setReferenceCountOwner(null);
     return result;
   }
   
-  @Retained
   public  Object getValueInVMOrDiskWithoutFaultIn(LocalRegion owner) {
    return getValueInVM(owner);
   }
@@ -642,8 +640,7 @@ public abstract class AbstractRegionEntry implements RegionEntry,
         // Because the pr meta data region will not have an LRU.
         newValueToWrite = ((CachedDeserializable) newValueToWrite).getDeserializedValue(region, null);
         if (!create && newValueToWrite instanceof Versionable) {
-          @Retained @Released final Object oldValue = getValueInVM(region); // Heap value should always be deserialized at this point // OFFHEAP will not be deserialized
-          try {
+          final Object oldValue = getValueInVM(region); // Heap value should always be deserialized at this point // OFFHEAP will not be deserialized
           // BUGFIX for 35029. If oldValue is null the newValue should be put.
           if(oldValue == null) {
           	putValue = true;
@@ -653,9 +650,6 @@ public abstract class AbstractRegionEntry implements RegionEntry,
             Versionable ov = (Versionable) oldValue;
             putValue = nv.isNewerThan(ov);
           }  
-          } finally {
-            OffHeapHelper.release(oldValue);
-          }
         }
       }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3ebcf1f7/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
index 75a1e32..5248d3d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
@@ -1588,8 +1588,7 @@ public abstract class AbstractRegionMap implements RegionMap {
           synchronized (re) {
             if (!re.isRemoved() || re.isTombstone()) {
               EntryEventImpl sqlfEvent = null;
-              @Retained @Released Object oldValue = re.getValueInVM(owner);
-              try {
+              Object oldValue = re.getValueInVM(owner);
               final int oldSize = owner.calculateRegionEntryValueSize(re);
               // Create an entry event only if the calling context is
               // a receipt of a TXCommitMessage AND there are callbacks installed
@@ -1672,9 +1671,6 @@ public abstract class AbstractRegionMap implements RegionMap {
               } finally {
                 if (!cbEventInPending) cbEvent.release();
               }
-              } finally {
-                OffHeapHelper.release(oldValue);
-              }
             }
           }
         } finally {
@@ -1959,18 +1955,14 @@ public abstract class AbstractRegionMap implements RegionMap {
                       if (!oldRe.isRemoved() && 
                           (fp != null && fp.getCqCount() > 0)) {
                         
-                        @Retained @Released Object oldValue = oldRe.getValueInVM(owner); // OFFHEAP EntryEventImpl oldValue
+                        Object oldValue = oldRe.getValueInVM(owner); // OFFHEAP EntryEventImpl oldValue
                         
                         // this will not fault in the value.
-                        try {
                         if (oldValue == Token.NOT_AVAILABLE){
                           event.setOldValue(oldRe.getValueOnDiskOrBuffer(owner));
                         } else {
                           event.setOldValue(oldValue);
                         }
-                        } finally {
-                          OffHeapHelper.release(oldValue);
-                        }
                       }
                       boolean isCreate = false;
                       try {
@@ -2196,14 +2188,8 @@ public abstract class AbstractRegionMap implements RegionMap {
                     if (re.isValueNull()) {
                       event.setOldValue(re.getValueOnDiskOrBuffer(owner));
                     } else {
-                      
-                      @Retained @Released Object v = re.getValueInVM(owner);
-                      
-                      try {
-                        event.setOldValue(v); // OFFHEAP escapes to EntryEventImpl oldValue
-                      } finally {
-                        OffHeapHelper.release(v);
-                      }
+                      Object v = re.getValueInVM(owner);
+                      event.setOldValue(v); // OFFHEAP escapes to EntryEventImpl oldValue
                     }
                   }
                   final boolean oldWasTombstone = re.isTombstone();
@@ -2400,7 +2386,6 @@ public abstract class AbstractRegionMap implements RegionMap {
                     final boolean oldWasTombstone = oldRe.isTombstone();
                     final int oldSize = owner.calculateRegionEntryValueSize(oldRe);
                     Object oldValue = oldRe.getValueInVM(owner); // OFFHEAP eei
-                    try {
                     // Create an entry event only if the calling context is
                     // a receipt of a TXCommitMessage AND there are callbacks
                     // installed
@@ -2462,9 +2447,6 @@ public abstract class AbstractRegionMap implements RegionMap {
                     } finally {
                       if (!cbEventInPending) cbEvent.release();
                     }
-                    } finally {
-                      OffHeapHelper.release(oldValue);
-                    }
                   }
                 }
               }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3ebcf1f7/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
index bedbf81..09aef2a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
@@ -283,7 +283,6 @@ public interface RegionEntry {
    *
    * @see LocalRegion#getValueInVM
    */
-  @Retained
   public Object getValueInVM(RegionEntryContext context);
   /**
    * Returns the value of an entry as it resides on disk.  For
@@ -383,7 +382,6 @@ public interface RegionEntry {
    * return a temporary copy. For SQLFabric this is used during table scans in
    * queries when faulting in every value will be only an unnecessary overhead.
    */
-  @Retained
   public Object getValueInVMOrDiskWithoutFaultIn(LocalRegion owner);
 
   /**


[08/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/BackupInspectorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/BackupInspectorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/BackupInspectorJUnitTest.java
index 342dcf5..dbb58bc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/BackupInspectorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/BackupInspectorJUnitTest.java
@@ -16,10 +16,7 @@
  */
 package com.gemstone.gemfire.internal.cache.persistence;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.io.File;
 import java.io.IOException;
@@ -28,11 +25,13 @@ import java.util.Set;
 
 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.TemporaryFolder;
 
 import com.gemstone.gemfire.internal.FileUtil;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
  * TODO: fails when running integrationTest from gradle command-line on Windows 7
@@ -45,10 +44,10 @@ com.gemstone.gemfire.internal.cache.DiskRegionJUnitTest > testAssertionErrorIfMi
         at com.gemstone.gemfire.internal.cache.DiskRegionJUnitTest.testAssertionErrorIfMissingOplog(DiskRegionJUnitTest.java:2630)
  * 
  * Tests for the BackupInspector.
- * 
  */
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class BackupInspectorJUnitTest {
+
   private static final String UNIX_INCREMENTAL_BACKUP_SCRIPT = "#!/bin/bash -e\ncd `dirname $0`\n\n#Restore a backup of gemfire persistent data to the location it was backed up\n#from.\n#This script will refuse to restore if the original data still exists.\n\n#This script was automatically generated by the gemfire backup utility.\n\n#Test for existing originals. If they exist, do not restore the backup.\ntest -e '/Users/rholmes/Projects/gemfire/test/cacheserver/disk3/BACKUPbar.if' && echo 'Backup not restored. Refusing to overwrite /Users/rholmes/Projects/gemfire/test/cacheserver/disk3/BACKUPbar.if' && exit 1 \ntest -e '/Users/rholmes/Projects/gemfire/test/cacheserver/disk1/BACKUPfoo.if' && echo 'Backup not restored. Refusing to overwrite /Users/rholmes/Projects/gemfire/test/cacheserver/disk1/BACKUPfoo.if' && exit 1 \n\n#Restore data\nmkdir -p '/Users/rholmes/Projects/gemfire/test/cacheserver/disk3'\ncp -rp 'diskstores/bar/dir0'/* '/Users/rholmes/Projects/gemfire/test/cacheserver/di
 sk3'\nmkdir -p '/Users/rholmes/Projects/gemfire/test/cacheserver/disk4'\nmkdir -p '/Users/rholmes/Projects/gemfire/test/cacheserver/disk1'\ncp -rp 'diskstores/foo/dir0'/* '/Users/rholmes/Projects/gemfire/test/cacheserver/disk1'\nmkdir -p '/Users/rholmes/Projects/gemfire/test/cacheserver/disk2'\n\n#Incremental backup.  Restore baseline originals from a previous backup.\ncp -p '/Users/rholmes/Projects/gemfire/test/backup/2012-05-24-09-42/rholmes_mbp_410_v1_56425/diskstores/bar/dir0/BACKUPbar_1.drf' '/Users/rholmes/Projects/gemfire/test/cacheserver/disk3/BACKUPbar_1.drf'\ncp -p '/Users/rholmes/Projects/gemfire/test/backup/2012-05-24-09-42/rholmes_mbp_410_v1_56425/diskstores/foo/dir1/BACKUPfoo_2.crf' '/Users/rholmes/Projects/gemfire/test/cacheserver/disk2/BACKUPfoo_2.crf'\ncp -p '/Users/rholmes/Projects/gemfire/test/backup/2012-05-24-09-42/rholmes_mbp_410_v1_56425/diskstores/foo/dir1/BACKUPfoo_2.drf' '/Users/rholmes/Projects/gemfire/test/cacheserver/disk2/BACKUPfoo_2.drf'\ncp -p '/Users
 /rholmes/Projects/gemfire/test/backup/2012-05-24-09-42/rholmes_mbp_410_v1_56425/diskstores/bar/dir1/BACKUPbar_2.drf' '/Users/rholmes/Projects/gemfire/test/cacheserver/disk4/BACKUPbar_2.drf'\ncp -p '/Users/rholmes/Projects/gemfire/test/backup/2012-05-24-09-42/rholmes_mbp_410_v1_56425/diskstores/foo/dir0/BACKUPfoo_1.crf' '/Users/rholmes/Projects/gemfire/test/cacheserver/disk1/BACKUPfoo_1.crf'\ncp -p '/Users/rholmes/Projects/gemfire/test/backup/2012-05-24-09-42/rholmes_mbp_410_v1_56425/diskstores/bar/dir1/BACKUPbar_2.crf' '/Users/rholmes/Projects/gemfire/test/cacheserver/disk4/BACKUPbar_2.crf'\ncp -p '/Users/rholmes/Projects/gemfire/test/backup/2012-05-24-09-42/rholmes_mbp_410_v1_56425/diskstores/bar/dir0/BACKUPbar_1.crf' '/Users/rholmes/Projects/gemfire/test/cacheserver/disk3/BACKUPbar_1.crf'\ncp -p '/Users/rholmes/Projects/gemfire/test/backup/2012-05-24-09-42/rholmes_mbp_410_v1_56425/diskstores/foo/dir0/BACKUPfoo_1.drf' '/Users/rholmes/Projects/gemfire/test/cacheserver/disk1/BACKUPfo
 o_1.drf'";
   private static final String UNIX_FULL_BACKUP_SCRIPT = "#!/bin/bash -e\ncd `dirname $0`\n\n#Restore a backup of gemfire persistent data to the location it was backed up\n#from.\n#This script will refuse to restore if the original data still exists.\n\n#This script was automatically generated by the gemfire backup utility.\n\n#Test for existing originals. If they exist, do not restore the backup.\ntest -e '/Users/rholmes/Projects/gemfire/test/cacheserver/disk3/BACKUPbar.if' && echo 'Backup not restored. Refusing to overwrite /Users/rholmes/Projects/gemfire/test/cacheserver/disk3/BACKUPbar.if' && exit 1 \ntest -e '/Users/rholmes/Projects/gemfire/test/cacheserver/disk1/BACKUPfoo.if' && echo 'Backup not restored. Refusing to overwrite /Users/rholmes/Projects/gemfire/test/cacheserver/disk1/BACKUPfoo.if' && exit 1 \n\n#Restore data\nmkdir -p '/Users/rholmes/Projects/gemfire/test/cacheserver/disk3'\ncp -rp 'diskstores/bar/dir0'/* '/Users/rholmes/Projects/gemfire/test/cacheserver/disk3'\nm
 kdir -p '/Users/rholmes/Projects/gemfire/test/cacheserver/disk4'\ncp -rp 'diskstores/bar/dir1'/* '/Users/rholmes/Projects/gemfire/test/cacheserver/disk4'\nmkdir -p '/Users/rholmes/Projects/gemfire/test/cacheserver/disk1'\ncp -rp 'diskstores/foo/dir0'/* '/Users/rholmes/Projects/gemfire/test/cacheserver/disk1'\nmkdir -p '/Users/rholmes/Projects/gemfire/test/cacheserver/disk2'\ncp -rp 'diskstores/foo/dir1'/* '/Users/rholmes/Projects/gemfire/test/cacheserver/disk2'";
   
@@ -85,12 +84,15 @@ public class BackupInspectorJUnitTest {
    */
   private File fullBackupDir = null;
 
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
   /**
    * Set up data for all tests.
    */
   @Before
   public void setUp() throws Exception {
-    File tempDir = new File(System.getProperty("java.io.tmpdir"));
+    File tempDir = temporaryFolder.newFolder();
     
     /*
      * Create an incremental backup on the file system.
@@ -132,27 +134,10 @@ public class BackupInspectorJUnitTest {
   }
 
   /**
-   * Delete leftover data for all tests.
-   */
-  @After
-  public void tearDown() throws Exception {
-    
-    if((null != this.incrementalBackupDir) && (this.incrementalBackupDir.exists())) {
-      FileUtil.delete(this.incrementalBackupDir);
-    }
-    
-    if((null != this.fullBackupDir) && (this.fullBackupDir.exists())) {
-      FileUtil.delete(fullBackupDir);
-    }
-  }
-
-  /**
    * Tests that an IOException is thrown for a non-existent restore script.
-   * @throws Exception
    */
   @Test
-  public void testNonExistentScriptFile() 
-  throws Exception {
+  public void testNonExistentScriptFile() throws Exception {
     boolean ioexceptionThrown = false;
     
     try {
@@ -169,8 +154,7 @@ public class BackupInspectorJUnitTest {
    * Tests copy lines for windows.
    * @param inspector a BackupInspector.
    */
-  private void testIncrementalBackupScriptForWindows(BackupInspector inspector) 
-  throws Exception {
+  private void testIncrementalBackupScriptForWindows(BackupInspector inspector) throws Exception {
     assertEquals(WINDOWS_COPY_FROM_1,inspector.getCopyFromForOplogFile(OPLOG_FILENAME_1));
     assertEquals(WINDOWS_COPY_TO_1,inspector.getCopyToForOplogFile(OPLOG_FILENAME_1));    
     assertEquals(WINDOWS_COPY_FROM_2,inspector.getCopyFromForOplogFile(OPLOG_FILENAME_2));
@@ -182,10 +166,8 @@ public class BackupInspectorJUnitTest {
   /**
    * Tests copy lines for unix.
    * @param inspector a BackupInspector. 
-   * @throws Exception
    */
-  private void testIncrementalBackupScriptForUnix(BackupInspector inspector) 
-  throws Exception {    
+  private void testIncrementalBackupScriptForUnix(BackupInspector inspector) throws Exception {
     assertEquals(UNIX_COPY_FROM_1,inspector.getCopyFromForOplogFile(OPLOG_FILENAME_1));
     assertEquals(UNIX_COPY_TO_1,inspector.getCopyToForOplogFile(OPLOG_FILENAME_1));    
     assertEquals(UNIX_COPY_FROM_2,inspector.getCopyFromForOplogFile(OPLOG_FILENAME_2));
@@ -196,11 +178,9 @@ public class BackupInspectorJUnitTest {
   
   /**
    * Tests that the parser succeeds for an incremental backup restore script.
-   * @throws Exception
    */
   @Test
-  public void testIncrementalBackupScript() 
-  throws Exception {
+  public void testIncrementalBackupScript() throws Exception {
     BackupInspector inspector = BackupInspector.createInspector(incrementalBackupDir);
     
     assertTrue(inspector.isIncremental());
@@ -222,11 +202,9 @@ public class BackupInspectorJUnitTest {
   
   /**
    * Tests that the parser works with a full backup restore script.
-   * @throws Exception
    */
   @Test
-  public void testFullBackupScript() 
-  throws Exception {
+  public void testFullBackupScript() throws Exception {
     BackupInspector inspector = BackupInspector.createInspector(fullBackupDir);
     assertFalse(inspector.isIncremental());
     assertTrue(inspector.getIncrementalOplogFileNames().isEmpty());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/query/TemporaryResultSetFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/query/TemporaryResultSetFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/query/TemporaryResultSetFactoryJUnitTest.java
index 3940a82..adfbad4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/query/TemporaryResultSetFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/query/TemporaryResultSetFactoryJUnitTest.java
@@ -16,32 +16,29 @@
  */
 package com.gemstone.gemfire.internal.cache.persistence.query;
 
+import static org.junit.Assert.*;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.internal.cache.CachedDeserializable;
-import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
-import com.gemstone.gemfire.internal.cache.persistence.query.IndexMap;
 import com.gemstone.gemfire.internal.cache.persistence.query.IndexMap.IndexEntry;
 import com.gemstone.gemfire.internal.cache.persistence.query.mock.IndexMapImpl;
 import com.gemstone.gemfire.internal.cache.persistence.query.mock.NaturalComparator;
 import com.gemstone.gemfire.internal.cache.persistence.query.mock.Pair;
 import com.gemstone.gemfire.internal.cache.persistence.query.mock.PairComparator;
-import com.gemstone.gemfire.internal.cache.persistence.query.ResultBag;
-import com.gemstone.gemfire.internal.cache.persistence.query.ResultSet;
-import com.gemstone.gemfire.internal.cache.persistence.query.TemporaryResultSetFactory;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
-public class TemporaryResultSetFactoryJUnitTest extends TestCase {
+public class TemporaryResultSetFactoryJUnitTest {
 
+  @Test
   public void testSortedResultSet() {
     ResultSet set = new TemporaryResultSetFactory().getSortedResultSet(null, false);
     set.add(1);
@@ -51,9 +48,9 @@ public class TemporaryResultSetFactoryJUnitTest extends TestCase {
     set.add(2);
     
     assertItrEquals(set.iterator(), 1,2, 3, 4);
-    
   }
-  
+
+  @Test
   public void testSortedResultBag() {
     ResultBag set = new TemporaryResultSetFactory().getSortedResultBag(null, false);
     set.add(1);
@@ -61,11 +58,11 @@ public class TemporaryResultSetFactoryJUnitTest extends TestCase {
     set.add(4);
     set.add(3);
     set.add(2);
-    
-    
+
     assertItrEquals(set.iterator(), 1,2, 2,3, 4);
   }
-  
+
+  @Test
   public void testResultList() {
     ResultList set = new TemporaryResultSetFactory().getResultList();
     set.add(1);
@@ -73,12 +70,12 @@ public class TemporaryResultSetFactoryJUnitTest extends TestCase {
     set.add(4);
     set.add(3);
     set.add(2);
-    
-    
+
     assertItrEquals(set.iterator(), 1,2, 4,3, 2);
     assertItrEquals(set.iterator(2), 4,3, 2);
   }
-  
+
+  @Test
   public void testIndexMap() {
     IndexMap map = new IndexMapImpl();
     TreeMap expected = new TreeMap(new PairComparator(new NaturalComparator(), new NaturalComparator()));
@@ -87,7 +84,6 @@ public class TemporaryResultSetFactoryJUnitTest extends TestCase {
     put("i4", "r4", "v4", map, expected);
     put("i2", "r5", "v5", map, expected);
     
-    
     assertItrEquals(map.keyIterator(), "r1", "r2", "r5", "r4");
     assertItrEquals(map.keyIterator("i2", true, "i3", true), "r2", "r5");
     assertItrEquals(map.keyIterator("i2", true, "i2", true), "r2", "r5");
@@ -97,16 +93,12 @@ public class TemporaryResultSetFactoryJUnitTest extends TestCase {
     assertEntryEquals(map.iterator("i2", true, "i4", true), expected.tailMap(new Pair("i1", "r2")));
   }
 
-  private void put(String ikey, String rkey, String value, IndexMap map,
-      Map expected) {
+  private void put(String ikey, String rkey, String value, IndexMap map, Map expected) {
     map.put(ikey, rkey, value);
     expected.put(new Pair(ikey, rkey), value);
-    
   }
 
-  private void assertItrEquals(
-      CloseableIterator<CachedDeserializable> iterator, Object ... values) {
-    
+  private void assertItrEquals(CloseableIterator<CachedDeserializable> iterator, Object ... values) {
     ArrayList actual = new ArrayList();
     
     while(iterator.hasNext()) {
@@ -114,12 +106,9 @@ public class TemporaryResultSetFactoryJUnitTest extends TestCase {
     }
     
     assertEquals(Arrays.asList(values), actual);
-    
   }
   
-  private void assertEntryEquals(
-      CloseableIterator<IndexEntry> closeableIterator, Map expected) {
-    
+  private void assertEntryEquals(CloseableIterator<IndexEntry> closeableIterator, Map expected) {
     LinkedHashMap actual = new LinkedHashMap();
     
     while(closeableIterator.hasNext()) {
@@ -131,6 +120,5 @@ public class TemporaryResultSetFactoryJUnitTest extends TestCase {
     }
     
     assertEquals(expected, actual);
-    
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/region/entry/RegionEntryFactoryBuilderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/region/entry/RegionEntryFactoryBuilderJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/region/entry/RegionEntryFactoryBuilderJUnitTest.java
index 09fde8a..fcbd140 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/region/entry/RegionEntryFactoryBuilderJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/region/entry/RegionEntryFactoryBuilderJUnitTest.java
@@ -16,7 +16,8 @@
  */
 package com.gemstone.gemfire.internal.cache.region.entry;
 
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import static org.junit.Assert.*;
+
 import junitparams.JUnitParamsRunner;
 import junitparams.Parameters;
 import org.junit.Before;
@@ -24,7 +25,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 
-import static org.junit.Assert.assertEquals;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 @RunWith(JUnitParamsRunner.class)
@@ -77,9 +78,7 @@ public class RegionEntryFactoryBuilderJUnitTest {
       "VersionedStatsDiskLRURegionEntryHeapFactory,true,true,true,true,false",
       "VersionedStatsDiskLRURegionEntryOffHeapFactory,true,true,true,true,true"
   })
-  public void testRegionEntryFactoryUnitTest(String factoryName, boolean enableStats, boolean enableLRU, boolean enableDisk,
-      boolean enableVersioning, boolean enableOffHeap) {
-    assertEquals(factoryName,
-        regionEntryFactoryBuilder.getRegionEntryFactoryOrNull(enableStats, enableLRU, enableDisk, enableVersioning, enableOffHeap).getClass().getSimpleName());
+  public void testRegionEntryFactoryUnitTest(String factoryName, boolean enableStats, boolean enableLRU, boolean enableDisk,boolean enableVersioning, boolean enableOffHeap) {
+    assertEquals(factoryName, regionEntryFactoryBuilder.getRegionEntryFactoryOrNull(enableStats, enableLRU, enableDisk, enableVersioning, enableOffHeap).getClass().getSimpleName());
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
index 40d741e..3b0157f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
@@ -112,7 +112,7 @@ public class Bug37805DUnitTest extends DistributedTestCase{
       }
     }
     //assertNull(rootRegions);
-    //assertEquals(0,((Collection)CacheServerTestUtil.getCache().rootRegions()).size());
+    //assertIndexDetailsEquals(0,((Collection)CacheServerTestUtil.getCache().rootRegions()).size());
   }
   
   private Pool getClientPool(String host, int server1Port,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
index 52f416a..f03f5fa 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
@@ -478,12 +478,12 @@ public class CacheServerTransactionsDUnitTest extends DistributedTestCase
     if (server.equals("server1")) {
       r1.invalidate(k1);
       assertNull(r1.getEntry(k1).getValue());
-      //assertEquals(r1.getEntry(k2).getValue(), server1_k2);
+      //assertIndexDetailsEquals(r1.getEntry(k2).getValue(), server1_k2);
     }
     else if (server.equals("server2")) {
       r1.invalidate(k1);
       assertNull(r1.getEntry(k1).getValue());
-      //assertEquals(r1.getEntry(k2).getValue(), server2_k3);
+      //assertIndexDetailsEquals(r1.getEntry(k2).getValue(), server2_k3);
     }
   }
 
@@ -495,12 +495,12 @@ public class CacheServerTransactionsDUnitTest extends DistributedTestCase
     if (server.equals("server1")) {
       r1.destroy(k1);
       assertNull(r1.getEntry(k1));
-      //assertEquals(r1.getEntry(k2).getValue(), server1_k2);
+      //assertIndexDetailsEquals(r1.getEntry(k2).getValue(), server1_k2);
     }
     else if (server.equals("server2")) {
       r1.destroy(k1);
       assertNull(r1.getEntry(k1));
-      //assertEquals(r1.getEntry(k2).getValue(), server2_k3);
+      //assertIndexDetailsEquals(r1.getEntry(k2).getValue(), server2_k3);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
index 42ff29a..5953b8a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
@@ -222,8 +222,8 @@ public class ClientHealthMonitorJUnitTest
 //     }
 //     connection1.putObject("region1", "key-1", "value-2", new EventID(new byte[] {1},1,3), null);
 //     this.system.getLogWriter().info("did put 2");
-//     assertEquals(1, s.getInt("currentClients"));
-//     assertEquals(1, s.getInt("currentClientConnections"));
+//     assertIndexDetailsEquals(1, s.getInt("currentClients"));
+//     assertIndexDetailsEquals(1, s.getInt("currentClientConnections"));
 
 //     // now lets see what happens when we close our connection
 //     // note we use a nasty close which just closes the socket instead
@@ -238,8 +238,8 @@ public class ClientHealthMonitorJUnitTest
 //                                       + s.getInt("currentClients")
 //                                       + " currentClientConnections="
 //                                       + s.getInt("currentClientConnections"));
-//       assertEquals(0, s.getInt("currentClients"));
-//       assertEquals(0, s.getInt("currentClientConnections"));
+//       assertIndexDetailsEquals(0, s.getInt("currentClients"));
+//       assertIndexDetailsEquals(0, s.getInt("currentClientConnections"));
 //     }
   }
  public void addExceptions() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
index 5415e86..d5111bc 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
@@ -623,7 +623,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
     };
     Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
     
-    // assertEquals(region1.getEntry(k1).getValue(), k1);
+    // assertIndexDetailsEquals(region1.getEntry(k1).getValue(), k1);
     wc = new WaitCriterion() {
       String excuse;
       public boolean done() {
@@ -648,8 +648,8 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
     };
     Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
     
-    // assertEquals(region1.getEntry(k2).getValue(), k2);
-    // assertEquals(region2.getEntry(k1).getValue(), k1);
+    // assertIndexDetailsEquals(region1.getEntry(k2).getValue(), k2);
+    // assertIndexDetailsEquals(region2.getEntry(k1).getValue(), k1);
     wc = new WaitCriterion() {
       String excuse;
       public boolean done() {
@@ -662,7 +662,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
     };
     Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
     
-    // assertEquals(region2.getEntry(k2).getValue(), k2);
+    // assertIndexDetailsEquals(region2.getEntry(k2).getValue(), k2);
   }
 
   /**
@@ -1103,7 +1103,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
       assertNull(cache.getRegion(Region.SEPARATOR + regionName));
        verifyCacheClientProxyOnServer();
 
-      //assertEquals(1, bs.getAcceptor().getCacheClientNotifier().getClientProxies().size());
+      //assertIndexDetailsEquals(1, bs.getAcceptor().getCacheClientNotifier().getClientProxies().size());
     }
     catch (Exception ex) {
       ex.printStackTrace();
@@ -1215,7 +1215,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
       };
       Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
       
-      // assertEquals(k1, r1.getEntry(k1).getValue());
+      // assertIndexDetailsEquals(k1, r1.getEntry(k1).getValue());
       wc = new WaitCriterion() {
         String excuse;
         public boolean done() {
@@ -1228,7 +1228,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
       };
       Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
       
-      // assertEquals(k2, r1.getEntry(k2).getValue());
+      // assertIndexDetailsEquals(k2, r1.getEntry(k2).getValue());
       wc = new WaitCriterion() {
         String excuse;
         public boolean done() {
@@ -1241,7 +1241,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
       };
       Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
       
-      // assertEquals(server_k1, r2.getEntry(k1).getValue());
+      // assertIndexDetailsEquals(server_k1, r2.getEntry(k1).getValue());
       wc = new WaitCriterion() {
         String excuse;
         public boolean done() {
@@ -1254,7 +1254,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
       };
       Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
       
-      // assertEquals(server_k2, r2.getEntry(k2).getValue());
+      // assertIndexDetailsEquals(server_k2, r2.getEntry(k2).getValue());
     }
     catch (Exception ex) {
       Assert.fail("failed while verifyUpdates()", ex);
@@ -1358,7 +1358,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
       };
       Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
       
-      // assertEquals(server_k1, r2.getEntry(k1).getValue());
+      // assertIndexDetailsEquals(server_k1, r2.getEntry(k1).getValue());
       wc = new WaitCriterion() {
         String excuse;
         public boolean done() {
@@ -1371,7 +1371,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
       };
       Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
       
-      // assertEquals(server_k2, r2.getEntry(k2).getValue());
+      // assertIndexDetailsEquals(server_k2, r2.getEntry(k2).getValue());
     }
     catch (Exception ex) {
       Assert.fail("failed while verifyUpdatesOnRegion2()", ex);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConflationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConflationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConflationDUnitTest.java
index 2aed3a7..d62addf 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConflationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConflationDUnitTest.java
@@ -553,7 +553,7 @@ public class ConflationDUnitTest extends DistributedTestCase
       }
     };
     Wait.waitForCriterion(ev, 60 * 1000, 200, true);
-    // assertEquals("creates", 2, counterCreate);
+    // assertIndexDetailsEquals("creates", 2, counterCreate);
     
     ev = new WaitCriterion() {
       public boolean done() {
@@ -566,7 +566,7 @@ public class ConflationDUnitTest extends DistributedTestCase
     };
     Wait.waitForCriterion(ev, 60 * 1000, 200, true);
     
-    // assertEquals("destroys", 2, counterDestroy);
+    // assertIndexDetailsEquals("destroys", 2, counterDestroy);
     // assertTrue("updates", 20000 >= counterUpdate);
     ev = new WaitCriterion() {
       public boolean done() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
index 90bb911..bd4f94a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
@@ -537,7 +537,7 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
     // Verify that it is durable and its properties are correct
     assertTrue(proxy.isDurable());
     assertEquals("DurableClientReconnectDUnitTest_client", proxy.getDurableId());
-//    assertEquals(60, proxy.getDurableTimeout());
+//    assertIndexDetailsEquals(60, proxy.getDurableTimeout());
     }catch (Exception e){
       Assert.fail("test failed due to" , e);
     }    

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/FilterProfileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/FilterProfileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/FilterProfileJUnitTest.java
index 1314d42..5d53dd2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/FilterProfileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/FilterProfileJUnitTest.java
@@ -16,10 +16,8 @@
  */
 package com.gemstone.gemfire.internal.cache.tier.sockets;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import java.util.Collections;
 
@@ -36,8 +34,8 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class FilterProfileJUnitTest {
 
-  LocalRegion mockRegion;
-  FilterProfile fprofile;
+  private LocalRegion mockRegion;
+  private FilterProfile fprofile;
   
   @Before
   public void setUp() {
@@ -48,7 +46,6 @@ public class FilterProfileJUnitTest {
     fprofile = new FilterProfile(mockRegion);
   }
 
-  
   @Test
   public void testUnregisterKey() {
     unregisterKey(false);
@@ -102,8 +99,7 @@ public class FilterProfileJUnitTest {
     assertTrue(isClientInterested);
     fprofile.unregisterClientInterest(clientId, "Object1234", InterestType.KEY);
     fprofile.unregisterClientInterest(clientId, "Object4567", InterestType.KEY);
-    assertFalse("still has this interest: " + fprofile.getKeysOfInterestFor(clientId),
-        fprofile.hasKeysOfInterestFor(clientId, inv));
+    assertFalse("still has this interest: " + fprofile.getKeysOfInterestFor(clientId), fprofile.hasKeysOfInterestFor(clientId, inv));
   }
 
   @Test
@@ -134,7 +130,6 @@ public class FilterProfileJUnitTest {
     assertFalse(fprofile.hasKeysOfInterestFor(clientId, inv));
   }
 
-  
   @Test
   public void testUnregisterRegex() {
     unregisterRegex(false);
@@ -194,7 +189,6 @@ public class FilterProfileJUnitTest {
     assertFalse(fprofile.hasRegexInterestFor(clientId, inv));
   }
 
-
   @Test
   public void testUnregisterAllKeys() {
     unregisterAllKeys(false);
@@ -237,7 +231,7 @@ public class FilterProfileJUnitTest {
     unregisterFilterClass(inv, true);
   }
 
-  public void unregisterFilterClass(boolean inv, boolean twoClients) {
+  private void unregisterFilterClass(boolean inv, boolean twoClients) {
     String clientId = "client";
     fprofile.registerClientInterest(clientId, "com.gemstone.gemfire.internal.cache.tier.sockets.TestFilter", InterestType.FILTER_CLASS, inv);
     if (twoClients) {
@@ -264,7 +258,7 @@ public class FilterProfileJUnitTest {
     unregisterAllFilterClass(inv, true);
   }
 
-  public void unregisterAllFilterClass(boolean inv, boolean twoClients) {
+  private void unregisterAllFilterClass(boolean inv, boolean twoClients) {
     String clientId = "client";
     fprofile.registerClientInterest(clientId, "com.gemstone.gemfire.internal.cache.tier.sockets.TestFilter", InterestType.FILTER_CLASS, inv);
     if (twoClients) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
index 693ead4..13f2527 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
@@ -382,7 +382,7 @@ public class HAStartupAndFailoverDUnitTest extends DistributedTestCase {
   }
 
 //  public static void processException() {
-//    assertEquals(conn.getServer().getPort(), PORT1.intValue());
+//    assertIndexDetailsEquals(conn.getServer().getPort(), PORT1.intValue());
 //    try {
 //      pool.processException(new Exception("dummy"), conn);
 //      //Thread.sleep(10000); // why sleep?
@@ -516,7 +516,7 @@ public class HAStartupAndFailoverDUnitTest extends DistributedTestCase {
     {
     try {
       Cache c = CacheFactory.getAnyInstance();
-      // assertEquals("More than one BridgeServer", 1,
+      // assertIndexDetailsEquals("More than one BridgeServer", 1,
       // c.getCacheServers().size());
       WaitCriterion wc = new WaitCriterion() {
         String excuse;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListFailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListFailoverDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListFailoverDUnitTest.java
index 74370c7..66527d0 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListFailoverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListFailoverDUnitTest.java
@@ -269,7 +269,7 @@ public class InterestListFailoverDUnitTest extends DistributedTestCase
       final String key1 = "key-1";
       assertNotNull(r);
       // Verify that 'key-1' was updated
-      // assertEquals("vm2-key-1", r.getEntry("key-1").getValue());
+      // assertIndexDetailsEquals("vm2-key-1", r.getEntry("key-1").getValue());
       WaitCriterion wc = new WaitCriterion() {
         String excuse;
         public boolean done() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/MessageJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/MessageJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/MessageJUnitTest.java
index 8caf3f6..9f05aa7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/MessageJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/MessageJUnitTest.java
@@ -17,7 +17,6 @@
 package com.gemstone.gemfire.internal.cache.tier.sockets;
 
 import static org.junit.Assert.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import java.net.Socket;
@@ -33,11 +32,11 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class MessageJUnitTest {
 
-  Message message;
-  Socket mockSocket;
-  MessageStats mockStats;
-  ByteBuffer msgBuffer;
-  ServerConnection mockServerConnection;
+  private Message message;
+  private Socket mockSocket;
+  private MessageStats mockStats;
+  private ByteBuffer msgBuffer;
+  private ServerConnection mockServerConnection;
   
   @Before
   public void setUp() throws Exception {
@@ -81,11 +80,10 @@ public class MessageJUnitTest {
     message.setParts(parts);
     try {
       message.send();
+      fail("expected an exception but none was thrown");
     } catch (MessageTooLargeException e) {
       assertTrue(e.getMessage().contains("exceeds maximum integer value"));
-      return;
     }
-    fail("expected an exception but none was thrown");
   }
   
   @Test
@@ -98,14 +96,12 @@ public class MessageJUnitTest {
     message.setParts(parts);
     try {
       message.send();
+      fail("expected an exception but none was thrown");
     } catch (MessageTooLargeException e) {
       assertFalse(e.getMessage().contains("exceeds maximum integer value"));
-      return;
     }
-    fail("expected an exception but none was thrown");
   }
-  
-  
+
   // TODO many more tests are needed
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ObjectPartListJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ObjectPartListJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ObjectPartListJUnitTest.java
index ef6bfcb..0805e2a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ObjectPartListJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ObjectPartListJUnitTest.java
@@ -16,24 +16,23 @@
  */
 package com.gemstone.gemfire.internal.cache.tier.sockets;
 
+import static org.junit.Assert.*;
+
 import java.io.IOException;
 import java.util.List;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import junit.framework.TestCase;
-
 import com.gemstone.gemfire.CopyHelper;
 import com.gemstone.gemfire.internal.util.BlobHelper;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- *
- */
 @Category(UnitTest.class)
-public class ObjectPartListJUnitTest extends TestCase {
-  
-  public void testValueAsObject() throws IOException {
+public class ObjectPartListJUnitTest {
+
+  @Test
+  public void testValueAsObject() throws Exception {
     VersionedObjectList list = new VersionedObjectList(100, false, false);
     byte[] normalBytes = "value1".getBytes();
     list.addObjectPart("key", normalBytes , false, null);
@@ -69,8 +68,9 @@ public class ObjectPartListJUnitTest extends TestCase {
     assertEquals(new TestException("hello"), values.get(3));
     assertNull(values.get(4));
   }
-  
-  public void testValueAsObjectByteArray() throws IOException, ClassNotFoundException {
+
+  @Test
+  public void testValueAsObjectByteArray() throws Exception {
     ObjectPartList list = new VersionedObjectList(100, false, false, true);
     byte[] normalBytes = "value1".getBytes();
     list.addObjectPart("key", normalBytes , false, null);
@@ -108,10 +108,8 @@ public class ObjectPartListJUnitTest extends TestCase {
 
     public TestException(String message) {
       super(message);
-      // TODO Auto-generated constructor stub
     }
-    
-    
+
     @Override
     public boolean equals(Object o) {
       if(!(o instanceof TestException)) {
@@ -122,8 +120,5 @@ public class ObjectPartListJUnitTest extends TestCase {
       }
       return true;
     }
-    
-    
   }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart1DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart1DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart1DUnitTest.java
index 65d6448..f1fba88 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart1DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart1DUnitTest.java
@@ -65,8 +65,8 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       //pause(5000);      
       verifyLiveAndRedundantServers(3, 0);
       verifyOrderOfEndpoints();
-      //assertEquals(1, pool.getRedundantNames().size());
-      // assertEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
 //      pause(10 * 1000);
 //      assertFalse(pool.getCurrentServerNames().contains(SERVER3));
       WaitCriterion wc = new WaitCriterion() {
@@ -114,8 +114,8 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       // pause(5000);
       verifyLiveAndRedundantServers(3, 0);
       verifyOrderOfEndpoints();
-      //assertEquals(1, pool.getRedundantNames().size());
-      //assertEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(3, pool.getConnectedServerCount());
 //      pause(10 * 1000);
 //      assertFalse(pool.getCurrentServerNames().contains(SERVER1));
       WaitCriterion wc = new WaitCriterion() {
@@ -153,7 +153,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertEquals(1, pool.getRedundantNames().size());
       //assertTrue(pool.getRedundantNames().contains(SERVER1));      
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       //pause(5000);
@@ -162,11 +162,11 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       verifyLiveAndRedundantServers(3, 1);
       verifyOrderOfEndpoints();
       // assertTrue(proxy.getDeadServers().contains(SERVER3));
-      //assertEquals(2, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
-      //assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -193,7 +193,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER4));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -202,11 +202,11 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       verifyLiveAndRedundantServers(3, 1);
       verifyOrderOfEndpoints();
       // assertTrue(proxy.getDeadServers().contains(SERVER3));
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -230,7 +230,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER4));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -241,11 +241,11 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       verifyLiveAndRedundantServers(3, 1);
       verifyOrderOfEndpoints();
       // assertTrue(proxy.getDeadServers().contains(SERVER3));
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -270,7 +270,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER4));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -280,11 +280,11 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       verifyLiveAndRedundantServers(3, 1);
       verifyOrderOfEndpoints();
       // assertTrue(proxy.getDeadServers().contains(SERVER3));
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -308,7 +308,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -318,11 +318,11 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       verifyLiveAndRedundantServers(3, 1);
       verifyOrderOfEndpoints();
       // assertTrue(proxy.getDeadServers().contains(SERVER3));
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
-      // assertEquals(3, pool.getConnectedServerCount());
-     // assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+     // assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -347,20 +347,20 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertEquals(1, pool.getRedundantNames().size());
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       //pause(5000);
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER3);
       verifyLiveAndRedundantServers(3, 1);
-      //assertEquals(2, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       //      assertTrue(pool.getRedundantNames()
       //          .contains(SERVER1));
       verifyOrderOfEndpoints();
       server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
-      //assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -387,20 +387,20 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertEquals(1, pool.getRedundantNames().size());
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER3);
       verifyLiveAndRedundantServers(3, 1);
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       verifyOrderOfEndpoints();
       server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -425,7 +425,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertEquals(1, pool.getRedundantNames().size());
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -434,13 +434,13 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER3);
       verifyLiveAndRedundantServers(3, 1);
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       verifyOrderOfEndpoints();
       server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -465,7 +465,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertEquals(1, pool.getRedundantNames().size());
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -473,14 +473,14 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER3);
       verifyLiveAndRedundantServers(3, 1);
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       verifyOrderOfEndpoints();
       //server1.invoke(RedundancyLevelTestBase.class,
       //    "verifyInterestRegistration");
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -505,7 +505,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertEquals(1, pool.getRedundantNames().size());
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -517,13 +517,13 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER3);
       verifyLiveAndRedundantServers(3, 1);
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       verifyOrderOfEndpoints();
       server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java
index 4692699..0499847 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java
@@ -67,7 +67,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
 
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       //pause(5000);
@@ -75,12 +75,12 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       verifyRedundantServersContain(SERVER3);
       verifyLiveAndRedundantServers(3, 1);
       verifyOrderOfEndpoints();
-      //assertEquals(2, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       //assertTrue(pool.getRedundantNames()
       //    .contains(SERVER2));
       assertTrue(pool.getPrimaryName().equals(SERVER2));
-      //assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -108,7 +108,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       waitConnectedServers(4);
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -116,12 +116,12 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       verifyRedundantServersContain(SERVER3);
       verifyLiveAndRedundantServers(3, 1);
       verifyOrderOfEndpoints();
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER2));
       assertTrue(pool.getPrimaryName().equals(SERVER2));
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -147,7 +147,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       waitConnectedServers(4);
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -157,12 +157,12 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       verifyRedundantServersContain(SERVER3);
       verifyLiveAndRedundantServers(3, 1);
       verifyOrderOfEndpoints();
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER2));
       assertTrue(pool.getPrimaryName().equals(SERVER2));
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -188,7 +188,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       waitConnectedServers(4);
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -197,12 +197,12 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       verifyRedundantServersContain(SERVER3);
       verifyLiveAndRedundantServers(3, 1);
       verifyOrderOfEndpoints();
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER2));
       assertTrue(pool.getPrimaryName().equals(SERVER2));
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -228,7 +228,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       waitConnectedServers(4);
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
-      //assertEquals(0, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
       server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
@@ -237,12 +237,12 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       verifyRedundantServersContain(SERVER3);
       verifyLiveAndRedundantServers(3, 1);
       verifyOrderOfEndpoints();
-      // assertEquals(2, pool.getRedundantNames().size());
+      // assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER2));
       assertTrue(pool.getPrimaryName().equals(SERVER2));
-      // assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(1, proxy.getDeadServers().size());
+      // assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, proxy.getDeadServers().size());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -273,7 +273,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       //pause(5000);
       verifyLiveAndRedundantServers(2, 1);
       verifyOrderOfEndpoints();
-      //assertEquals(2, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       //Not Sure
       //assertTrue(pool.getPrimaryName().equals(SERVER2));
       server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
@@ -311,19 +311,19 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       verifyDeadServers(2);
-      //assertEquals(2, pool.getConnectedServerCount());
-      //assertEquals(2, proxy.getDeadServers().size());
+      //assertIndexDetailsEquals(2, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(2, proxy.getDeadServers().size());
       //pause(10000);
       verifyLiveAndRedundantServers(2, 1);
       verifyOrderOfEndpoints();
-      //assertEquals(2, pool.getRedundantNames().size());      
+      //assertIndexDetailsEquals(2, pool.getRedundantNames().size());
       // bring up one server.
       server1.invoke(() -> RedundancyLevelTestBase.startServer());
       //pause(10000);
       verifyLiveAndRedundantServers(3, 2);
       verifyOrderOfEndpoints();
-      //assertEquals(3, pool.getRedundantNames().size());
-      //assertEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(3, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(3, pool.getConnectedServerCount());
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       verifyRedundantServersContain(SERVER2);
       verifyRedundantServersContain(SERVER4);
@@ -334,8 +334,8 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       //pause(10000);
       Wait.pause(1000);
       verifyOrderOfEndpoints();
-      //assertEquals(3, pool.getRedundantNames().size());
-      //assertEquals(4, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(3, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(4, pool.getConnectedServerCount());
       server2.invoke(() -> RedundancyLevelTestBase.verifyNoCCP());
     }
     catch (Exception ex) {
@@ -364,8 +364,8 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       //pause(10000);      
       verifyLiveAndRedundantServers(2, 1);
       verifyOrderOfEndpoints();
-      //assertEquals(2, pool.getRedundantNames().size());
-      //assertEquals(2, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(2, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(2, pool.getConnectedServerCount());
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertFalse(pool.getRedundantNames().contains(SERVER3));
@@ -375,8 +375,8 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       //pause(10000);
       verifyLiveAndRedundantServers(3, 2);
       verifyOrderOfEndpoints();
-      //assertEquals(3, pool.getConnectedServerCount());
-      //assertEquals(3, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(3, pool.getRedundantNames().size());
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       assertTrue(pool.getRedundantNames().contains(SERVER3));
       assertTrue(pool.getPrimaryName().equals(SERVER1));
@@ -387,8 +387,8 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       //pause(10000);
       Wait.pause(1000);
       verifyOrderOfEndpoints();
-      //assertEquals(3, pool.getRedundantNames().size());
-      //assertEquals(4, pool.getConnectedServerCount());      
+      //assertIndexDetailsEquals(3, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(4, pool.getConnectedServerCount());
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       assertTrue(pool.getRedundantNames().contains(SERVER3));
       assertTrue(pool.getPrimaryName().equals(SERVER1));
@@ -418,8 +418,8 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       //pause(10000);      
       verifyLiveAndRedundantServers(3, 2);
       verifyOrderOfEndpoints();
-      //assertEquals(3, pool.getRedundantNames().size());
-      //assertEquals(3, pool.getConnectedServerCount());      
+      //assertIndexDetailsEquals(3, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(3, pool.getConnectedServerCount());
       assertTrue(pool.getRedundantNames().contains(SERVER3));
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       assertTrue(pool.getPrimaryName().equals(SERVER1));
@@ -428,8 +428,8 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       server1.invoke(() -> RedundancyLevelTestBase.startServer());
       Wait.pause(1000);
       verifyOrderOfEndpoints();
-      //assertEquals(3, pool.getRedundantNames().size());
-      //assertEquals(4, pool.getConnectedServerCount());      
+      //assertIndexDetailsEquals(3, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(4, pool.getConnectedServerCount());
       assertTrue(pool.getRedundantNames().contains(SERVER3));
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       assertTrue(pool.getPrimaryName().equals(SERVER1));
@@ -458,8 +458,8 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       //pause(10000);
       verifyLiveAndRedundantServers(3, 2);
       verifyOrderOfEndpoints();
-      //assertEquals(1, pool.getRedundantNames().size());
-      //assertEquals(3, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(3, pool.getConnectedServerCount());
       assertFalse(pool.getRedundantNames().contains(SERVER1));
       assertFalse(pool.getRedundantNames().contains(SERVER3));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
@@ -470,8 +470,8 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       //pause(10000);
       verifyLiveAndRedundantServers(4, 3);
       verifyOrderOfEndpoints();
-      //assertEquals(1, pool.getRedundantNames().size());
-      //assertEquals(4, pool.getConnectedServerCount());
+      //assertIndexDetailsEquals(1, pool.getRedundantNames().size());
+      //assertIndexDetailsEquals(4, pool.getConnectedServerCount());
       //assertTrue(pool.getRedundantNames()
       //    .contains(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER2));
@@ -495,12 +495,12 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
   {
     try {
       createClientCache(getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 1);
-      assertEquals(1, proxy.getRedundantServers().size());
-      assertEquals(PORT3, proxy.acquireConnection().getEndpoint().getPort());
-      assertEquals(PORT4, proxy.acquireConnection().getEndpoint().getPort());
-      assertEquals(PORT1, proxy.acquireConnection().getEndpoint().getPort());
-      assertEquals(PORT2, proxy.acquireConnection().getEndpoint().getPort());
-      assertEquals(PORT3, proxy.acquireConnection().getEndpoint().getPort());
+      assertIndexDetailsEquals(1, proxy.getRedundantServers().size());
+      assertIndexDetailsEquals(PORT3, proxy.acquireConnection().getEndpoint().getPort());
+      assertIndexDetailsEquals(PORT4, proxy.acquireConnection().getEndpoint().getPort());
+      assertIndexDetailsEquals(PORT1, proxy.acquireConnection().getEndpoint().getPort());
+      assertIndexDetailsEquals(PORT2, proxy.acquireConnection().getEndpoint().getPort());
+      assertIndexDetailsEquals(PORT3, proxy.acquireConnection().getEndpoint().getPort());
     }
     catch (Exception ex) {
       ex.printStackTrace();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
index 17e1e2a..285d200 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
@@ -156,7 +156,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
   public static void verifyDispatcherIsAlive()
   {
     try {
-//      assertEquals("More than one BridgeServer", 1, cache.getCacheServers()
+//      assertIndexDetailsEquals("More than one BridgeServer", 1, cache.getCacheServers()
 //          .size());
       WaitCriterion wc = new WaitCriterion() {
         String excuse;
@@ -215,7 +215,7 @@ public class RedundancyLevelTestBase extends DistributedTestCase
   public static void verifyDispatcherIsNotAlive()
   {
     try {
-      // assertEquals("More than one BridgeServer", 1,
+      // assertIndexDetailsEquals("More than one BridgeServer", 1,
       // cache.getCacheServers().size());
       WaitCriterion wc = new WaitCriterion() {
         String excuse;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/CommitCommandTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/CommitCommandTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/CommitCommandTest.java
index 328a796..9159ad7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/CommitCommandTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/CommitCommandTest.java
@@ -16,10 +16,7 @@
  */
 package com.gemstone.gemfire.internal.cache.tier.sockets.command;
 
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
+import static org.mockito.Mockito.*;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -41,12 +38,9 @@ public class CommitCommandTest {
 	 * No NPE should be thrown from the {@link CommitCommand#writeCommitResponse(com.gemstone.gemfire.internal.cache.TXCommitMessage, Message, ServerConnection)}
 	 * if the response message is null as it is the case when JTA
 	 * transaction is rolled back with TX_SYNCHRONIZATION AFTER_COMPLETION STATUS_ROLLEDBACK 
-	 * @throws IOException 
-	 * 
 	 */
 	@Test
-	public void testWriteNullResponse() throws IOException {
-		
+	public void testWriteNullResponse() throws Exception {
 		Cache cache = mock(Cache.class);
 		Message origMsg = mock(Message.class);
 		ServerConnection servConn = mock(ServerConnection.class);
@@ -55,7 +49,5 @@ public class CommitCommandTest {
 		when(cache.getCancelCriterion()).thenReturn(mock(CancelCriterion.class));
 		
 		CommitCommand.writeCommitResponse(null, origMsg, servConn);
-		
 	}
-	
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RVVExceptionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RVVExceptionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RVVExceptionJUnitTest.java
index 62a12df..4935524 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RVVExceptionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RVVExceptionJUnitTest.java
@@ -16,18 +16,17 @@
  */
 package com.gemstone.gemfire.internal.cache.versions;
 
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
 @Category(UnitTest.class)
-public class RVVExceptionJUnitTest extends TestCase {
+public class RVVExceptionJUnitTest {
 
-  public RVVExceptionJUnitTest() {
-  }
-  
+  @Test
   public void testRVVExceptionB() {
     RVVExceptionB ex = new RVVExceptionB(5, 10);
     ex.add(8);
@@ -35,14 +34,13 @@ public class RVVExceptionJUnitTest extends TestCase {
     assertEquals(8, ex.getHighestReceivedVersion());
     ex.add(5);
     assertEquals(8, ex.getHighestReceivedVersion());
-    
   }
 
+  @Test
   public void testRVVExceptionT() {
     RVVExceptionT ex = new RVVExceptionT(5, 10);
     ex.add(8);
     ex.add(6);
     assertEquals(8, ex.getHighestReceivedVersion());
-
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolder2JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolder2JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolder2JUnitTest.java
index af78f79..20be1b7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolder2JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolder2JUnitTest.java
@@ -18,8 +18,6 @@ package com.gemstone.gemfire.internal.cache.versions;
 
 import static org.junit.Assert.*;
 
-import java.util.Iterator;
-
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -43,7 +41,6 @@ public class RegionVersionHolder2JUnitTest {
     assertEquals(0, h.getExceptionCount());
   }
 
-
   @Test
   public void testRecordZeroDoesNothingWithBitSet() {
     recordZeroDoesNothing(true);
@@ -161,7 +158,7 @@ public class RegionVersionHolder2JUnitTest {
     assertTrue(h.isSpecialException(e, h));
     h.recordVersion(2l);
     // BUG: the exception is not removed
-//    assertEquals("unexpected RVV exception : " + h, 0, h.getExceptionCount());
+//    assertIndexDetailsEquals("unexpected RVV exception : " + h, 0, h.getExceptionCount());
   }
   
   private void createSpecialException(RegionVersionHolder h) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderJUnitTest.java
index 731f466..b2a74f0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderJUnitTest.java
@@ -16,33 +16,47 @@
  */
 package com.gemstone.gemfire.internal.cache.versions;
 
-import java.io.FileReader;
-import java.io.Reader;
+import static org.junit.Assert.*;
+
 import java.net.InetAddress;
 import java.util.BitSet;
 
+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.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.cache.versions.RVVException.ReceivedVersionsIterator;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
-public class RegionVersionHolderJUnitTest extends TestCase {
-  
-  protected InternalDistributedMember member;
-  
-  int originalBitSetWidth = RegionVersionHolder.BIT_SET_WIDTH;
+public class RegionVersionHolderJUnitTest {
+
+  private int originalBitSetWidth;
+  private InternalDistributedMember member;
 
-  @Override
-  protected void setUp() throws Exception {
-    super.setUp();
+  @Before
+  public final void setUp() throws Exception {
+    originalBitSetWidth = RegionVersionHolder.BIT_SET_WIDTH;
     member = new InternalDistributedMember(InetAddress.getLocalHost(), 12345);
+    postSetUp();
   }
-  
+
+  protected void postSetUp() throws Exception {
+  }
+
+  @After
+  public final void tearDown() throws Exception {
+    RegionVersionHolder.BIT_SET_WIDTH = originalBitSetWidth;
+  }
+
+  protected final InternalDistributedMember member() {
+    return member;
+  }
+
+  @Test
   public void test48066_1() {
     RegionVersionHolder vh1 = new RegionVersionHolder(member);
     for (int i=1; i<=3; i++) {
@@ -74,7 +88,8 @@ public class RegionVersionHolderJUnitTest extends TestCase {
       assertEquals(7, vh3.getVersion());
     }
   }
-   
+
+  @Test
   public void test48066() {
     RegionVersionHolder vh = new RegionVersionHolder(member);
     BitSet bs = new BitSet();
@@ -1472,6 +1487,7 @@ public class RegionVersionHolderJUnitTest extends TestCase {
   /**
    * Test merging two version holders
    */
+  @Test
   public void testInitializeFrom() {
     testInitializeFrom(false);
     testInitializeFrom(true);
@@ -1587,6 +1603,7 @@ public class RegionVersionHolderJUnitTest extends TestCase {
    * Test a case in 46522 where the received exceptions end up 
    * not being in the RVV interval.
    */
+  @Test
   public void testConsumeReceivedRevisions() {
     testConsumeReceivedRevisions(false);
     testConsumeReceivedRevisions(true);
@@ -1630,7 +1647,8 @@ public class RegionVersionHolderJUnitTest extends TestCase {
       RVVException.UseTreeSetsForTesting = false;
     }
   }
-  
+
+  @Test
   public void testChangeSetForm() {
     try {
       RVVException.UseTreeSetsForTesting = true;
@@ -1667,12 +1685,12 @@ public class RegionVersionHolderJUnitTest extends TestCase {
    * 
    * See bug 47106
    */
+  @Test
   public void testDominates() {
     testDominates(false);
     testDominates(true);
   }
-  
-  
+
   private void testDominates(boolean useTreeSets) {
     try {
       RVVException.UseTreeSetsForTesting = useTreeSets;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderRandomJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderRandomJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderRandomJUnitTest.java
index d60a354..7821b6d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderRandomJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderRandomJUnitTest.java
@@ -16,18 +16,18 @@
  */
 package com.gemstone.gemfire.internal.cache.versions;
 
-import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
+import static org.junit.Assert.*;
 
-import java.net.InetAddress;
 import java.util.ArrayList;
 import java.util.BitSet;
 import java.util.Collections;
 import java.util.List;
 import java.util.Random;
 
+import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
@@ -41,32 +41,16 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class RegionVersionHolderRandomJUnitTest extends RegionVersionHolderSmallBitSetJUnitTest {
   
-  Random random = new Random();
-  
+  private Random random;
+
   @Override
-  protected void setUp() throws Exception {
-    super.setUp();
+  protected final void postSetUpRegionVersionHolderSmallBitSetJUnitTest() throws Exception {
     long seed = System.nanoTime();
-//    seed = 1194319178069961L;
-    random.setSeed(seed);
+    random = new Random();
+    random.setSeed(seed); // 1194319178069961L;
     System.out.println("RegionVersionHolderJUnitTest using random seed " + seed);
   }
   
-  
-  int loopNum = 0;
-  /**
-   * Rerun all of the tests several times to see if anything fails.
-   * @throws InterruptedException
-   */
-//  public void testLoop() throws InterruptedException {
-//    for(int i =0; i < 50; i++) {
-//      loopNum=i;
-//      System.err.println("i=" + i);
-//      testInitializeFrom();
-//      testConsumeReceivedRevisions();
-//      testParallelThreads();
-//    }
-//  }
   /**
    * Record versions in random order, rather than in sequential order
    * This should generate and fill some exceptions.
@@ -92,17 +76,16 @@ public class RegionVersionHolderRandomJUnitTest extends RegionVersionHolderSmall
    * This tries to be a more "real life" test. A bunch of threads perform
    * updates, which should create exceptions. Verify that the final
    * exception list is correct.
-   * @throws InterruptedException
    */
+  @Test
   public void testParallelThreads() throws InterruptedException {
-    RegionVersionHolder vh1 = new RegionVersionHolder(member);
-    RegionVersionHolder vh2 = new RegionVersionHolder(member);
+    RegionVersionHolder vh1 = new RegionVersionHolder(member());
+    RegionVersionHolder vh2 = new RegionVersionHolder(member());
     
     int UPDATES = 50000;
     int NUM_UPDATERS=20;
     int NUM_EXCEPTIONS=500;
-//    int NUM_EXCEPTIONS=0;
-    
+
     Random random = new Random();
     IntOpenHashSet exceptions = new IntOpenHashSet();
     for(int i =0; i < NUM_EXCEPTIONS; i++) {
@@ -136,13 +119,9 @@ public class RegionVersionHolderRandomJUnitTest extends RegionVersionHolderSmall
     for(int i = 1; i < UPDATES; i++) {
       assertEquals("vector is incorrect on item "+  i,!exceptions.contains(i), vh2.contains(i));
     }
-    
   }
-  
-  
-  
+
   private static class HolderUpdater extends Thread {
-    
 
     private int updates;
     private int myNumber;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderSmallBitSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderSmallBitSetJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderSmallBitSetJUnitTest.java
index 3c9f09e..bd6199b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderSmallBitSetJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionHolderSmallBitSetJUnitTest.java
@@ -27,20 +27,13 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class RegionVersionHolderSmallBitSetJUnitTest extends RegionVersionHolderJUnitTest {
   
-  
   @Override
-  protected void setUp() throws Exception {
-    super.setUp();
-    originalBitSetWidth = RegionVersionHolder.BIT_SET_WIDTH;
+  protected final void postSetUp() throws Exception {
     RegionVersionHolder.BIT_SET_WIDTH = 4;
+    postSetUpRegionVersionHolderSmallBitSetJUnitTest();
   }
-  
-  protected void tearDown() throws Exception {
-    super.tearDown();
-    RegionVersionHolder.BIT_SET_WIDTH = originalBitSetWidth;
+
+  protected void postSetUpRegionVersionHolderSmallBitSetJUnitTest() throws Exception {
   }
-  
-  
-  
 
 }


[28/55] [abbrv] incubator-geode git commit: GEODE-596: change test to start servers on port 0

Posted by sa...@apache.org.
GEODE-596: change test to start servers on port 0


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6c53d4f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6c53d4f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6c53d4f8

Branch: refs/heads/feature/GEODE-1153
Commit: 6c53d4f840abb874d2cb9d50f499acf50db61943
Parents: 2c148ca
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Mon May 9 15:08:28 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Mon May 9 15:11:59 2016 -0700

----------------------------------------------------------------------
 .../MemoryThresholdsOffHeapDUnitTest.java       | 54 ++++++++------------
 1 file changed, 20 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6c53d4f8/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
index be6b266..9216788 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
@@ -143,14 +143,11 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     final VM server1 = host.getVM(0);
     final VM server2 = host.getVM(1);
     
-    final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
-    final int port1 = ports[0];
-    final int port2 = ports[1];
     final String regionName = "offHeapEventDelivery";
 
-    startCacheServer(server1, port1, 0f, 0f,
+    startCacheServer(server1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    startCacheServer(server2, port2, 70f, 90f,
+    startCacheServer(server2, 70f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     registerTestMemoryThresholdListener(server1);
@@ -245,10 +242,9 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     
     final String regionName = "offHeapDisabledThresholds";
 
-    //set port to 0 in-order for system to pickup a random port.
-    startCacheServer(server1, 0, 0f, 0f,
+    startCacheServer(server1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    startCacheServer(server2, 0, 0f, 0f,
+    startCacheServer(server2, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     registerTestMemoryThresholdListener(server1);
@@ -358,14 +354,11 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     final VM server2 = host.getVM(1);
     final VM client = host.getVM(2);
 
-    final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
-    final int port1 = ports[0];
-    final int port2 = ports[1];
     final String regionName = "offHeapDRRemoteClientPutReject";
 
-    startCacheServer(server1, port1, 0f, 0f,
+    final int port1 = startCacheServer(server1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    startCacheServer(server2, port2, 0f, 90f,
+    startCacheServer(server2, 0f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     startClient(client, server1, port1, regionName);
@@ -437,9 +430,9 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     final String regionName = "offHeapDRRemotePutRejection";
 
     //set port to 0 in-order for system to pickup a random port.
-    startCacheServer(server1, 0, 0f, 0f,
+    startCacheServer(server1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    startCacheServer(server2, 0, 0f, 90f,
+    startCacheServer(server2, 0f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     registerTestMemoryThresholdListener(server1);
@@ -729,7 +722,6 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     prRemotePutRejection(false, true, false);
   }
 
-  @Category(FlakyTest.class) // GEODE-596: BindException, random ports
   public void testPR_RemotePutRejectionCacheClose() throws Exception {
     prRemotePutRejection(true, false, false);
   }
@@ -746,7 +738,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     prRemotePutRejection(true, false, true);
   }
 
-  @Category(FlakyTest.class) // GEODE-500: random ports, time sensitive, memory sensitive and GC dependent, waitForCriterions
+  @Category(FlakyTest.class) // GEODE-500: time sensitive, memory sensitive and GC dependent, waitForCriterions
   public void testPR_RemotePutRejectionWithTx() throws Exception {
     prRemotePutRejection(false, false, true);
   }
@@ -759,15 +751,14 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     servers[1] = host.getVM(2);
     servers[2] = host.getVM(3);
 
-    final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(3);
     final String regionName = "offHeapPRRemotePutRejection";
     final int redundancy = 1;
 
-    startCacheServer(servers[0], ports[0], 0f, 90f,
+    startCacheServer(servers[0], 0f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
-    startCacheServer(servers[1], ports[1], 0f, 90f,
+    startCacheServer(servers[1], 0f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
-    startCacheServer(servers[2], ports[2], 0f, 90f,
+    startCacheServer(servers[2], 0f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
     accessor.invoke(new SerializableCallable() {
       public Object call() throws Exception {
@@ -1272,15 +1263,11 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     final VM server2 = host.getVM(1);
     final VM server3 = host.getVM(2);
 
-    final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(3);
-    final int port1 = ports[0];
-    final int port2 = ports[1];
-    final int port3 = ports[2];
     final String regionName = "testEventOrder";
 
-    startCacheServer(server1, port1, 0f, 0f,
+    startCacheServer(server1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    startCacheServer(server2, port2, 0f, 0f,
+    startCacheServer(server2, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     verifyProfiles(server1, 2);
@@ -1295,7 +1282,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
 
     verifyProfiles(server1, 1);
 
-    startCacheServer(server3, port3, 0f, 0f,
+    startCacheServer(server3, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     verifyProfiles(server1, 2);
@@ -1391,8 +1378,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     final Object bigKey = -1;
     final Object smallKey = -2;
 
-    final int port = AvailablePortHelper.getRandomAvailableTCPPort();
-    startCacheServer(server, port, 0f, 90f,
+    final int port = startCacheServer(server, 0f, 90f,
         regionName, createPR, false, 0);
     startClient(client, server, port, regionName);
     doPuts(client, regionName, false/*catchServerException*/,
@@ -1604,11 +1590,11 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     });
   }
 
-  private void startCacheServer(VM server, final int port,
+  private int startCacheServer(VM server,
       final float evictionThreshold, final float criticalThreshold, final String regionName,
       final boolean createPR, final boolean notifyBySubscription, final int prRedundancy) throws Exception {
 
-    server.invoke(new SerializableCallable() {
+    return (Integer)server.invoke(new SerializableCallable() {
       public Object call() throws Exception {
         getSystem(getOffHeapProperties());
         GemFireCacheImpl cache = (GemFireCacheImpl)getCache();
@@ -1636,10 +1622,10 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
           assertTrue(region instanceof DistributedRegion);
         }
         CacheServer cacheServer = getCache().addCacheServer();
-        cacheServer.setPort(port);
+        cacheServer.setPort(0);
         cacheServer.setNotifyBySubscription(notifyBySubscription);
         cacheServer.start();
-        return null;
+        return cacheServer.getPort();
       }
     });
   }


[52/55] [abbrv] incubator-geode git commit: GEODE-1330: Set boolean so that internal lucene regions aren't generated in xml

Posted by sa...@apache.org.
GEODE-1330: Set boolean so that internal lucene regions aren't generated in xml


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c92e5dad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c92e5dad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c92e5dad

Branch: refs/heads/feature/GEODE-1153
Commit: c92e5dad2464a7d633db11ccf80b1a07dc6d569a
Parents: 3ebcf1f
Author: Barry Oglesby <bo...@pivotal.io>
Authored: Mon May 9 15:00:31 2016 -0700
Committer: Barry Oglesby <bo...@pivotal.io>
Committed: Wed May 11 10:43:56 2016 -0700

----------------------------------------------------------------------
 .../LuceneIndexForPartitionedRegion.java        | 38 ++++-----
 .../LuceneIndexForReplicatedRegion.java         |  1 +
 .../cache/lucene/internal/LuceneIndexImpl.java  | 29 +++++++
 .../LuceneIndexCreationIntegrationTest.java     | 74 ++++++++++++++++++
 .../LuceneIndexForPartitionedRegionTest.java    | 82 +++++++++++---------
 .../lucene/internal/LuceneIntegrationTest.java  | 47 +++++++++++
 6 files changed, 217 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c92e5dad/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
index 28ff543..382f61c 100644
--- a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
@@ -19,6 +19,7 @@
 
 package com.gemstone.gemfire.cache.lucene.internal;
 
+import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.PartitionAttributes;
@@ -37,12 +38,8 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 /* wrapper of IndexWriter */
 public class LuceneIndexForPartitionedRegion extends LuceneIndexImpl {
 
-  private final Cache cache;
-
   public LuceneIndexForPartitionedRegion(String indexName, String regionPath, Cache cache) {
-    this.indexName = indexName;
-    this.regionPath = regionPath;
-    this.cache = cache;
+    super(indexName, regionPath, cache);
   }
 
   @Override
@@ -138,13 +135,7 @@ public class LuceneIndexForPartitionedRegion extends LuceneIndexImpl {
   Region createFileRegion(final RegionShortcut regionShortCut,
                                 final String fileRegionName,
                                 final PartitionAttributes partitionAttributes) {
-    PartitionAttributesFactory partitionAttributesFactory = new PartitionAttributesFactory<String, File>();
-    partitionAttributesFactory.setColocatedWith(regionPath);
-    configureLuceneRegionAttributesFactory(partitionAttributesFactory, partitionAttributes);
-
-    return cache.<String, File> createRegionFactory(regionShortCut)
-        .setPartitionAttributes(partitionAttributesFactory.create())
-        .create(fileRegionName);
+    return createRegion(fileRegionName, regionShortCut, this.regionPath, partitionAttributes);
   }
 
   String createFileRegionName() {
@@ -158,13 +149,7 @@ public class LuceneIndexForPartitionedRegion extends LuceneIndexImpl {
   Region<ChunkKey, byte[]> createChunkRegion(final RegionShortcut regionShortCut,
                            final String fileRegionName,
                            final PartitionAttributes partitionAttributes, final String chunkRegionName) {
-    PartitionAttributesFactory partitionAttributesFactory = new PartitionAttributesFactory<String, File>();
-    partitionAttributesFactory.setColocatedWith(fileRegionName);
-    configureLuceneRegionAttributesFactory(partitionAttributesFactory, partitionAttributes);
-
-    return cache.<ChunkKey, byte[]> createRegionFactory(regionShortCut)
-      .setPartitionAttributes(partitionAttributesFactory.create())
-      .create(chunkRegionName);
+    return createRegion(chunkRegionName, regionShortCut, fileRegionName, partitionAttributes);
   }
 
   String createChunkRegionName() {
@@ -177,6 +162,21 @@ public class LuceneIndexForPartitionedRegion extends LuceneIndexImpl {
     return attributesFactory;
   }
 
+  protected <K, V> Region<K, V> createRegion(final String regionName, final RegionShortcut regionShortCut,
+      final String colocatedWithRegionName, final PartitionAttributes partitionAttributes) {
+    PartitionAttributesFactory partitionAttributesFactory = new PartitionAttributesFactory<String, File>();
+    partitionAttributesFactory.setColocatedWith(colocatedWithRegionName);
+    configureLuceneRegionAttributesFactory(partitionAttributesFactory, partitionAttributes);
+
+    // Create AttributesFactory based on input RegionShortcut
+    RegionAttributes baseAttributes = this.cache.getRegionAttributes(regionShortCut.toString());
+    AttributesFactory factory = new AttributesFactory(baseAttributes);
+    factory.setPartitionAttributes(partitionAttributesFactory.create());
+    RegionAttributes<K, V> attributes = factory.create();
+
+    return createRegion(regionName, attributes);
+  }
+
   public void close() {
     // TODO Auto-generated method stub
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c92e5dad/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForReplicatedRegion.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForReplicatedRegion.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForReplicatedRegion.java
index cd07672..c24cb9d 100644
--- a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForReplicatedRegion.java
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForReplicatedRegion.java
@@ -29,6 +29,7 @@ import com.gemstone.gemfire.cache.Cache;
 public class LuceneIndexForReplicatedRegion extends LuceneIndexImpl {
 
   public LuceneIndexForReplicatedRegion(String indexName, String regionPath, Cache cache) {
+    super(indexName, regionPath, cache);
     throw new UnsupportedOperationException("Lucene indexes on replicated regions is not yet implemented");
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c92e5dad/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
index 1158fd1..0b5f8fa 100644
--- a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
@@ -22,6 +22,12 @@ package com.gemstone.gemfire.cache.lucene.internal;
 import java.util.Collections;
 import java.util.Map;
 
+import com.gemstone.gemfire.InternalGemFireError;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import org.apache.logging.log4j.Logger;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
@@ -50,6 +56,14 @@ public abstract class LuceneIndexImpl implements InternalLuceneIndex {
   protected boolean hasInitialized = false;
   protected Map<String, Analyzer> fieldAnalyzers;
 
+  protected final Cache cache;
+  
+  protected LuceneIndexImpl(String indexName, String regionPath, Cache cache) {
+    this.indexName = indexName;
+    this.regionPath = regionPath;
+    this.cache = cache;
+  }
+
   @Override
   public String getName() {
     return this.indexName;
@@ -108,4 +122,19 @@ public abstract class LuceneIndexImpl implements InternalLuceneIndex {
     creation.setFieldAnalyzers(this.getFieldAnalyzers());
     dataRegion.getExtensionPoint().addExtension(creation);
   }
+
+  protected <K, V> Region<K, V> createRegion(final String regionName, final RegionAttributes<K, V> attributes) {
+    // Create InternalRegionArguments to set isUsedForMetaRegion true to suppress xml generation (among other things)
+    InternalRegionArguments ira = new InternalRegionArguments().setDestroyLockFlag(true).setRecreateFlag(false)
+        .setSnapshotInputStream(null).setImageTarget(null).setIsUsedForMetaRegion(true);
+
+    // Create the region
+    try {
+      return ((GemFireCacheImpl)this.cache).createVMRegion(regionName, attributes, ira);
+    } catch (Exception e) {
+      InternalGemFireError ige = new InternalGemFireError(LocalizedStrings.GemFireCache_UNEXPECTED_EXCEPTION.toLocalizedString());
+      ige.initCause(e);
+      throw ige;
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c92e5dad/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexCreationIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexCreationIntegrationTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexCreationIntegrationTest.java
new file mode 100644
index 0000000..e04d1c7
--- /dev/null
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexCreationIntegrationTest.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.gemstone.gemfire.cache.lucene.internal;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(IntegrationTest.class)
+public class LuceneIndexCreationIntegrationTest extends LuceneIntegrationTest {
+
+  @Test
+  public void verifyLuceneRegionInternal() {
+    // Create cache
+    createCache();
+
+    // Create index
+    String indexName = "index";
+    String regionName = this.name.getMethodName();
+    createIndex(indexName, regionName, "text");
+
+    // Create partitioned region
+    createRegion(regionName);
+
+    // Get index
+    LuceneIndexForPartitionedRegion index = (LuceneIndexForPartitionedRegion) LuceneServiceProvider.get(this.cache).getIndex(indexName, regionName);
+    assertNotNull(index);
+
+    // Verify the meta regions exist and are internal
+    LocalRegion chunkRegion = (LocalRegion) this.cache.getRegion(index.createChunkRegionName());
+    assertNotNull(chunkRegion);
+    assertTrue(chunkRegion.isInternalRegion());
+    LocalRegion fileRegion = (LocalRegion) this.cache.getRegion(index.createFileRegionName());
+    assertNotNull(fileRegion);
+    assertTrue(fileRegion.isInternalRegion());
+
+    // Verify the meta regions are not contained in the root regions
+    for (Region region : cache.rootRegions()) {
+      assertNotEquals(chunkRegion.getFullPath(), region.getFullPath());
+      assertNotEquals(fileRegion.getFullPath(), region.getFullPath());
+    }
+  }
+
+  private Region createRegion(String regionName) {
+    return this.cache.createRegionFactory(RegionShortcut.PARTITION).create(regionName);
+  }
+
+  private void createIndex(String indexName, String regionName, String fieldName) {
+    LuceneServiceProvider.get(this.cache).createIndex(indexName, regionName, fieldName);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c92e5dad/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegionTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegionTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegionTest.java
index ff22f85..984b221 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegionTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegionTest.java
@@ -27,12 +27,15 @@ import org.junit.experimental.categories.Category;
 import org.junit.rules.ExpectedException;
 
 import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheListener;
 import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.ExpirationAttributes;
+import com.gemstone.gemfire.cache.MembershipAttributes;
 import com.gemstone.gemfire.cache.PartitionAttributes;
 import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
 import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueFactoryImpl;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.extension.ExtensionPoint;
 import com.gemstone.gemfire.test.fake.Fakes;
@@ -113,38 +116,6 @@ public class LuceneIndexForPartitionedRegionTest {
   }
 
   @Test
-  public void createChunkRegionWithPartitionShortcutCreatesRegionThroughFactory() {
-    String name = "indexName";
-    String regionPath = "regionName";
-    Cache cache = Fakes.cache();
-    RegionFactory regionFactory = mock(RegionFactory.class);
-    PartitionAttributes partitionAttributes = mock(PartitionAttributes.class);
-    when(cache.createRegionFactory(RegionShortcut.PARTITION)).thenReturn(regionFactory);
-    when(regionFactory.setPartitionAttributes(any())).thenReturn(regionFactory);
-    when(partitionAttributes.getTotalNumBuckets()).thenReturn(113);
-    LuceneIndexForPartitionedRegion index = new LuceneIndexForPartitionedRegion(name, regionPath, cache);
-
-    index.createChunkRegion(RegionShortcut.PARTITION, index.createFileRegionName(), partitionAttributes, index.createChunkRegionName());
-    verify(regionFactory).create(index.createChunkRegionName());
-  }
-
-  @Test
-  public void createFileRegionWithPartitionShortcutCreatesRegionThroughFactory() {
-    String name = "indexName";
-    String regionPath = "regionName";
-    Cache cache = Fakes.cache();
-    RegionFactory regionFactory = mock(RegionFactory.class);
-    PartitionAttributes partitionAttributes = mock(PartitionAttributes.class);
-    when(cache.createRegionFactory(RegionShortcut.PARTITION)).thenReturn(regionFactory);
-    when(regionFactory.setPartitionAttributes(any())).thenReturn(regionFactory);
-    when(partitionAttributes.getTotalNumBuckets()).thenReturn(113);
-    LuceneIndexForPartitionedRegion index = new LuceneIndexForPartitionedRegion(name, regionPath, cache);
-
-    index.createFileRegion(RegionShortcut.PARTITION, index.createFileRegionName(), partitionAttributes);
-    verify(regionFactory).create(index.createFileRegionName());
-  }
-
-  @Test
   public void createAEQWithPersistenceCallsCreateOnAEQFactory() {
     String name = "indexName";
     String regionPath = "regionName";
@@ -181,11 +152,9 @@ public class LuceneIndexForPartitionedRegionTest {
     PartitionedRegion region = mock(PartitionedRegion.class);
     RegionAttributes regionAttributes = mock(RegionAttributes.class);
     PartitionAttributes partitionAttributes = mock(PartitionAttributes.class);
-    RegionFactory regionFactory = mock(RegionFactory.class);
     DataPolicy dataPolicy = mock(DataPolicy.class);
     ExtensionPoint extensionPoint = mock(ExtensionPoint.class);
     when(cache.getRegion(regionPath)).thenReturn(region);
-    when(cache.createRegionFactory(isA(RegionShortcut.class))).thenReturn(regionFactory);
     when(region.getAttributes()).thenReturn(regionAttributes);
     when(regionAttributes.getPartitionAttributes()).thenReturn(partitionAttributes);
     when(regionAttributes.getDataPolicy()).thenReturn(dataPolicy);
@@ -195,6 +164,20 @@ public class LuceneIndexForPartitionedRegionTest {
     when(region.getExtensionPoint()).thenReturn(extensionPoint);
   }
 
+  private PartitionAttributes initializeAttributes(final Cache cache) {
+    PartitionAttributes partitionAttributes = mock(PartitionAttributes.class);
+    RegionAttributes attributes = mock(RegionAttributes.class);
+    when(attributes.getCacheListeners()).thenReturn(new CacheListener[0]);
+    when(attributes.getRegionTimeToLive()).thenReturn(ExpirationAttributes.DEFAULT);
+    when(attributes.getRegionIdleTimeout()).thenReturn(ExpirationAttributes.DEFAULT);
+    when(attributes.getEntryTimeToLive()).thenReturn(ExpirationAttributes.DEFAULT);
+    when(attributes.getEntryIdleTimeout()).thenReturn(ExpirationAttributes.DEFAULT);
+    when(attributes.getMembershipAttributes()).thenReturn(new MembershipAttributes());
+    when(cache.getRegionAttributes(RegionShortcut.PARTITION.toString())).thenReturn(attributes);
+    when(partitionAttributes.getTotalNumBuckets()).thenReturn(113);
+    return partitionAttributes;
+  }
+
   @Test
   public void initializeWithNoLocalMemoryThrowsException() {
     expectedExceptions.expect(IllegalStateException.class);
@@ -285,6 +268,35 @@ public class LuceneIndexForPartitionedRegionTest {
   }
 
   @Test
+  public void createFileRegionWithPartitionShortcutCreatesRegionUsingCreateVMRegion() throws Exception {
+    String name = "indexName";
+    String regionPath = "regionName";
+    GemFireCacheImpl cache = Fakes.cache();
+    PartitionAttributes partitionAttributes = initializeAttributes(cache);
+    LuceneIndexForPartitionedRegion index = new LuceneIndexForPartitionedRegion(name, regionPath, cache);
+    LuceneIndexForPartitionedRegion indexSpy = spy(index);
+    indexSpy.createFileRegion(RegionShortcut.PARTITION, index.createFileRegionName(), partitionAttributes);
+    String fileRegionName = index.createFileRegionName();
+    verify(indexSpy).createRegion(fileRegionName, RegionShortcut.PARTITION, regionPath, partitionAttributes);
+    verify(cache).createVMRegion(eq(fileRegionName), any(), any());
+  }
+
+  @Test
+  public void createChunkRegionWithPartitionShortcutCreatesRegionUsingCreateVMRegion() throws Exception {
+    String name = "indexName";
+    String regionPath = "regionName";
+    GemFireCacheImpl cache = Fakes.cache();
+    PartitionAttributes partitionAttributes = initializeAttributes(cache);
+    LuceneIndexForPartitionedRegion index = new LuceneIndexForPartitionedRegion(name, regionPath, cache);
+    LuceneIndexForPartitionedRegion indexSpy = spy(index);
+    String chunkRegionName = index.createChunkRegionName();
+    String fileRegionName = index.createFileRegionName();
+    indexSpy.createChunkRegion(RegionShortcut.PARTITION, fileRegionName, partitionAttributes, chunkRegionName);
+    verify(indexSpy).createRegion(chunkRegionName, RegionShortcut.PARTITION, fileRegionName, partitionAttributes);
+    verify(cache).createVMRegion(eq(chunkRegionName), any(), any());
+  }
+
+  @Test
   public void initializeShouldCreatePartitionPersistentChunkRegion() {
     boolean withPersistence = true;
     String name = "indexName";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c92e5dad/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIntegrationTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIntegrationTest.java
new file mode 100644
index 0000000..4d94042
--- /dev/null
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIntegrationTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.gemstone.gemfire.cache.lucene.internal;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.rules.TestName;
+
+public class LuceneIntegrationTest {
+
+  protected Cache cache;
+
+  @Rule
+  public TestName name = new TestName();
+
+  @After
+  public void tearDown() {
+    if(this.cache != null) {
+      this.cache.close();
+    }
+  }
+
+  protected void createCache() {
+    CacheFactory cf = new CacheFactory();
+    cf.set("mcast-port", "0");
+    this.cache = cf.create();
+  }
+}


[50/55] [abbrv] incubator-geode git commit: GEODE-1379: update javadocs for off-heap and cloning

Posted by sa...@apache.org.
GEODE-1379: update javadocs for off-heap and cloning

the javadocs now make clear that off-heap regions always clone


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f4a16799
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f4a16799
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f4a16799

Branch: refs/heads/feature/GEODE-1153
Commit: f4a167998076d82319aecafc34da076882ceb8d3
Parents: 4d52260
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Tue May 10 15:37:17 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed May 11 10:35:14 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java | 1 +
 .../src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java | 1 +
 .../src/main/java/com/gemstone/gemfire/cache/RegionFactory.java     | 1 +
 .../java/com/gemstone/gemfire/cache/client/ClientRegionFactory.java | 1 +
 4 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f4a16799/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java
index 34eafb9..fe7910a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java
@@ -1223,6 +1223,7 @@ public class AttributesFactory<K,V> {
   /**
    * Sets cloning on region.
    * Default is false.
+   * Note: off-heap regions always behave as if cloning is enabled.
    * 
    * @param cloningEnable
    * @since 6.1

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f4a16799/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java
index 0a69437..27d161d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java
@@ -167,6 +167,7 @@ public interface AttributesMutator<K,V> {
 
   /**
    * Sets cloning on region
+   * Note: off-heap regions always behave as if cloning is enabled.
    * @param cloningEnable
    * @since 6.1
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f4a16799/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java
index b919cc0..5110d40 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java
@@ -851,6 +851,7 @@ public class RegionFactory<K,V>
   
   /**
    * Sets cloning on region
+   * Note: off-heap regions always behave as if cloning is enabled.
    * @param cloningEnable
    * @return a reference to this RegionFactory object
    * @since 6.1

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f4a16799/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientRegionFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientRegionFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientRegionFactory.java
index 9c7fae0..fc68a99 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientRegionFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientRegionFactory.java
@@ -272,6 +272,7 @@ public interface ClientRegionFactory<K,V> {
 
   /**
    * Sets cloning on region
+   * Note: off-heap regions always behave as if cloning is enabled.
    * @param cloningEnable
    * @return a reference to this ClientRegionFactory object
    * @see AttributesFactory#setCloningEnabled


[03/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DescribeDiskStoreFunctionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DescribeDiskStoreFunctionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DescribeDiskStoreFunctionJUnitTest.java
index 1f919bc..1d41279 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DescribeDiskStoreFunctionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DescribeDiskStoreFunctionJUnitTest.java
@@ -26,6 +26,15 @@ import java.util.List;
 import java.util.Set;
 import java.util.UUID;
 
+import org.apache.logging.log4j.Logger;
+import org.jmock.Expectations;
+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;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.DiskStore;
@@ -49,16 +58,6 @@ import com.gemstone.gemfire.management.internal.cli.domain.DiskStoreDetails;
 import com.gemstone.gemfire.management.internal.cli.util.DiskStoreNotFoundException;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import org.apache.logging.log4j.Logger;
-import org.jmock.Expectations;
-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.Ignore;
-import org.junit.experimental.categories.Category;
-
 /**
  * The DescribeDiskStoreFunctionJUnitTest test suite class tests the contract and functionality of the
  * DescribeDiskStoreFunction class.
@@ -92,7 +91,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
     mockContext = null;
   }
 
-  protected void assertAsyncEventQueueDetails(final Set<DiskStoreDetails.AsyncEventQueueDetails> expectedAsyncEventQueueDetailsSet, final DiskStoreDetails diskStoreDetails) {
+  private void assertAsyncEventQueueDetails(final Set<DiskStoreDetails.AsyncEventQueueDetails> expectedAsyncEventQueueDetailsSet, final DiskStoreDetails diskStoreDetails) {
     int actualCount = 0;
 
     for (final DiskStoreDetails.AsyncEventQueueDetails actualAsyncEventQueueDetails : diskStoreDetails.iterateAsyncEventQueues()) {
@@ -109,7 +108,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
     assertEquals(expectedAsyncEventQueueDetailsSet.size(), actualCount);
   }
 
-  protected void assertCacheServerDetails(final Set<DiskStoreDetails.CacheServerDetails> expectedCacheServerDetailsSet, final DiskStoreDetails diskStoreDetails) {
+  private void assertCacheServerDetails(final Set<DiskStoreDetails.CacheServerDetails> expectedCacheServerDetailsSet, final DiskStoreDetails diskStoreDetails) {
     int actualCount = 0;
 
     for (final DiskStoreDetails.CacheServerDetails actualCacheServerDetails : diskStoreDetails.iterateCacheServers()) {
@@ -129,7 +128,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
     assertEquals(expectedCacheServerDetailsSet.size(), actualCount);
   }
 
-  protected void assertGatewayDetails(final Set<DiskStoreDetails.GatewayDetails> expectedGatewayDetailsSet, final DiskStoreDetails diskStoreDetails) {
+  private void assertGatewayDetails(final Set<DiskStoreDetails.GatewayDetails> expectedGatewayDetailsSet, final DiskStoreDetails diskStoreDetails) {
     int actualCount = 0;
 
     for (final DiskStoreDetails.GatewayDetails actualGatewayDetails : diskStoreDetails.iterateGateways()) {
@@ -148,7 +147,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
     assertEquals(expectedGatewayDetailsSet.size(), actualCount);
   }
 
-  protected void assertRegionDetails(final Set<DiskStoreDetails.RegionDetails> expectedRegionDetailsSet, final DiskStoreDetails diskStoreDetails) {
+  private void assertRegionDetails(final Set<DiskStoreDetails.RegionDetails> expectedRegionDetailsSet, final DiskStoreDetails diskStoreDetails) {
     int actualCount = 0;
 
     for (final DiskStoreDetails.RegionDetails actualRegionDetails : diskStoreDetails.iterateRegions()) {
@@ -169,11 +168,11 @@ public class DescribeDiskStoreFunctionJUnitTest {
     assertEquals(expectedRegionDetailsSet.size(), actualCount);
   }
 
-  protected DiskStoreDetails.AsyncEventQueueDetails createAsyncEventQueueDetails(final String id) {
+  private DiskStoreDetails.AsyncEventQueueDetails createAsyncEventQueueDetails(final String id) {
     return new DiskStoreDetails.AsyncEventQueueDetails(id);
   }
 
-  protected DiskStoreDetails.CacheServerDetails createCacheServerDetails(final String bindAddress,
+  private DiskStoreDetails.CacheServerDetails createCacheServerDetails(final String bindAddress,
                                                                          final int port,
                                                                          final String hostname)
   {
@@ -182,11 +181,11 @@ public class DescribeDiskStoreFunctionJUnitTest {
     return cacheServerDetails;
   }
 
-  protected DescribeDiskStoreFunction createDescribeDiskStoreFunction(final Cache cache) {
+  private DescribeDiskStoreFunction createDescribeDiskStoreFunction(final Cache cache) {
     return new TestDescribeDiskStoreFunction(cache);
   }
 
-  protected File[] createFileArray(final String... locations) {
+  private File[] createFileArray(final String... locations) {
     assert locations != null : "The locations argument cannot be null!";
 
     final File[] directories = new File[locations.length];
@@ -199,18 +198,18 @@ public class DescribeDiskStoreFunctionJUnitTest {
     return directories;
   }
 
-  protected DiskStoreDetails.GatewayDetails createGatewayDetails(final String id, final boolean persistent) {
+  private DiskStoreDetails.GatewayDetails createGatewayDetails(final String id, final boolean persistent) {
     DiskStoreDetails.GatewayDetails gatewayDetails = new DiskStoreDetails.GatewayDetails(id);
     gatewayDetails.setPersistent(persistent);
     return gatewayDetails;
   }
 
-  protected int[] createIntArray(final int... array) {
+  private int[] createIntArray(final int... array) {
     assert array != null : "The array of int values cannot be null!";
     return array;
   }
 
-  protected DiskStore createMockDiskStore(final UUID diskStoreId,
+  private DiskStore createMockDiskStore(final UUID diskStoreId,
                                           final String name,
                                           final boolean allowForceCompaction,
                                           final boolean autoCompact,
@@ -258,7 +257,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
     return mockDiskStore;
   }
 
-  protected DiskStoreDetails.RegionDetails createRegionDetails(final String fullPath,
+  private DiskStoreDetails.RegionDetails createRegionDetails(final String fullPath,
                                                                final String name,
                                                                final boolean persistent,
                                                                final boolean overflow)
@@ -285,7 +284,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
     }
   }
 
-  protected void setupEmptyRegionsPdxGatewaysCacheServersAndAsyncEventQueues(final InternalCache mockCache) {
+  private void setupEmptyRegionsPdxGatewaysCacheServersAndAsyncEventQueues(final InternalCache mockCache) {
     mockContext.checking(new Expectations() {{
       oneOf(mockCache).rootRegions();
       will(returnValue(Collections.emptySet()));
@@ -301,7 +300,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
     }});
   }
 
-  protected Set<DiskStoreDetails.RegionDetails> setupRegionsForTestExecute(final InternalCache mockCache, final String diskStoreName) {
+  private Set<DiskStoreDetails.RegionDetails> setupRegionsForTestExecute(final InternalCache mockCache, final String diskStoreName) {
     final Region mockUserRegion = mockContext.mock(Region.class, "/UserRegion");
     final Region mockSessionRegion = mockContext.mock(Region.class, "/UserRegion/SessionRegion");
     final Region mockGuestRegion = mockContext.mock(Region.class, "/GuestRegion");
@@ -367,7 +366,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
       createRegionDetails("/UserRegion/SessionRegion", "SessionRegion", false, true));
   }
 
-  protected Set<DiskStoreDetails.GatewayDetails> setupGatewaysForTestExecute(final InternalCache mockCache, final String diskStoreName) {
+  private Set<DiskStoreDetails.GatewayDetails> setupGatewaysForTestExecute(final InternalCache mockCache, final String diskStoreName) {
     final GatewaySender mockGatewaySender = mockContext.mock(GatewaySender.class, "GatewaySender");
 
     mockContext.checking(new Expectations() {{
@@ -418,7 +417,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
     return CollectionUtils.asSet(createCacheServerDetails("10.127.0.1", 10123, "rodan"));
   }
 
-  protected Set<DiskStoreDetails.AsyncEventQueueDetails> setupAsyncEventQueuesForTestExecute(final InternalCache mockCache, final String diskStoreName) {
+  private Set<DiskStoreDetails.AsyncEventQueueDetails> setupAsyncEventQueuesForTestExecute(final InternalCache mockCache, final String diskStoreName) {
     final AsyncEventQueue mockAsyncEventQueue1 = mockContext.mock(AsyncEventQueue.class, "AsyncEventQueue1");
     final AsyncEventQueue mockAsyncEventQueue2 = mockContext.mock(AsyncEventQueue.class, "AsyncEventQueue2");
     final AsyncEventQueue mockAsyncEventQueue3 = mockContext.mock(AsyncEventQueue.class, "AsyncEventQueue3");
@@ -444,7 +443,6 @@ public class DescribeDiskStoreFunctionJUnitTest {
   }
 
   @Test
-  @Ignore("Removing the old WAN broke this method. Unignore when merged")
   public void testExecute() throws Throwable {
     final UUID diskStoreId = UUID.randomUUID();
 
@@ -1410,7 +1408,6 @@ public class DescribeDiskStoreFunctionJUnitTest {
     assertTrue(function.isUsingDiskStore(mockGatewaySender, mockDiskStore));
   }
 
-
   @Test
   public void testSetPdxSerializationDetails() {
     final String diskStoreName = "testDiskStore";
@@ -1532,6 +1529,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
 
     assertTrue(function.isUsingDiskStore(mockQueue, mockDiskStore));
   }
+
   @Test
   public void testIsAsyncEventQueueUsingDiskStoreWhenDiskStoresMismatch() {
     final AsyncEventQueue mockQueue = mockContext.mock(AsyncEventQueue.class, "AsyncEventQueue");
@@ -1633,7 +1631,7 @@ public class DescribeDiskStoreFunctionJUnitTest {
     assertAsyncEventQueueDetails(expectedAsyncEventQueueDetails, diskStoreDetails);
   }
 
-  protected static class TestDescribeDiskStoreFunction extends DescribeDiskStoreFunction {
+  private static class TestDescribeDiskStoreFunction extends DescribeDiskStoreFunction {
 
     private final Cache cache;
 
@@ -1641,12 +1639,13 @@ public class DescribeDiskStoreFunctionJUnitTest {
       this.cache = cache;
     }
 
-    @Override protected Cache getCache() {
+    @Override
+    protected Cache getCache() {
       return this.cache;
     }
   }
 
-  protected static class TestResultSender implements ResultSender {
+  private static class TestResultSender implements ResultSender {
 
     private final List<Object> results = new LinkedList<Object>();
 
@@ -1659,14 +1658,17 @@ public class DescribeDiskStoreFunctionJUnitTest {
       return Collections.unmodifiableList(results);
     }
 
+    @Override
     public void lastResult(final Object lastResult) {
       results.add(lastResult);
     }
 
+    @Override
     public void sendResult(final Object oneResult) {
       results.add(oneResult);
     }
 
+    @Override
     public void sendException(final Throwable t) {
       this.t = t;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/ListDiskStoresFunctionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/ListDiskStoresFunctionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/ListDiskStoresFunctionJUnitTest.java
index 2e48dea..ff34701 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/ListDiskStoresFunctionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/ListDiskStoresFunctionJUnitTest.java
@@ -27,6 +27,14 @@ import java.util.List;
 import java.util.Set;
 import java.util.UUID;
 
+import org.jmock.Expectations;
+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;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
@@ -37,14 +45,6 @@ import com.gemstone.gemfire.internal.cache.InternalCache;
 import com.gemstone.gemfire.management.internal.cli.domain.DiskStoreDetails;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import org.jmock.Expectations;
-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;
-
 /**
  * The ListDiskStoreFunctionJUnitTest test suite class tests the contract and functionality of the
  * ListDiskStoresFunction.
@@ -76,14 +76,14 @@ public class ListDiskStoresFunctionJUnitTest {
     mockContext = null;
   }
 
-  protected DiskStoreDetails createDiskStoreDetails(final UUID id,
+  private DiskStoreDetails createDiskStoreDetails(final UUID id,
                                                     final String name,
                                                     final String memberName,
                                                     final String memberId) {
     return new DiskStoreDetails(id, name, memberId, memberName);
   }
 
-  protected ListDiskStoresFunction createListDiskStoresFunction(final Cache cache) {
+  private ListDiskStoresFunction createListDiskStoresFunction(final Cache cache) {
     return new TestListDiskStoresFunction(cache);
   }
 
@@ -284,7 +284,7 @@ public class ListDiskStoresFunctionJUnitTest {
     }
   }
 
-  protected static class TestListDiskStoresFunction extends ListDiskStoresFunction {
+  private static class TestListDiskStoresFunction extends ListDiskStoresFunction {
 
     private final Cache cache;
 
@@ -293,12 +293,13 @@ public class ListDiskStoresFunctionJUnitTest {
       this.cache = cache;
     }
 
-    @Override protected Cache getCache() {
+    @Override
+    protected Cache getCache() {
       return cache;
     }
   }
 
-  protected static class TestResultSender implements ResultSender {
+  private static class TestResultSender implements ResultSender {
 
     private final List<Object> results = new LinkedList<Object>();
 
@@ -311,14 +312,17 @@ public class ListDiskStoresFunctionJUnitTest {
       return Collections.unmodifiableList(results);
     }
 
+    @Override
     public void lastResult(final Object lastResult) {
       results.add(lastResult);
     }
 
+    @Override
     public void sendResult(final Object oneResult) {
       results.add(oneResult);
     }
 
+    @Override
     public void sendException(final Throwable t) {
       this.t = t;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/ListIndexFunctionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/ListIndexFunctionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/ListIndexFunctionJUnitTest.java
index 413d0ac..ff7a7ad 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/ListIndexFunctionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/ListIndexFunctionJUnitTest.java
@@ -26,6 +26,14 @@ import java.util.List;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.jmock.Expectations;
+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;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
@@ -43,15 +51,6 @@ import com.gemstone.gemfire.management.internal.cli.domain.IndexDetails;
 import com.gemstone.gemfire.management.internal.cli.domain.IndexDetails.IndexStatisticsDetails;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 /**
  * The ListIndexFunctionJUnitTest class is test suite of test cases testing the contract and functionality of the
  * ListIndexFunction GemFire function.
@@ -68,15 +67,15 @@ import org.junit.experimental.categories.Category;
 @Category(UnitTest.class)
 public class ListIndexFunctionJUnitTest {
 
-  private AtomicLong mockCounter = new AtomicLong(0l);
-
   private Mockery mockContext;
+  private AtomicLong mockCounter;
 
   @Before
   public void setup() {
     mockContext = new Mockery() {{
       setImposteriser(ClassImposteriser.INSTANCE);
     }};
+    mockCounter = new AtomicLong(0l);
   }
 
   @After
@@ -85,38 +84,34 @@ public class ListIndexFunctionJUnitTest {
     mockContext = null;
   }
 
-  protected void assertEquals(final IndexDetails expectedIndexDetails, final IndexDetails actualIndexDetails) {
-    Assert.assertEquals(expectedIndexDetails.getFromClause(), actualIndexDetails.getFromClause());
-    Assert.assertEquals(expectedIndexDetails.getIndexedExpression(), actualIndexDetails.getIndexedExpression());
-    Assert.assertEquals(expectedIndexDetails.getIndexName(), actualIndexDetails.getIndexName());
-    assertEquals(expectedIndexDetails.getIndexStatisticsDetails(), actualIndexDetails.getIndexStatisticsDetails());
-    Assert.assertEquals(expectedIndexDetails.getIndexType(), actualIndexDetails.getIndexType());
-    Assert.assertEquals(expectedIndexDetails.getMemberId(), actualIndexDetails.getMemberId());
-    Assert.assertEquals(expectedIndexDetails.getMemberName(), actualIndexDetails.getMemberName());
-    Assert.assertEquals(expectedIndexDetails.getProjectionAttributes(), actualIndexDetails.getProjectionAttributes());
-    Assert.assertEquals(expectedIndexDetails.getRegionName(), actualIndexDetails.getRegionName());
-    Assert.assertEquals(expectedIndexDetails.getRegionPath(), actualIndexDetails.getRegionPath());
+  private void assertIndexDetailsEquals(final IndexDetails expectedIndexDetails, final IndexDetails actualIndexDetails) {
+    assertEquals(expectedIndexDetails.getFromClause(), actualIndexDetails.getFromClause());
+    assertEquals(expectedIndexDetails.getIndexedExpression(), actualIndexDetails.getIndexedExpression());
+    assertEquals(expectedIndexDetails.getIndexName(), actualIndexDetails.getIndexName());
+    assertIndexStatisticsDetailsEquals(expectedIndexDetails.getIndexStatisticsDetails(), actualIndexDetails.getIndexStatisticsDetails());
+    assertEquals(expectedIndexDetails.getIndexType(), actualIndexDetails.getIndexType());
+    assertEquals(expectedIndexDetails.getMemberId(), actualIndexDetails.getMemberId());
+    assertEquals(expectedIndexDetails.getMemberName(), actualIndexDetails.getMemberName());
+    assertEquals(expectedIndexDetails.getProjectionAttributes(), actualIndexDetails.getProjectionAttributes());
+    assertEquals(expectedIndexDetails.getRegionName(), actualIndexDetails.getRegionName());
+    assertEquals(expectedIndexDetails.getRegionPath(), actualIndexDetails.getRegionPath());
   }
 
-  protected void assertEquals(final IndexStatisticsDetails expectedIndexStatisticsDetails, final IndexStatisticsDetails actualIndexStatisticsDetails) {
+  private void assertIndexStatisticsDetailsEquals(final IndexStatisticsDetails expectedIndexStatisticsDetails, final IndexStatisticsDetails actualIndexStatisticsDetails) {
     if (expectedIndexStatisticsDetails != null) {
       assertNotNull(actualIndexStatisticsDetails);
-      Assert.assertEquals(expectedIndexStatisticsDetails.getNumberOfKeys(), actualIndexStatisticsDetails
-        .getNumberOfKeys());
-      Assert.assertEquals(expectedIndexStatisticsDetails.getNumberOfUpdates(), actualIndexStatisticsDetails
-        .getNumberOfUpdates());
-      Assert.assertEquals(expectedIndexStatisticsDetails.getNumberOfValues(), actualIndexStatisticsDetails
-        .getNumberOfValues());
-      Assert.assertEquals(expectedIndexStatisticsDetails.getTotalUpdateTime(), actualIndexStatisticsDetails
-        .getTotalUpdateTime());
-      Assert.assertEquals(expectedIndexStatisticsDetails.getTotalUses(), actualIndexStatisticsDetails.getTotalUses());
-    }
-    else {
+      assertEquals(expectedIndexStatisticsDetails.getNumberOfKeys(), actualIndexStatisticsDetails.getNumberOfKeys());
+      assertEquals(expectedIndexStatisticsDetails.getNumberOfUpdates(), actualIndexStatisticsDetails.getNumberOfUpdates());
+      assertEquals(expectedIndexStatisticsDetails.getNumberOfValues(), actualIndexStatisticsDetails.getNumberOfValues());
+      assertEquals(expectedIndexStatisticsDetails.getTotalUpdateTime(), actualIndexStatisticsDetails.getTotalUpdateTime());
+      assertEquals(expectedIndexStatisticsDetails.getTotalUses(), actualIndexStatisticsDetails.getTotalUses());
+
+    } else {
       assertNull(actualIndexStatisticsDetails);
     }
   }
 
-  protected IndexDetails createIndexDetails(final String memberId,
+  private IndexDetails createIndexDetails(final String memberId,
                                             final String regionPath,
                                             final String indexName,
                                             final IndexType indexType,
@@ -124,8 +119,7 @@ public class ListIndexFunctionJUnitTest {
                                             final String indexedExpression,
                                             final String memberName,
                                             final String projectionAttributes,
-                                            final String regionName)
-  {
+                                            final String regionName) {
     final IndexDetails indexDetails = new IndexDetails(memberId, regionPath, indexName);
 
     indexDetails.setFromClause(fromClause);
@@ -138,12 +132,11 @@ public class ListIndexFunctionJUnitTest {
     return indexDetails;
   }
 
-  protected IndexStatisticsDetails createIndexStatisticsDetails(final Long numberOfKeys,
+  private IndexStatisticsDetails createIndexStatisticsDetails(final Long numberOfKeys,
                                                                 final Long numberOfUpdates,
                                                                 final Long numberOfValues,
                                                                 final Long totalUpdateTime,
-                                                                final Long totalUses)
-  {
+                                                                final Long totalUses) {
     final IndexStatisticsDetails indexStatisticsDetails = new IndexStatisticsDetails();
 
     indexStatisticsDetails.setNumberOfKeys(numberOfKeys);
@@ -155,16 +148,14 @@ public class ListIndexFunctionJUnitTest {
     return indexStatisticsDetails;
   }
 
-  protected ListIndexFunction createListIndexFunction(final Cache cache) {
+  private ListIndexFunction createListIndexFunction(final Cache cache) {
     return new TestListIndexFunction(cache);
   }
 
-  protected Index createMockIndex(final IndexDetails indexDetails) {
-    final Index mockIndex = mockContext.mock(Index.class, "Index " + indexDetails.getIndexName() + " "
-      + mockCounter.getAndIncrement());
+  private Index createMockIndex(final IndexDetails indexDetails) {
+    final Index mockIndex = mockContext.mock(Index.class, "Index " + indexDetails.getIndexName() + " " + mockCounter.getAndIncrement());
 
-    final Region mockRegion = mockContext.mock(Region.class, "Region " + indexDetails.getRegionPath() + " "
-      + mockCounter.getAndIncrement());
+    final Region mockRegion = mockContext.mock(Region.class, "Region " + indexDetails.getRegionPath() + " " + mockCounter.getAndIncrement());
 
     mockContext.checking(new Expectations() {{
       oneOf(mockIndex).getFromClause();
@@ -186,8 +177,7 @@ public class ListIndexFunctionJUnitTest {
     }});
 
     if (indexDetails.getIndexStatisticsDetails() != null) {
-      final IndexStatistics mockIndexStatistics = mockContext.mock(IndexStatistics.class, "IndexStatistics "
-        + indexDetails.getIndexName() + " " + mockCounter.getAndIncrement());
+      final IndexStatistics mockIndexStatistics = mockContext.mock(IndexStatistics.class, "IndexStatistics " + indexDetails.getIndexName() + " " + mockCounter.getAndIncrement());
 
       mockContext.checking(new Expectations() {{
         exactly(2).of(mockIndex).getStatistics();
@@ -203,8 +193,8 @@ public class ListIndexFunctionJUnitTest {
         oneOf(mockIndexStatistics).getTotalUses();
         will(returnValue(indexDetails.getIndexStatisticsDetails().getTotalUses()));
       }});
-    }
-    else {
+
+    } else {
       mockContext.checking(new Expectations() {{
         oneOf(mockIndex).getStatistics();
         will(returnValue(null));
@@ -214,7 +204,7 @@ public class ListIndexFunctionJUnitTest {
     return mockIndex;
   }
 
-  protected IndexType getIndexType(final IndexDetails.IndexType type) {
+  private IndexType getIndexType(final IndexDetails.IndexType type) {
     switch (type) {
       case FUNCTIONAL:
         return IndexType.FUNCTIONAL;
@@ -289,12 +279,12 @@ public class ListIndexFunctionJUnitTest {
     final List<?> results = testResultSender.getResults();
 
     assertNotNull(results);
-    Assert.assertEquals(1, results.size());
+    assertEquals(1, results.size());
 
     final Set<IndexDetails> actualIndexDetailsSet = (Set<IndexDetails>) results.get(0);
 
     assertNotNull(actualIndexDetailsSet);
-    Assert.assertEquals(expectedIndexDetailsSet.size(), actualIndexDetailsSet.size());
+    assertEquals(expectedIndexDetailsSet.size(), actualIndexDetailsSet.size());
 
     for (final IndexDetails expectedIndexDetails : expectedIndexDetailsSet) {
       final IndexDetails actualIndexDetails = CollectionUtils.findBy(actualIndexDetailsSet, new Filter<IndexDetails>() {
@@ -304,7 +294,7 @@ public class ListIndexFunctionJUnitTest {
       });
 
       assertNotNull(actualIndexDetails);
-      assertEquals(expectedIndexDetails, actualIndexDetails);
+      assertIndexDetailsEquals(expectedIndexDetails, actualIndexDetails);
     }
   }
 
@@ -342,7 +332,7 @@ public class ListIndexFunctionJUnitTest {
     final List<?> results = testResultSender.getResults();
 
     assertNotNull(results);
-    Assert.assertEquals(1, results.size());
+    assertEquals(1, results.size());
 
     final Set<IndexDetails> actualIndexDetailsSet = (Set<IndexDetails>) results.get(0);
 
@@ -382,15 +372,14 @@ public class ListIndexFunctionJUnitTest {
 
     try {
       testResultSender.getResults();
-    }
-    catch (Throwable t) {
+    } catch (Throwable t) {
       assertTrue(t instanceof RuntimeException);
-      Assert.assertEquals("expected", t.getMessage());
+      assertEquals("expected", t.getMessage());
       throw t;
     }
   }
 
-  protected static class TestListIndexFunction extends ListIndexFunction {
+  private static class TestListIndexFunction extends ListIndexFunction {
 
     private final Cache cache;
 
@@ -405,7 +394,7 @@ public class ListIndexFunctionJUnitTest {
     }
   }
 
-  protected static class TestResultSender implements ResultSender {
+  private static class TestResultSender implements ResultSender {
 
     private final List<Object> results = new LinkedList<Object>();
 
@@ -418,14 +407,17 @@ public class ListIndexFunctionJUnitTest {
       return Collections.unmodifiableList(results);
     }
 
+    @Override
     public void lastResult(final Object lastResult) {
       results.add(lastResult);
     }
 
+    @Override
     public void sendResult(final Object oneResult) {
       results.add(oneResult);
     }
 
+    @Override
     public void sendException(final Throwable t) {
       this.t = t;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/ParserUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/ParserUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/ParserUtilsJUnitTest.java
index 03d73d3..b4d688c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/ParserUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/ParserUtilsJUnitTest.java
@@ -16,24 +16,23 @@
  */
 package com.gemstone.gemfire.management.internal.cli.parser;
 
-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.parser.ParserUtils;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Includes tests for all utility methods in {@link ParserUtils}
- * 
- * 
  */
 @Category(UnitTest.class)
-public class ParserUtilsJUnitTest extends TestCase {
+public class ParserUtilsJUnitTest {
 
   /**
    * Test for {@link ParserUtils#split(String, String)}
    */
+  @Test
   public void testSplit() {
     String input = "something::{::}::nothing";
     String[] split = ParserUtils.split(input, "::");
@@ -46,6 +45,7 @@ public class ParserUtilsJUnitTest extends TestCase {
   /**
    * Test for {@link ParserUtils#splitValues(String, String)}
    */
+  @Test
   public void testSplitValues() {
     String input = "something::{::}::nothing::";
     String[] split = ParserUtils.splitValues(input, "::");
@@ -59,6 +59,7 @@ public class ParserUtilsJUnitTest extends TestCase {
   /**
    * Test for {@link ParserUtils#contains(String, String)}
    */
+  @Test
   public void testContains() {
     String input = "something::{::}::nothing::";
     assertTrue("Check Boolean", ParserUtils.contains(input, "::"));
@@ -69,6 +70,7 @@ public class ParserUtilsJUnitTest extends TestCase {
   /**
    * Test for {@link ParserUtils#lastIndexOf(String, String)}
    */
+  @Test
   public void testLastIndexOf() {
     String input = "something::{::}::nothing::";
     assertEquals("lastIndex", 24, ParserUtils.lastIndexOf(input, "::"));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/preprocessor/PreprocessorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/preprocessor/PreprocessorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/preprocessor/PreprocessorJUnitTest.java
index 5b928e3..2d217cc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/preprocessor/PreprocessorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/preprocessor/PreprocessorJUnitTest.java
@@ -16,7 +16,7 @@
  */
 package com.gemstone.gemfire.management.internal.cli.parser.preprocessor;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.*;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -24,13 +24,10 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
- * 
  * Test for Preprocessor
- * 
- *
  */
 @Category(UnitTest.class)
-public class PreprocessorJUnitTest extends TestCase{
+public class PreprocessorJUnitTest {
   
   @Test
   public void test1Arg() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/preprocessor/PreprocessorUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/preprocessor/PreprocessorUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/preprocessor/PreprocessorUtilsJUnitTest.java
index 2a56747..05be5bb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/preprocessor/PreprocessorUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/parser/preprocessor/PreprocessorUtilsJUnitTest.java
@@ -16,26 +16,24 @@
  */
 package com.gemstone.gemfire.management.internal.cli.parser.preprocessor;
 
-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.internal.lang.SystemUtils;
-import com.gemstone.gemfire.management.internal.cli.parser.preprocessor.PreprocessorUtils;
-import com.gemstone.gemfire.management.internal.cli.parser.preprocessor.TrimmedInput;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Includes tests for all utility methods in {@link PreprocessorUtils}
- * 
- * 
  */
 @Category(UnitTest.class)
-public class PreprocessorUtilsJUnitTest extends TestCase {
+public class PreprocessorUtilsJUnitTest {
 
   /**
    * Test for {@link PreprocessorUtils#simpleTrim(String)}
    */
+  @Test
   public void testSimpleTrim() {
     String input = " 1 2 3 ";
     TrimmedInput simpleTrim = PreprocessorUtils.simpleTrim(input);
@@ -51,6 +49,7 @@ public class PreprocessorUtilsJUnitTest extends TestCase {
   /**
    * Test for {@link PreprocessorUtils#trim(String)}
    */
+  @Test
   public void testTrim() {
     String input = " command argument1 argument2 ";
     TrimmedInput trim = PreprocessorUtils.trim(input);
@@ -86,6 +85,7 @@ public class PreprocessorUtilsJUnitTest extends TestCase {
   /**
    * Test for {@link PreprocessorUtils#removeWhiteSpaces(String)}
    */
+  @Test
   public void testRemoveWhiteSpaces() {
     String input = "1 2 3   ";
     String output = PreprocessorUtils.removeWhiteSpaces(input);
@@ -95,6 +95,7 @@ public class PreprocessorUtilsJUnitTest extends TestCase {
   /**
    * Test for {@link PreprocessorUtils#isSyntaxValid(String)}
    */
+  @Test
   public void testIsSyntaxValid() {
     assertTrue(PreprocessorUtils.isSyntaxValid("{}"));
     assertFalse(PreprocessorUtils.isSyntaxValid("{{]}"));
@@ -106,6 +107,7 @@ public class PreprocessorUtilsJUnitTest extends TestCase {
   /**
    * Test for {@link PreprocessorUtils#containsOnlyWhiteSpaces(String)}
    */
+  @Test
   public void testContainsOnlyWhiteSpaces() {
     assertTrue(PreprocessorUtils
         .containsOnlyWhiteSpaces("                                                  "));
@@ -116,6 +118,7 @@ public class PreprocessorUtilsJUnitTest extends TestCase {
   /**
    * Test for {@link PreprocessorUtils#isWhitespace(char)}
    */
+  @Test
   public void testIsWhitespace() {
     assertTrue(PreprocessorUtils.isWhitespace(' '));
     assertTrue(PreprocessorUtils.isWhitespace('\t'));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshConfigInitFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshConfigInitFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshConfigInitFileJUnitTest.java
index bbd1946..81b99c2 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshConfigInitFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshConfigInitFileJUnitTest.java
@@ -26,10 +26,11 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TemporaryFolder;
 
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class GfshConfigInitFileJUnitTest {
+
   private static final String INIT_FILE_NAME = GfshConfig.DEFAULT_INIT_FILE_NAME;
   private static final String INIT_FILE_PROPERTY = GfshConfig.INIT_FILE_PROPERTY;
 
@@ -65,8 +66,7 @@ public class GfshConfigInitFileJUnitTest {
 
   @Before
   public void setUp() throws Exception {
-    String userDir = temporaryFolder_CurrentDirectory.getRoot()
-        .getAbsolutePath();
+    String userDir = temporaryFolder_CurrentDirectory.getRoot().getAbsolutePath();
     String userHome = temporaryFolder_HomeDirectory.getRoot().getAbsolutePath();
 
     System.setProperty("user.dir", userDir);
@@ -82,8 +82,7 @@ public class GfshConfigInitFileJUnitTest {
   public void constructorArgumentUsed() throws Exception {
     temporaryFolder_HomeDirectory.newFile(INIT_FILE_NAME);
     temporaryFolder_CurrentDirectory.newFile(INIT_FILE_NAME);
-    System.setProperty(INIT_FILE_PROPERTY, temporaryFolder_AnotherDirectory
-        .newFile(INIT_FILE_NAME).getAbsolutePath());
+    System.setProperty(INIT_FILE_PROPERTY, temporaryFolder_AnotherDirectory.newFile(INIT_FILE_NAME).getAbsolutePath());
 
     String argument = temporaryFolder_AnotherDirectory.newFile("junit")
         .getAbsolutePath();
@@ -107,8 +106,7 @@ public class GfshConfigInitFileJUnitTest {
   public void systemPropertySelectedFirst() throws Exception {
     temporaryFolder_HomeDirectory.newFile(INIT_FILE_NAME);
     temporaryFolder_CurrentDirectory.newFile(INIT_FILE_NAME);
-    String fileName = temporaryFolder_AnotherDirectory.newFile(INIT_FILE_NAME)
-        .getAbsolutePath();
+    String fileName = temporaryFolder_AnotherDirectory.newFile(INIT_FILE_NAME).getAbsolutePath();
     System.setProperty(INIT_FILE_PROPERTY, fileName);
 
     /*
@@ -129,8 +127,7 @@ public class GfshConfigInitFileJUnitTest {
   @Test
   public void currentDirectorySelectedSecond() throws Exception {
     temporaryFolder_HomeDirectory.newFile(INIT_FILE_NAME);
-    String fileName = temporaryFolder_CurrentDirectory.newFile(INIT_FILE_NAME)
-        .getAbsolutePath();
+    String fileName = temporaryFolder_CurrentDirectory.newFile(INIT_FILE_NAME).getAbsolutePath();
 
     /*
      * String historyFileName, String defaultPrompt, int historySize, String
@@ -149,8 +146,7 @@ public class GfshConfigInitFileJUnitTest {
   // Home directory file selected if only one present
   @Test
   public void homeDirectorySelectedThird() throws Exception {
-    String fileName = temporaryFolder_HomeDirectory.newFile(INIT_FILE_NAME)
-        .getAbsolutePath();
+    String fileName = temporaryFolder_HomeDirectory.newFile(INIT_FILE_NAME).getAbsolutePath();
 
     /*
      * String historyFileName, String defaultPrompt, int historySize, String

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshExecutionStrategyJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshExecutionStrategyJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshExecutionStrategyJUnitTest.java
index 4579178..088a6a1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshExecutionStrategyJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshExecutionStrategyJUnitTest.java
@@ -16,6 +16,19 @@
  */
 package com.gemstone.gemfire.management.internal.cli.shell;
 
+import static com.gemstone.gemfire.cache.operations.OperationContext.*;
+import static org.junit.Assert.*;
+
+import java.util.List;
+
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.springframework.shell.core.CommandMarker;
+import org.springframework.shell.core.annotation.CliCommand;
+import org.springframework.shell.core.annotation.CliOption;
+import org.springframework.shell.event.ParseResult;
+
 import com.gemstone.gemfire.management.cli.CliMetaData;
 import com.gemstone.gemfire.management.cli.ConverterHint;
 import com.gemstone.gemfire.management.cli.Result;
@@ -25,27 +38,13 @@ import com.gemstone.gemfire.management.internal.cli.annotation.CliArgument;
 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 org.junit.After;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.springframework.shell.core.CommandMarker;
-import org.springframework.shell.core.annotation.CliCommand;
-import org.springframework.shell.core.annotation.CliOption;
-import org.springframework.shell.event.ParseResult;
-
-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.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 /**
  * GfshExecutionStrategyTest - Includes tests to for GfshExecutionStrategyTest
- * 
  */
 @Category(UnitTest.class)
 public class GfshExecutionStrategyJUnitTest {
+
   private static final String COMMAND1_NAME = "command1";
   private static final String COMMAND1_NAME_ALIAS = "command1_alias";
   private static final String COMMAND2_NAME = "command2";
@@ -58,15 +57,16 @@ public class GfshExecutionStrategyJUnitTest {
     CommandManager.clearInstance();
   }
   
-  //tests execute method by executing dummy method command1
+  /**
+   * tests execute method by executing dummy method command1
+   */
   @Test
   public void testGfshExecutionStartegyExecute() throws Exception {
     CommandManager commandManager = CommandManager.getInstance();
     assertNotNull("CommandManager should not be null.", commandManager);      
     commandManager.add(Commands.class.newInstance());
     GfshParser parser = new GfshParser(commandManager);
-    String[] command1Names = ((CliCommand) Commands.class.getMethod(
-        COMMAND1_NAME).getAnnotation(CliCommand.class)).value();
+    String[] command1Names = ((CliCommand) Commands.class.getMethod(COMMAND1_NAME).getAnnotation(CliCommand.class)).value();
     String input =command1Names[0];
     ParseResult parseResult = null;   
     parseResult = parser.parse(input);  
@@ -78,16 +78,17 @@ public class GfshExecutionStrategyJUnitTest {
     assertTrue(str.trim().equals(COMMAND1_SUCESS));      
   }
   
-  //tests isReadyForCommnads method by executing dummy method command1.
-  //TODO: this method is hard coded in source which may change in future. So this 
-  //test should also be accordingly changed
+  /**
+   * tests isReadyForCommnads method by executing dummy method command1.
+   * TODO: this method is hard coded in source which may change in future. So this
+   * test should also be accordingly changed
+   */
   @Test
   public void testGfshExecutionStartegyIsReadyForCommands() throws Exception {
     CommandManager commandManager = CommandManager.getInstance();
     assertNotNull("CommandManager should not be null.", commandManager);
     commandManager.add(Commands.class.newInstance());      
-    String[] command1Names = ((CliCommand) Commands.class.getMethod(
-        COMMAND1_NAME).getAnnotation(CliCommand.class)).value();       
+    String[] command1Names = ((CliCommand) Commands.class.getMethod(COMMAND1_NAME).getAnnotation(CliCommand.class)).value();
     String[] args = new String[] {command1Names[0]  };
     Gfsh gfsh = Gfsh.getInstance(false, args, new GfshConfig());      
     GfshExecutionStrategy gfshExecutionStrategy = new GfshExecutionStrategy(gfsh);
@@ -95,7 +96,9 @@ public class GfshExecutionStrategyJUnitTest {
     assertTrue(ready);      
   }
 
-  //represents class for dummy methods
+  /**
+   * represents class for dummy methods
+   */
   public static class Commands implements CommandMarker {
 
     @CliCommand(value = { COMMAND1_NAME, COMMAND1_NAME_ALIAS }, help = COMMAND1_HELP)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshHistoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshHistoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshHistoryJUnitTest.java
index b2081d2..cfa9e32 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshHistoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshHistoryJUnitTest.java
@@ -23,8 +23,6 @@ import java.lang.reflect.Field;
 import java.nio.file.Files;
 import java.util.List;
 
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
@@ -32,7 +30,9 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TemporaryFolder;
 
-@Category(UnitTest.class)
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+@Category(IntegrationTest.class)
 public class GfshHistoryJUnitTest {
 
   private File gfshHistoryFile;
@@ -81,8 +81,7 @@ public class GfshHistoryJUnitTest {
     gfsh.executeScriptLine("connect --password=foo --password = foo --password= goo --password =goo --password-param=blah --other-password-param=    gah");
 
     List<String> lines = Files.readAllLines(gfshHistoryFile.toPath());
-    assertEquals("// [failed] connect --password=***** --password = ***** --password= ***** --password =***** --password-param=***** --other-password-param= *****",
-        lines.get(1));
+    assertEquals("// [failed] connect --password=***** --password = ***** --password= ***** --password =***** --password-param=***** --other-password-param= *****", lines.get(1));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshInitFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshInitFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshInitFileJUnitTest.java
index c0b9348..529336f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshInitFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshInitFileJUnitTest.java
@@ -45,16 +45,14 @@ import com.gemstone.gemfire.management.internal.cli.LogWrapper;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
- * <P>
  * Unit tests for supplying an init file to Gfsh.
  * </P>
- * <P>
  * Makes use of reflection to reset private static variables on some classes to
  * replace loggers that would otherwise clutter the console.
- * </P>
  */
 @Category(UnitTest.class)
 public class GfshInitFileJUnitTest {
+
   private static final String INIT_FILE_NAME = GfshConfig.DEFAULT_INIT_FILE_NAME;
   private static final boolean APPEND = true;
   private static final int BANNER_LINES = 1;
@@ -66,16 +64,17 @@ public class GfshInitFileJUnitTest {
   private static java.util.logging.Logger julLogger;
   private static Handler[] saveHandlers;
 
-  @ClassRule
-  public static TemporaryFolder temporaryFolder_Config = new TemporaryFolder();
-  @Rule
-  public TemporaryFolder temporaryFolder_CurrentDirectory = new TemporaryFolder();
-
   private ByteArrayOutputStream sysout = new ByteArrayOutputStream();
   private String gfshHistoryFileName;
   private LogWrapper gfshFileLogger;
   private JUnitLoggerHandler junitLoggerHandler;
 
+  @ClassRule
+  public static TemporaryFolder temporaryFolder_Config = new TemporaryFolder();
+
+  @Rule
+  public TemporaryFolder temporaryFolder_CurrentDirectory = new TemporaryFolder();
+
   /*
    * Turn off console logging from JUL and Log4j2 for the duration of this
    * class's tests, to reduce noise level of output in automated build.
@@ -443,13 +442,12 @@ public class GfshInitFileJUnitTest {
   }
 
   /**
-   * <P>
    * Log handler for testing. Capture logged messages for later inspection.
-   * </P>
-   * 
+   *
    * @see java.util.logging.Handler#publish(java.util.logging.LogRecord)
    */
-  private class JUnitLoggerHandler extends Handler {
+  private static class JUnitLoggerHandler extends Handler {
+
     private List<LogRecord> log;
 
     public JUnitLoggerHandler() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/ZipUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/ZipUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/ZipUtilsJUnitTest.java
index 1222aad..595bdeb 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/ZipUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/ZipUtilsJUnitTest.java
@@ -16,80 +16,90 @@
  */
 package com.gemstone.gemfire.management.internal.configuration;
 
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.io.File;
-import java.io.FileNotFoundException;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FilenameUtils;
-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.TemporaryFolder;
 
 import com.gemstone.gemfire.management.internal.configuration.utils.ZipUtils;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
  * JUnit Test for {@link ZipUtils}
  * 
- * TODO: this is broken on Windows: see bug #52036
- * 
+ * TODO: this is broken on Windows: see bug #52036 (GEODE-312)
  */
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class ZipUtilsJUnitTest {
   
-  private static final String sourceFolderName = "sourceFolder";
-  private static final String zipFileName = "target.zip";
-  private static final String destinationFolderName = "destination";
-  private static final String clusterFolderName = "cluster";
-  private static final String groupFolderName = "group";
-  private static final String clusterTextFileName = "cf.txt";
-  private static final String groupTextFileName = "gf.txt";
-  private static final String clusterText = "cluster content";
-  private static final String groupText = "group content";
-  
-  @After
-  public void tearDown() throws Exception {
-    forceDelete(new File(sourceFolderName));
-    forceDelete(new File(zipFileName));
-    forceDelete(new File(destinationFolderName));
-  }
-  
-  private void forceDelete(File f) throws Exception {
-    try {
-      FileUtils.forceDelete(f);
-    } catch (FileNotFoundException e) {
-      // ignored
-    }
+  private String destinationFolderName = "destination";
+  private String clusterFolderName = "cluster";
+  private String groupFolderName = "group";
+  private String clusterTextFileName = "cf.txt";
+  private String groupTextFileName = "gf.txt";
+  private String clusterText = "cluster content";
+  private String groupText = "group content";
+
+  private File sourceFolder;
+  private File zipFolder;
+
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  @Before
+  public void setUp() throws Exception {
+    sourceFolder = temporaryFolder.newFolder("sourceFolder");
+
+    File clusterFolder = new File(sourceFolder.getCanonicalPath(), clusterFolderName);
+    assertTrue(clusterFolder.mkdir());
+
+    File groupFolder = new File(sourceFolder.getCanonicalPath(), groupFolderName);
+    assertTrue(groupFolder.mkdir());
+
+    zipFolder = temporaryFolder.newFolder("zipFolder");
+
+    FileUtils.writeStringToFile(new File(FilenameUtils.concat(clusterFolder.getCanonicalPath(), clusterTextFileName)), clusterText);
+    FileUtils.writeStringToFile(new File(FilenameUtils.concat(groupFolder.getCanonicalPath(), groupTextFileName)), groupText);
   }
 
   @Test
   public void testZipUtils() throws Exception {
-    File sf = new File(sourceFolderName);
-    File cf = new File(FilenameUtils.concat(sourceFolderName, clusterFolderName));
-    File gf = new File(FilenameUtils.concat(sourceFolderName, groupFolderName));
-    sf.mkdir();
-    cf.mkdir();
-    gf.mkdir();
-    FileUtils.writeStringToFile(new File(FilenameUtils.concat(cf.getCanonicalPath(), clusterTextFileName)), clusterText);
-    FileUtils.writeStringToFile(new File(FilenameUtils.concat(gf.getCanonicalPath(), groupTextFileName)), groupText);
-    ZipUtils.zip(sourceFolderName, zipFileName);
-    File zipFile = new File(zipFileName);
+    File zipFile = new File(zipFolder, "target.zip");
+    assertFalse(zipFile.exists());
+    assertFalse(zipFile.isFile());
+
+    ZipUtils.zip(sourceFolder.getCanonicalPath(), zipFile.getCanonicalPath());
     assertTrue(zipFile.exists());
     assertTrue(zipFile.isFile());
-    ZipUtils.unzip(zipFileName, destinationFolderName);
-    
-    File df = new File(destinationFolderName);
-    assertTrue(df.exists());
-    assertTrue(df.isDirectory());
-    
-    File[] subDirs = df.listFiles();
-    assertTrue((subDirs != null) && (subDirs.length != 0));
-    File dfClusterTextFile = new File(FilenameUtils.concat(destinationFolderName, clusterFolderName + File.separator + clusterTextFileName));
-    File dfGroupTextFile = new File (FilenameUtils.concat(destinationFolderName, groupFolderName + File.separator + groupTextFileName));
+
+    File destinationFolder = new File(FilenameUtils.concat(temporaryFolder.getRoot().getCanonicalPath(), destinationFolderName));
+    assertFalse(destinationFolder.exists());
+    assertFalse(destinationFolder.isFile());
+
+    ZipUtils.unzip(zipFile.getCanonicalPath(), destinationFolder.getCanonicalPath());
+    assertTrue(destinationFolder.exists());
+    assertTrue(destinationFolder.isDirectory());
     
-    assertTrue(clusterText.equals(FileUtils.readFileToString(dfClusterTextFile)));
-    assertTrue(groupText.equals(FileUtils.readFileToString(dfGroupTextFile)));
+    File[] destinationSubDirs = destinationFolder.listFiles();
+    assertNotNull(destinationSubDirs);
+    assertEquals(2, destinationSubDirs.length);
+
+    File destinationClusterTextFile = new File(FilenameUtils.concat(destinationFolder.getCanonicalPath(), clusterFolderName + File.separator + clusterTextFileName));
+    assertTrue(destinationClusterTextFile.exists());
+    assertTrue(destinationClusterTextFile.isFile());
+
+    File destinationGroupTextFile = new File(FilenameUtils.concat(destinationFolder.getCanonicalPath(), groupFolderName + File.separator + groupTextFileName));
+    assertTrue(destinationGroupTextFile.exists());
+    assertTrue(destinationGroupTextFile.isFile());
+
+    assertTrue(clusterText.equals(FileUtils.readFileToString(destinationClusterTextFile)));
+    assertTrue(groupText.equals(FileUtils.readFileToString(destinationGroupTextFile)));
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/domain/CacheElementJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/domain/CacheElementJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/domain/CacheElementJUnitTest.java
index 57d1c7e..d4d0d8e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/domain/CacheElementJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/domain/CacheElementJUnitTest.java
@@ -16,16 +16,13 @@
  */
 package com.gemstone.gemfire.management.internal.configuration.domain;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.Map.Entry;
-
 import javax.xml.XMLConstants;
 
 import org.junit.Test;
@@ -44,16 +41,14 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Test cases for {@link CacheElement}.
- * 
- * 
- * @see CacheElement
  *
+ * @see CacheElement
  * @since 8.1
  */
 @Category(UnitTest.class)
 public class CacheElementJUnitTest {
 
-  private static final Document loadSchema(final String schemaLocation) throws Exception {
+  private Document loadSchema(final String schemaLocation) throws Exception {
     final CacheXmlParser entityResolver = new CacheXmlParser();
     final XMLReader xmlReader = XMLReaderFactory.createXMLReader();
     xmlReader.setEntityResolver(entityResolver);
@@ -98,7 +93,6 @@ public class CacheElementJUnitTest {
    * correct order. If we change to use choice for all elements then we can
    * abandon this mapping.
    * 
-   * @throws IOException
    * @since 8.1
    */
   @Test
@@ -134,7 +128,7 @@ public class CacheElementJUnitTest {
     assertTrue("Extra entries in map.", !entries.hasNext());
   }
 
-  protected void assertEntry(final String expectedName, final int expectedOrder, final Entry<String, CacheElement> entry) {
+  private void assertEntry(final String expectedName, final int expectedOrder, final Entry<String, CacheElement> entry) {
     assertEquals("Entry key out of order.", expectedName, entry.getKey());
     assertEquals("Entry value name out of order.", expectedName, entry.getValue().getName());
     assertEquals("Entry value order out of order.", expectedOrder, entry.getValue().getOrder());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtilsJUnitTest.java
index 24702c3..f0d8c83 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtilsJUnitTest.java
@@ -45,7 +45,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 /**
  * Unit tests for {@link XmlUtils}. See Also {@link XmlUtilsAddNewNodeJUnitTest}
  * for tests related to {@link XmlUtils#addNewNode(Document, XmlEntity)}
- * 
  *
  * @since 8.1
  */
@@ -54,13 +53,10 @@ public class XmlUtilsJUnitTest {
 
   /**
    * Test method for {@link XmlUtils#buildSchemaLocationMap(String)}.
-   * @throws IOException 
-   * @throws ParserConfigurationException 
-   * @throws SAXException 
    */
   @Test
-  public void testBuildSchemaLocationMapAttribute() throws SAXException, ParserConfigurationException, IOException {
-    final Document doc = XmlUtils.createDocumentFromReader(new InputStreamReader(this.getClass().getResourceAsStream(
+  public void testBuildSchemaLocationMapAttribute() throws Exception {
+    final Document doc = XmlUtils.createDocumentFromReader(new InputStreamReader(getClass().getResourceAsStream(
         "XmlUtilsJUnitTest.testBuildSchemaLocationMapAttribute.xml")));
     final String schemaLocationAttribute = XmlUtils.getAttribute(doc.getDocumentElement(), W3C_XML_SCHEMA_INSTANCE_ATTRIBUTE_SCHEMA_LOCATION,
         W3C_XML_SCHEMA_INSTANCE_NS_URI);
@@ -86,21 +82,18 @@ public class XmlUtilsJUnitTest {
 
   /**
    * Test method for {@link XmlUtils#buildSchemaLocationMap(Map, String)}.
-   * @throws IOException 
-   * @throws ParserConfigurationException 
-   * @throws SAXException 
    */
   @Test
-  public void testBuildSchemaLocationMapMapOfStringListOfStringAttribute() throws SAXException, ParserConfigurationException, IOException {
+  public void testBuildSchemaLocationMapMapOfStringListOfStringAttribute() throws Exception {
     Map<String, List<String>> schemaLocationMap = new HashMap<>();
 
-    final Document doc1 = XmlUtils.createDocumentFromReader(new InputStreamReader(this.getClass().getResourceAsStream(
+    final Document doc1 = XmlUtils.createDocumentFromReader(new InputStreamReader(getClass().getResourceAsStream(
         "XmlUtilsJUnitTest.testBuildSchemaLocationMapAttribute.xml")));
     final String schemaLocationAttribute1 = XmlUtils.getAttribute(doc1.getDocumentElement(), W3C_XML_SCHEMA_INSTANCE_ATTRIBUTE_SCHEMA_LOCATION,
         W3C_XML_SCHEMA_INSTANCE_NS_URI);
     schemaLocationMap = XmlUtils.buildSchemaLocationMap(schemaLocationMap, schemaLocationAttribute1);
 
-    final Document doc2 = XmlUtils.createDocumentFromReader(new InputStreamReader(this.getClass().getResourceAsStream(
+    final Document doc2 = XmlUtils.createDocumentFromReader(new InputStreamReader(getClass().getResourceAsStream(
         "XmlUtilsJUnitTest.testBuildSchemaLocationMapMapOfStringListOfStringAttribute.xml")));
     final String schemaLocationAttribute2 = XmlUtils.getAttribute(doc2.getDocumentElement(), W3C_XML_SCHEMA_INSTANCE_ATTRIBUTE_SCHEMA_LOCATION,
         W3C_XML_SCHEMA_INSTANCE_NS_URI);
@@ -133,13 +126,10 @@ public class XmlUtilsJUnitTest {
   /**
    * Test method for {@link XmlUtils#buildSchemaLocationMap(Map, String)}.
    * Asserts map is empty if schemaLocation attribute is <code>null</code>.
-   * @throws IOException 
-   * @throws ParserConfigurationException 
-   * @throws SAXException 
    */
   @Test
-  public void testBuildSchemaLocationMapNullAttribute() throws SAXException, ParserConfigurationException, IOException {
-    final Document doc = XmlUtils.createDocumentFromReader(new InputStreamReader(this.getClass().getResourceAsStream(
+  public void testBuildSchemaLocationMapNullAttribute() throws Exception {
+    final Document doc = XmlUtils.createDocumentFromReader(new InputStreamReader(getClass().getResourceAsStream(
         "XmlUtilsJUnitTest.testBuildSchemaLocationMapNullAttribute.xml")));
     final String schemaLocationAttribute = XmlUtils.getAttribute(doc.getDocumentElement(), W3C_XML_SCHEMA_INSTANCE_ATTRIBUTE_SCHEMA_LOCATION,
         W3C_XML_SCHEMA_INSTANCE_NS_URI);
@@ -151,13 +141,10 @@ public class XmlUtilsJUnitTest {
   /**
    * Test method for {@link XmlUtils#buildSchemaLocationMap(Map, String)}.
    * Asserts map is empty if schemaLocation attribute is empty.
-   * @throws IOException 
-   * @throws ParserConfigurationException 
-   * @throws SAXException 
    */
   @Test
-  public void testBuildSchemaLocationMapEmptyAttribute() throws SAXException, ParserConfigurationException, IOException {
-    final Document doc = XmlUtils.createDocumentFromReader(new InputStreamReader(this.getClass().getResourceAsStream(
+  public void testBuildSchemaLocationMapEmptyAttribute() throws Exception {
+    final Document doc = XmlUtils.createDocumentFromReader(new InputStreamReader(getClass().getResourceAsStream(
         "XmlUtilsJUnitTest.testBuildSchemaLocationMapEmptyAttribute.xml")));
     final String schemaLocationAttribute = XmlUtils.getAttribute(doc.getDocumentElement(), W3C_XML_SCHEMA_INSTANCE_ATTRIBUTE_SCHEMA_LOCATION,
         W3C_XML_SCHEMA_INSTANCE_NS_URI);
@@ -169,14 +156,10 @@ public class XmlUtilsJUnitTest {
   /**
    * Test method for
    * {@link XmlUtils#querySingleElement(Node, String, XPathContext)}.
-   * @throws XPathExpressionException 
-   * @throws IOException 
-   * @throws ParserConfigurationException 
-   * @throws SAXException 
    */
   @Test
-  public void testQuerySingleElement() throws XPathExpressionException, SAXException, ParserConfigurationException, IOException {
-    final Document doc = XmlUtils.createDocumentFromReader(new InputStreamReader(this.getClass().getResourceAsStream(
+  public void testQuerySingleElement() throws Exception {
+    final Document doc = XmlUtils.createDocumentFromReader(new InputStreamReader(getClass().getResourceAsStream(
         "XmlUtilsJUnitTest.testQuerySingleElement.xml")));
     final Element root = doc.getDocumentElement();
     final String cacheNamespace = "http://geode.apache.org/schema/cache";
@@ -209,19 +192,16 @@ public class XmlUtilsJUnitTest {
     try {
       XmlUtils.querySingleElement(root, q4, cacheXPathContext);
       fail("Expected XPathExpressionException");
-    } catch (XPathExpressionException e) {
+    } catch (XPathExpressionException expected) {
       // ignore
     }
-
   }
 
   /**
    * Test method for {@link XmlUtils#changeNamespace(Node, String, String)}.
-   * @throws XPathExpressionException 
-   * @throws ParserConfigurationException 
    */
   @Test
-  public void testChangeNamespace() throws XPathExpressionException, ParserConfigurationException {
+  public void testChangeNamespace() throws Exception {
     Document doc = XmlUtils.getDocumentBuilder().newDocument();
     Element root = doc.createElement("root");
     root = (Element) doc.appendChild(root);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/WanCommandsControllerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/WanCommandsControllerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/WanCommandsControllerJUnitTest.java
index d9362cd..03d39fd 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/WanCommandsControllerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/web/controllers/WanCommandsControllerJUnitTest.java
@@ -17,9 +17,11 @@
 package com.gemstone.gemfire.management.internal.web.controllers;
 
 import static com.gemstone.gemfire.management.internal.cli.i18n.CliStrings.*;
-import static junitparams.JUnitParamsRunner.$;
+import static junitparams.JUnitParamsRunner.*;
 import static org.assertj.core.api.Assertions.*;
 
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -27,14 +29,10 @@ import org.junit.runner.RunWith;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junitparams.JUnitParamsRunner;
-import junitparams.Parameters;
-
 /**
  * Unit tests for WanCommandsController. 
  * 
  * Introduced for GEODE-213 "JMX -http manager treats "start gateway-sender" as "start gateway-receiver"
- *  
  */
 @SuppressWarnings("unused")
 @Category(UnitTest.class)
@@ -127,7 +125,8 @@ public class WanCommandsControllerJUnitTest {
    * performed by two different classes. Then we could mock the executor
    * class while testing just the command string definition class.
    */
-  public static class TestableWanCommandsController extends WanCommandsController {
+  private static class TestableWanCommandsController extends WanCommandsController {
+
     protected String testableCommand;
     
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/pdx/ByteSourceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/ByteSourceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/ByteSourceJUnitTest.java
index 11ac89c..fd9c5e3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/ByteSourceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/ByteSourceJUnitTest.java
@@ -39,7 +39,10 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class ByteSourceJUnitTest {
-  
+
+  /**
+   * Override as needed in subclass.
+   */
   protected ByteSource createByteSource(byte[] bytes) {
     return ByteSourceFactory.wrap(bytes);
   }
@@ -617,6 +620,9 @@ public class ByteSourceJUnitTest {
     }
   }
 
+  /**
+   * Override as needed in subclass.
+   */
   protected boolean isTestOffHeap() {
     return false;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
index 14a514d..55aa5aa 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
@@ -372,7 +372,7 @@ public class JSONPdxClientServerDUnitTest extends CacheTestCase {
     byte[] o1 = jsonParse(jd.getJsonByteArray());
     byte[] o2 = jsonParse(jsonByteArray);
     
-   // junit.framework.Assert.assertEquals("Pdx byte aray are not equal after fetching from cache " + jd.getFileName(), o1, o2); 
+   // junit.framework.Assert.assertIndexDetailsEquals("Pdx byte aray are not equal after fetching from cache " + jd.getFileName(), o1, o2);
    compareByteArray(o1, o2);
     
     PdxInstance pdx2 = JSONFormatter.fromJSON(jsonByteArray);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
index 7946b7e..c914e3f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
@@ -35,12 +35,12 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 public class OffHeapByteSourceJUnitTest extends ByteSourceJUnitTest {
 
   @Before
-  public void setUp() throws Exception {
+  public final void setUp() throws Exception {
     MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
   }
 
   @After
-  public void tearDown() throws Exception {
+  public final void tearDown() throws Exception {
     MemoryAllocatorImpl.freeOffHeapMemory();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxDeserializationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxDeserializationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxDeserializationDUnitTest.java
index 70ae048..fde1a27 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxDeserializationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxDeserializationDUnitTest.java
@@ -321,21 +321,21 @@ public class PdxDeserializationDUnitTest extends CacheTestCase {
 //    //Test puts and get in a transaction
 //    txManager.begin();
 //    region.put("C", new TestSerializable());
-//    assertEquals(TestSerializable.class, region.get("C").getClass());
+//    assertIndexDetailsEquals(TestSerializable.class, region.get("C").getClass());
 //    txManager.commit();
 //    
 //    txManager.begin();
-//    assertEquals(TestSerializable.class, region.get("C").getClass());
+//    assertIndexDetailsEquals(TestSerializable.class, region.get("C").getClass());
 //    txManager.commit();
 //    
 //    
 //    //Test cache load in a transaction
 //    txManager.begin();
-//    assertEquals(TestSerializable.class, region.get("D").getClass());
+//    assertIndexDetailsEquals(TestSerializable.class, region.get("D").getClass());
 //    txManager.commit();
 //    
 //    txManager.begin();
-//    assertEquals(TestSerializable.class, region.get("D").getClass());
+//    assertIndexDetailsEquals(TestSerializable.class, region.get("D").getClass());
 //    txManager.commit();
   }
   
@@ -343,8 +343,8 @@ public class PdxDeserializationDUnitTest extends CacheTestCase {
     assertEquals(TestSerializable.class, region.get("A").getClass());
     assertEquals(TestSerializable.class, region.get("B").getClass());
     //TODO Transactions don't work
-//    assertEquals(TestSerializable.class, region.get("C").getClass());
-//    assertEquals(TestSerializable.class, region.get("D").getClass());
+//    assertIndexDetailsEquals(TestSerializable.class, region.get("C").getClass());
+//    assertIndexDetailsEquals(TestSerializable.class, region.get("D").getClass());
   }
 
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java
index 58d3442..f9e45b3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java
@@ -436,7 +436,7 @@ public abstract class ClientAuthorizationTestCase extends JUnit4DistributedTestC
           // if ((flags & OpFlags.CHECK_NOTAUTHZ) > 0) {
           // Object value = region.get(key);
           // assertNotNull(value);
-          // assertEquals(vals[index], value);
+          // assertIndexDetailsEquals(vals[index], value);
           // }
           // else {
           // region.put(key, vals[index]);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/security/NotAuthorizedExceptionTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/NotAuthorizedExceptionTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/NotAuthorizedExceptionTest.java
index ec054d7..67dfadc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/NotAuthorizedExceptionTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/NotAuthorizedExceptionTest.java
@@ -71,10 +71,10 @@ public class NotAuthorizedExceptionTest {
     this.nonSerializablePrincipal = mock(Principal.class);
     this.serializablePrincipal = new SerializablePrincipal(this.principalName);
 
-    assertPreConditions();
+    assertPreconditions();
   }
 
-  private void assertPreConditions() {
+  private void assertPreconditions() {
     catchException(this).clone(this.nonSerializableNamingException);
     assertThat((Throwable)caughtException()).isNotNull();
     assertThat((Throwable)caughtException().getCause()).isInstanceOf(NotSerializableException.class);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipalTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipalTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipalTest.java
index 677e2d4..95cd99c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipalTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipalTest.java
@@ -24,12 +24,13 @@ import org.apache.commons.lang.SerializationUtils;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Unit tests for {@link PKCSPrincipal}
  */
-@Category(UnitTest.class)
+@Category({ UnitTest.class, SecurityTest.class })
 public class PKCSPrincipalTest {
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipalTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipalTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipalTest.java
index bce19b4..7fbb454 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipalTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipalTest.java
@@ -24,12 +24,13 @@ import org.apache.commons.lang.SerializationUtils;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Unit tests for {@link UsernamePrincipal}
  */
-@Category(UnitTest.class)
+@Category({ UnitTest.class, SecurityTest.class })
 public class UsernamePrincipalTest {
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/Assert.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/Assert.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/Assert.java
index 5d927eb..683d01c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/Assert.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/Assert.java
@@ -20,7 +20,7 @@ package com.gemstone.gemfire.test.dunit;
  * Extends <code>org.junit.Assert</code> with additional assertion and fail
  * methods. 
  * 
- * These methods can be used directly: <code>Assert.assertEquals(...)</code>, 
+ * These methods can be used directly: <code>Assert.assertIndexDetailsEquals(...)</code>,
  * however, they are intended to be referenced through static import:
  *
  * <pre>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/RMIException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/RMIException.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/RMIException.java
index 82ede05..cc0b69c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/RMIException.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/RMIException.java
@@ -30,7 +30,7 @@ import com.gemstone.gemfire.GemFireException;
  *       vm.invoke(() -> this.getUnknownObject());
  *
  *     } catch (RMIException ex) {
- *       assertEquals(ex.getCause() instanceof ObjectException);
+ *       assertIndexDetailsEquals(ex.getCause() instanceof ObjectException);
  *     }
  * </PRE>
  *

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/SerializableCallable.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/SerializableCallable.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/SerializableCallable.java
index f9291fd..ec40423 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/SerializableCallable.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/SerializableCallable.java
@@ -39,7 +39,7 @@ import java.util.concurrent.Callable;
  *       }
  *      });
  *   assertNull(vm0.invoke(putMethod));
- *   assertEquals(value, vm1.invoke(putMethod));
+ *   assertIndexDetailsEquals(value, vm1.invoke(putMethod));
  *  }
  * </PRE>
  * 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/SerializableRunnable.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/SerializableRunnable.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/SerializableRunnable.java
index 4776775..28ef471 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/SerializableRunnable.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/SerializableRunnable.java
@@ -40,7 +40,7 @@ import java.io.Serializable;
  *   vm1.invoke(new SerializableRunnable("Get value") {
  *       public void run() {
  *         ...// get the region //...
- *         assertEquals(value, region.get(name));
+ *         assertIndexDetailsEquals(value, region.get(name));
  *       }
  *     });
  *  }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/test/process/MainLauncherJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/process/MainLauncherJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/test/process/MainLauncherJUnitTest.java
index 15341c6..230a9d4 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/process/MainLauncherJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/process/MainLauncherJUnitTest.java
@@ -37,21 +37,20 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Quick sanity tests to make sure MainLauncher is functional.
- * 
  */
 @Category(UnitTest.class)
 public class MainLauncherJUnitTest {
 
   private static final long TIMEOUT_SECONDS = 10;
 
-  @Rule
-  public final TextFromStandardInputStream systemInMock = emptyStandardInputStream();
-  
   private static volatile boolean flag = false;
-  
+
   private final String launchedClass = getClass().getName();
   private ExecutorService futures;
 
+  @Rule
+  public final TextFromStandardInputStream systemInMock = emptyStandardInputStream();
+  
   @Before
   public void before() {
     flag = false;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
index 4e0ec90..2b2dbd7 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
@@ -1190,7 +1190,7 @@ public class CqQueryDUnitTest extends CacheTestCase {
           // Since ResultSet is not maintained for this release.
           // Instead of resultSize its been validated with total number of events.
           fail("test for event counts instead of results size");
-//        assertEquals("Result Size mismatch", resultSize, listener.getTotalEventCount());
+//        assertIndexDetailsEquals("Result Size mismatch", resultSize, listener.getTotalEventCount());
         }
         
         // Check for create count.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
index 4ba5e48..548dd2f 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
@@ -1019,7 +1019,7 @@ public class CqQueryUsingPoolDUnitTest extends CacheTestCase {
           // Since ResultSet is not maintained for this release.
           // Instead of resultSize its been validated with total number of events.
           fail("test for event counts instead of results size");
-//        assertEquals("Result Size mismatch", resultSize, listener.getTotalEventCount());
+//        assertIndexDetailsEquals("Result Size mismatch", resultSize, listener.getTotalEventCount());
         }
         
         // Check for create count.
@@ -1387,7 +1387,7 @@ public class CqQueryUsingPoolDUnitTest extends CacheTestCase {
         assertNotNull(region);
         
 //        Set keys = region.entrySet();
-//        assertEquals("Mismatch, number of keys in local region is not equal to the interest list size", 
+//        assertIndexDetailsEquals("Mismatch, number of keys in local region is not equal to the interest list size",
 //            size, keys.size());
         // TODO does this WaitCriterion actually help?
         WaitCriterion wc = new WaitCriterion() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsDUnitTest.java
index 26cda3c..fcd8160 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsDUnitTest.java
@@ -146,7 +146,7 @@ public class CqStatsDUnitTest extends CacheTestCase {
         }
 ////      Check for initial results time.
 //        if (initialResultsTime != CqQueryDUnitTest.noTest && cqVsdStats.getCqInitialResultsTime() <= 0) {
-//          assertEquals("Initial results time mismatch", initialResultsTime, cqVsdStats.getCqInitialResultsTime());
+//          assertIndexDetailsEquals("Initial results time mismatch", initialResultsTime, cqVsdStats.getCqInitialResultsTime());
 //        }
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolDUnitTest.java
index d4ba5ff..71b11d8 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolDUnitTest.java
@@ -146,7 +146,7 @@ public class CqStatsUsingPoolDUnitTest extends CacheTestCase {
         }
 ////      Check for initial results time.
 //        if (initialResultsTime != CqQueryUsingPoolDUnitTest.noTest && cqVsdStats.getCqInitialResultsTime() <= 0) {
-//          assertEquals("Initial results time mismatch", initialResultsTime, cqVsdStats.getCqInitialResultsTime());
+//          assertIndexDetailsEquals("Initial results time mismatch", initialResultsTime, cqVsdStats.getCqInitialResultsTime());
 //        }
       }
     });



[35/55] [abbrv] incubator-geode git commit: GEODE-92: PR with entry eviction 1 leaves 3 entries in memory with async overflow

Posted by sa...@apache.org.
GEODE-92: PR with entry eviction 1 leaves 3 entries in memory with async overflow

 Found that invoking lruUpdateCallback multiple times with in a single get
 could mess up entry eviction state. So disabled lru callback and invoked
 at the end of the operation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f4b06438
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f4b06438
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f4b06438

Branch: refs/heads/feature/GEODE-1153
Commit: f4b0643829b00d0ba9b0852fdd3a679812395545
Parents: 44c2f39
Author: Sai Boorlagadda <sb...@pivotal.io>
Authored: Tue Apr 26 13:31:25 2016 -0700
Committer: Sai Boorlagadda <sb...@pivotal.io>
Committed: Tue May 10 08:33:09 2016 -0700

----------------------------------------------------------------------
 .../gemfire/internal/cache/AbstractLRURegionMap.java  |  9 +++------
 .../gemstone/gemfire/internal/cache/LocalRegion.java  |  6 ++++++
 .../cache/PartitionedRegionStatsJUnitTest.java        | 14 ++------------
 3 files changed, 11 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f4b06438/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractLRURegionMap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractLRURegionMap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractLRURegionMap.java
index 2cc7a55..14c431d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractLRURegionMap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractLRURegionMap.java
@@ -197,17 +197,14 @@ public abstract class AbstractLRURegionMap extends AbstractRegionMap {
     int delta = le.updateEntrySize(_getCCHelper(), new CDValueWrapper(v));
     if (delta != 0) {
       result = true;
-      boolean needToDisableCallbacks = !getCallbackDisabled();
-      if (needToDisableCallbacks) {
-        setCallbackDisabled(true);
-      }
+      boolean disabledLURCallbacks = disableLruUpdateCallback();
       // by making sure that callbacks are disabled when we call
       // setDelta; it ensures that the setDelta will just inc the delta
       // value and not call lruUpdateCallback which we call in
       // finishChangeValueForm
       setDelta(delta);
-      if (needToDisableCallbacks) {
-        setCallbackDisabled(false);
+      if (disabledLURCallbacks) {
+        enableLruUpdateCallback();
       }
     }
     // fix for bug 42090

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f4b06438/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index 3ad294c..e9f5819 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -1298,6 +1298,7 @@ public class LocalRegion extends AbstractRegion
   @Retained
   protected final Object getDeserialized(RegionEntry re, boolean updateStats, boolean disableCopyOnRead, boolean preferCD, boolean retainResult) {
     assert !retainResult || preferCD;
+    boolean disabledLRUCallback = this.entries.disableLruUpdateCallback();
     try {
       @Retained Object v = null;
       try {
@@ -1340,6 +1341,11 @@ public class LocalRegion extends AbstractRegion
       IllegalArgumentException iae = new IllegalArgumentException(LocalizedStrings.DONT_RELEASE.toLocalizedString("Error while deserializing value for key="+re.getKey()));
       iae.initCause(i);
       throw iae;
+    } finally {
+      if(disabledLRUCallback) {
+        this.entries.enableLruUpdateCallback();
+        this.entries.lruUpdateCallback();
+      }
     }
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f4b06438/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsJUnitTest.java
index 167b89b..1a3277c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionStatsJUnitTest.java
@@ -436,11 +436,7 @@ public class PartitionedRegionStatsJUnitTest
     
     pr.getDiskStore().flush();
     
-    //Workaround for GEODE-92. We are leaving more than 1 entry in memory. To
-    //validate that stats, let's confirm the stats match what is actually in
-    //memory
-    //int entriesInMem = 1;
-    int entriesInMem = countEntriesInMem(pr);
+    int entriesInMem = 1;
     
     assertEquals(singleEntryMemSize * entriesInMem, stats.getLong("dataStoreBytesInUse"));
     assertEquals(numEntries , stats.getInt("dataStoreEntryCount"));
@@ -475,13 +471,7 @@ public class PartitionedRegionStatsJUnitTest
     System.out.println("----Done with random operations");
 
     numEntries = pr.entryCount();
-    
-    //Workaround for GEODE-92. We are leaving more than 1 entry in memory. To
-    //validate that stats, let's confirm the stats match what is actually in
-    //memory
-    //entriesInMem = 1;
-    entriesInMem = countEntriesInMem(pr);
-    
+        
     assertEquals(singleEntryMemSize * entriesInMem, stats.getLong("dataStoreBytesInUse"));
     assertEquals(numEntries , stats.getInt("dataStoreEntryCount"));
     assertEquals((numEntries - entriesInMem) * entryOverflowSize, diskStats.getNumOverflowBytesOnDisk());


[48/55] [abbrv] incubator-geode git commit: GEODE-248: remove unused BoundedLinkedHashMap

Posted by sa...@apache.org.
GEODE-248: remove unused BoundedLinkedHashMap


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/fc943cb8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/fc943cb8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/fc943cb8

Branch: refs/heads/feature/GEODE-1153
Commit: fc943cb81e10f4121ce9a1e6ca6e8e0d3fbc10f9
Parents: 463ae16
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Tue May 10 14:15:09 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed May 11 10:13:12 2016 -0700

----------------------------------------------------------------------
 .../cache/util/BoundedLinkedHashMap.java        | 88 --------------------
 .../codeAnalysis/sanctionedSerializables.txt    |  1 -
 2 files changed, 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc943cb8/geode-core/src/main/java/com/gemstone/gemfire/cache/util/BoundedLinkedHashMap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/util/BoundedLinkedHashMap.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/util/BoundedLinkedHashMap.java
deleted file mode 100755
index fbb024a..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/util/BoundedLinkedHashMap.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.cache.util;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Class <code>BoundedLinkedHashMap</code> is a bounded
- * <code>LinkedHashMap</code>. The bound is the maximum
- * number of entries the <code>BoundedLinkedHashMap</code>
- * can contain.
- *
- * @since 4.2
- * @deprecated as of 5.7 create your own class that extends {@link LinkedHashMap}
- * and implement {@link LinkedHashMap#removeEldestEntry}
- * to enforce a maximum number of entries.
- */
-public class BoundedLinkedHashMap extends LinkedHashMap
-{
-  private static final long serialVersionUID = -3419897166186852692L;
-
-  /**
-   * The maximum number of entries allowed in this
-   * <code>BoundedLinkedHashMap</code>
-   */
-  protected int _maximumNumberOfEntries;
-
-  /**
-   * Constructor.
-   *
-   * @param initialCapacity The initial capacity.
-   * @param loadFactor The load factor
-   * @param maximumNumberOfEntries The maximum number of allowed entries
-   */
-  public BoundedLinkedHashMap(int initialCapacity, float loadFactor, int maximumNumberOfEntries) {
-    super(initialCapacity, loadFactor);
-    this._maximumNumberOfEntries = maximumNumberOfEntries;
-  }
-
-  /**
-   * Constructor.
-   *
-   * @param initialCapacity The initial capacity.
-   * @param maximumNumberOfEntries The maximum number of allowed entries
-   */
-  public BoundedLinkedHashMap(int initialCapacity, int maximumNumberOfEntries) {
-    super(initialCapacity);
-    this._maximumNumberOfEntries = maximumNumberOfEntries;
-  }
-
-  /**
-   * Constructor.
-   *
-   * @param maximumNumberOfEntries The maximum number of allowed entries
-   */
-  public BoundedLinkedHashMap(int maximumNumberOfEntries) {
-    super();
-    this._maximumNumberOfEntries = maximumNumberOfEntries;
-  }
-
-  /**
-   * Returns the maximum number of entries.
-   * @return the maximum number of entries
-   */
-  public int getMaximumNumberOfEntries(){
-    return this._maximumNumberOfEntries;
-  }
-
-  @Override
-  protected boolean removeEldestEntry(Map.Entry entry) {
-    return size() > this._maximumNumberOfEntries;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc943cb8/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
index f356bda..ed0f9fc 100755
--- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
@@ -202,7 +202,6 @@ com/gemstone/gemfire/cache/query/internal/parse/GemFireAST,true,7799648022743052
 com/gemstone/gemfire/cache/query/internal/utils/PDXUtils$1,false
 com/gemstone/gemfire/cache/query/internal/utils/PDXUtils$2,false
 com/gemstone/gemfire/cache/snapshot/SnapshotOptions$SnapshotFormat,false
-com/gemstone/gemfire/cache/util/BoundedLinkedHashMap,true,-3419897166186852692,_maximumNumberOfEntries:int
 com/gemstone/gemfire/cache/util/Gateway$OrderPolicy,false
 com/gemstone/gemfire/cache/wan/GatewaySender$OrderPolicy,false
 com/gemstone/gemfire/compression/CompressionException,true,4118639654597191235


[34/55] [abbrv] incubator-geode git commit: GEODE-1260: Cache SCM metadata for source distributions

Posted by sa...@apache.org.
GEODE-1260: Cache SCM metadata for source distributions

The GemFireVersion.properties file is generated by the build and
contains the git branch, commit, and source date. This change
caches the SCM info in the build root (.buildinfo) for use by the
source distribution.

Actually works this time.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/44c2f398
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/44c2f398
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/44c2f398

Branch: refs/heads/feature/GEODE-1153
Commit: 44c2f398ff0a67d3e639c224c7df3ec861fe2c70
Parents: c33de6d
Author: Anthony Baker <ab...@apache.org>
Authored: Wed May 4 15:19:39 2016 -0700
Committer: Anthony Baker <ab...@apache.org>
Committed: Mon May 9 19:48:25 2016 -0700

----------------------------------------------------------------------
 geode-assembly/build.gradle | 12 +++++++
 geode-core/build.gradle     | 68 +++++++++++++++++++++++-----------------
 gradle/rat.gradle           |  1 +
 3 files changed, 52 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44c2f398/geode-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index e786b24..ed5154e 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -227,6 +227,17 @@ task docs(type: Javadoc) {
    }
 }
 
+task writeBuildInfo {
+  def buildInfo = file "$buildDir/.buildinfo"
+  outputs.file buildInfo
+  doLast {
+    buildInfo.getParentFile().mkdirs();
+    new FileOutputStream(buildInfo).withStream { fos ->
+      project(':geode-core').readScmInfo().store(fos, '')
+    }
+  }
+}
+
 gradle.taskGraph.whenReady( { graph ->
   tasks.withType(AbstractArchiveTask).findAll {
     it.name.toLowerCase().contains("dist")
@@ -242,6 +253,7 @@ distributions {
   src {
     baseName = 'apache-geode-src'
     contents {
+      from writeBuildInfo
       from (rootDir) {
         exclude 'KEYS'
         exclude 'gradlew'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44c2f398/geode-core/build.gradle
----------------------------------------------------------------------
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index 45051dc..8cd5bf3 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -131,7 +131,40 @@ sourceSets {
     output.dir(generatedResources, builtBy: 'createVersionPropertiesFile')
   }
 }
- 
+
+ext.readScmInfo = {
+  try {
+    def git = org.ajoberstar.grgit.Grgit.open(currentDir: projectDir)
+    try {
+      return [
+        'Source-Repository': git.branch.getCurrent().name,
+        'Source-Revision'  : git.head().id,
+        'Source-Date'      : git.head().getDate().format('yyyy-MM-dd HH:mm:ss Z')
+      ] as Properties
+    } finally {
+      git.close()
+    }
+  } catch (IllegalArgumentException e) {
+    // if we're building from the source distribution, we don't have git so
+    // use cached info written during the assembly process
+    def buildInfo = file "$rootDir/.buildinfo"
+    if (buildInfo.exists()) {
+      def props = new Properties()
+      new FileInputStream(buildInfo).withStream { fis ->
+        props.load(fis)
+      }
+      return props
+    }
+
+    logger.warn( '***** Unable to find Git workspace. Using default version information *****' )
+    return [
+      'Source-Repository': 'UNKNOWN',
+      'Source-Revision'  : 'UNKNOWN',
+      'Source-Date'      : new Date().format('yyyy-MM-dd HH:mm:ss Z')
+    ] as Properties
+  }
+}
+
 // Creates the version properties file and writes it to the classes dir
 task createVersionPropertiesFile {
   def propertiesFile = file(generatedResources + "/com/gemstone/gemfire/internal/GemFireVersion.properties");
@@ -139,38 +172,15 @@ task createVersionPropertiesFile {
   inputs.dir compileJava.destinationDir
 
   doLast {
-
-    try {
-      def grgit = org.ajoberstar.grgit.Grgit.open(currentDir: projectDir)
-      ext.branch = grgit.branch.getCurrent().name
-      ext.commitId = grgit.head().id
-      ext.sourceDate = grgit.head().getDate().format('yyyy-MM-dd HH:mm:ss Z')
-      grgit.close()
-    } catch (Exception e) {
-      logger.warn( '***** Unable to find Git workspace. Using default version information *****' )
-      ext.branch = 'UNKNOWN'
-      ext.commitId = 'UNKNOWN'
-      ext.sourceDate = new Date().format('yyyy-MM-dd HH:mm:ss Z')
-    }
-
-    ext.osArch = System.getProperty('os.arch')
-    ext.osName = System.getProperty('os.name')
-    ext.osVersion = System.getProperty('os.version')
-    ext.buildDate = new Date().format('yyyy-MM-dd HH:mm:ss Z')
-    ext.buildNumber = new Date().format('MMddyy')
-    ext.jdkVersion = System.getProperty('java.version')
-
     def props = [
       "Product-Name"      : "Apache Geode (incubating)",
       "Product-Version"   : version,
-      "Build-Id"          : System.env.USER + ' ' + ext.buildNumber,
-      "Build-Date"        : ext.buildDate,
-      "Build-Platform"    : ext.osName + ' ' + ext.osVersion + ' ' + ext.osArch,
-      "Build-Java-Version": ext.jdkVersion,
-      "Source-Date"       : ext.sourceDate,
-      "Source-Revision"   : ext.commitId,
-      "Source-Repository" : ext.branch
+      "Build-Id"          : "${System.env.USER} ${new Date().format('MMddyy')}".toString(),
+      "Build-Date"        : new Date().format('yyyy-MM-dd HH:mm:ss Z'),
+      "Build-Platform"    : "${System.properties['os.name']} ${System.properties['os.version']} ${System.properties['os.arch']}".toString(),
+      "Build-Java-Version": System.properties['java.version']
     ] as Properties
+    props.putAll(readScmInfo())
 
     propertiesFile.getParentFile().mkdirs();
     new FileOutputStream(propertiesFile).withStream { fos ->

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44c2f398/gradle/rat.gradle
----------------------------------------------------------------------
diff --git a/gradle/rat.gradle b/gradle/rat.gradle
index f35b157..3d0826a 100644
--- a/gradle/rat.gradle
+++ b/gradle/rat.gradle
@@ -37,6 +37,7 @@ rat {
     'native/**',
     'wrapper/**',
     '**/build/**',
+    '.buildinfo',
 
     // SBT
     'geode-spark-connector/**/target/**',


[02/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
index 5e4dd3d..29eec8e 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
@@ -169,7 +169,7 @@ public class PartitionedRegionCqQueryDUnitTest extends CacheTestCase {
     //cc1 = server1.invoke(() -> PartitionedRegionCqQueryDUnitTest.getCqCountFromRegionProfile());
     cc2 = server2.invoke(() -> PartitionedRegionCqQueryDUnitTest.getCqCountFromRegionProfile());
     
-    //assertEquals("Should have one", 0, cc1);
+    //assertIndexDetailsEquals("Should have one", 0, cc1);
     assertEquals("Should have one", 0, cc2);
     
     cqHelper.closeServer(server2);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java
index fafcd9b..68960bd 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java
@@ -2168,7 +2168,7 @@ public void testOneServer() throws CacheException, InterruptedException {
     int client2Size = getRegionSize(client2, regionName);
     int server1Size = getRegionSize(server1, regionName);
     LogWriterUtils.getLogWriter().info("region sizes: "+client1Size+","+client2Size+","+server1Size);
-//    assertEquals(server1Size, client1Size);
+//    assertIndexDetailsEquals(server1Size, client1Size);
 
     // restart server2
     createBridgeServer(server2, regionName, serverPort2, true, 0, "ds1");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
index 020f967..5c3a1b3 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
@@ -85,7 +85,7 @@ public class RemoteCQTransactionDUnitTest extends CacheTestCase {
   private final SerializableCallable verifyNoTxState = new SerializableCallable() {
     public Object call() throws Exception {
       //TXManagerImpl mgr = getGemfireCache().getTxManager();
-      //assertEquals(0, mgr.hostedTransactionsInProgressForTest());
+      //assertIndexDetailsEquals(0, mgr.hostedTransactionsInProgressForTest());
       final TXManagerImpl mgr = getGemfireCache().getTxManager();
       Wait.waitForCriterion(new WaitCriterion() {
         @Override
@@ -244,14 +244,14 @@ public class RemoteCQTransactionDUnitTest extends CacheTestCase {
       Region.Entry eR = refRegion.getEntry(custId);
       assertNotNull(eC);
       assertNotNull(eR);
-//      assertEquals(1,custRegion.size());
-  //    assertEquals(1,orderRegion.size());
-    //  assertEquals(1,refRegion.size());
+//      assertIndexDetailsEquals(1,custRegion.size());
+  //    assertIndexDetailsEquals(1,orderRegion.size());
+    //  assertIndexDetailsEquals(1,refRegion.size());
       
     } else {
-      //assertEquals(0,custRegion.size());
-      //assertEquals(0,orderRegion.size());
-      //assertEquals(0,refRegion.size());
+      //assertIndexDetailsEquals(0,custRegion.size());
+      //assertIndexDetailsEquals(0,orderRegion.size());
+      //assertIndexDetailsEquals(0,refRegion.size());
       try {
         Region.Entry eC =  custRegion.getEntry(custId);
         assertNull("should have had an EntryNotFoundException:"+eC,eC);
@@ -303,13 +303,13 @@ public class RemoteCQTransactionDUnitTest extends CacheTestCase {
       assertEquals(expectedCust, custRegion.getEntry(custId).getValue());
       /*
       assertNotNull(orderRegion.getEntry(orderId));
-      assertEquals(expectedOrder, orderRegion.getEntry(orderId).getValue());
+      assertIndexDetailsEquals(expectedOrder, orderRegion.getEntry(orderId).getValue());
       
       assertNotNull(orderRegion.getEntry(orderId2));
-      assertEquals(expectedOrder2, orderRegion.getEntry(orderId2).getValue());
+      assertIndexDetailsEquals(expectedOrder2, orderRegion.getEntry(orderId2).getValue());
       
       assertNotNull(orderRegion.getEntry(orderId3));
-      assertEquals(expectedOrder3, orderRegion.getEntry(orderId3).getValue());
+      assertIndexDetailsEquals(expectedOrder3, orderRegion.getEntry(orderId3).getValue());
       */
       assertNotNull(refRegion.getEntry(custId));
       assertEquals(expectedRef, refRegion.getEntry(custId).getValue());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
index 5d2290b..6d830b8 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
@@ -454,7 +454,7 @@ public class CQListGIIDUnitTest extends DistributedTestCase {
       assertTrue("executeWithInitialResults() state mismatch", cq1.getState()
           .isRunning());
       // if (expectedResultsSize >= 0) {
-      // assertEquals("unexpected results size", expectedResultsSize, cqResults
+      // assertIndexDetailsEquals("unexpected results size", expectedResultsSize, cqResults
       // .size());
       // }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
index 563c9a7..cfe4d67 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
@@ -153,7 +153,7 @@ public class DurableClientTestCase extends DistributedTestCase {
         assertTrue(proxy.isDurable());
         assertEquals(durableClientId, proxy.getDurableId());
         assertEquals(DistributionConfig.DEFAULT_DURABLE_CLIENT_TIMEOUT, proxy.getDurableTimeout());
-        //assertEquals(DistributionConfig.DEFAULT_DURABLE_CLIENT_KEEP_ALIVE, proxy.getDurableKeepAlive());
+        //assertIndexDetailsEquals(DistributionConfig.DEFAULT_DURABLE_CLIENT_KEEP_ALIVE, proxy.getDurableKeepAlive());
       }
     });
     
@@ -216,7 +216,7 @@ public class DurableClientTestCase extends DistributedTestCase {
 
           assertEquals(dId, proxy.getDurableId());
           assertEquals(DistributionConfig.DEFAULT_DURABLE_CLIENT_TIMEOUT, proxy.getDurableTimeout());
-          // assertEquals(DistributionConfig.DEFAULT_DURABLE_CLIENT_KEEP_ALIVE, proxy.getDurableKeepAlive());
+          // assertIndexDetailsEquals(DistributionConfig.DEFAULT_DURABLE_CLIENT_KEEP_ALIVE, proxy.getDurableKeepAlive());
         }
       });
 
@@ -339,7 +339,7 @@ public class DurableClientTestCase extends DistributedTestCase {
         assertTrue(proxy.isDurable());
         assertEquals(durableClientId, proxy.getDurableId());
         assertEquals(durableClientTimeout, proxy.getDurableTimeout());
-        //assertEquals(durableClientKeepAlive, proxy.getDurableKeepAlive());
+        //assertIndexDetailsEquals(durableClientKeepAlive, proxy.getDurableKeepAlive());
       }
     });
     
@@ -420,7 +420,7 @@ public class DurableClientTestCase extends DistributedTestCase {
         assertTrue(proxy.isDurable());
         assertEquals(durableClientId, proxy.getDurableId());
         assertEquals(durableClientTimeout, proxy.getDurableTimeout());
-        //assertEquals(durableClientKeepAlive, proxy.getDurableKeepAlive());
+        //assertIndexDetailsEquals(durableClientKeepAlive, proxy.getDurableKeepAlive());
       }
     });
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
index 06a5d1a..d784397 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
@@ -473,7 +473,7 @@ public class CacheServerManagementDUnitTest extends LocatorTestBase {
   }
 
   protected void assertCacheServerConfig(CacheServerMXBean bean) {
-    // assertEquals(ServerInfo.getInstance().getServerPort(), bean.getPort());
+    // assertIndexDetailsEquals(ServerInfo.getInstance().getServerPort(), bean.getPort());
     assertEquals(CacheServer.DEFAULT_BIND_ADDRESS, bean.getBindAddress());
     assertEquals(CacheServer.DEFAULT_HOSTNAME_FOR_CLIENTS, bean
         .getHostNameForClients());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
index 0d257e3..28ff543 100644
--- a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
@@ -27,12 +27,11 @@ import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionAttributes;
 import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
-import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory;
 import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueFactoryImpl;
 import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.ChunkKey;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.File;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogenousLuceneSerializer;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 
 /* wrapper of IndexWriter */
@@ -88,7 +87,7 @@ public class LuceneIndexForPartitionedRegion extends LuceneIndexImpl {
       }
 
       // we will create RegionDirectories on the fly when data comes in
-      HeterogenousLuceneSerializer mapper = new HeterogenousLuceneSerializer(getFieldNames());
+      HeterogeneousLuceneSerializer mapper = new HeterogeneousLuceneSerializer(getFieldNames());
       repositoryManager = new PartitionedRepositoryManager(dataRegion, (PartitionedRegion)fileRegion, (PartitionedRegion)chunkRegion, mapper, analyzer);
       
       // create AEQ, AEQ listener and specify the listener to repositoryManager

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogeneousLuceneSerializer.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogeneousLuceneSerializer.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogeneousLuceneSerializer.java
new file mode 100644
index 0000000..a0319f4
--- /dev/null
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogeneousLuceneSerializer.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
+
+import java.util.Map;
+
+import org.apache.lucene.document.Document;
+
+import com.gemstone.gemfire.internal.util.concurrent.CopyOnWriteWeakHashMap;
+import com.gemstone.gemfire.pdx.PdxInstance;
+
+/**
+ * An implementation of LuceneSerializer that reads the fields
+ * of a given object using reflection or from a PDX instance and
+ * writes them to a lucene document.
+ */
+public class HeterogeneousLuceneSerializer implements LuceneSerializer {
+  /**
+   * The set of indexed fields for this mapper
+   */
+  private String[] indexedFields;
+  
+  /**
+   * A mapper for converting a PDX object into a document
+   */
+  private LuceneSerializer pdxMapper;
+  
+  /**
+   * Mappers for each individual class type that this class has seen.
+   * 
+   * Weak so that entry will be removed if a class is garbage collected.
+   */
+  private Map<Class<?>, LuceneSerializer> mappers = new CopyOnWriteWeakHashMap<Class<?>, LuceneSerializer>();
+  
+  public HeterogeneousLuceneSerializer(String[] indexedFields) {
+    this.indexedFields = indexedFields;
+    pdxMapper = new PdxLuceneSerializer(indexedFields);
+  }
+  
+  @Override
+  public void toDocument(Object value, Document doc) {
+    
+    LuceneSerializer mapper = getFieldMapper(value);
+    
+    mapper.toDocument(value, doc);
+  }
+
+  /**
+   * Get the field mapper based on the type of the given object.
+   */
+  private LuceneSerializer getFieldMapper(Object value) {
+    if(value instanceof PdxInstance) {
+      return pdxMapper;
+    } else {
+      Class<?> clazz = value.getClass();
+      LuceneSerializer mapper = mappers.get(clazz);
+      if(mapper == null) {
+        mapper = new ReflectionLuceneSerializer(clazz, indexedFields);
+        mappers.put(clazz, mapper);
+      }
+      return mapper;
+    }
+  }
+  
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializer.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializer.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializer.java
deleted file mode 100644
index 7cb25bb..0000000
--- a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializer.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
-
-import java.util.Map;
-
-import org.apache.lucene.document.Document;
-
-import com.gemstone.gemfire.internal.util.concurrent.CopyOnWriteWeakHashMap;
-import com.gemstone.gemfire.pdx.PdxInstance;
-
-/**
- * An implementation of LuceneSerializer that reads the fields
- * of a given object using reflection or from a PDX instance and
- * writes them to a lucene document.
- */
-public class HeterogenousLuceneSerializer implements LuceneSerializer {
-  /**
-   * The set of indexed fiels for this mapper
-   */
-  private String[] indexedFields;
-  
-  /**
-   * A mapper for converting a PDX object into a document
-   */
-  private LuceneSerializer pdxMapper;
-  
-  /**
-   * Mappers for each individual class type that this class has seen.
-   * 
-   * Weak so that entry will be removed if a class is garbage collected.
-   */
-  private Map<Class<?>, LuceneSerializer> mappers = new CopyOnWriteWeakHashMap<Class<?>, LuceneSerializer>();
-  
-  public HeterogenousLuceneSerializer(String[] indexedFields) {
-    this.indexedFields = indexedFields;
-    pdxMapper = new PdxLuceneSerializer(indexedFields);
-  }
-  
-  @Override
-  public void toDocument(Object value, Document doc) {
-    
-    LuceneSerializer mapper = getFieldMapper(value);
-    
-    mapper.toDocument(value, doc);
-  }
-
-  /**
-   * Get the field mapper based on the type of the given object.
-   */
-  private LuceneSerializer getFieldMapper(Object value) {
-    if(value instanceof PdxInstance) {
-      return pdxMapper;
-    } else {
-      Class<?> clazz = value.getClass();
-      LuceneSerializer mapper = mappers.get(clazz);
-      if(mapper == null) {
-        mapper = new ReflectionLuceneSerializer(clazz, indexedFields);
-        mappers.put(clazz, mapper);
-      }
-      return mapper;
-    }
-  }
-  
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListenerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListenerJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListenerJUnitTest.java
index 85a5333..9660393 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListenerJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListenerJUnitTest.java
@@ -16,21 +16,17 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.atLeast;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.*;
 
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
 import junit.framework.AssertionFailedError;
-
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.mockito.Mockito;
@@ -38,9 +34,9 @@ import org.mockito.Mockito;
 import com.gemstone.gemfire.cache.Operation;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent;
+import com.gemstone.gemfire.cache.lucene.internal.repository.IndexRepository;
 import com.gemstone.gemfire.cache.lucene.internal.repository.RepositoryManager;
 import com.gemstone.gemfire.internal.cache.BucketNotFoundException;
-import com.gemstone.gemfire.cache.lucene.internal.repository.IndexRepository;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegionTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegionTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegionTest.java
index 74d4e34..ff22f85 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegionTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegionTest.java
@@ -16,31 +16,28 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal;
 
+import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.ExpectedException;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionAttributes;
 import com.gemstone.gemfire.cache.RegionFactory;
 import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory;
 import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueFactoryImpl;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.extension.ExtensionPoint;
 import com.gemstone.gemfire.test.fake.Fakes;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.ExpectedException;
-
 @Category(UnitTest.class)
 public class LuceneIndexForPartitionedRegionTest {
 
@@ -53,7 +50,7 @@ public class LuceneIndexForPartitionedRegionTest {
     String regionPath = "regionName";
     Cache cache = null;
     LuceneIndexForPartitionedRegion index = new LuceneIndexForPartitionedRegion(name, regionPath, cache);
-    Assert.assertEquals(name, index.getName());
+    assertEquals(name, index.getName());
   }
 
   @Test
@@ -62,7 +59,7 @@ public class LuceneIndexForPartitionedRegionTest {
     String regionPath = "regionName";
     Cache cache = null;
     LuceneIndexForPartitionedRegion index = new LuceneIndexForPartitionedRegion(name, regionPath, cache);
-    Assert.assertEquals(regionPath, index.getRegionPath());
+    assertEquals(regionPath, index.getRegionPath());
   }
 
   @Test
@@ -75,7 +72,7 @@ public class LuceneIndexForPartitionedRegionTest {
     String fileRegionName = index.createFileRegionName();
     when(cache.getRegion(fileRegionName)).thenReturn(region);
 
-    Assert.assertTrue(index.fileRegionExists(fileRegionName));
+    assertTrue(index.fileRegionExists(fileRegionName));
   }
 
   @Test
@@ -87,7 +84,7 @@ public class LuceneIndexForPartitionedRegionTest {
     String fileRegionName = index.createFileRegionName();
     when(cache.getRegion(fileRegionName)).thenReturn(null);
 
-    Assert.assertFalse(index.fileRegionExists(fileRegionName));
+    assertFalse(index.fileRegionExists(fileRegionName));
   }
 
   @Test
@@ -100,7 +97,7 @@ public class LuceneIndexForPartitionedRegionTest {
     String chunkRegionName = index.createChunkRegionName();
     when(cache.getRegion(chunkRegionName)).thenReturn(region);
 
-    Assert.assertTrue(index.chunkRegionExists(chunkRegionName));
+    assertTrue(index.chunkRegionExists(chunkRegionName));
   }
 
   @Test
@@ -112,7 +109,7 @@ public class LuceneIndexForPartitionedRegionTest {
     String chunkRegionName = index.createChunkRegionName();
     when(cache.getRegion(chunkRegionName)).thenReturn(null);
 
-    Assert.assertFalse(index.chunkRegionExists(chunkRegionName));
+    assertFalse(index.chunkRegionExists(chunkRegionName));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
index 2aa3241..ebde9d4 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
@@ -21,7 +21,6 @@ package com.gemstone.gemfire.cache.lucene.internal;
 import static org.junit.Assert.*;
 
 import java.io.IOException;
-import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.lucene.analysis.Analyzer;
@@ -48,7 +47,7 @@ import com.gemstone.gemfire.cache.lucene.LuceneService;
 import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
 import com.gemstone.gemfire.cache.lucene.internal.repository.IndexRepository;
 import com.gemstone.gemfire.cache.lucene.internal.repository.RepositoryManager;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogenousLuceneSerializer;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
 import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.Type1;
 import com.gemstone.gemfire.internal.cache.BucketNotFoundException;
 import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl;
@@ -64,7 +63,7 @@ public class LuceneIndexRecoveryHAJUnitTest {
   private static final String INDEX = "index";
   private static final String REGION = "indexedRegion";
   String[] indexedFields = new String[] { "txt" };
-  HeterogenousLuceneSerializer mapper = new HeterogenousLuceneSerializer(indexedFields);
+  HeterogeneousLuceneSerializer mapper = new HeterogeneousLuceneSerializer(indexedFields);
   Analyzer analyzer = new StandardAnalyzer();
 
   Cache cache;
@@ -72,7 +71,7 @@ public class LuceneIndexRecoveryHAJUnitTest {
   @Before
   public void setup() {
     indexedFields = new String[] { "txt" };
-    mapper = new HeterogenousLuceneSerializer(indexedFields);
+    mapper = new HeterogeneousLuceneSerializer(indexedFields);
     analyzer = new StandardAnalyzer();
     LuceneServiceImpl.registerDataSerializables();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImplJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImplJUnitTest.java
index 91556a9..9c3a65e 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImplJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImplJUnitTest.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.*;
@@ -26,13 +25,11 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.mockito.Mockito;
-import org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
@@ -76,7 +73,6 @@ public class LuceneQueryResultsImplJUnitTest {
   
   @Test
   public void testMaxStore() {
-
     hits.set(5, new EntryScore("key_5", 502));
     
     LuceneQueryResultsImpl<String, String> results = new LuceneQueryResultsImpl<String, String>(hits, null, 5);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpJUnitTest.java
index 7893940..a41c7da 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpJUnitTest.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.*;
@@ -31,7 +30,6 @@ public class LuceneResultStructImpJUnitTest {
 
   @Test
   public void hashCodeAndEquals() {
-    
     //Create 2 equal structs
     LuceneResultStructImpl<String, String> result1 = new LuceneResultStructImpl<String, String>("key1", "value1", 5);
     LuceneResultStructImpl<String, String> result2 = new LuceneResultStructImpl<String, String>("key1", "value1", 5);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
index 1beea0f..dec4572 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.*;
@@ -36,7 +35,6 @@ import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.queryparser.classic.ParseException;
 import org.junit.After;
-import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -44,32 +42,30 @@ import org.junit.rules.ExpectedException;
 
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.GemFireCache;
 import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
 import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.lucene.LuceneIndex;
 import com.gemstone.gemfire.cache.lucene.LuceneService;
 import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
 import com.gemstone.gemfire.cache.lucene.internal.distributed.LuceneFunction;
 import com.gemstone.gemfire.cache.lucene.internal.repository.RepositoryManager;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogenousLuceneSerializer;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class LuceneServiceImplJUnitTest {
 
   Cache cache;
   ClientCache clientCache;
   private LuceneIndexImpl repo;
-  private HeterogenousLuceneSerializer mapper;
+  private HeterogeneousLuceneSerializer mapper;
   private StandardAnalyzer analyzer = new StandardAnalyzer();
   private IndexWriter writer;
   LuceneServiceImpl service = null;
@@ -242,7 +238,7 @@ public class LuceneServiceImplJUnitTest {
     }
   }
 
-  public void canCreateLuceneIndexForPRType(RegionShortcut regionShortcut) {
+  private void canCreateLuceneIndexForPRType(RegionShortcut regionShortcut) {
     getService();
     service.createIndex("index1", "PR1", "field1", "field2", "field3");
     Region region = null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
index bf09f99..4532d16 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
@@ -16,14 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.*;
 
 import java.io.IOException;
 import java.util.Arrays;
@@ -43,11 +39,10 @@ import org.mockito.Mockito;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
-import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.lucene.internal.directory.RegionDirectory;
 import com.gemstone.gemfire.cache.lucene.internal.repository.IndexRepository;
 import com.gemstone.gemfire.cache.lucene.internal.repository.IndexRepositoryImpl;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogenousLuceneSerializer;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
 import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.LuceneSerializer;
 import com.gemstone.gemfire.internal.cache.BucketNotFoundException;
 import com.gemstone.gemfire.internal.cache.BucketRegion;
@@ -60,7 +55,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class PartitionedRepositoryManagerJUnitTest {
 
-  
   private PartitionedRegion userRegion;
   private PartitionedRegion fileRegion;
   private PartitionedRegion chunkRegion;
@@ -84,7 +78,7 @@ public class PartitionedRepositoryManagerJUnitTest {
     chunkRegion = Mockito.mock(PartitionedRegion.class);
     chunkDataStore = Mockito.mock(PartitionedRegionDataStore.class);
     Mockito.when(chunkRegion.getDataStore()).thenReturn(chunkDataStore);
-    serializer = new HeterogenousLuceneSerializer(new String[] {"a", "b"} );  
+    serializer = new HeterogeneousLuceneSerializer(new String[] {"a", "b"} );
   }
   
   @Test
@@ -163,7 +157,6 @@ public class PartitionedRepositoryManagerJUnitTest {
   
   @Test
   public void getByRegion() throws BucketNotFoundException {
-
     PartitionedRepositoryManager repoManager = new PartitionedRepositoryManager(userRegion, fileRegion, chunkRegion, serializer, new StandardAnalyzer());
     
     setUpMockBucket(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProviderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProviderJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProviderJUnitTest.java
index a16b019..dded69c 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProviderJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProviderJUnitTest.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.assertEquals;
@@ -36,9 +35,8 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class StringQueryProviderJUnitTest {
-  static final String INDEXED_REGION = "indexedRegion";
 
-  LuceneIndex mockIndex;
+  private LuceneIndex mockIndex;
 
   @Before
   public void initMocksAndCommonObjects() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectoryJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectoryJUnitTest.java
index d20b052..e8118c5 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectoryJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectoryJUnitTest.java
@@ -16,19 +16,18 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.directory;
 
 import java.io.IOException;
 import java.nio.file.Path;
 import java.util.concurrent.ConcurrentHashMap;
 
+import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
 import org.apache.lucene.store.BaseDirectoryTestCase;
 import org.apache.lucene.store.Directory;
 import org.junit.Rule;
 import org.junit.experimental.categories.Category;
 
-import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.ChunkKey;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.File;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
@@ -42,9 +41,11 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
  */
 @Category(UnitTest.class)
 public class RegionDirectoryJUnitTest extends BaseDirectoryTestCase {
+
   @Rule
   public SystemPropertiesRestoreRule restoreProps = new SystemPropertiesRestoreRule();
-  
+
+  @Override
   protected Directory getDirectory(Path path) throws IOException {
     
     //This is super lame, but log4j automatically sets the system property, and the lucene

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/DistributedScoringJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/DistributedScoringJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/DistributedScoringJUnitTest.java
index bec2da8..7bcc761 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/DistributedScoringJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/DistributedScoringJUnitTest.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.IOException;
@@ -41,24 +40,17 @@ import com.gemstone.gemfire.cache.lucene.internal.directory.RegionDirectory;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.ChunkKey;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.File;
 import com.gemstone.gemfire.cache.lucene.internal.repository.IndexRepositoryImpl;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogenousLuceneSerializer;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class DistributedScoringJUnitTest {
-  class TestType {
-    String txt;
-
-    public TestType(String txt) {
-      this.txt = txt;
-    }
-  }
 
-  String[] indexedFields = new String[] { "txt" };
-  HeterogenousLuceneSerializer mapper = new HeterogenousLuceneSerializer(indexedFields);
+  private String[] indexedFields = new String[] { "txt" };
+  private HeterogeneousLuceneSerializer mapper = new HeterogeneousLuceneSerializer(indexedFields);
 
-  final StandardAnalyzer analyzer = new StandardAnalyzer();
-  Region<String, String> region;
+  private final StandardAnalyzer analyzer = new StandardAnalyzer();
+  private Region<String, String> region;
 
   @Before
   public void createMocks() {
@@ -66,7 +58,7 @@ public class DistributedScoringJUnitTest {
     Mockito.when(region.isDestroyed()).thenReturn(false);
   }
 
-  /*
+  /**
    * The goal of this test is to verify fair scoring if entries are uniformly distributed. It compares ordered results
    * from a single IndexRepository (IR) with merged-ordered results from multiple repositories (ir1, ir2, ir3). The
    * records inserted in IR are same as the combined records in irX. This simulates merging of results from buckets of a
@@ -152,4 +144,13 @@ public class DistributedScoringJUnitTest {
 
     return new IndexRepositoryImpl(region, writer, mapper);
   }
+
+  private static class TestType {
+
+    String txt;
+
+    public TestType(String txt) {
+      this.txt = txt;
+    }
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScoreJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScoreJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScoreJUnitTest.java
index abdf8ec..bcb34e2 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScoreJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScoreJUnitTest.java
@@ -16,10 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.distributed;
 
-import org.junit.Assert;
+import static org.junit.Assert.*;
+
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -29,12 +29,13 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class EntryScoreJUnitTest {
+
   @Test
   public void testSerialization() {
     LuceneServiceImpl.registerDataSerializables();
     EntryScore entry = new EntryScore("entry", .1f);
     EntryScore copy = CopyHelper.deepCopy(entry);
-    Assert.assertEquals("entry", copy.getKey());
-    Assert.assertEquals(.1f, copy.getScore(), 0f);
+    assertEquals("entry", copy.getKey());
+    assertEquals(.1f, copy.getScore(), 0f);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContextJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContextJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContextJUnitTest.java
index 46ea67f..39a4dde 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContextJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContextJUnitTest.java
@@ -16,18 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.distributed;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
-import org.mockito.Mockito;
 
 import com.gemstone.gemfire.CopyHelper;
-import com.gemstone.gemfire.cache.lucene.LuceneIndex;
 import com.gemstone.gemfire.cache.lucene.LuceneQueryFactory;
 import com.gemstone.gemfire.cache.lucene.LuceneQueryProvider;
 import com.gemstone.gemfire.cache.lucene.internal.LuceneServiceImpl;
@@ -38,6 +34,7 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class LuceneFunctionContextJUnitTest {
+
   @Test
   public void testLuceneFunctionArgsDefaults() {
     LuceneFunctionContext<IndexResultCollector> context = new LuceneFunctionContext<>();
@@ -55,7 +52,7 @@ public class LuceneFunctionContextJUnitTest {
 
     LuceneFunctionContext<TopEntriesCollector> copy = CopyHelper.deepCopy(context);
     assertEquals(123, copy.getLimit());
-    Assert.assertNotNull(copy.getQueryProvider());
+    assertNotNull(copy.getQueryProvider());
     assertEquals("text", ((StringQueryProvider) copy.getQueryProvider()).getQueryString());
     assertEquals(TopEntriesCollectorManager.class, copy.getCollectorManager().getClass());
     assertEquals("test", ((TopEntriesCollectorManager) copy.getCollectorManager()).getId());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorJUnitTest.java
index b36d8cc..9e2f310 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorJUnitTest.java
@@ -16,15 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.distributed;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
 
 import java.util.ArrayList;
 import java.util.List;
 
-import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -36,18 +34,19 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class TopEntriesCollectorJUnitTest {
-  EntryScore r1_1 = new EntryScore("1-1", .9f);
-  EntryScore r1_2 = new EntryScore("1-2", .7f);
-  EntryScore r1_3 = new EntryScore("1-3", .5f);
 
-  EntryScore r2_1 = new EntryScore("2-1", .85f);
-  EntryScore r2_2 = new EntryScore("2-2", .65f);
+  private EntryScore r1_1 = new EntryScore("1-1", .9f);
+  private EntryScore r1_2 = new EntryScore("1-2", .7f);
+  private EntryScore r1_3 = new EntryScore("1-3", .5f);
+
+  private EntryScore r2_1 = new EntryScore("2-1", .85f);
+  private EntryScore r2_2 = new EntryScore("2-2", .65f);
 
-  EntryScore r3_1 = new EntryScore("3-1", .8f);
-  EntryScore r3_2 = new EntryScore("3-2", .6f);
-  EntryScore r3_3 = new EntryScore("3-3", .4f);
+  private EntryScore r3_1 = new EntryScore("3-1", .8f);
+  private EntryScore r3_2 = new EntryScore("3-2", .6f);
+  private EntryScore r3_3 = new EntryScore("3-3", .4f);
 
-  TopEntriesCollectorManager manager;
+  private TopEntriesCollectorManager manager;
 
   @Before
   public void setup() {
@@ -122,16 +121,16 @@ public class TopEntriesCollectorJUnitTest {
     TopEntriesJUnitTest.verifyResultOrder(c1.getEntries().getHits(), r1_1, r1_2, r1_3);
 
     ListScanner scanner = new ListScanner(c1.getEntries().getHits());
-    Assert.assertTrue(scanner.hasNext());
+    assertTrue(scanner.hasNext());
     assertEquals(r1_1.getKey(), scanner.peek().getKey());
     assertEquals(r1_1.getKey(), scanner.next().getKey());
-    Assert.assertTrue(scanner.hasNext());
+    assertTrue(scanner.hasNext());
     assertEquals(r1_2.getKey(), scanner.peek().getKey());
     assertEquals(r1_2.getKey(), scanner.next().getKey());
-    Assert.assertTrue(scanner.hasNext());
+    assertTrue(scanner.hasNext());
     assertEquals(r1_3.getKey(), scanner.peek().getKey());
     assertEquals(r1_3.getKey(), scanner.next().getKey());
-    Assert.assertFalse(scanner.hasNext());
+    assertFalse(scanner.hasNext());
 
     assertEquals(3, c1.getEntries().getHits().size());
     TopEntriesJUnitTest.verifyResultOrder(c1.getEntries().getHits(), r1_1, r1_2, r1_3);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesJUnitTest.java
index d849c8e..410d0ef 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesJUnitTest.java
@@ -16,11 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.distributed;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 import java.util.Collection;
 import java.util.Iterator;
@@ -40,12 +38,13 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class TopEntriesJUnitTest {
-  Mockery mockContext;
 
-  EntryScore r1_1 = new EntryScore("3", .9f);
-  EntryScore r1_2 = new EntryScore("1", .8f);
-  EntryScore r2_1 = new EntryScore("2", 0.85f);
-  EntryScore r2_2 = new EntryScore("4", 0.1f);
+  private Mockery mockContext;
+
+  private EntryScore r1_1 = new EntryScore("3", .9f);
+  private EntryScore r1_2 = new EntryScore("1", .8f);
+  private EntryScore r2_1 = new EntryScore("2", 0.85f);
+  private EntryScore r2_2 = new EntryScore("4", 0.1f);
 
   @Test
   public void testPopulateTopEntries() {
@@ -115,7 +114,8 @@ public class TopEntriesJUnitTest {
     assertEquals(3, copy.size());
     verifyResultOrder(copy.getHits(), r1_1, r2_1, r1_2);
   }
-  
+
+  // TODO: extract to lucene test util class
   public static void verifyResultOrder(Collection<EntryScore> list, EntryScore... expectedEntries) {
     Iterator<EntryScore> iter = list.iterator();
     for (EntryScore expectedEntry : expectedEntries) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKeyJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKeyJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKeyJUnitTest.java
index f28b84a..b49beb5 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKeyJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKeyJUnitTest.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileJUnitTest.java
index e4e8752..b4ba92f 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileJUnitTest.java
@@ -16,13 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import static org.junit.Assert.*;
 
-import java.util.UUID;
-
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -41,7 +38,7 @@ public class FileJUnitTest {
     file.length = 5;
     file.chunks = 7;
     File copy = CopyHelper.deepCopy(file);
-    
+
     assertEquals(file.chunks, copy.chunks);
     assertEquals(file.created, copy.created);
     assertEquals(file.modified, copy.modified);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java
index 83d9e03..1d936ca 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java
@@ -16,16 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 import java.io.ByteArrayOutputStream;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -51,6 +46,7 @@ public class FileSystemJUnitTest {
 
   private static final int SMALL_CHUNK = 523;
   private static final int LARGE_CHUNK = 1024 * 1024 * 5 + 33;
+
   private FileSystem system;
   private Random rand = new Random();
   private ConcurrentHashMap<String, File> fileRegion;
@@ -67,7 +63,7 @@ public class FileSystemJUnitTest {
    * A test of reading and writing to a file.
    */
   @Test
-  public void testReadWriteBytes() throws IOException {
+  public void testReadWriteBytes() throws Exception {
     long start = System.currentTimeMillis();
     
     File file1= system.createFile("testFile1");
@@ -143,7 +139,7 @@ public class FileSystemJUnitTest {
    * but they should not hurt each other.
    */
   @Test
-  public void testCloneReader() throws IOException {
+  public void testCloneReader() throws Exception {
     File file1= system.createFile("testFile1");
     
     byte[] data = writeRandomBytes(file1);
@@ -180,7 +176,7 @@ public class FileSystemJUnitTest {
    * A test that skip can jump to the correct position in the stream
    */
   @Test
-  public void testSeek() throws IOException {
+  public void testSeek() throws Exception {
     File file= system.createFile("testFile1");
 
     ByteArrayOutputStream expected = new ByteArrayOutputStream();
@@ -238,10 +234,9 @@ public class FileSystemJUnitTest {
 
   /**
    * Test basic file operations - rename, delete, listFiles.
-   * @throws IOException
    */
   @Test
-  public void testFileOperations() throws IOException {
+  public void testFileOperations() throws Exception {
     String name1 = "testFile1";
     File file1= system.createFile(name1);
     byte[] file1Data = writeRandomBytes(file1);
@@ -292,19 +287,17 @@ public class FileSystemJUnitTest {
   
   /**
    * Test what happens if you have an unclosed stream and you create a new file.
-   * @throws IOException
    */
   @Test
-  public void testUnclosedStreamSmallFile() throws IOException {
+  public void testUnclosedStreamSmallFile() throws Exception {
     doUnclosedStream(SMALL_CHUNK);
   }
   
   /**
    * Test what happens if you have an unclosed stream and you create a new file.
-   * @throws IOException
    */
   @Test
-  public void testUnclosedStreamLargeFile() throws IOException {
+  public void testUnclosedStreamLargeFile() throws Exception {
     doUnclosedStream(LARGE_CHUNK);
   }
   
@@ -346,7 +339,7 @@ public class FileSystemJUnitTest {
    * the partial rename.
    */
   @Test
-  public void testPartialRename() throws IOException {
+  public void testPartialRename() throws Exception {
 
     final CountOperations countOperations = new CountOperations();
     //Create a couple of mock regions where we count the operations
@@ -387,7 +380,7 @@ public class FileSystemJUnitTest {
     try {
       system.renameFile(name2, name3);
       fail("should have seen an error");
-    } catch(CacheClosedException e) {
+    } catch(CacheClosedException expectedException) {
       
     }
     
@@ -413,7 +406,7 @@ public class FileSystemJUnitTest {
    * the partial rename.
    */
   @Test
-  public void testPartialDelete() throws IOException {
+  public void testPartialDelete() throws Exception {
 
     final CountOperations countOperations = new CountOperations();
     //Create a couple of mock regions where we count the operations
@@ -456,8 +449,7 @@ public class FileSystemJUnitTest {
     try {
       system.deleteFile(name2);
       fail("should have seen an error");
-    } catch(CacheClosedException e) {
-      
+    } catch(CacheClosedException expectedException) {
     }
     
     system = new FileSystem(fileRegion, chunkRegion);
@@ -466,22 +458,13 @@ public class FileSystemJUnitTest {
       //File was deleted, but shouldn't have any dangling chunks at this point
       assertEquals(Collections.EMPTY_SET, fileRegion.keySet());
       //TODO - need to purge chunks of deleted files somehow.
-//      assertEquals(Collections.EMPTY_SET, chunkRegion.keySet());
+//      assertIndexDetailsEquals(Collections.EMPTY_SET, chunkRegion.keySet());
     } else {
       file2 = system.getFile(name2);
       assertContents(expected.toByteArray(), file2);
     }
-    
   }
 
-  private File getOrCreateFile(String name) throws IOException {
-    try {
-      return system.getFile(name);
-    } catch(FileNotFoundException e) {
-      return system.createFile(name);
-    }
-  }
-  
   private void assertContents(byte[] data, File file) throws IOException {
     assertEquals(data.length, file.getLength());
     
@@ -512,11 +495,11 @@ public class FileSystemJUnitTest {
     outputStream.close();
   }
   
-  public byte[] getRandomBytes() {
+  private byte[] getRandomBytes() {
     return getRandomBytes(rand.nextInt(LARGE_CHUNK) + SMALL_CHUNK);
   }
-  
-  public byte[] getRandomBytes(int length) {
+
+  private byte[] getRandomBytes(int length) {
     byte[] data = new byte[length];
     rand.nextBytes(data);
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitTest.java
index 617879f..53c4161 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitTest.java
@@ -43,7 +43,7 @@ import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.lucene.internal.directory.RegionDirectory;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.ChunkKey;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.File;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogenousLuceneSerializer;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
 import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.Type2;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
@@ -56,7 +56,7 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 public class IndexRepositoryImplJUnitTest {
 
   private IndexRepositoryImpl repo;
-  private HeterogenousLuceneSerializer mapper;
+  private HeterogeneousLuceneSerializer mapper;
   private StandardAnalyzer analyzer = new StandardAnalyzer();
   private IndexWriter writer;
   private Region region;
@@ -69,7 +69,7 @@ public class IndexRepositoryImplJUnitTest {
     IndexWriterConfig config = new IndexWriterConfig(analyzer);
     writer = new IndexWriter(dir, config);
     String[] indexedFields= new String[] {"s", "i", "l", "d", "f", "s2", "missing"};
-    mapper = new HeterogenousLuceneSerializer(indexedFields);
+    mapper = new HeterogeneousLuceneSerializer(indexedFields);
     region = Mockito.mock(Region.class);
     Mockito.when(region.isDestroyed()).thenReturn(false);
     repo = new IndexRepositoryImpl(region, writer, mapper);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
index e996f30..cec76ba 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
@@ -65,7 +65,7 @@ import com.gemstone.gemfire.cache.lucene.internal.directory.RegionDirectory;
 import com.gemstone.gemfire.cache.lucene.internal.distributed.TopEntriesCollector;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.ChunkKey;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.File;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogenousLuceneSerializer;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
 import com.gemstone.gemfire.cache.query.QueryException;
 import com.gemstone.gemfire.test.junit.categories.PerformanceTest;
 
@@ -119,7 +119,7 @@ public class IndexRepositoryImplPerformanceTest {
         IndexWriterConfig config = new IndexWriterConfig(analyzer);
         writer = new IndexWriter(dir, config);
         String[] indexedFields= new String[] {"text"};
-        HeterogenousLuceneSerializer mapper = new HeterogenousLuceneSerializer(indexedFields);
+        HeterogeneousLuceneSerializer mapper = new HeterogeneousLuceneSerializer(indexedFields);
         repo = new IndexRepositoryImpl(fileRegion, writer, mapper);
       }
 
@@ -381,7 +381,7 @@ public class IndexRepositoryImplPerformanceTest {
         int size  = callbacks.query(query);
 //        int size  = callbacks.query(parser.parse(word));
         //All of my tests sometimes seem to be missing a couple of words, including the stock lucene
-//        assertEquals("Error on query " + i + " word=" + word, counts[wordIndex], size);
+//        assertIndexDetailsEquals("Error on query " + i + " word=" + word, counts[wordIndex], size);
       }
       end = System.nanoTime();
       results.queryTime = end - start;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogeneousLuceneSerializerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogeneousLuceneSerializerJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogeneousLuceneSerializerJUnitTest.java
new file mode 100644
index 0000000..3bce904
--- /dev/null
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogeneousLuceneSerializerJUnitTest.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+
+import org.apache.lucene.document.Document;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.pdx.PdxInstance;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+/**
+ * Unit test of the ObjectToDocumentMapper. 
+ */
+@Category(UnitTest.class)
+public class HeterogeneousLuceneSerializerJUnitTest {
+
+  /**
+   * Test that the mapper can handle a mix of different
+   * object types.
+   */
+  @Test
+  public void testHeterogeneousObjects() {
+    String[] fields = new String[] {"s", "i", "l", "d", "f", "s2", "missing"};
+    HeterogeneousLuceneSerializer mapper = new HeterogeneousLuceneSerializer(fields);
+    
+    Type1 t1 = new Type1("a", 1, 2L, 3.0, 4.0f);
+    
+    Document doc1 = new Document();
+    mapper.toDocument(t1, doc1);
+    
+    assertEquals(5, doc1.getFields().size());
+    assertEquals("a", doc1.getField("s").stringValue());
+    assertEquals(1, doc1.getField("i").numericValue());
+    assertEquals(2L, doc1.getField("l").numericValue());
+    assertEquals(3.0, doc1.getField("d").numericValue());
+    assertEquals(4.0f, doc1.getField("f").numericValue());
+    
+    Type2 t2 = new Type2("a", 1, 2L, 3.0, 4.0f, "b");
+    
+    Document doc2 = new Document();
+    mapper.toDocument(t2, doc2);
+    
+    assertEquals(6, doc2.getFields().size());
+    assertEquals("a", doc2.getField("s").stringValue());
+    assertEquals("b", doc2.getField("s2").stringValue());
+    assertEquals(1, doc2.getField("i").numericValue());
+    assertEquals(2L, doc2.getField("l").numericValue());
+    assertEquals(3.0, doc2.getField("d").numericValue());
+    assertEquals(4.0f, doc2.getField("f").numericValue());
+    
+    PdxInstance i = mock(PdxInstance.class);
+    
+    when(i.hasField("s")).thenReturn(true);
+    when(i.hasField("i")).thenReturn(true);
+    when(i.getField("s")).thenReturn("a");
+    when(i.getField("i")).thenReturn(5);
+    
+    Document doc3 = new Document();
+    mapper.toDocument(i, doc3);
+    
+    assertEquals(2, doc3.getFields().size());
+    assertEquals("a", doc3.getField("s").stringValue());
+    assertEquals(5, doc3.getField("i").numericValue());
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializerJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializerJUnitTest.java
deleted file mode 100644
index e54856a..0000000
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializerJUnitTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.lucene.document.Document;
-import org.apache.lucene.index.Term;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.Mockito;
-
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogenousLuceneSerializer;
-import com.gemstone.gemfire.pdx.PdxInstance;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-/**
- * Unit test of the ObjectToDocumentMapper. 
- */
-@Category(UnitTest.class)
-public class HeterogenousLuceneSerializerJUnitTest {
-
-  /**
-   * Test that the mapper can handle a mix of different
-   * object types.
-   */
-  @Test
-  public void testHetrogenousObjects() {
-    String[] fields = new String[] {"s", "i", "l", "d", "f", "s2", "missing"};
-    HeterogenousLuceneSerializer mapper = new HeterogenousLuceneSerializer(fields);
-    
-    Type1 t1 = new Type1("a", 1, 2L, 3.0, 4.0f);
-    
-    Document doc1 = new Document();
-    mapper.toDocument(t1, doc1);
-    
-    assertEquals(5, doc1.getFields().size());
-    assertEquals("a", doc1.getField("s").stringValue());
-    assertEquals(1, doc1.getField("i").numericValue());
-    assertEquals(2L, doc1.getField("l").numericValue());
-    assertEquals(3.0, doc1.getField("d").numericValue());
-    assertEquals(4.0f, doc1.getField("f").numericValue());
-    
-    Type2 t2 = new Type2("a", 1, 2L, 3.0, 4.0f, "b");
-    
-    Document doc2 = new Document();
-    mapper.toDocument(t2, doc2);
-    
-    assertEquals(6, doc2.getFields().size());
-    assertEquals("a", doc2.getField("s").stringValue());
-    assertEquals("b", doc2.getField("s2").stringValue());
-    assertEquals(1, doc2.getField("i").numericValue());
-    assertEquals(2L, doc2.getField("l").numericValue());
-    assertEquals(3.0, doc2.getField("d").numericValue());
-    assertEquals(4.0f, doc2.getField("f").numericValue());
-    
-    PdxInstance i = Mockito.mock(PdxInstance.class);
-    
-    Mockito.when(i.hasField("s")).thenReturn(true);
-    Mockito.when(i.hasField("i")).thenReturn(true);
-    Mockito.when(i.getField("s")).thenReturn("a");
-    Mockito.when(i.getField("i")).thenReturn(5);
-    
-    Document doc3 = new Document();
-    mapper.toDocument(i, doc3);
-    
-    assertEquals(2, doc3.getFields().size());
-    assertEquals("a", doc3.getField("s").stringValue());
-    assertEquals(5, doc3.getField("i").numericValue());
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxFieldMapperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxFieldMapperJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxFieldMapperJUnitTest.java
index ec31da9..278e818 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxFieldMapperJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxFieldMapperJUnitTest.java
@@ -16,17 +16,15 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import org.apache.lucene.document.Document;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
-import org.mockito.Mockito;
 
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.PdxLuceneSerializer;
 import com.gemstone.gemfire.pdx.PdxInstance;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
@@ -42,13 +40,12 @@ public class PdxFieldMapperJUnitTest {
     String[] fields = new String[] {"s", "i"};
     PdxLuceneSerializer mapper = new PdxLuceneSerializer(fields);
     
-    PdxInstance i = Mockito.mock(PdxInstance.class);
-    
-    Mockito.when(i.hasField("s")).thenReturn(true);
-    Mockito.when(i.hasField("i")).thenReturn(true);
-    Mockito.when(i.getField("s")).thenReturn("a");
-    Mockito.when(i.getField("i")).thenReturn(5);
+    PdxInstance i = mock(PdxInstance.class);
     
+    when(i.hasField("s")).thenReturn(true);
+    when(i.hasField("i")).thenReturn(true);
+    when(i.getField("s")).thenReturn("a");
+    when(i.getField("i")).thenReturn(5);
     
     Document doc = new Document();
     mapper.toDocument(i, doc);
@@ -63,17 +60,16 @@ public class PdxFieldMapperJUnitTest {
     String[] fields = new String[] {"s", "i", "s2", "o"};
     PdxLuceneSerializer mapper = new PdxLuceneSerializer(fields);
     
-    PdxInstance i = Mockito.mock(PdxInstance.class);
-    
-    Mockito.when(i.hasField("s")).thenReturn(true);
-    Mockito.when(i.hasField("i")).thenReturn(true);
-    Mockito.when(i.hasField("o")).thenReturn(true);
-    Mockito.when(i.hasField("o2")).thenReturn(true);
-    Mockito.when(i.getField("s")).thenReturn("a");
-    Mockito.when(i.getField("i")).thenReturn(5);
-    Mockito.when(i.getField("o")).thenReturn(new Object());
-    Mockito.when(i.getField("o2")).thenReturn(new Object());
+    PdxInstance i = mock(PdxInstance.class);
     
+    when(i.hasField("s")).thenReturn(true);
+    when(i.hasField("i")).thenReturn(true);
+    when(i.hasField("o")).thenReturn(true);
+    when(i.hasField("o2")).thenReturn(true);
+    when(i.getField("s")).thenReturn("a");
+    when(i.getField("i")).thenReturn(5);
+    when(i.getField("o")).thenReturn(new Object());
+    when(i.getField("o2")).thenReturn(new Object());
     
     Document doc = new Document();
     mapper.toDocument(i, doc);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionFieldMapperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionFieldMapperJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionFieldMapperJUnitTest.java
index 3ca8fbf..c187022 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionFieldMapperJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionFieldMapperJUnitTest.java
@@ -16,16 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
 
 import org.apache.lucene.document.Document;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.ReflectionLuceneSerializer;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
@@ -37,7 +35,7 @@ public class ReflectionFieldMapperJUnitTest {
 
   @Test
   public void testAllFields() {
-    
+
     String[] allFields = new String[] {"s", "i", "l", "d", "f", "s2"};
     ReflectionLuceneSerializer mapper1 = new ReflectionLuceneSerializer(Type1.class, allFields);
     ReflectionLuceneSerializer mapper2 = new ReflectionLuceneSerializer(Type2.class, allFields);
@@ -69,7 +67,7 @@ public class ReflectionFieldMapperJUnitTest {
   
   @Test
   public void testIgnoreInvalid() {
-    
+
     String[] fields = new String[] {"s", "o", "s2"};
     ReflectionLuceneSerializer mapper = new ReflectionLuceneSerializer(Type2.class, fields);
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorJUnitTest.java
index c1e93ad..ea98f5c 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorJUnitTest.java
@@ -16,11 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package com.gemstone.gemfire.cache.lucene.internal.xml;
 
 import static org.junit.Assert.*;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.*;
 
 import java.util.Arrays;
 import java.util.HashSet;
@@ -29,10 +29,8 @@ import java.util.Set;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
 
 import com.gemstone.gemfire.cache.lucene.LuceneIndex;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
@@ -43,28 +41,27 @@ public class LuceneIndexXmlGeneratorJUnitTest {
   
   /**
    * Test of generating and reading cache configuration back in.
-   * @throws SAXException 
    */
   @Test
-  public void generateWithFields() throws SAXException {
-    LuceneIndex index = Mockito.mock(LuceneIndex.class);
-    Mockito.when(index.getName()).thenReturn("index");
+  public void generateWithFields() throws Exception {
+    LuceneIndex index = mock(LuceneIndex.class);
+    when(index.getName()).thenReturn("index");
     String[] fields = new String[] {"field1", "field2"};
-    Mockito.when(index.getFieldNames()).thenReturn(fields);
+    when(index.getFieldNames()).thenReturn(fields);
     
     LuceneIndexXmlGenerator generator = new LuceneIndexXmlGenerator(index);
-    CacheXmlGenerator cacheXmlGenerator = Mockito.mock(CacheXmlGenerator.class);
-    ContentHandler handler = Mockito.mock(ContentHandler.class);
-    Mockito.when(cacheXmlGenerator.getContentHandler()).thenReturn(handler);
+    CacheXmlGenerator cacheXmlGenerator = mock(CacheXmlGenerator.class);
+    ContentHandler handler = mock(ContentHandler.class);
+    when(cacheXmlGenerator.getContentHandler()).thenReturn(handler);
     generator.generate(cacheXmlGenerator);
     
     ArgumentCaptor<Attributes> captor = ArgumentCaptor.forClass(Attributes.class);
-    Mockito.verify(handler).startElement(eq(""), eq("index"), eq("lucene:index"), captor.capture());
+    verify(handler).startElement(eq(""), eq("index"), eq("lucene:index"), captor.capture());
     Attributes value = captor.getValue();
     assertEquals("index", value.getValue(LuceneXmlConstants.NAME));
     
     captor = ArgumentCaptor.forClass(Attributes.class);
-    Mockito.verify(handler, Mockito.times(2)).startElement(eq(""), eq("field"), eq("lucene:field"), captor.capture());
+    verify(handler, times(2)).startElement(eq(""), eq("field"), eq("lucene:field"), captor.capture());
     Set<String> foundFields = new HashSet<String>();
     for(Attributes fieldAttr : captor.getAllValues()) {
       foundFields.add(fieldAttr.getValue(LuceneXmlConstants.NAME));
@@ -73,8 +70,8 @@ public class LuceneIndexXmlGeneratorJUnitTest {
     HashSet<String> expected = new HashSet<String>(Arrays.asList(fields));
     assertEquals(expected, foundFields);
     
-    Mockito.verify(handler, Mockito.times(2)).endElement(eq(""), eq("field"), eq("lucene:field"));
-    Mockito.verify(handler).endElement(eq(""), eq("index"), eq("lucene:index"));
+    verify(handler, times(2)).endElement(eq(""), eq("field"), eq("lucene:field"));
+    verify(handler).endElement(eq(""), eq("index"), eq("lucene:index"));
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java
index be2fa62..acb6c2d 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java
@@ -18,6 +18,7 @@ package com.vmware.gemfire.tools.pulse.controllers;
 
 import static org.hamcrest.Matchers.contains;
 import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.doReturn;
@@ -30,6 +31,11 @@ import java.io.File;
 import java.security.Principal;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.UUID;
+import javax.servlet.ServletContextListener;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.vmware.gemfire.tools.pulse.internal.PulseAppListener;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
@@ -59,27 +65,17 @@ import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.setup.MockMvcBuilders;
 import org.springframework.web.context.WebApplicationContext;
 
-/**
- */
-@Category(UnitTest.class)
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+@Category(IntegrationTest.class)
 @PrepareForTest(Repository.class)
 @RunWith(PowerMockRunner.class)
 @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
 @WebAppConfiguration
 @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
-@PowerMockIgnore("*.UnitTest")
+@PowerMockIgnore("*.IntegrationTest")
 public class PulseControllerJUnitTest {
 
-  @Autowired
-  private WebApplicationContext wac;
-
-  private MockMvc mockMvc;
-
-  private Cluster cluster;
-
-  @Rule
-  public TemporaryFolder tempFolder = new TemporaryFolder();
-
   private static final String PRINCIPAL_USER = "test-user";
 
   private static final String MEMBER_ID = "member1";
@@ -99,6 +95,16 @@ public class PulseControllerJUnitTest {
     principal = () -> PRINCIPAL_USER;
   }
 
+  @Rule
+  public TemporaryFolder tempFolder = new TemporaryFolder();
+
+  @Autowired
+  private WebApplicationContext wac;
+
+  private MockMvc mockMvc;
+
+  private Cluster cluster;
+
   private final ObjectMapper mapper = new ObjectMapper();
 
   @Before

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
index 70f7dff..0021c2f 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
@@ -261,7 +261,7 @@ public class PulseUITest {
       List<Region> locatorRegionscount = testBed.getRootDs().getRegions(locator);
       int locatorRegions = Integer.parseInt(driver.findElement(
           By.id("memberRegionsCount")).getText());
-      Assert.assertEquals(locatorRegionscount.size(), locatorRegions);
+      Assert.assertIndexDetailsEquals(locatorRegionscount.size(), locatorRegions);
       prevSelectedMember = peername;
     }*/
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
index fbd5700..190b381 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
@@ -116,7 +116,7 @@ public class SerialGatewaySenderQueueDUnitTest extends WANTestBase{
     secondarySenderUpdates = (HashMap)vm5.invoke(() -> WANTestBase.checkQueue());
     
     checkPrimarySenderUpdatesOnVM5(primarySenderUpdates);
-//    assertEquals(primarySenderUpdates, secondarySenderUpdates);
+//    assertIndexDetailsEquals(primarySenderUpdates, secondarySenderUpdates);
     
     vm4.invoke(() -> WANTestBase.resumeSender( "ln"));
     Wait.pause(5000);



[29/55] [abbrv] incubator-geode git commit: Revert "GEODE-1360: Enabling to specify log4j2.xml for junit/dunit/intgrationtest"

Posted by sa...@apache.org.
Revert "GEODE-1360: Enabling to specify log4j2.xml for junit/dunit/intgrationtest"

This reverts commit 717ba5c8b45394c691b77d6a1bb83318bfa182da.

This commit caused all dunit tests to fail, because if the log4j file
was not specified, it added an empty parameter when launching the dunit
VMs.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/af119cfd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/af119cfd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/af119cfd

Branch: refs/heads/feature/GEODE-1153
Commit: af119cfd38e4545b0d7deb0321f5142434fa5f5e
Parents: 6c53d4f
Author: Dan Smith <up...@apache.org>
Authored: Mon May 9 15:10:54 2016 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Mon May 9 15:15:29 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java    | 1 -
 .../gemstone/gemfire/test/dunit/standalone/ProcessManager.java   | 1 -
 gradle/test.gradle                                               | 4 ----
 3 files changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/af119cfd/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
index e06958a..0c294ec 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
@@ -75,7 +75,6 @@ public class DUnitLauncher {
 
   /** change this to use a different log level in unit tests */
   public static final String LOG_LEVEL = System.getProperty("logLevel", "info");
-  public static final String LOG4J = System.getProperty("log4j.configurationFile");
   
   static int locatorPort;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/af119cfd/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
index 489f72b..dd532c4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
@@ -172,7 +172,6 @@ public class ProcessManager {
       "-Xrunjdwp:transport=dt_socket,server=y,suspend=" + jdkSuspend + jdkDebug,
       "-XX:+HeapDumpOnOutOfMemoryError",
       "-Xmx512m",
-      DUnitLauncher.LOG4J==null?"":"-Dlog4j.configurationFile="+DUnitLauncher.LOG4J,
       "-Dgemfire.DEFAULT_MAX_OPLOG_SIZE=10",
       "-Dgemfire.disallowMcastDefaults=true",
       "-ea", "-XX:+PrintGC", "-XX:+PrintGCDetails","-XX:+PrintGCTimeStamps",

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/af119cfd/gradle/test.gradle
----------------------------------------------------------------------
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 96fbfc5..2dd7521 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -211,10 +211,6 @@ subprojects {
         if (logLevel != null) {
           systemProperty 'logLevel', logLevel
         }
-        def log4jLocation = System.getProperty('log4j.configurationFile')
-        if (log4jLocation != null) {
-          systemProperty 'log4j.configurationFile', log4jLocation
-        }
 
         def eol = System.getProperty('line.separator')
         def progress = new File(resultsDir, "$test.name-progress.txt")


[07/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

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java
index df85998..82f2003 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVectorJUnitTest.java
@@ -16,17 +16,17 @@
  */
 package com.gemstone.gemfire.internal.cache.versions;
 
+import static org.junit.Assert.*;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
-import java.io.IOException;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import junit.framework.TestCase;
-
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.DataSerializer;
@@ -39,8 +39,9 @@ import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
-public class RegionVersionVectorJUnitTest extends TestCase {
+public class RegionVersionVectorJUnitTest {
 
+  @Test
   public void testExceptionsWithContains() {
     DiskStoreID ownerId = new DiskStoreID(0, 0);
     DiskStoreID id1 = new DiskStoreID(0, 1);
@@ -53,6 +54,7 @@ public class RegionVersionVectorJUnitTest extends TestCase {
   }
   
   @SuppressWarnings({ "unchecked", "rawtypes" })
+  @Test
   public void testRegionVersionVectors() throws Exception {
     // this is just a quick set of unit tests for basic RVV functionality
     
@@ -266,10 +268,10 @@ public class RegionVersionVectorJUnitTest extends TestCase {
     assertTrue(rv1.contains(server2, bitSetRollPoint));
     assertTrue(rv1.contains(server2, bitSetRollPoint+1));
     assertFalse(rv1.contains(server2, bitSetRollPoint+2));
-  
   }
-  
-  public void testRVVSerialization() throws IOException, ClassNotFoundException {
+
+  @Test
+  public void testRVVSerialization() throws Exception {
     DiskStoreID ownerId = new DiskStoreID(0, 0);
     DiskStoreID id1 = new DiskStoreID(0, 1);
     DiskStoreID id2 = new DiskStoreID(1, 0);
@@ -300,6 +302,7 @@ public class RegionVersionVectorJUnitTest extends TestCase {
   /**
    * Test that we can copy the member to version map correctly.
    */
+  @Test
   public void testCopyMemberToVersion() {
     DiskStoreID id0 = new DiskStoreID(0, 0);
     DiskStoreID id1 = new DiskStoreID(0, 1);
@@ -331,7 +334,8 @@ public class RegionVersionVectorJUnitTest extends TestCase {
     assertTrue(rvv1.dominates(rvv0));
     assertFalse(rvv0.dominates(rvv1));
   }
-  
+
+  @Test
   public void testSpecialException() {
     DiskStoreID id0 = new DiskStoreID(0, 0);
     DiskStoreID id1 = new DiskStoreID(0, 1);
@@ -357,7 +361,8 @@ public class RegionVersionVectorJUnitTest extends TestCase {
     assertTrue(rvv1.dominates(rvv0));
     assertTrue(rvv0.dominates(rvv1));
   }
-  
+
+  @Test
   public void test48066_1() {
     DiskStoreID id0 = new DiskStoreID(0, 0);
     DiskRegionVersionVector rvv0 = new DiskRegionVersionVector(id0);
@@ -384,7 +389,8 @@ public class RegionVersionVectorJUnitTest extends TestCase {
     System.out.println("after record 7, rvv2="+rvv2.fullToString());
     assertEquals(7, rvv2.getCurrentVersion());
   }
-  
+
+  @Test
   public void test48066_2() {
     DiskStoreID id0 = new DiskStoreID(0, 0);
     DiskRegionVersionVector rvv0 = new DiskRegionVersionVector(id0);
@@ -415,8 +421,8 @@ public class RegionVersionVectorJUnitTest extends TestCase {
   /**
    * Test for bug 47023. Make sure recordGCVersion works
    * correctly and doesn't generate exceptions for the local member.
-   * 
    */
+  @Test
   public void testRecordGCVersion() {
     DiskStoreID id0 = new DiskStoreID(0, 0);
     DiskStoreID id1 = new DiskStoreID(0, 1);
@@ -432,7 +438,6 @@ public class RegionVersionVectorJUnitTest extends TestCase {
     rvv0.recordVersion(id1, 1);
     rvv0.recordVersion(id1, 3);
     rvv0.recordVersion(id1, 5);
-    
 
     //Assert that the exceptions are present
     {
@@ -470,9 +475,9 @@ public class RegionVersionVectorJUnitTest extends TestCase {
     
     //exceptions greater than the GC version should still be there.
     assertFalse(holder1.contains(4));
-    
   }
 
+  @Test
   public void testRemoveOldVersions() {
     DiskStoreID id0 = new DiskStoreID(0, 0);
     DiskStoreID id1 = new DiskStoreID(0, 1);
@@ -511,7 +516,8 @@ public class RegionVersionVectorJUnitTest extends TestCase {
     assertEquals("expected exceptions to be erased for " + rvv.fullToString(),
         rvv.getExceptionCount(id2), 0);
   }
-  
+
+  @Test
   public void testRegionVersionInTags() {
     VMVersionTag tag = new VMVersionTag();
     long version = 0x8080000000L;
@@ -519,10 +525,7 @@ public class RegionVersionVectorJUnitTest extends TestCase {
     assertEquals("failed test for bug #48576", version, tag.getRegionVersion());
   }
 
-
-  
-  private void doExceptionsWithContains(DiskStoreID id,
-      DiskRegionVersionVector rvv) {
+  private void doExceptionsWithContains(DiskStoreID id, DiskRegionVersionVector rvv) {
     rvv.recordVersion(id, 10);
     
     //Make sure we have exceptions from 0-10

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
index b2399fd..08e81d4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
@@ -17,8 +17,8 @@
 package com.gemstone.gemfire.internal.cache.wan.parallel;
 
 import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
-import java.io.IOException;
 import java.util.Collections;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
@@ -29,8 +29,6 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.CancelCriterion;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.TimeoutException;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
@@ -38,8 +36,6 @@ import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
 import com.gemstone.gemfire.internal.cache.wan.parallel.ParallelGatewaySenderQueue.MetaRegionFactory;
 import com.gemstone.gemfire.internal.cache.wan.parallel.ParallelGatewaySenderQueue.ParallelGatewaySenderQueueMetaRegion;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import static org.mockito.Mockito.*;
-
 
 @Category(UnitTest.class)
 public class ParallelGatewaySenderQueueJUnitTest {
@@ -62,7 +58,7 @@ public class ParallelGatewaySenderQueueJUnitTest {
   }
 
   @Test
-  public void testLocalSize() throws TimeoutException, RegionExistsException, ClassNotFoundException, IOException {
+  public void testLocalSize() throws Exception {
     ParallelGatewaySenderQueueMetaRegion mockMetaRegion = mock(ParallelGatewaySenderQueueMetaRegion.class);
     PartitionedRegionDataStore dataStore = mock(PartitionedRegionDataStore.class);
     when(mockMetaRegion.getDataStore()).thenReturn(dataStore);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/ConcurrentSerialGatewaySenderEventProcessorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/ConcurrentSerialGatewaySenderEventProcessorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/ConcurrentSerialGatewaySenderEventProcessorJUnitTest.java
index e26d287..37962e9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/ConcurrentSerialGatewaySenderEventProcessorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/ConcurrentSerialGatewaySenderEventProcessorJUnitTest.java
@@ -19,6 +19,7 @@ package com.gemstone.gemfire.internal.cache.wan.serial;
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -29,12 +30,19 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class ConcurrentSerialGatewaySenderEventProcessorJUnitTest {
 
-  @Test
-  public void eventQueueSizeReturnsSizeOfQueues() {
+  private ConcurrentSerialGatewaySenderEventProcessor processor;
+  private RegionQueue queue;
+
+  @Before
+  public void setUp() throws Exception {
     AbstractGatewaySender sender = mock(AbstractGatewaySender.class);
-    ConcurrentSerialGatewaySenderEventProcessor processor = new ConcurrentSerialGatewaySenderEventProcessor(sender);
-    RegionQueue queue = mock(RegionQueue.class);
+    processor = new ConcurrentSerialGatewaySenderEventProcessor(sender);
+    queue = mock(RegionQueue.class);
     when(queue.size()).thenReturn(3);
+  }
+
+  @Test
+  public void eventQueueSizeReturnsSizeOfQueues() {
     processor.getQueues().add(queue);
     assertEquals(3,processor.eventQueueSize());
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractEntityResolverTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractEntityResolverTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractEntityResolverTest.java
index f42d52c..8b69cd8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractEntityResolverTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractEntityResolverTest.java
@@ -14,23 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.cache.xmlcache;
 
-import com.gemstone.gemfire.internal.ClassPathLoader;
+import static org.junit.Assert.*;
+
+import java.util.ServiceLoader;
+
 import org.junit.Test;
 import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.ext.EntityResolver2;
 
-import java.io.IOException;
-import java.util.ServiceLoader;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import com.gemstone.gemfire.internal.ClassPathLoader;
 
 /**
  * Unit test for {@link PivotalEntityResolver} and
@@ -38,9 +34,9 @@ import static org.junit.Assert.assertTrue;
  */
 public abstract class AbstractEntityResolverTest {
 
-  public abstract EntityResolver getEntityResolver();
+  protected abstract EntityResolver getEntityResolver();
 
-  public abstract String getSystemId();
+  protected abstract String getSystemId();
 
   /**
    * Assert that {@link PivotalEntityResolver} extends
@@ -77,12 +73,10 @@ public abstract class AbstractEntityResolverTest {
    * Resolve the cache.xml XSD using the {@link PivotalEntityResolver}. Verifies
    * that the META-INF/schemas files are correctly found.
    * 
-   * @throws SAXException
-   * @throws IOException
    * @since 8.1
    */
   @Test
-  public void testResolveEntity() throws SAXException, IOException {
+  public void testResolveEntity() throws Exception {
     final InputSource inputSource = getEntityResolver().resolveEntity(null, getSystemId());
     assertNotNull(inputSource);
     assertEquals(getSystemId(), inputSource.getSystemId());
@@ -93,12 +87,10 @@ public abstract class AbstractEntityResolverTest {
    * <code>null</code> <code>systemId</code>. Asserts that returns to
    * <code>null<code>.
    * 
-   * @throws SAXException
-   * @throws IOException
    * @since 8.1
    */
   @Test
-  public void testResolveEntityNullSystemId() throws SAXException, IOException {
+  public void testResolveEntityNullSystemId() throws SAXException, Exception {
     final String systemId = null;
     final InputSource inputSource = getEntityResolver().resolveEntity(null, systemId);
     assertNull(inputSource);
@@ -109,12 +101,10 @@ public abstract class AbstractEntityResolverTest {
    * <code>"--not-a-valid-system-id--"</code> <code>systemId</code>, which is
    * not in the Pivotal namespace.. Asserts that returns to <code>null<code>.
    * 
-   * @throws SAXException
-   * @throws IOException
    * @since 8.1
    */
   @Test
-  public void testResolveEntityUnkownSystemId() throws SAXException, IOException {
+  public void testResolveEntityUnkownSystemId() throws Exception {
     final String systemId = "--not-a-valid-system-id--";
     final InputSource inputSource = getEntityResolver().resolveEntity(null, systemId);
     assertNull(inputSource);
@@ -126,12 +116,10 @@ public abstract class AbstractEntityResolverTest {
    * <code>systemId</code>, which should not be found. Asserts that returns to
    * <code>null<code>.
    * 
-   * @throws SAXException
-   * @throws IOException
    * @since 8.1
    */
   @Test
-  public void testResolveEntityNotFoundSystemId() throws SAXException, IOException {
+  public void testResolveEntityNotFoundSystemId() throws Exception {
     final String systemId = "http://schema.pivotal.io/this/should/be/not/found.xsd";
     final InputSource inputSource = getEntityResolver().resolveEntity(null, systemId);
     assertNull(inputSource);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractXmlParserJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractXmlParserJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractXmlParserJUnitTest.java
index 6148da1..104a706 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractXmlParserJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractXmlParserJUnitTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.cache.xmlcache;
 
 import static org.junit.Assert.*;
@@ -31,7 +30,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Unit tests for {@link AbstractXmlParser}.
- * 
  *
  * @since 8.1
  */
@@ -52,6 +50,7 @@ public class AbstractXmlParserJUnitTest {
   /**
    * Test method for {@link AbstractXmlParser#setDocumentLocator(Locator)}.
    */
+  @Test
   public void testSetDocumentLocator() {
     final MockXmlParser mockXmlParser = new MockXmlParser();
     final Locator mockLocator = new Locator() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
index f159b3b..d2b43b0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
@@ -16,11 +16,7 @@
  */
 package com.gemstone.gemfire.internal.cache.xmlcache;
 
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -42,7 +38,7 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 public class CacheCreationJUnitTest {
 
   @Mock
-  GemFireCacheImpl cache;
+  private GemFireCacheImpl cache;
 
   @Before
   public void setUp() {
@@ -167,7 +163,6 @@ public class CacheCreationJUnitTest {
     cacheCreation.startCacheServers(cacheCreation.getCacheServers(), cache, configuredServerPort, configuredServerBindAddress, disableDefaultCacheServer);
 
     verify(cache, never()).addCacheServer();
-
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlParserJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
index 5a4f7b3..88c1adf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.cache.xmlcache;
 
 import static org.junit.Assert.*;
@@ -34,7 +33,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Test cases for {@link CacheXmlParser}.
- * 
  *
  * @since 8.1
  */
@@ -105,8 +103,10 @@ public class CacheXmlParserJUnitTest {
    * @since 8.1
    */
   private static class TestCacheXmlParser extends CacheXmlParser {
+
     static Field delegatesField;
     static Method getDelegateMethod;
+
     static {
       try {
         delegatesField = CacheXmlParser.class.getDeclaredField("delegates");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlVersionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlVersionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlVersionJUnitTest.java
index a51ce2b..15f3161 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlVersionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlVersionJUnitTest.java
@@ -25,7 +25,6 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
- *
  * @since 8.1
  */
 @Category(UnitTest.class)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/GeodeEntityResolverJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/GeodeEntityResolverJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/GeodeEntityResolverJUnitTest.java
index 2fef8b3..dd3f2e2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/GeodeEntityResolverJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/GeodeEntityResolverJUnitTest.java
@@ -14,14 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.cache.xmlcache;
 
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
 import org.junit.Before;
 import org.junit.experimental.categories.Category;
 import org.xml.sax.EntityResolver;
 
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 /**
  * Unit test for {@link GeodeEntityResolver} and
  * {@link DefaultEntityResolver2}.
@@ -38,11 +38,13 @@ public class GeodeEntityResolverJUnitTest extends AbstractEntityResolverTest {
     entityResolver = new GeodeEntityResolver();
   }
 
-  public EntityResolver getEntityResolver() {
+  @Override
+  protected EntityResolver getEntityResolver() {
     return entityResolver;
   }
 
-  public String getSystemId() {
+  @Override
+  protected String getSystemId() {
     return systemId;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/PivotalEntityResolverJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/PivotalEntityResolverJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/PivotalEntityResolverJUnitTest.java
index ce4941e..155b051 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/PivotalEntityResolverJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/PivotalEntityResolverJUnitTest.java
@@ -14,18 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.cache.xmlcache;
 
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
 import org.junit.Before;
 import org.junit.experimental.categories.Category;
 import org.xml.sax.EntityResolver;
 
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
 /**
  * Unit test for {@link PivotalEntityResolver} and
  * {@link DefaultEntityResolver2}.
- * 
  *
  * @since 8.1
  */
@@ -41,11 +40,13 @@ public class PivotalEntityResolverJUnitTest extends AbstractEntityResolverTest {
     entityResolver = new PivotalEntityResolver();
   }
 
-  public EntityResolver getEntityResolver() {
+  @Override
+  protected EntityResolver getEntityResolver() {
     return entityResolver;
   }
 
-  public String getSystemId() {
+  @Override
+  protected String getSystemId() {
     return systemId;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/RegionCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/RegionCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/RegionCreationJUnitTest.java
index 5a81b94..563d55f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/RegionCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/RegionCreationJUnitTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.cache.xmlcache;
 
 import static org.junit.Assert.*;
@@ -31,7 +30,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 /**
  * Unit test for {@link RegionCreation}.
  * 
- *
  * @since 8.1
  */
 @Category(UnitTest.class)
@@ -42,7 +40,6 @@ public class RegionCreationJUnitTest {
    * 
    * Assert that method returns a {@link SimpleExtensionPoint} instance and
    * assume that {@link SimpleExtensionPointJUnitTest} has covered the rest.
-   * 
    */
   @Test
   public void testGetExtensionPoint() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/XmlGeneratorUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/XmlGeneratorUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/XmlGeneratorUtilsJUnitTest.java
index 15875f7..57561bd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/XmlGeneratorUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/XmlGeneratorUtilsJUnitTest.java
@@ -14,14 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.cache.xmlcache;
 
 import static javax.xml.XMLConstants.*;
 import static org.junit.Assert.*;
 
 import java.util.concurrent.atomic.AtomicReference;
-
 import javax.xml.XMLConstants;
 
 import org.junit.Test;
@@ -37,15 +35,13 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 /**
  * Unit Tests for {@link XmlGeneratorUtils}.
  * 
- *
  * @since 8.1
  */
 @Category(UnitTest.class)
 public class XmlGeneratorUtilsJUnitTest {
 
   /**
-   * Test method for
-   * {@link XmlGeneratorUtils#addAttribute(AttributesImpl, String, Object)}.
+   * Test method for {@link XmlGeneratorUtils#addAttribute(AttributesImpl, String, Object)}.
    */
   @Test
   public void testAddAttributeAttributesImplStringObject() {
@@ -64,9 +60,7 @@ public class XmlGeneratorUtilsJUnitTest {
   }
 
   /**
-   * Test method for
-   * {@link XmlGeneratorUtils#addAttribute(AttributesImpl, String, String, Object)}
-   * .
+   * Test method for {@link XmlGeneratorUtils#addAttribute(AttributesImpl, String, String, Object)}.
    */
   @Test
   public void testAddAttributeAttributesImplStringStringObject() {
@@ -85,11 +79,7 @@ public class XmlGeneratorUtilsJUnitTest {
   }
 
   /**
-   * Test method for
-   * {@link XmlGeneratorUtils#startElement(ContentHandler, String, String, AttributesImpl)}
-   * .
-   * 
-   * @throws SAXException
+   * Test method for {@link XmlGeneratorUtils#startElement(ContentHandler, String, String, AttributesImpl)}.
    */
   @Test
   public void testStartElementContentHandlerStringStringAttributesImpl() throws SAXException {
@@ -116,10 +106,7 @@ public class XmlGeneratorUtilsJUnitTest {
   }
 
   /**
-   * Test method for
-   * {@link XmlGeneratorUtils#endElement(ContentHandler, String, String)}.
-   * 
-   * @throws SAXException
+   * Test method for {@link XmlGeneratorUtils#endElement(ContentHandler, String, String)}.
    */
   @Test
   public void testEndElementContentHandlerStringString() throws SAXException {
@@ -143,11 +130,7 @@ public class XmlGeneratorUtilsJUnitTest {
   }
 
   /**
-   * Test method for
-   * {@link XmlGeneratorUtils#emptyElement(ContentHandler, String, String, AttributesImpl)}
-   * .
-   * 
-   * @throws SAXException
+   * Test method for {@link XmlGeneratorUtils#emptyElement(ContentHandler, String, String, AttributesImpl)}.
    */
   @Test
   public void testEmptyElement() throws SAXException {
@@ -189,7 +172,7 @@ public class XmlGeneratorUtilsJUnitTest {
     assertEquals(NULL_NS_URI, uriRef.get());
   }
 
-  private class MockContentHandler implements ContentHandler {
+  private static class MockContentHandler implements ContentHandler {
     @Override
     public void startPrefixMapping(String prefix, String uri) throws SAXException {
       throw new UnsupportedOperationException();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java
index 53b50d6..ae8bf7b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java
@@ -16,31 +16,31 @@
  */
 package com.gemstone.gemfire.internal.compression;
 
+import static org.junit.Assert.*;
+
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
-import junit.framework.TestCase;
-
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.xerial.snappy.SnappyLoader;
 
 import com.gemstone.gemfire.compression.Compressor;
 import com.gemstone.gemfire.compression.SnappyCompressor;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
  * Tests the Snappy {@link Compressor}.
  */
-@Category(UnitTest.class)
-public class SnappyCompressorJUnitTest extends TestCase {
+@Category(IntegrationTest.class)
+public class SnappyCompressorJUnitTest {
+
   /**
-   * Tests {@link Compressor#compress(byte[])} and {@link Compressor#decompress(byte[])} using
-   * the Snappy compressor.
+   * Tests {@link Compressor#compress(byte[])} and {@link Compressor#decompress(byte[])} using the Snappy compressor.
    */
   @Test
-  public void testCompressByteArray() {
+  public void testCompressByteArray() throws Exception {
     String compressMe = "Hello, how are you?";
     byte[] compressMeData = SnappyCompressor.getDefaultInstance().compress(compressMe.getBytes());
     String uncompressedMe = new String(SnappyCompressor.getDefaultInstance().decompress(compressMeData));
@@ -50,24 +50,24 @@ public class SnappyCompressorJUnitTest extends TestCase {
   
   /**
    * Tests {@link SnappyCompressor#SnappyCompressor()} constructor.
-   * @throws SecurityException 
-   * @throws NoSuchMethodException 
-   * @throws InvocationTargetException 
-   * @throws IllegalArgumentException 
-   * @throws IllegalAccessException 
    */
   @Test
-  public void testConstructor() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+  public void testConstructor() throws Exception {
     SnappyCompressor.getDefaultInstance();
+
     // repeat findNativeLibrary and make sure it's pointing at a file in tmpdir
     Method findNativeLibraryMethod = SnappyLoader.class.getDeclaredMethod("findNativeLibrary", new Class[0]);
     findNativeLibraryMethod.setAccessible(true);
     File nativeLibrary = (File) findNativeLibraryMethod.invoke(null);
+
     System.out.println(nativeLibrary);
+
     assertNotNull(nativeLibrary);
     assertTrue(nativeLibrary + " does not exist", nativeLibrary.exists());
+
     File tmpDir = new File(System.getProperty("java.io.tmpdir"));
     assertTrue(tmpDir.exists());
+
     File parent = nativeLibrary.getParentFile();
     assertNotNull(parent);
     assertEquals(tmpDir, parent);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
index 05abe30..46b5ba4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
@@ -16,10 +16,7 @@
  */
 package com.gemstone.gemfire.internal.i18n;
 
-import com.gemstone.gemfire.i18n.StringId;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-import junit.framework.TestCase;
+import static org.junit.Assert.*;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
@@ -28,185 +25,41 @@ import java.util.LinkedHashSet;
 import java.util.Locale;
 import java.util.Set;
 
+import org.junit.After;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.i18n.StringId;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
 /**
  * This class tests all basic i18n functionality.
  */
-@Category(UnitTest.class)
-public class BasicI18nJUnitTest extends TestCase {
+@Category(IntegrationTest.class)
+public class BasicI18nJUnitTest {
   
   private static final Locale DEFAULT_LOCALE = Locale.getDefault();
   //static final Class DEFAULT_RESOURCEBUNDLE = StringIdResourceBundle_ja.class;
   //static final Class JAPAN_RESOURCEBUNDLE = StringIdResourceBundle_ja.class;
-  private static final StringId messageId
-         = (StringId)LocalizedStrings.TESTING_THIS_IS_A_TEST_MESSAGE;
+
+  private static final StringId messageId = (StringId)LocalizedStrings.TESTING_THIS_IS_A_TEST_MESSAGE;
   private static final String englishMessage = "This is a test message.";
   private static final String japaneseMessage = "msgID " + messageId.id + ": " + "\u3053\u308c\u306f\u30c6\u30b9\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u3042\u308b\u3002";
 
   private static final Integer messageArg = new Integer(1);
-  private static final StringId messageIdWithArg
-         = (StringId)LocalizedStrings.TESTING_THIS_MESSAGE_HAS_0_MEMBERS;
+  private static final StringId messageIdWithArg = (StringId)LocalizedStrings.TESTING_THIS_MESSAGE_HAS_0_MEMBERS;
   private static final String englishMessageWithArg = "Please ignore: This message has 1 members.";
-  private static final String japaneseMessageWithArg
-         = "msgID " + messageIdWithArg.id + ": Please ignore: \u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306b 1 \u30e1\u30f3\u30d0\u30fc\u304c\u3042\u308b\u3002";
-  private static final String englishMessageWithArgMissing
-         = "Please ignore: This message has {0} members.";
-  private static final String japaneseMessageWithArgMissing
-         = "msgID " + messageIdWithArg.id + ": Please ignore: \u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306b {0} \u30e1\u30f3\u30d0\u30fc\u304c\u3042\u308b\u3002";
-
-  /**
-   * Get all of the StringId instances via reflection.
-   * @return a set of all StringId declarations within the product
-   */
-  private Set<StringId> getAllStringIds() {
-    final Set<StringId> allStringIds = new HashSet<StringId>();
-    for(String className : getStringIdDefiningClasses()) {
-      try {
-        Class<?> c = Class.forName(className);
-        Field[] fields = c.getDeclaredFields();
-        final String msg = "Found no StringIds in " + className;
-        assertTrue(msg, fields.length > 0);
-        for(Field f : fields) {
-          f.setAccessible(true);
-          StringId instance = (StringId) f.get(null);
-          allStringIds.add(instance);
-        }
-      } catch (ClassNotFoundException cnfe) {
-        throw new AssertionError(cnfe.toString(), cnfe);
-      } catch (Exception e) {
-        String exMsg = "Reflection attempt failed while attempting to find all"
-                       + " StringId instances. ";
-        throw new AssertionError(exMsg + e.toString(), e);
-      }
-    }
-    return allStringIds;
-  }
-
-  /**
-   * Lists all of the classes that define StringId instances
-   * @return a set of all classes that contain StringId declarations
-   */
-  private Set<String> getStringIdDefiningClasses() {
-    final Set<String> StringIdDefiningClasses = new LinkedHashSet<String>();
-    final String pkg = "com.gemstone.gemfire.internal.i18n.";
-    StringIdDefiningClasses.add(pkg + "ParentLocalizedStrings");
-    StringIdDefiningClasses.add(pkg + "LocalizedStrings");
-    // JGroupsStrings are no longer localizable
-//    StringIdDefiningClasses.add(pkg + "JGroupsStrings");
-    StringIdDefiningClasses.add("com.gemstone.gemfire.management.internal.ManagementStrings");
-    return StringIdDefiningClasses;
-  }
-
-  /**
-   * Helper to access a private method via reflection, thus allowing
-   * us to not expose them to customers.
-   */
-  private Locale getCurrentLocale() {
-    Class<?> c = StringId.class;
-    Locale locale = null;
-    try {
-      Method m = c.getDeclaredMethod("getCurrentLocale");
-      m.setAccessible(true);
-      locale = (Locale)m.invoke(null);
-    } catch (Exception e) {
-      String msg = "Reflection attempt failed for StringId.getCurrentLocale ";
-      throw new AssertionError( msg + e.toString(), e);
-    }
-    return locale;
-  }
-
-  /**
-   *  Helper to access a private method via reflection, thus allowing
-   *  us to not expose them to customers.
-   */
-  private AbstractStringIdResourceBundle getActiveResourceBundle() {
-    Class<?> c = StringId.class;
-    AbstractStringIdResourceBundle rb = null;
-    try {
-      Method m = c.getDeclaredMethod("getActiveResourceBundle");
-      m.setAccessible(true);
-      rb = (AbstractStringIdResourceBundle)m.invoke(null);
-    } catch (Exception e) {
-      String msg = "Reflection attempt failed for StringId.getActiveResourceBundle ";
-      throw new AssertionError(msg + e.toString(), e);
-    }
-    return rb;
-  }
-
-  /**
-   * Check that the "raw" string matches the "formatted" string after taking
-   * into account known changes due to the fomatting process.
-   * For example:
-   * <code>
-   * "I''m using a contraction." should become "I'm using a contraction."
-   * </code>
-   */
-  private void verifyStringsAreProperlyEscaped(Locale loc) {
-    StringId.setLocale(loc);
-
-    final Set<StringId> misquoted = new HashSet<StringId>();
-
-    final Object[] identityArgs = new Object[100];
-
-    for (int index = 0; index < identityArgs.length; index++) {
-      identityArgs[index] = index;
-    }
-
-    final AbstractStringIdResourceBundle rb = getActiveResourceBundle();
-    for(StringId instance : getAllStringIds()) {
-      String raw = rb.getString(instance);
-      String altered = raw.replaceAll("''", "'");
-      altered = altered.replaceAll("\\{([0-9]+)[^\\}]*\\}", "$1");
-      if (!rb.usingRawMode()) {
-        altered = "msgID " + ((StringId)instance).id + ": " + altered;
-      }
-      String formatted = null;
-      try {
-        formatted = instance.toLocalizedString(identityArgs);
-      } catch(IllegalArgumentException iae) {
-        String testName = this.getClass().getName().replaceAll("\\.", "/")
-                          + ".class";
-        String exMsg = "Improper message id=" + ((StringId)instance).id + "\n"
-               + "Usually this is caused by an unmatched or nested \"{\"\n"
-               + "Examples:\t\"{0]\" or \"{ {0} }\"\n"
-               + "This is just the first failure, it is in your interest"
-               + " to rebuild and run just this one test.\n"
-               + "build.sh run-java-tests -Djunit.testcase="
-               + testName;
-        throw new AssertionError(exMsg, iae);
-      }
-      if(! altered.equals(formatted)) {
-        System.err.println("altered:   " + altered);
-        System.err.println("formatted: " + formatted);
-        misquoted.add(instance);
-      }
-    }
-    if(! misquoted.isEmpty()) {
-      StringBuffer err = new StringBuffer();
-      err.append("These errors are usually resolved by replacing ");
-      err.append("\"'\" with \"''\".\n");
-      err.append("If the error is in the non-english version then ");
-      err.append("alter the text in StringIdResouceBundle_{lang}.txt.\n");
-      err.append("The following misquoted StringIds were found:");
-      for(StringId i : misquoted) {
-        err.append("\n")
-           .append("StringId id=")
-           .append(((StringId)i).id)
-           .append(" : text=\"")
-           .append(i.getRawText())
-           .append("\"");
-      }
-      fail(err.toString());
-    }
-  }
+  private static final String japaneseMessageWithArg = "msgID " + messageIdWithArg.id + ": Please ignore: \u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306b 1 \u30e1\u30f3\u30d0\u30fc\u304c\u3042\u308b\u3002";
+  private static final String englishMessageWithArgMissing = "Please ignore: This message has {0} members.";
+  private static final String japaneseMessageWithArgMissing = "msgID " + messageIdWithArg.id + ": Please ignore: \u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306b {0} \u30e1\u30f3\u30d0\u30fc\u304c\u3042\u308b\u3002";
 
-  @Override
+  @After
   public void tearDown() {
     //reset to the original
     StringId.setLocale(DEFAULT_LOCALE);
   }
 
+  @Test
   public void testSetLocale() {
     //Verify we are starting in a known state
     assertTrue(DEFAULT_LOCALE.equals(getCurrentLocale()));
@@ -242,6 +95,7 @@ public class BasicI18nJUnitTest extends TestCase {
    * 7) toString() wrong number or arguments, too few
    * 8) toLocalizedString() wrong number or arguments, too few
    */
+  @Test
   public void testToLocalizedString() {
     Object[] missingArgs = new Object[] {};
     Object[] extraArgs = new Object[] { messageArg, "should not print" };
@@ -320,11 +174,13 @@ public class BasicI18nJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testEnglishLanguage() {
     StringId.setLocale(Locale.ENGLISH);
     assertEquals(messageId.toLocalizedString(), englishMessage);
   }
 
+  @Test
   public void testJapaneseLanguage() {
     StringId.setLocale(Locale.JAPANESE);
     if (getActiveResourceBundle().usingRawMode()) {
@@ -334,6 +190,7 @@ public class BasicI18nJUnitTest extends TestCase {
     }
   }
 
+  @Test
   public void testAlternateEnglishCountries() {
     StringId.setLocale(Locale.CANADA);
     assertEquals(messageId.toLocalizedString(), englishMessage);
@@ -347,6 +204,7 @@ public class BasicI18nJUnitTest extends TestCase {
    * the classes listed in StringIdDefiningClasses and verify
    * there are not any duplicate indexes used.
    */
+  @Test
   public void testVerifyStringIdsAreUnique() {
     final Set<Integer> allStringIds = new HashSet<Integer>(3000);
 
@@ -382,6 +240,7 @@ public class BasicI18nJUnitTest extends TestCase {
    * This test is to catch issues like bug #40146
    * This tests the English version in the US locale.
    */
+  @Test
   public void testVerifyStringsAreProperlyEscaped_US() {
     verifyStringsAreProperlyEscaped(Locale.US);
   }
@@ -391,6 +250,7 @@ public class BasicI18nJUnitTest extends TestCase {
    * This test is to catch issues like bug #40146
    * This tests the English version in the UK locale.
    */
+  @Test
   public void testVerifyStringsAreProperlyEscaped_UK() {
     verifyStringsAreProperlyEscaped(Locale.UK);
   }
@@ -400,7 +260,154 @@ public class BasicI18nJUnitTest extends TestCase {
    * This test is to catch issues like bug #40146
    * This tests the English version in the JAPAN locale.
    */
+  @Test
   public void testVerifyStringsAreProperlyEscaped_JAPAN() {
     verifyStringsAreProperlyEscaped(Locale.JAPAN);
   }
+
+  /**
+   * Get all of the StringId instances via reflection.
+   * @return a set of all StringId declarations within the product
+   */
+  private Set<StringId> getAllStringIds() {
+    final Set<StringId> allStringIds = new HashSet<StringId>();
+    for(String className : getStringIdDefiningClasses()) {
+      try {
+        Class<?> c = Class.forName(className);
+        Field[] fields = c.getDeclaredFields();
+        final String msg = "Found no StringIds in " + className;
+        assertTrue(msg, fields.length > 0);
+        for(Field f : fields) {
+          f.setAccessible(true);
+          StringId instance = (StringId) f.get(null);
+          allStringIds.add(instance);
+        }
+      } catch (ClassNotFoundException cnfe) {
+        throw new AssertionError(cnfe.toString(), cnfe);
+      } catch (Exception e) {
+        String exMsg = "Reflection attempt failed while attempting to find all"
+                + " StringId instances. ";
+        throw new AssertionError(exMsg + e.toString(), e);
+      }
+    }
+    return allStringIds;
+  }
+
+  /**
+   * Lists all of the classes that define StringId instances
+   * @return a set of all classes that contain StringId declarations
+   */
+  private Set<String> getStringIdDefiningClasses() {
+    final Set<String> StringIdDefiningClasses = new LinkedHashSet<String>();
+    final String pkg = "com.gemstone.gemfire.internal.i18n.";
+    StringIdDefiningClasses.add(pkg + "ParentLocalizedStrings");
+    StringIdDefiningClasses.add(pkg + "LocalizedStrings");
+    // JGroupsStrings are no longer localizable
+//    StringIdDefiningClasses.add(pkg + "JGroupsStrings");
+    StringIdDefiningClasses.add("com.gemstone.gemfire.management.internal.ManagementStrings");
+    return StringIdDefiningClasses;
+  }
+
+  /**
+   * Helper to access a private method via reflection, thus allowing
+   * us to not expose them to customers.
+   */
+  private Locale getCurrentLocale() {
+    Class<?> c = StringId.class;
+    Locale locale = null;
+    try {
+      Method m = c.getDeclaredMethod("getCurrentLocale");
+      m.setAccessible(true);
+      locale = (Locale)m.invoke(null);
+    } catch (Exception e) {
+      String msg = "Reflection attempt failed for StringId.getCurrentLocale ";
+      throw new AssertionError( msg + e.toString(), e);
+    }
+    return locale;
+  }
+
+  /**
+   *  Helper to access a private method via reflection, thus allowing
+   *  us to not expose them to customers.
+   */
+  private AbstractStringIdResourceBundle getActiveResourceBundle() {
+    Class<?> c = StringId.class;
+    AbstractStringIdResourceBundle rb = null;
+    try {
+      Method m = c.getDeclaredMethod("getActiveResourceBundle");
+      m.setAccessible(true);
+      rb = (AbstractStringIdResourceBundle)m.invoke(null);
+    } catch (Exception e) {
+      String msg = "Reflection attempt failed for StringId.getActiveResourceBundle ";
+      throw new AssertionError(msg + e.toString(), e);
+    }
+    return rb;
+  }
+
+  /**
+   * Check that the "raw" string matches the "formatted" string after taking
+   * into account known changes due to the fomatting process.
+   * For example:
+   * <code>
+   * "I''m using a contraction." should become "I'm using a contraction."
+   * </code>
+   */
+  private void verifyStringsAreProperlyEscaped(Locale loc) {
+    StringId.setLocale(loc);
+
+    final Set<StringId> misquoted = new HashSet<StringId>();
+
+    final Object[] identityArgs = new Object[100];
+
+    for (int index = 0; index < identityArgs.length; index++) {
+      identityArgs[index] = index;
+    }
+
+    final AbstractStringIdResourceBundle rb = getActiveResourceBundle();
+    for(StringId instance : getAllStringIds()) {
+      String raw = rb.getString(instance);
+      String altered = raw.replaceAll("''", "'");
+      altered = altered.replaceAll("\\{([0-9]+)[^\\}]*\\}", "$1");
+      if (!rb.usingRawMode()) {
+        altered = "msgID " + ((StringId)instance).id + ": " + altered;
+      }
+      String formatted = null;
+      try {
+        formatted = instance.toLocalizedString(identityArgs);
+      } catch(IllegalArgumentException iae) {
+        String testName = this.getClass().getName().replaceAll("\\.", "/")
+                + ".class";
+        String exMsg = "Improper message id=" + ((StringId)instance).id + "\n"
+                + "Usually this is caused by an unmatched or nested \"{\"\n"
+                + "Examples:\t\"{0]\" or \"{ {0} }\"\n"
+                + "This is just the first failure, it is in your interest"
+                + " to rebuild and run just this one test.\n"
+                + "build.sh run-java-tests -Djunit.testcase="
+                + testName;
+        throw new AssertionError(exMsg, iae);
+      }
+      if(! altered.equals(formatted)) {
+        System.err.println("altered:   " + altered);
+        System.err.println("formatted: " + formatted);
+        misquoted.add(instance);
+      }
+    }
+    if(! misquoted.isEmpty()) {
+      StringBuffer err = new StringBuffer();
+      err.append("These errors are usually resolved by replacing ");
+      err.append("\"'\" with \"''\".\n");
+      err.append("If the error is in the non-english version then ");
+      err.append("alter the text in StringIdResouceBundle_{lang}.txt.\n");
+      err.append("The following misquoted StringIds were found:");
+      for(StringId i : misquoted) {
+        err.append("\n")
+                .append("StringId id=")
+                .append(((StringId)i).id)
+                .append(" : text=\"")
+                .append(i.getRawText())
+                .append("\"");
+      }
+      fail(err.toString());
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/io/CompositeOutputStreamJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/io/CompositeOutputStreamJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/io/CompositeOutputStreamJUnitTest.java
index 11f9a79..29725f1 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/io/CompositeOutputStreamJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/io/CompositeOutputStreamJUnitTest.java
@@ -43,7 +43,7 @@ public class CompositeOutputStreamJUnitTest {
   private Mockery mockContext;
 
   @Before
-  public void setup() {
+  public void setUp() {
     mockContext = new Mockery() {{
       setImposteriser(ClassImposteriser.INSTANCE);
     }};

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/jndi/ContextJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jndi/ContextJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jndi/ContextJUnitTest.java
index 2fe0518..0afe7f0 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jndi/ContextJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jndi/ContextJUnitTest.java
@@ -16,8 +16,9 @@
  */
 package com.gemstone.gemfire.internal.jndi;
 
-import java.util.Hashtable;
+import static org.junit.Assert.*;
 
+import java.util.Hashtable;
 import javax.naming.Binding;
 import javax.naming.Context;
 import javax.naming.ContextNotEmptyException;
@@ -28,337 +29,290 @@ import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.NoPermissionException;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junit.framework.TestCase;
-
-//import com.gemstone.gemfire.internal.jndi.InitialContextFactoryImpl;
-
 /**
  * Tests all basic methods of ContextImpl.
- * 
  */
 @Category(UnitTest.class)
-public class ContextJUnitTest extends TestCase {
-  
-  private Context initialCtx;
-  
-  private Context gfCtx;
-  
-  private Context envCtx;
+public class ContextJUnitTest {
   
-  private Context datasourceCtx;
-  
-  public ContextJUnitTest(String name) {
-    super(name);
-  }
-  
-  protected void setUp() throws Exception {
-    // InitialContextFactoryImpl impl = new InitialContextFactoryImpl();
-    //	impl.setAsInitial();
+  private Context initialContext;
+  private Context gemfireContext;
+  private Context envContext;
+  private Context dataSourceContext;
+
+  @Before
+  public void setUp() throws Exception {
     Hashtable table = new Hashtable();
-    table
-    .put(
-        Context.INITIAL_CONTEXT_FACTORY,
-    "com.gemstone.gemfire.internal.jndi.InitialContextFactoryImpl");
-    //	table.put(Context.URL_PKG_PREFIXES,
-    // "com.gemstone.gemfire.internal.jndi");
-    initialCtx = new InitialContext(table);
-    initialCtx.bind("java:gf/env/datasource/oracle", "a");
-    gfCtx = (Context) initialCtx.lookup("java:gf");
-    envCtx = (Context) gfCtx.lookup("env");
-    datasourceCtx = (Context) envCtx.lookup("datasource");
+    table.put(Context.INITIAL_CONTEXT_FACTORY, "com.gemstone.gemfire.internal.jndi.InitialContextFactoryImpl");
+    initialContext = new InitialContext(table);
+    initialContext.bind("java:gf/env/datasource/oracle", "a");
+    gemfireContext = (Context) initialContext.lookup("java:gf");
+    envContext = (Context) gemfireContext.lookup("env");
+    dataSourceContext = (Context) envContext.lookup("datasource");
   }
-  
-  protected void tearDown() throws Exception {
-    
-    clearContext(initialCtx);
-    datasourceCtx = null;
-    envCtx = null;
-    gfCtx = null;
-    initialCtx = null;
-    //InitialContextFactoryImpl.revertSetAsInitial();
+
+  @After
+  public void tearDown() throws Exception {
+    clearContext(initialContext);
+    dataSourceContext = null;
+    envContext = null;
+    gemfireContext = null;
+    initialContext = null;
   }
   
   /**
    * Removes all entries from the specified context, including subcontexts.
    * 
-   * @param context context ot clear
+   * @param context context to clear
    */
-  private void clearContext(Context context)
-  throws NamingException {
-    
-    for (NamingEnumeration e = context.listBindings(""); e
-    .hasMoreElements();) {
+  private void clearContext(Context context) throws NamingException {
+    for (NamingEnumeration e = context.listBindings(""); e.hasMoreElements();) {
       Binding binding = (Binding) e.nextElement();
       if (binding.getObject() instanceof Context) {
         clearContext((Context) binding.getObject());
       }
       context.unbind(binding.getName());
     }
-    
   }
   
-  /*
+  /**
    * Tests inability to create duplicate subcontexts.
-   * 
-   * @throws NamingException
    */
-  public void testSubcontextCreationOfDuplicates()
-  throws NamingException {
-    
+  @Test
+  public void testSubcontextCreationOfDuplicates() throws NamingException {
     // Try to create duplicate subcontext
     try {
-      initialCtx.createSubcontext("java:gf");
+      initialContext.createSubcontext("java:gf");
       fail();
     }
-    catch (NameAlreadyBoundException ex) {
+    catch (NameAlreadyBoundException expected) {
     }
     // Try to create duplicate subcontext using multi-component name
     try {
-      gfCtx.createSubcontext("env/datasource");
+      gemfireContext.createSubcontext("env/datasource");
       fail();
     }
-    catch (NameAlreadyBoundException ex) {
+    catch (NameAlreadyBoundException expected) {
     }
   }
   
-  /*
+  /**
    * Tests inability to destroy non empty subcontexts.
-   * 
-   * @throws NamingException
    */
-  public void testSubcontextNonEmptyDestruction()
-  throws NamingException {
-    
+  @Test
+  public void testSubcontextNonEmptyDestruction() throws Exception {
     // Bind some object in ejb subcontext
-    datasourceCtx.bind("Test", "Object");
+    dataSourceContext.bind("Test", "Object");
     // Attempt to destroy any subcontext
     try {
-      initialCtx.destroySubcontext("java:gf");
+      initialContext.destroySubcontext("java:gf");
       fail();
     }
-    catch (ContextNotEmptyException ex) {
+    catch (ContextNotEmptyException expected) {
     }
     try {
-      initialCtx
+      initialContext
       .destroySubcontext("java:gf/env/datasource");
       fail();
     }
-    catch (ContextNotEmptyException ex) {
+    catch (ContextNotEmptyException expected) {
     }
     try {
-      envCtx.destroySubcontext("datasource");
+      envContext.destroySubcontext("datasource");
       fail();
     }
-    catch (ContextNotEmptyException ex) {
+    catch (ContextNotEmptyException expected) {
     }
   }
   
-  /*
+  /**
    * Tests ability to destroy empty subcontexts.
-   * 
-   * @throws NamingException
    */
-  public void testSubcontextDestruction()
-  throws NamingException {
-    
+  @Test
+  public void testSubcontextDestruction() throws Exception {
     // Create three new subcontexts
-    datasourceCtx.createSubcontext("sub1");
-    datasourceCtx.createSubcontext("sub2");
-    envCtx.createSubcontext("sub3");
+    dataSourceContext.createSubcontext("sub1");
+    dataSourceContext.createSubcontext("sub2");
+    envContext.createSubcontext("sub3");
     // Destroy
-    initialCtx
-    .destroySubcontext("java:gf/env/datasource/sub1");
-    datasourceCtx.destroySubcontext("sub2");
-    envCtx.destroySubcontext("sub3");
+    initialContext.destroySubcontext("java:gf/env/datasource/sub1");
+    dataSourceContext.destroySubcontext("sub2");
+    envContext.destroySubcontext("sub3");
     // Perform lookup
     try {
-      datasourceCtx.lookup("sub1");
+      dataSourceContext.lookup("sub1");
       fail();
     }
-    catch (NameNotFoundException ex) {
+    catch (NameNotFoundException expected) {
     }
     try {
-      envCtx.lookup("datasource/sub2");
+      envContext.lookup("datasource/sub2");
       fail();
     }
-    catch (NameNotFoundException ex) {
+    catch (NameNotFoundException expected) {
     }
     try {
-      initialCtx.lookup("java:gf/sub3");
+      initialContext.lookup("java:gf/sub3");
       fail();
     }
-    catch (NameNotFoundException ex) {
+    catch (NameNotFoundException expected) {
     }
   }
   
-  /*
-   * Tests inability to invoke methods on destroyed subcontexts. @throws
-   * NamingException
+  /**
+   * Tests inability to invoke methods on destroyed subcontexts.
    */
-  public void testSubcontextInvokingMethodsOnDestroyedContext()
-  throws NamingException {
-    
+  @Test
+  public void testSubcontextInvokingMethodsOnDestroyedContext() throws Exception {
     //Create subcontext and destroy it.
-    Context sub = datasourceCtx.createSubcontext("sub4");
-    initialCtx
-    .destroySubcontext("java:gf/env/datasource/sub4");
+    Context sub = dataSourceContext.createSubcontext("sub4");
+    initialContext.destroySubcontext("java:gf/env/datasource/sub4");
     
     try {
       sub.bind("name", "object");
       fail();
     }
-    catch (NoPermissionException ex) {
+    catch (NoPermissionException expected) {
     }
     try {
       sub.unbind("name");
       fail();
     }
-    catch (NoPermissionException ex) {
+    catch (NoPermissionException expected) {
     }
     try {
       sub.createSubcontext("sub5");
       fail();
     }
-    catch (NoPermissionException ex) {
+    catch (NoPermissionException expected) {
     }
     try {
       sub.destroySubcontext("sub6");
       fail();
     }
-    catch (NoPermissionException ex) {
+    catch (NoPermissionException expected) {
     }
     try {
       sub.list("");
       fail();
     }
-    catch (NoPermissionException ex) {
+    catch (NoPermissionException expected) {
     }
     try {
       sub.lookup("name");
       fail();
     }
-    catch (NoPermissionException ex) {
+    catch (NoPermissionException expected) {
     }
     try {
       sub.composeName("name", "prefix");
       fail();
     }
-    catch (NoPermissionException ex) {
+    catch (NoPermissionException expected) {
     }
     try {
       NameParserImpl parser = new NameParserImpl();
       sub.composeName(parser.parse("a"), parser.parse("b"));
       fail();
     }
-    catch (NoPermissionException ex) {
+    catch (NoPermissionException expected) {
     }
   }
   
-  /*
-   * Tests ability to bind name to object. @throws NamingException
+  /**
+   * Tests ability to bind name to object.
    */
-  public void testBindLookup() throws NamingException {
-    
+  @Test
+  public void testBindLookup() throws Exception {
     Object obj1 = new String("Object1");
     Object obj2 = new String("Object2");
     Object obj3 = new String("Object3");
-    datasourceCtx.bind("sub21", null);
-    datasourceCtx.bind("sub22", obj1);
-    initialCtx.bind("java:gf/env/sub23", null);
-    initialCtx.bind("java:gf/env/sub24", obj2);
+    dataSourceContext.bind("sub21", null);
+    dataSourceContext.bind("sub22", obj1);
+    initialContext.bind("java:gf/env/sub23", null);
+    initialContext.bind("java:gf/env/sub24", obj2);
     // Bind to subcontexts that do not exist
-    initialCtx.bind("java:gf/env/datasource/sub25/sub26",
-        obj3);
+    initialContext.bind("java:gf/env/datasource/sub25/sub26", obj3);
     
     // Try to lookup
-    assertNull(datasourceCtx.lookup("sub21"));
-    assertSame(datasourceCtx.lookup("sub22"), obj1);
-    assertNull(gfCtx.lookup("env/sub23"));
-    assertSame(initialCtx.lookup("java:gf/env/sub24"), obj2);
-    assertSame(datasourceCtx.lookup("sub25/sub26"), obj3);
+    assertNull(dataSourceContext.lookup("sub21"));
+    assertSame(dataSourceContext.lookup("sub22"), obj1);
+    assertNull(gemfireContext.lookup("env/sub23"));
+    assertSame(initialContext.lookup("java:gf/env/sub24"), obj2);
+    assertSame(dataSourceContext.lookup("sub25/sub26"), obj3);
   }
   
-  /*
-   * Tests ability to unbind names. @throws NamingException
+  /**
+   * Tests ability to unbind names.
    */
-  public void testUnbind() throws NamingException {
-    
-    envCtx.bind("sub31", null);
-    gfCtx.bind("env/ejb/sub32", new String("UnbindObject"));
+  @Test
+  public void testUnbind() throws Exception {
+    envContext.bind("sub31", null);
+    gemfireContext.bind("env/ejb/sub32", new String("UnbindObject"));
     // Unbind
-    initialCtx.unbind("java:gf/env/sub31");
-    datasourceCtx.unbind("sub32");
+    initialContext.unbind("java:gf/env/sub31");
+    dataSourceContext.unbind("sub32");
     try {
-      envCtx.lookup("sub31");
+      envContext.lookup("sub31");
       fail();
     }
-    catch (NameNotFoundException ex) {
+    catch (NameNotFoundException expected) {
     }
     try {
-      initialCtx.lookup("java:gf/env/sub32");
+      initialContext.lookup("java:gf/env/sub32");
       fail();
     }
-    catch (NameNotFoundException ex) {
+    catch (NameNotFoundException expected) {
     }
     // Unbind non-existing name
-    try {
-      datasourceCtx.unbind("doesNotExist");
-    }
-    catch (Exception ex) {
-      fail();
-    }
+    dataSourceContext.unbind("doesNotExist");
     // Unbind non-existing name, when subcontext does not exists
     try {
-      gfCtx.unbind("env/x/y");
+      gemfireContext.unbind("env/x/y");
       fail();
     }
-    catch (NameNotFoundException ex) {
+    catch (NameNotFoundException expected) {
     }
   }
   
-  /*
+  /**
    * Tests ability to list bindings for a context - specified by name through
    * object reference.
-   * 
-   * @throws NamingException
    */
-  public void testListBindings() throws NamingException {
-    
-    gfCtx.bind("env/datasource/sub41", "ListBindings1");
-    envCtx.bind("sub42", "ListBindings2");
-    datasourceCtx.bind("sub43", null);
+  @Test
+  public void testListBindings() throws Exception {
+    gemfireContext.bind("env/datasource/sub41", "ListBindings1");
+    envContext.bind("sub42", "ListBindings2");
+    dataSourceContext.bind("sub43", null);
     
     // Verify bindings for context specified by reference
-    verifyListBindings(envCtx, "", "ListBindings1",
-    "ListBindings2");
+    verifyListBindings(envContext, "", "ListBindings1", "ListBindings2");
     // Verify bindings for context specified by name
-    verifyListBindings(initialCtx, "java:gf/env",
-        "ListBindings1", "ListBindings2");
+    verifyListBindings(initialContext, "java:gf/env", "ListBindings1", "ListBindings2");
   }
   
-  private void verifyListBindings(Context c, String name,
-      Object obj1, Object obj2) throws NamingException {
-    
+  private void verifyListBindings(Context c, String name, Object obj1, Object obj2) throws NamingException {
     boolean datasourceFoundFlg = false;
     boolean o2FoundFlg = false;
     boolean datasourceO1FoundFlg = false;
     boolean datasourceNullFoundFlg = false;
     
     // List bindings for the specified context
-    for (NamingEnumeration en = c.listBindings(name); en
-    .hasMore();) {
+    for (NamingEnumeration en = c.listBindings(name); en.hasMore();) {
       Binding b = (Binding) en.next();
       if (b.getName().equals("datasource")) {
-        assertEquals(b.getObject(), datasourceCtx);
+        assertEquals(b.getObject(), dataSourceContext);
         datasourceFoundFlg = true;
         
         Context nextCon = (Context) b.getObject();
-        for (NamingEnumeration en1 = nextCon
-            .listBindings(""); en1.hasMore();) {
+        for (NamingEnumeration en1 = nextCon.listBindings(""); en1.hasMore();) {
           Binding b1 = (Binding) en1.next();
           if (b1.getName().equals("sub41")) {
             assertEquals(b1.getObject(), obj1);
@@ -376,12 +330,12 @@ public class ContextJUnitTest extends TestCase {
         o2FoundFlg = true;
       }
     }
-    if (!(datasourceFoundFlg && o2FoundFlg
-        && datasourceO1FoundFlg && datasourceNullFoundFlg)) {
+    if (!(datasourceFoundFlg && o2FoundFlg && datasourceO1FoundFlg && datasourceNullFoundFlg)) {
       fail();
     }
   }
-  
+
+  @Test
   public void testCompositeName() throws Exception {
     ContextImpl c = new ContextImpl();
     Object o = new Object();
@@ -389,9 +343,9 @@ public class ContextJUnitTest extends TestCase {
     c.rebind("/a/b/c/", o);
     assertEquals(c.lookup("a/b/c"), o);
     assertEquals(c.lookup("///a/b/c///"), o);
-    
   }
-  
+
+  @Test
   public void testLookup() throws Exception {
     ContextImpl ctx = new ContextImpl();
     Object obj = new Object();
@@ -400,14 +354,13 @@ public class ContextJUnitTest extends TestCase {
     
     ctx.bind("a", obj);
     assertEquals(obj, ctx.lookup("a"));
-    
   }
   
-  /*
+  /**
    * Tests "getCompositeName" method
    */
+  @Test
   public void testGetCompositeName() throws Exception {
-    
     ContextImpl ctx = new ContextImpl();
     ctx.rebind("a/b/c/d", new Object());
     
@@ -418,15 +371,13 @@ public class ContextJUnitTest extends TestCase {
     
     subCtx = (ContextImpl) ctx.lookup("a/b/c");
     assertEquals("a/b/c", subCtx.getCompoundStringName());
-    
   }
   
-  /*
-   * Tests substitution of '.' with '/' when parsing string names. @throws
-   * NamingException
+  /**
+   * Tests substitution of '.' with '/' when parsing string names.
    */
-  public void testTwoSeparatorNames()
-  throws NamingException {
+  @Test
+  public void testTwoSeparatorNames() throws Exception {
     ContextImpl ctx = new ContextImpl();
     Object obj = new Object();
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ObjectUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ObjectUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ObjectUtilsJUnitTest.java
index faaec6a..7f68a52 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ObjectUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ObjectUtilsJUnitTest.java
@@ -163,7 +163,7 @@ public class ObjectUtilsJUnitTest {
       " is the loneliest number!"));
   }
 
-  public static final class ValueHolder<T> {
+  private static final class ValueHolder<T> {
 
     private final T value;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java
index f345735..c172885 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/lang/ThreadUtilsJUnitTest.java
@@ -16,24 +16,21 @@
  */
 package com.gemstone.gemfire.internal.lang;
 
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.*;
-import static org.assertj.core.api.Assertions.*;
 
 import java.lang.Thread.State;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import com.gemstone.gemfire.test.junit.Retry;
-import com.gemstone.gemfire.test.junit.rules.RetryRule;
 import edu.umd.cs.mtc.MultithreadedTestCase;
 import edu.umd.cs.mtc.TestFramework;
-
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.lib.concurrent.Synchroniser;
 import org.jmock.lib.legacy.ClassImposteriser;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Rule;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -56,7 +53,7 @@ public class ThreadUtilsJUnitTest {
   protected Mockery mockContext;
 
   @Before
-  public void setup() {
+  public void setUp() {
     mockContext = new Mockery() {{
       setImposteriser(ClassImposteriser.INSTANCE);
       setThreadingPolicy(new Synchroniser());
@@ -68,9 +65,6 @@ public class ThreadUtilsJUnitTest {
     mockContext.assertIsSatisfied();
   }
 
-  @Rule
-  public RetryRule retryRule = new RetryRule();
-
   @Test
   public void testGetThreadNameWithNull() {
     assertNull(ThreadUtils.getThreadName(null));
@@ -172,8 +166,8 @@ public class ThreadUtilsJUnitTest {
     assertTrue(sleepDuration > 0);
   }
 
+  @Ignore("This is really just testing Thread.sleep(long)")
   @Test
-  @Retry(3)
   public void testSleepWithInterrupt() throws Throwable {
     TestFramework.runOnce(new SleepInterruptedMultithreadedTestCase(10 * 1000));
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogServiceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogServiceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogServiceJUnitTest.java
index ea2a1e9..aaa146a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogServiceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogServiceJUnitTest.java
@@ -16,11 +16,13 @@
  */
 package com.gemstone.gemfire.internal.logging;
 
-import static junitparams.JUnitParamsRunner.$;
+import static junitparams.JUnitParamsRunner.*;
 import static org.assertj.core.api.Assertions.*;
 
 import java.net.URL;
 
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
 import org.apache.logging.log4j.Level;
 import org.junit.Before;
 import org.junit.Rule;
@@ -33,22 +35,18 @@ import com.gemstone.gemfire.internal.ClassPathLoader;
 import com.gemstone.gemfire.internal.logging.log4j.AppenderContext;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-import junitparams.JUnitParamsRunner;
-import junitparams.Parameters;
-
 /**
  * Unit tests for LogService
- * 
  */
 @Category(UnitTest.class)
 @RunWith(JUnitParamsRunner.class)
 public class LogServiceJUnitTest {
-  
-  @Rule
-  public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
-  
+
   private URL defaultConfigUrl;
   private URL cliConfigUrl;
+
+  @Rule
+  public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
   
   @Before
   public void setUp() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/SortLogFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/SortLogFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/SortLogFileJUnitTest.java
index 24002f9..7dfc7d3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/SortLogFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/SortLogFileJUnitTest.java
@@ -16,12 +16,11 @@
  */
 package com.gemstone.gemfire.internal.logging;
 
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.io.StringReader;
@@ -29,6 +28,7 @@ import java.io.StringWriter;
 import java.util.Date;
 import java.util.Random;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.LogWriter;
@@ -37,7 +37,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 /**
  * Tests the functionality of the {@link SortLogFile} program.
  *
- *
  * @since 3.0
  */
 @Category(UnitTest.class)
@@ -48,8 +47,8 @@ public class SortLogFileJUnitTest {
    * order.  Then it sorts the log file and asserts that the entries
    * are sorted order.
    */
-  @org.junit.Test
-  public void testRandomLog() throws IOException {
+  @Test
+  public void testRandomLog() throws Exception {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     PrintWriter pw = new PrintWriter(new OutputStreamWriter(baos), true);
     LogWriter logger = new RandomLogWriter(pw);
@@ -105,6 +104,7 @@ public class SortLogFileJUnitTest {
      * Ignores <code>date</code> and returns the timestamp for a
      * random date.
      */
+    @Override
     protected String formatDate(Date date) {
       long time = date.getTime() + (random.nextInt(100000) * 1000);
       date = new Date(time);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/AlertAppenderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/AlertAppenderJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/AlertAppenderJUnitTest.java
index a1d5e9d..6721d04 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/AlertAppenderJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/AlertAppenderJUnitTest.java
@@ -16,10 +16,7 @@
  */
 package com.gemstone.gemfire.internal.logging.log4j;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import java.lang.reflect.Field;
 import java.util.ArrayList;
@@ -44,7 +41,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Tests the AlertAppender.
- * 
  */
 @Category(UnitTest.class)
 public class AlertAppenderJUnitTest {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/ConfigLocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/ConfigLocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/ConfigLocatorJUnitTest.java
index 885afa4..24916ae 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/ConfigLocatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/ConfigLocatorJUnitTest.java
@@ -32,14 +32,14 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TemporaryFolder;
 
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
  * UnitTest for ConfigLocator which is used to find the Log4J 2 configuration file.
  * 
  * @since 8.2
  */
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class ConfigLocatorJUnitTest {
 
   private static Set<String> suffixesNotFoundTested = new HashSet<String>();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/FastLoggerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/FastLoggerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/FastLoggerJUnitTest.java
index fc905a8..f054db6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/FastLoggerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/FastLoggerJUnitTest.java
@@ -16,9 +16,9 @@
  */
 package com.gemstone.gemfire.internal.logging.log4j;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.hamcrest.CoreMatchers.*;
 import static org.junit.Assert.*;
+import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.*;
 
 import org.apache.logging.log4j.Level;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LocalizedMessageJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LocalizedMessageJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LocalizedMessageJUnitTest.java
index 5c41ae0..428de32 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LocalizedMessageJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LocalizedMessageJUnitTest.java
@@ -16,10 +16,7 @@
  */
 package com.gemstone.gemfire.internal.logging.log4j;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -30,7 +27,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 /**
  * Tests for LocalizedMessage which bridges our StringId LocalizedStrings for 
  * Log4J2 usage.
- * 
  */
 @Category(UnitTest.class)
 public class LocalizedMessageJUnitTest {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bf258f62/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenderJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenderJUnitTest.java
index 58abcc8..4a485d8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenderJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenderJUnitTest.java
@@ -40,7 +40,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Tests the LogWriterAppender.
- * 
  */
 @Category(UnitTest.class)
 public class LogWriterAppenderJUnitTest {


[42/55] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-1153

Posted by sa...@apache.org.
Merge branch 'develop' into feature/GEODE-1153


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/37db6040
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/37db6040
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/37db6040

Branch: refs/heads/feature/GEODE-1153
Commit: 37db6040d8c5084d5559c1bae0805320df7e7d3f
Parents: 8c6adb7 036c931
Author: Sai Boorlagadda <sb...@pivotal.io>
Authored: Tue May 10 21:51:58 2016 -0700
Committer: Sai Boorlagadda <sb...@pivotal.io>
Committed: Tue May 10 21:51:58 2016 -0700

----------------------------------------------------------------------
 BUILDING.md                                     |    2 +-
 KEYS                                            |  309 +-
 LICENSE                                         |  473 ++-
 NOTICE                                          |   21 +-
 build.gradle                                    |    8 +-
 .../apache/geode/gradle/PasswordDialog.groovy   |   41 +
 extensions/geode-modules-assembly/build.gradle  |    1 +
 .../release/conf/cache-client.xml               |    6 +-
 .../release/conf/cache-peer.xml                 |    6 +-
 .../release/conf/cache-server.xml               |    6 +-
 .../SessionReplicationIntegrationJUnitTest.java |   40 +-
 .../session/junit/PerTestClassLoaderRunner.java |  138 +-
 extensions/geode-modules-tomcat7/build.gradle   |    9 +-
 .../session/Tomcat7SessionsJUnitTest.java       |    2 -
 extensions/geode-modules/build.gradle           |    2 +-
 .../modules/session/TestSessionsBase.java       |    8 +-
 .../session/Tomcat6SessionsJUnitTest.java       |    2 -
 geode-assembly/build.gradle                     |   45 +-
 geode-assembly/src/main/dist/LICENSE            |  888 ++++-
 geode-assembly/src/main/dist/NOTICE             |  691 ++--
 .../gemstone/gemfire/BundledJarsJUnitTest.java  |    4 +-
 .../LocatorLauncherAssemblyIntegrationTest.java |  155 +
 .../LocatorLauncherAssemblyJUnitTest.java       |  156 -
 .../LauncherLifecycleCommandsDUnitTest.java     |  153 +-
 ...auncherLifecycleCommandsIntegrationTest.java |  165 +
 .../LauncherLifecycleCommandsJUnitTest.java     |  240 +-
 .../SharedConfigurationEndToEndDUnitTest.java   |  320 +-
 .../controllers/RestAPIsWithSSLDUnitTest.java   |  160 +-
 .../src/test/resources/expected_jars.txt        |    4 +-
 .../annotations/ExperimentalJUnitTest.java      |    1 -
 geode-core/build.gradle                         |  111 +-
 .../gemfire/admin/SystemMemberRegion.java       |    2 +-
 .../gemfire/admin/internal/InetAddressUtil.java |    1 +
 .../admin/jmx/internal/MX4JModelMBean.java      |   16 -
 .../gemfire/cache/AttributesFactory.java        |   62 +-
 .../gemfire/cache/AttributesMutator.java        |   14 -
 .../gemstone/gemfire/cache/CacheFactory.java    |    5 +
 .../gemfire/cache/CustomEvictionAttributes.java |   78 -
 .../com/gemstone/gemfire/cache/DataPolicy.java  |   11 -
 .../gemfire/cache/EvictionCriteria.java         |   57 -
 .../com/gemstone/gemfire/cache/LossAction.java  |    2 +-
 .../gemfire/cache/MembershipAttributes.java     |    2 +-
 .../com/gemstone/gemfire/cache/Operation.java   |   13 -
 .../gemfire/cache/RegionAccessException.java    |    2 +-
 .../gemfire/cache/RegionAttributes.java         |   25 +-
 .../cache/RegionDistributionException.java      |    2 +-
 .../gemstone/gemfire/cache/RegionFactory.java   |   25 +-
 .../gemfire/cache/RegionRoleException.java      |    2 +-
 .../gemfire/cache/RegionRoleListener.java       |    2 +-
 .../gemstone/gemfire/cache/RequiredRoles.java   |    2 +-
 .../gemfire/cache/ResumptionAction.java         |    2 +-
 .../com/gemstone/gemfire/cache/RoleEvent.java   |    2 +-
 .../gemstone/gemfire/cache/RoleException.java   |    2 +-
 .../internal/AsyncEventQueueFactoryImpl.java    |    6 +-
 .../internal/SerialAsyncEventQueueImpl.java     |    4 +
 .../cache/client/ClientCacheFactory.java        |   23 +-
 .../client/internal/CloseConnectionOp.java      |   26 +-
 .../cache/client/internal/ConnectionImpl.java   |    8 +-
 .../client/internal/ServerRegionProxy.java      |    3 +-
 .../execute/EmptyRegionFunctionException.java   |   63 +
 .../execute/EmtpyRegionFunctionException.java   |   63 -
 .../gemfire/cache/execute/Function.java         |   19 +-
 .../gemfire/cache/execute/FunctionAdapter.java  |   87 +-
 .../gemfire/cache/hdfs/HDFSIOException.java     |   52 -
 .../gemstone/gemfire/cache/hdfs/HDFSStore.java  |  341 --
 .../gemfire/cache/hdfs/HDFSStoreFactory.java    |  203 -
 .../gemfire/cache/hdfs/HDFSStoreMutator.java    |  196 -
 .../cache/hdfs/StoreExistsException.java        |   32 -
 .../cache/hdfs/internal/FailureTracker.java     |   96 -
 .../cache/hdfs/internal/FlushObserver.java      |   53 -
 .../hdfs/internal/HDFSBucketRegionQueue.java    | 1232 ------
 .../cache/hdfs/internal/HDFSEntriesSet.java     |  329 --
 .../cache/hdfs/internal/HDFSEventListener.java  |  179 -
 .../hdfs/internal/HDFSEventQueueFilter.java     |   73 -
 .../hdfs/internal/HDFSGatewayEventImpl.java     |  180 -
 .../hdfs/internal/HDFSIntegrationUtil.java      |  117 -
 .../HDFSParallelGatewaySenderQueue.java         |  471 ---
 .../hdfs/internal/HDFSStoreConfigHolder.java    |  559 ---
 .../cache/hdfs/internal/HDFSStoreCreation.java  |  198 -
 .../hdfs/internal/HDFSStoreFactoryImpl.java     |   77 -
 .../cache/hdfs/internal/HDFSStoreImpl.java      |  638 ---
 .../hdfs/internal/HDFSStoreMutatorImpl.java     |  200 -
 .../HDFSWriteOnlyStoreEventListener.java        |  184 -
 .../hdfs/internal/HoplogListenerForRegion.java  |   72 -
 .../cache/hdfs/internal/PersistedEventImpl.java |  202 -
 .../hdfs/internal/QueuedPersistentEvent.java    |   27 -
 .../hdfs/internal/SignalledFlushObserver.java   |  122 -
 .../internal/SortedHDFSQueuePersistedEvent.java |   86 -
 .../internal/SortedHoplogPersistedEvent.java    |  114 -
 .../UnsortedHDFSQueuePersistedEvent.java        |   76 -
 .../internal/UnsortedHoplogPersistedEvent.java  |   92 -
 .../hdfs/internal/hoplog/AbstractHoplog.java    |  357 --
 .../hoplog/AbstractHoplogOrganizer.java         |  430 --
 .../cache/hdfs/internal/hoplog/BloomFilter.java |   36 -
 .../hoplog/CloseTmpHoplogsTimerTask.java        |  108 -
 .../hdfs/internal/hoplog/CompactionStatus.java  |   72 -
 .../cache/hdfs/internal/hoplog/FlushStatus.java |   72 -
 .../internal/hoplog/HDFSCompactionManager.java  |  330 --
 .../internal/hoplog/HDFSFlushQueueArgs.java     |   93 -
 .../internal/hoplog/HDFSFlushQueueFunction.java |  287 --
 .../hoplog/HDFSForceCompactionArgs.java         |  107 -
 .../hoplog/HDFSForceCompactionFunction.java     |  129 -
 .../HDFSForceCompactionResultCollector.java     |  131 -
 .../hoplog/HDFSLastCompactionTimeFunction.java  |   56 -
 .../internal/hoplog/HDFSRegionDirector.java     |  480 ---
 .../hdfs/internal/hoplog/HDFSStoreDirector.java |   78 -
 .../hoplog/HDFSUnsortedHoplogOrganizer.java     |  447 ---
 .../hdfs/internal/hoplog/HFileSortedOplog.java  |  853 ----
 .../hoplog/HdfsSortedOplogOrganizer.java        | 2004 ----------
 .../cache/hdfs/internal/hoplog/Hoplog.java      |  263 --
 .../hdfs/internal/hoplog/HoplogConfig.java      |   74 -
 .../hdfs/internal/hoplog/HoplogListener.java    |   47 -
 .../hdfs/internal/hoplog/HoplogOrganizer.java   |  123 -
 .../hdfs/internal/hoplog/HoplogSetIterator.java |  166 -
 .../hdfs/internal/hoplog/HoplogSetReader.java   |  114 -
 .../internal/hoplog/SequenceFileHoplog.java     |  395 --
 .../hoplog/mapred/AbstractGFRecordReader.java   |  106 -
 .../internal/hoplog/mapred/GFInputFormat.java   |   95 -
 .../internal/hoplog/mapred/GFOutputFormat.java  |   75 -
 .../mapreduce/AbstractGFRecordReader.java       |  140 -
 .../hoplog/mapreduce/GFInputFormat.java         |  124 -
 .../hdfs/internal/hoplog/mapreduce/GFKey.java   |   72 -
 .../hoplog/mapreduce/GFOutputFormat.java        |  198 -
 .../hoplog/mapreduce/HDFSSplitIterator.java     |  197 -
 .../internal/hoplog/mapreduce/HoplogUtil.java   |  463 ---
 .../hoplog/mapreduce/RWSplitIterator.java       |   48 -
 .../hoplog/mapreduce/StreamSplitIterator.java   |   46 -
 .../org/apache/hadoop/io/SequenceFile.java      | 3726 ------------------
 .../cache/operations/OperationContext.java      |  552 +--
 .../query/internal/index/DummyQRegion.java      |    3 -
 .../cache/query/internal/index/HashIndex.java   |    1 -
 .../query/internal/index/IndexManager.java      |    8 -
 .../cache/util/RegionRoleListenerAdapter.java   |    2 +-
 .../gemfire/cache/wan/GatewaySender.java        |    2 -
 .../gemfire/distributed/DistributedSystem.java  |   21 +-
 .../com/gemstone/gemfire/distributed/Role.java  |    2 +-
 .../gemfire/distributed/ServerLauncher.java     |   26 +-
 .../internal/AbstractDistributionConfig.java    |   48 +-
 .../distributed/internal/ConfigAttribute.java   |    1 -
 .../internal/ConfigAttributeChecker.java        |    1 -
 .../internal/ConfigAttributeDesc.java           |    3 -
 .../internal/ConfigAttributeGetter.java         |    3 -
 .../internal/ConfigAttributeSetter.java         |    3 -
 .../internal/DistributionConfig.java            |    7 +
 .../internal/DistributionConfigImpl.java        |   38 +-
 .../internal/InternalDistributedSystem.java     |  255 +-
 .../distributed/internal/InternalLocator.java   |   24 +-
 .../internal/SharedConfiguration.java           |  532 ++-
 .../internal/WanLocatorDiscoverer.java          |    4 +
 .../membership/InternalDistributedMember.java   |   68 +-
 .../internal/membership/InternalRole.java       |    2 +-
 .../internal/membership/NetMember.java          |    4 +-
 .../internal/membership/gms/GMSMember.java      |   36 +-
 .../internal/membership/gms/ServiceConfig.java  |   18 +
 .../internal/membership/gms/Services.java       |   23 +-
 .../membership/gms/fd/GMSHealthMonitor.java     |   27 +-
 .../membership/gms/locator/GMSLocator.java      |    2 +-
 .../membership/gms/membership/GMSJoinLeave.java |  248 +-
 .../gms/messenger/JGroupsMessenger.java         |   17 +-
 .../membership/gms/messenger/StatRecorder.java  |   30 +-
 .../internal/tcpserver/TcpServer.java           |    4 +-
 .../gemfire/internal/AbstractConfig.java        |   28 +-
 .../gemfire/internal/AvailablePort.java         |    6 +-
 .../gemfire/internal/ClassPathLoader.java       |    8 +-
 .../gemstone/gemfire/internal/DSFIDFactory.java |    3 -
 .../internal/DataSerializableFixedID.java       |    1 -
 .../gemfire/internal/HeapDataOutputStream.java  |    3 -
 .../gemfire/internal/SocketCreator.java         |   25 +-
 .../gemfire/internal/SocketIOWithTimeout.java   |  491 ---
 .../gemfire/internal/SocketInputStream.java     |  181 -
 .../gemfire/internal/SocketInputWrapper.java    |   93 -
 .../gemfire/internal/SocketOutputStream.java    |  174 -
 .../gemstone/gemfire/internal/SocketUtils.java  |  220 --
 .../internal/admin/ClientStatsManager.java      |    3 +-
 .../admin/remote/RemoteRegionAttributes.java    |   25 -
 .../cache/AbstractBucketRegionQueue.java        |   21 +-
 .../internal/cache/AbstractLRURegionMap.java    |   13 +-
 .../gemfire/internal/cache/AbstractRegion.java  |  149 +-
 .../internal/cache/AbstractRegionEntry.java     |   38 +-
 .../internal/cache/AbstractRegionMap.java       |  170 +-
 .../gemfire/internal/cache/BucketAdvisor.java   |    1 -
 .../gemfire/internal/cache/BucketRegion.java    |  224 +-
 .../internal/cache/BucketRegionQueue.java       |   13 +-
 .../cache/CacheDistributionAdvisor.java         |   22 +-
 .../gemfire/internal/cache/CachePerfStats.java  |   75 -
 .../internal/cache/ColocationHelper.java        |    3 -
 .../cache/CustomEvictionAttributesImpl.java     |   35 -
 .../internal/cache/DestroyOperation.java        |    6 +-
 .../gemfire/internal/cache/DiskEntry.java       |    1 -
 .../gemfire/internal/cache/DiskRegion.java      |    1 +
 .../internal/cache/DistPeerTXStateStub.java     |    2 +
 .../gemfire/internal/cache/DistTXState.java     |   11 +-
 .../cache/DistTXStateOnCoordinator.java         |    2 +
 .../DistTXStateProxyImplOnCoordinator.java      |    2 +
 .../cache/DistributedCacheOperation.java        |   11 +-
 .../cache/DistributedPutAllOperation.java       |   40 +-
 .../internal/cache/DistributedRegion.java       |   51 +-
 .../cache/DistributedRemoveAllOperation.java    |   25 +-
 .../gemfire/internal/cache/EntryEventImpl.java  |  103 +-
 .../gemfire/internal/cache/EntryExpiryTask.java |    9 +-
 .../gemfire/internal/cache/EventIDHolder.java   |   35 +
 .../gemfire/internal/cache/EvictorService.java  |  284 --
 .../gemfire/internal/cache/FilterProfile.java   |    6 +-
 .../internal/cache/GemFireCacheImpl.java        |  136 +-
 .../gemfire/internal/cache/HARegion.java        |   20 +-
 .../internal/cache/HDFSLRURegionMap.java        |  111 -
 .../gemfire/internal/cache/HDFSRegionMap.java   |   32 -
 .../internal/cache/HDFSRegionMapDelegate.java   |  540 ---
 .../internal/cache/HDFSRegionMapImpl.java       |   74 -
 .../internal/cache/InitialImageOperation.java   |   17 +-
 .../gemfire/internal/cache/InternalCache.java   |    4 -
 .../internal/cache/InternalDataView.java        |   28 +-
 .../internal/cache/InternalRegionArguments.java |   16 -
 .../internal/cache/InvalidateOperation.java     |    5 +-
 .../gemfire/internal/cache/LocalRegion.java     |  406 +-
 .../internal/cache/LocalRegionDataView.java     |   35 +-
 .../internal/cache/NonLocalRegionEntry.java     |   20 -
 .../gemstone/gemfire/internal/cache/Oplog.java  |   14 -
 .../gemfire/internal/cache/OverflowOplog.java   |    1 -
 .../internal/cache/PartitionedRegion.java       |  501 +--
 .../cache/PartitionedRegionDataStore.java       |   49 +-
 .../cache/PartitionedRegionDataView.java        |   27 +-
 .../gemfire/internal/cache/ProxyRegionMap.java  |   39 +-
 .../gemfire/internal/cache/QueuedOperation.java |    3 +-
 .../gemfire/internal/cache/RegionEntry.java     |   20 -
 .../internal/cache/RegionMapFactory.java        |    6 -
 .../internal/cache/RemoteDestroyMessage.java    |    5 +-
 .../internal/cache/RemoteGetMessage.java        |    2 +-
 .../internal/cache/RemoteInvalidateMessage.java |    4 +-
 .../internal/cache/RemotePutAllMessage.java     |    5 +-
 .../internal/cache/RemotePutMessage.java        |    6 +-
 .../internal/cache/RemoteRemoveAllMessage.java  |    5 +-
 .../cache/SearchLoadAndWriteProcessor.java      |   30 +-
 .../gemfire/internal/cache/TXCommitMessage.java |   22 +-
 .../gemfire/internal/cache/TXEntry.java         |    3 +-
 .../gemfire/internal/cache/TXEntryState.java    |   20 +-
 .../gemfire/internal/cache/TXEvent.java         |   21 +
 .../gemfire/internal/cache/TXRegionState.java   |    1 +
 .../gemfire/internal/cache/TXRmtEvent.java      |   37 +-
 .../gemfire/internal/cache/TXState.java         |   59 +-
 .../internal/cache/TXStateInterface.java        |   10 +-
 .../internal/cache/TXStateProxyImpl.java        |   30 +-
 .../gemfire/internal/cache/TXStateStub.java     |   32 +-
 .../cache/TimestampedEntryEventImpl.java        |    2 +
 .../cache/UpdateEntryVersionOperation.java      |    4 +-
 .../gemfire/internal/cache/UpdateOperation.java |   11 +-
 .../cache/UserSpecifiedRegionAttributes.java    |   24 +-
 .../cache/VMStatsDiskLRURegionEntryHeap.java    |    2 +-
 .../cache/VMStatsDiskLRURegionEntryOffHeap.java |    2 +-
 .../cache/VMStatsDiskRegionEntryHeap.java       |    2 +-
 .../cache/VMStatsDiskRegionEntryOffHeap.java    |    2 +-
 .../cache/VMStatsLRURegionEntryHeap.java        |    2 +-
 .../cache/VMStatsLRURegionEntryOffHeap.java     |    2 +-
 .../internal/cache/VMStatsRegionEntryHeap.java  |    2 +-
 .../cache/VMStatsRegionEntryOffHeap.java        |    2 +-
 .../cache/VMThinDiskLRURegionEntryHeap.java     |    2 +-
 .../cache/VMThinDiskLRURegionEntryOffHeap.java  |    2 +-
 .../cache/VMThinDiskRegionEntryHeap.java        |    2 +-
 .../cache/VMThinDiskRegionEntryOffHeap.java     |    2 +-
 .../cache/VMThinLRURegionEntryHeap.java         |    2 +-
 .../cache/VMThinLRURegionEntryOffHeap.java      |    2 +-
 .../internal/cache/VMThinRegionEntryHeap.java   |    2 +-
 .../cache/VMThinRegionEntryOffHeap.java         |    2 +-
 .../internal/cache/ValidatingDiskRegion.java    |   13 -
 .../internal/cache/VersionTagHolder.java        |   34 +
 .../VersionedStatsDiskLRURegionEntryHeap.java   |    2 +-
 ...VersionedStatsDiskLRURegionEntryOffHeap.java |    2 +-
 .../VersionedStatsDiskRegionEntryHeap.java      |    2 +-
 .../VersionedStatsDiskRegionEntryOffHeap.java   |    2 +-
 .../cache/VersionedStatsLRURegionEntryHeap.java |    2 +-
 .../VersionedStatsLRURegionEntryOffHeap.java    |    2 +-
 .../cache/VersionedStatsRegionEntryHeap.java    |    2 +-
 .../cache/VersionedStatsRegionEntryOffHeap.java |    2 +-
 .../VersionedThinDiskLRURegionEntryHeap.java    |    2 +-
 .../VersionedThinDiskLRURegionEntryOffHeap.java |    2 +-
 .../cache/VersionedThinDiskRegionEntryHeap.java |    2 +-
 .../VersionedThinDiskRegionEntryOffHeap.java    |    2 +-
 .../cache/VersionedThinLRURegionEntryHeap.java  |    2 +-
 .../VersionedThinLRURegionEntryOffHeap.java     |    2 +-
 .../cache/VersionedThinRegionEntryHeap.java     |    2 +-
 .../cache/VersionedThinRegionEntryOffHeap.java  |    2 +-
 .../cache/control/InternalResourceManager.java  |   10 -
 .../ServerToClientFunctionResultSender.java     |    2 +-
 .../cache/execute/util/CommitFunction.java      |  141 -
 .../execute/util/NestedTransactionFunction.java |  116 -
 .../cache/execute/util/RollbackFunction.java    |  136 -
 .../internal/cache/ha/HAContainerRegion.java    |    5 +
 .../cache/partitioned/DestroyMessage.java       |   13 +-
 .../partitioned/FetchBulkEntriesMessage.java    |    6 +-
 .../internal/cache/partitioned/GetMessage.java  |   27 +-
 .../cache/partitioned/InvalidateMessage.java    |    3 +-
 .../PRUpdateEntryVersionMessage.java            |    1 +
 .../cache/partitioned/PutAllPRMessage.java      |   28 +-
 .../internal/cache/partitioned/PutMessage.java  |   23 +-
 .../cache/partitioned/RemoveAllPRMessage.java   |   13 +-
 .../persistence/soplog/ByteComparator.java      |   55 -
 .../persistence/soplog/CursorIterator.java      |   81 -
 .../soplog/DelegatingSerializedComparator.java  |   37 -
 .../soplog/HFileStoreStatistics.java            |  205 -
 .../persistence/soplog/KeyValueIterator.java    |   42 -
 .../soplog/SortedOplogStatistics.java           |  505 ---
 .../cache/persistence/soplog/SortedReader.java  |  255 --
 .../persistence/soplog/TrackedReference.java    |  153 -
 .../cache/tier/sockets/AcceptorImpl.java        |    3 +-
 .../cache/tier/sockets/BaseCommand.java         |   23 +-
 .../cache/tier/sockets/CacheClientNotifier.java |  199 +-
 .../cache/tier/sockets/CacheClientUpdater.java  |    8 +-
 .../cache/tier/sockets/ClientHealthMonitor.java |   14 +
 .../internal/cache/tier/sockets/HandShake.java  |   13 +-
 .../internal/cache/tier/sockets/Message.java    |   19 +-
 .../cache/tier/sockets/ServerConnection.java    |   66 +-
 .../tier/sockets/ServerHandShakeProcessor.java  |   26 +-
 .../tier/sockets/command/CloseConnection.java   |   17 +-
 .../cache/tier/sockets/command/Destroy.java     |    3 +-
 .../cache/tier/sockets/command/Destroy65.java   |    5 +-
 .../sockets/command/GatewayReceiverCommand.java |   11 +-
 .../cache/tier/sockets/command/Get70.java       |   19 +-
 .../cache/tier/sockets/command/Invalidate.java  |    3 +-
 .../cache/tier/sockets/command/Put.java         |    5 +-
 .../cache/tier/sockets/command/Put61.java       |    5 +-
 .../cache/tier/sockets/command/Put65.java       |    3 +-
 .../cache/tier/sockets/command/Request.java     |    4 +-
 .../cache/tx/AbstractPeerTXRegionStub.java      |    8 +-
 .../internal/cache/tx/ClientTXRegionStub.java   |    4 +-
 .../internal/cache/tx/DistTxEntryEvent.java     |   13 +-
 .../cache/tx/DistributedTXRegionStub.java       |   14 +-
 .../cache/tx/PartitionedTXRegionStub.java       |   25 +-
 .../gemfire/internal/cache/tx/TXRegionStub.java |    4 +-
 .../cache/wan/AbstractGatewaySender.java        |   41 +-
 .../AbstractGatewaySenderEventProcessor.java    |    8 +-
 .../cache/wan/GatewaySenderAttributes.java      |    5 -
 .../GatewaySenderEventCallbackDispatcher.java   |    5 +-
 .../cache/wan/GatewaySenderEventDispatcher.java |    2 +-
 .../cache/wan/GatewaySenderEventImpl.java       |    5 -
 ...rentParallelGatewaySenderEventProcessor.java |    3 -
 .../ConcurrentParallelGatewaySenderQueue.java   |   12 -
 .../ParallelGatewaySenderEventProcessor.java    |   22 +-
 .../parallel/ParallelGatewaySenderQueue.java    |   21 +-
 .../cache/wan/serial/BatchDestroyOperation.java |    5 +-
 ...urrentSerialGatewaySenderEventProcessor.java |    3 +-
 .../wan/serial/SerialGatewaySenderQueue.java    |    2 +-
 .../serial/SerialSecondaryGatewayListener.java  |   19 +-
 .../cache/xmlcache/AsyncEventQueueCreation.java |    9 -
 .../internal/cache/xmlcache/CacheCreation.java  |   39 +-
 .../internal/cache/xmlcache/CacheXml.java       |   94 +-
 .../cache/xmlcache/CacheXmlGenerator.java       |  148 +-
 .../internal/cache/xmlcache/CacheXmlParser.java |  172 +-
 .../cache/xmlcache/CacheXmlVersion.java         |   56 +-
 .../cache/xmlcache/GeodeEntityResolver.java     |    2 +-
 .../xmlcache/RegionAttributesCreation.java      |   63 +-
 .../gemfire/internal/i18n/LocalizedStrings.java | 2498 +++++++++---
 .../internal/i18n/ParentLocalizedStrings.java   |    2 +-
 .../gemfire/internal/lang/ThrowableUtils.java   |  101 +
 .../internal/offheap/AbstractStoredObject.java  |    1 -
 .../internal/offheap/FreeListManager.java       |    7 -
 .../internal/offheap/OffHeapStoredObject.java   |    6 -
 .../internal/offheap/ReferenceCountHelper.java  |  218 +-
 .../offheap/ReferenceCountHelperImpl.java       |  304 ++
 .../internal/offheap/TinyStoredObject.java      |    4 -
 .../gemfire/internal/process/ProcessUtils.java  |    9 +-
 .../internal/security/AuthorizeRequest.java     |    5 -
 .../internal/security/GeodeSecurityUtil.java    |  214 +
 .../security/shiro/CustomAuthRealm.java         |  176 +
 .../security/shiro/JMXShiroAuthenticator.java   |   78 +
 .../internal/security/shiro/ShiroPrincipal.java |   39 +
 .../gemfire/internal/shared/NativeCalls.java    |    2 +-
 .../internal/size/ReflectionObjectSizer.java    |    9 +-
 .../gemfire/internal/tcp/Connection.java        |    5 +-
 .../gemfire/internal/tcp/MsgStreamer.java       |   11 -
 .../management/AsyncEventQueueMXBean.java       |    5 +
 .../gemfire/management/CacheServerMXBean.java   |   12 +-
 .../gemfire/management/DiskStoreMXBean.java     |    9 +
 .../DistributedLockServiceMXBean.java           |    8 +-
 .../management/DistributedRegionMXBean.java     |   18 +-
 .../management/DistributedSystemMXBean.java     |   38 +-
 .../management/GatewayReceiverMXBean.java       |    8 +-
 .../gemfire/management/GatewaySenderMXBean.java |   12 +-
 .../gemfire/management/GemFireProperties.java   |    3 +
 .../gemfire/management/LocatorMXBean.java       |    5 +
 .../gemfire/management/LockServiceMXBean.java   |   10 +-
 .../gemfire/management/ManagerMXBean.java       |   12 +-
 .../gemfire/management/MemberMXBean.java        |   22 +-
 .../management/MembershipAttributesData.java    |    3 +-
 .../gemfire/management/RegionMXBean.java        |   16 +-
 .../management/internal/ManagementAgent.java    |  126 +-
 .../gemfire/management/internal/RestAgent.java  |   51 +-
 .../internal/SystemManagementService.java       |   39 +-
 .../internal/beans/DistributedRegionBridge.java |    5 -
 .../internal/beans/DistributedRegionMBean.java  |    5 -
 .../internal/beans/DistributedSystemBridge.java |   19 -
 .../internal/beans/DistributedSystemMBean.java  |    7 -
 .../internal/beans/GatewaySenderMBean.java      |    8 +-
 .../internal/beans/HDFSRegionBridge.java        |  173 -
 .../management/internal/beans/MemberMBean.java  |    5 -
 .../internal/beans/MemberMBeanBridge.java       |   44 +-
 .../internal/beans/PartitionedRegionBridge.java |   13 +-
 .../management/internal/beans/RegionMBean.java  |    5 -
 .../internal/beans/RegionMBeanBridge.java       |    5 -
 .../beans/stats/RegionClusterStatsMonitor.java  |    7 -
 .../management/internal/cli/CommandManager.java |    3 -
 .../management/internal/cli/Launcher.java       |    9 +-
 .../internal/cli/commands/ClientCommands.java   |   50 +-
 .../internal/cli/commands/ConfigCommands.java   |   44 +-
 .../CreateAlterDestroyRegionCommands.java       |   42 +-
 .../internal/cli/commands/DataCommands.java     |   36 +-
 .../internal/cli/commands/DeployCommands.java   |   21 +-
 .../cli/commands/DiskStoreCommands.java         |   64 +-
 .../cli/commands/DurableClientCommands.java     |   45 +-
 ...ExportImportSharedConfigurationCommands.java |   23 +-
 .../internal/cli/commands/FunctionCommands.java |   33 +-
 .../internal/cli/commands/GfshHelpCommands.java |   13 +-
 .../internal/cli/commands/IndexCommands.java    |   39 +-
 .../cli/commands/LauncherLifecycleCommands.java |  142 +-
 .../internal/cli/commands/MemberCommands.java   |   27 +-
 .../cli/commands/MiscellaneousCommands.java     |   99 +-
 .../internal/cli/commands/PDXCommands.java      |   33 +-
 .../internal/cli/commands/QueueCommands.java    |   25 +-
 .../internal/cli/commands/RegionCommands.java   |   17 +-
 .../internal/cli/commands/ShellCommands.java    |   61 +-
 .../internal/cli/commands/StatusCommands.java   |   24 +-
 .../internal/cli/commands/WanCommands.java      |  336 +-
 .../cli/domain/RegionAttributesInfo.java        |   21 +-
 .../functions/DescribeHDFSStoreFunction.java    |   86 -
 .../cli/functions/ShutDownFunction.java         |   52 +-
 .../internal/cli/remote/CommandProcessor.java   |   24 +-
 .../internal/cli/result/ErrorResultData.java    |   10 +-
 .../internal/cli/result/ResultBuilder.java      |    7 +-
 .../management/internal/cli/shell/Gfsh.java     |   41 +-
 .../internal/cli/shell/GfshConfig.java          |   11 +
 .../internal/cli/shell/JmxOperationInvoker.java |   70 +-
 .../internal/cli/shell/jline/GfshHistory.java   |   12 +-
 .../cli/util/HDFSStoreNotFoundException.java    |   47 -
 .../cli/util/RegionAttributesNames.java         |    4 +-
 .../configuration/domain/CacheElement.java      |    4 +-
 .../configuration/domain/XmlEntity.java         |    7 +-
 .../internal/configuration/utils/XmlUtils.java  |    6 +-
 .../internal/security/AccessControl.java        |   51 -
 .../internal/security/AccessControlContext.java |   37 -
 .../internal/security/AccessControlMBean.java   |   41 +
 .../internal/security/AccessControlMXBean.java  |    6 +-
 .../internal/security/CLIOperationContext.java  |  138 -
 .../internal/security/JMXOperationContext.java  |  177 -
 .../internal/security/JSONAuthorization.java    |  308 --
 .../internal/security/MBeanServerWrapper.java   |  168 +-
 .../security/ManagementInterceptor.java         |  271 --
 .../management/internal/security/Resource.java  |   26 -
 .../internal/security/ResourceConstants.java    |   91 +-
 .../internal/security/ResourceOperation.java    |   13 +-
 .../security/ResourceOperationContext.java      |  221 +-
 .../controllers/AbstractCommandsController.java |   82 +-
 .../controllers/ConfigCommandsController.java   |   20 +-
 .../web/controllers/DataCommandsController.java |   26 +-
 .../DiskStoreCommandsController.java            |   14 +-
 .../controllers/FunctionCommandsController.java |    9 +-
 .../MiscellaneousCommandsController.java        |    8 +-
 .../web/controllers/WanCommandsController.java  |    2 +-
 .../EnvironmentVariablesHandlerInterceptor.java |   92 -
 .../support/LoginHandlerInterceptor.java        |  122 +
 .../support/MemberMXBeanAdapter.java            |    5 -
 .../web/http/support/SimpleHttpRequester.java   |  105 +-
 .../web/shell/AbstractHttpOperationInvoker.java |   28 +-
 .../web/shell/RestHttpOperationInvoker.java     |   26 +-
 .../web/shell/SimpleHttpOperationInvoker.java   |   11 +-
 .../gemfire/pdx/internal/PdxReaderImpl.java     |    3 -
 .../gemfire/security/AccessControl.java         |   16 +-
 .../gemfire/security/Authenticator.java         |   18 +-
 .../geode.apache.org/schema/cache/cache-1.0.xsd | 1438 +++++++
 .../gemfire/cache/cache-9.0.xsd                 | 1519 -------
 .../gemfire/cache/doc-files/cache8_0.dtd        |    4 +-
 .../gemfire/SystemFailureJUnitTest.java         |    1 +
 .../com/gemstone/gemfire/TXExpiryJUnitTest.java |    6 +-
 .../java/com/gemstone/gemfire/TXJUnitTest.java  |   38 +-
 .../cache/AttributesFactoryJUnitTest.java       |   25 +-
 .../gemfire/cache/Bug36619JUnitTest.java        |   77 -
 .../gemfire/cache/Bug52289JUnitTest.java        |   88 -
 .../gemfire/cache/ConnectionPoolDUnitTest.java  |   42 +-
 ...alStaticArrayShouldNotCauseSegFaultTest.java |   86 +
 ...MembershipAttributesAreSerializableTest.java |   74 +
 .../gemfire/cache/OperationJUnitTest.java       |   96 +-
 .../gemfire/cache/RoleExceptionJUnitTest.java   |   26 +-
 .../internal/AutoConnectionSourceDUnitTest.java |    6 +-
 .../internal/OpExecutorImplJUnitTest.java       |  175 +-
 .../internal/ServerBlackListJUnitTest.java      |   25 +-
 .../locator/LocatorStatusResponseJUnitTest.java |    1 -
 .../pooling/ConnectionManagerJUnitTest.java     |   16 +-
 .../cache/execute/FunctionAdapterJUnitTest.java |   65 +
 .../SignalledFlushObserverJUnitTest.java        |   97 -
 .../SortedListForAsyncQueueJUnitTest.java       |  564 ---
 .../management/MemoryThresholdsDUnitTest.java   |    4 +
 .../MemoryThresholdsOffHeapDUnitTest.java       |   59 +-
 .../management/ResourceManagerDUnitTest.java    |   18 +-
 .../PutOperationContextJUnitTest.java           |   34 +-
 .../GetOperationContextImplJUnitTest.java       |   38 +-
 .../PartitionRegionHelperDUnitTest.java         |    2 +-
 .../gemfire/cache/query/CacheUtils.java         |    2 +-
 .../gemfire/cache/query/QueryTestUtils.java     |  238 +-
 .../cache/query/QueryTestUtilsJUnitTest.java    |    1 +
 .../com/gemstone/gemfire/cache/query/Utils.java |   38 +
 .../query/dunit/CompactRangeIndexDUnitTest.java |    1 +
 .../cache/query/dunit/HashIndexDUnitTest.java   |    1 +
 .../query/dunit/PdxStringQueryDUnitTest.java    |  148 +-
 .../dunit/QueryDataInconsistencyDUnitTest.java  |   14 +-
 .../QueryUsingFunctionContextDUnitTest.java     |   19 +-
 .../query/dunit/QueryUsingPoolDUnitTest.java    | 2714 ++++++-------
 .../cache/query/dunit/RemoteQueryDUnitTest.java |    7 +-
 .../query/dunit/SelectStarQueryDUnitTest.java   |  216 +-
 .../query/functional/CountStarJUnitTest.java    |   18 +-
 .../IUMRMultiIndexesMultiRegionJUnitTest.java   |   12 +-
 .../IndexMaintenanceAsynchJUnitTest.java        |    2 +-
 .../functional/JavaSerializationJUnitTest.java  |   17 +-
 .../query/functional/LimitClauseJUnitTest.java  |    8 +-
 .../cache/query/functional/MiscJUnitTest.java   |   32 +-
 .../MultiRegionIndexUsageJUnitTest.java         |   32 +-
 .../NonDistinctOrderByReplicatedJUnitTest.java  |    4 +-
 .../NonDistinctOrderByTestImplementation.java   |   16 +-
 .../functional/OrderByReplicatedJUnitTest.java  |    4 +-
 .../functional/OrderByTestImplementation.java   |   16 +-
 .../query/functional/PdxOrderByJUnitTest.java   |    2 +-
 .../QueryREUpdateInProgressJUnitTest.java       |   15 +-
 .../CompiledAggregateFunctionJUnitTest.java     |   28 +-
 .../query/internal/CompiledInJUnitTest.java     |   72 +-
 .../internal/NWayMergeResultsJUnitTest.java     |   37 +-
 ...ueryFromClauseCanonicalizationJUnitTest.java |    6 +-
 .../QueryObjectSerializationJUnitTest.java      |   46 +-
 .../query/internal/ResultsBagJUnitTest.java     |   52 +-
 .../ResultsBagLimitBehaviourJUnitTest.java      |   38 +-
 .../ResultsCollectionWrapperLimitJUnitTest.java |   29 +-
 .../SelectResultsComparatorJUnitTest.java       |   24 +-
 .../StructBagLimitBehaviourJUnitTest.java       |   23 +-
 .../query/internal/StructSetJUnitTest.java      |   15 +-
 .../internal/aggregate/AggregatorJUnitTest.java |   23 +-
 .../index/AsynchIndexMaintenanceJUnitTest.java  |    8 +-
 .../index/CompactRangeIndexJUnitTest.java       |    1 +
 ...rrentIndexInitOnOverflowRegionDUnitTest.java |   27 +-
 ...ndexOperationsOnOverflowRegionDUnitTest.java |   97 +-
 ...pdateWithInplaceObjectModFalseDUnitTest.java |   55 +-
 ...ConcurrentIndexUpdateWithoutWLDUnitTest.java |   48 +-
 .../internal/index/HashIndexSetJUnitTest.java   |  192 +-
 .../internal/index/IndexElemArrayJUnitTest.java |   24 +-
 .../index/IndexMaintenanceJUnitTest.java        |   16 +-
 .../index/IndexStatisticsJUnitTest.java         |   12 +-
 ...itializeIndexEntryDestroyQueryDUnitTest.java |  110 +-
 .../index/MemoryIndexStoreJUnitTest.java        |  698 ++--
 ...exStoreWithInplaceModificationJUnitTest.java |   45 +-
 .../PRBasicIndexCreationDUnitTest.java          |  315 +-
 .../PRBasicIndexCreationDeadlockDUnitTest.java  |   42 +-
 .../PRBasicMultiIndexCreationDUnitTest.java     |  276 +-
 .../partitioned/PRBasicQueryDUnitTest.java      |   36 +-
 .../PRBasicRemoveIndexDUnitTest.java            |   37 +-
 .../PRColocatedEquiJoinDUnitTest.java           |  106 +-
 .../partitioned/PRInvalidQueryDUnitTest.java    |   26 +-
 .../partitioned/PRQueryCacheCloseDUnitTest.java |   52 +-
 .../query/partitioned/PRQueryDUnitHelper.java   |  786 +---
 .../query/partitioned/PRQueryDUnitTest.java     |   89 +-
 .../query/partitioned/PRQueryPerfDUnitTest.java |  504 ---
 .../PRQueryRegionCloseDUnitTest.java            |   28 +-
 .../PRQueryRegionDestroyedDUnitTest.java        |   36 +-
 .../PRQueryRemoteNodeExceptionDUnitTest.java    |   48 +-
 .../internal/ConnectionCountProbeJUnitTest.java |   22 +-
 .../cache/util/PasswordUtilJUnitTest.java       |   11 +-
 .../gemfire/cache30/Bug38741DUnitTest.java      |    2 +-
 .../gemfire/cache30/Bug44418JUnitTest.java      |  142 +-
 .../gemfire/cache30/CacheLoaderTestCase.java    |   14 +-
 .../gemfire/cache30/CacheLogRollDUnitTest.java  |   13 +-
 .../gemfire/cache30/CacheMapTxnDUnitTest.java   |    2 +-
 .../cache30/CacheStatisticsDUnitTest.java       |    4 +-
 .../gemfire/cache30/CacheXml41DUnitTest.java    |   10 +-
 .../gemfire/cache30/CacheXml57DUnitTest.java    |    2 +-
 .../gemfire/cache30/CacheXml58DUnitTest.java    |    6 +-
 .../gemfire/cache30/CacheXml65DUnitTest.java    |    2 +-
 .../gemfire/cache30/CacheXml90DUnitTest.java    |  234 --
 .../cache30/CacheXmlGeode10DUnitTest.java       |  234 ++
 .../cache30/ClientMembershipDUnitTest.java      | 1018 +++--
 ...iskDistributedNoAckAsyncRegionDUnitTest.java |    4 -
 .../DiskDistributedNoAckRegionTestCase.java     |    7 +-
 .../gemfire/cache30/DiskRegionDUnitTest.java    |    2 +-
 .../cache30/DistAckMapMethodsDUnitTest.java     |    2 +-
 ...tributedAckPersistentRegionCCEDUnitTest.java |  108 +-
 .../DistributedAckRegionCCEDUnitTest.java       |   76 +-
 .../cache30/DistributedAckRegionDUnitTest.java  |    2 -
 .../DistributedNoAckRegionCCEDUnitTest.java     |   76 +-
 .../DistributedNoAckRegionDUnitTest.java        |    3 +-
 .../gemfire/cache30/MultiVMRegionTestCase.java  |  110 +-
 .../cache30/PartitionedRegionDUnitTest.java     |    6 +-
 .../gemfire/cache30/PutAllMultiVmDUnitTest.java |    4 +-
 .../gemfire/cache30/QueueMsgDUnitTest.java      |    2 +-
 .../gemfire/cache30/ReconnectDUnitTest.java     |  242 +-
 .../RegionMembershipListenerDUnitTest.java      |    6 +-
 .../cache30/RegionReliabilityTestCase.java      |    4 +
 .../gemfire/cache30/RegionTestCase.java         |   15 +-
 .../gemfire/cache30/SlowRecDUnitTest.java       |    4 +-
 .../gemfire/cache30/TXDistributedDUnitTest.java |    5 +-
 .../AbstractLauncherIntegrationJUnitTest.java   |   71 -
 .../AbstractLauncherIntegrationTest.java        |   71 +
 .../AbstractLauncherIntegrationTestCase.java    |  254 ++
 .../distributed/AbstractLauncherJUnitTest.java  |  298 --
 .../AbstractLauncherJUnitTestCase.java          |  254 --
 .../AbstractLauncherServiceStatusJUnitTest.java |  264 --
 .../AbstractLauncherServiceStatusTest.java      |  259 ++
 .../distributed/AbstractLauncherTest.java       |  298 ++
 ...tractLocatorLauncherIntegrationTestCase.java |  117 +
 .../AbstractLocatorLauncherJUnitTestCase.java   |  105 -
 ...ocatorLauncherRemoteIntegrationTestCase.java |   67 +
 ...stractServerLauncherIntegrationTestCase.java |   95 +
 .../AbstractServerLauncherJUnitTestCase.java    |   93 -
 ...ServerLauncherRemoteIntegrationTestCase.java |   95 +
 .../distributed/DistributedLockBlackboard.java  |   37 +
 .../DistributedLockBlackboardImpl.java          |   97 +
 .../DistributedLockServiceDUnitTest.java        | 3246 +++++++++++++++
 .../distributed/DistributedSystemDUnitTest.java |   20 +-
 .../distributed/DistributedTestSuite.java       |   35 -
 .../distributed/HostedLocatorsDUnitTest.java    |   30 +-
 .../LauncherMemberMXBeanIntegrationTest.java    |  151 +
 .../LauncherMemberMXBeanJUnitTest.java          |  152 -
 .../gemfire/distributed/LauncherTestSuite.java  |   47 -
 .../gemfire/distributed/LocatorDUnitTest.java   |  606 ++-
 .../gemfire/distributed/LocatorJUnitTest.java   |   67 +-
 .../LocatorLauncherIntegrationJUnitTest.java    |  248 --
 .../LocatorLauncherIntegrationTest.java         |  248 ++
 .../distributed/LocatorLauncherJUnitTest.java   |  341 --
 ...LocatorLauncherLocalFileIntegrationTest.java |   54 +
 .../LocatorLauncherLocalFileJUnitTest.java      |   51 -
 .../LocatorLauncherLocalIntegrationTest.java    |  827 ++++
 .../LocatorLauncherLocalJUnitTest.java          |  842 ----
 ...ocatorLauncherRemoteFileIntegrationTest.java |  218 +
 .../LocatorLauncherRemoteFileJUnitTest.java     |  218 -
 .../LocatorLauncherRemoteIntegrationTest.java   |  977 +++++
 .../LocatorLauncherRemoteJUnitTest.java         | 1004 -----
 ...rRemoteWithCustomLoggingIntegrationTest.java |  124 +
 .../distributed/LocatorLauncherTest.java        |  340 ++
 .../distributed/LocatorStateJUnitTest.java      |  208 -
 .../gemfire/distributed/LocatorStateTest.java   |  222 ++
 .../MockServerLauncherCacheProvider.java        |    8 +-
 .../ServerLauncherIntegrationJUnitTest.java     |  312 --
 .../ServerLauncherIntegrationTest.java          |  311 ++
 .../distributed/ServerLauncherJUnitTest.java    |  829 ----
 .../ServerLauncherLocalFileIntegrationTest.java |   54 +
 .../ServerLauncherLocalFileJUnitTest.java       |   54 -
 .../ServerLauncherLocalIntegrationTest.java     | 1073 +++++
 .../ServerLauncherLocalJUnitTest.java           | 1073 -----
 ...ServerLauncherRemoteFileIntegrationTest.java |  222 ++
 .../ServerLauncherRemoteFileJUnitTest.java      |  222 --
 .../ServerLauncherRemoteIntegrationTest.java    | 1380 +++++++
 .../ServerLauncherRemoteJUnitTest.java          | 1425 -------
 ...rRemoteWithCustomLoggingIntegrationTest.java |  122 +
 .../gemfire/distributed/ServerLauncherTest.java |  894 +++++
 ...rverLauncherWithProviderIntegrationTest.java |   89 +
 .../ServerLauncherWithProviderJUnitTest.java    |   90 -
 .../AtomicLongWithTerminalStateJUnitTest.java   |   13 +-
 .../internal/DistributionConfigJUnitTest.java   |  126 +-
 .../InternalDistributedSystemJUnitTest.java     |    6 +-
 .../LocatorLoadSnapshotIntegrationTest.java     |  122 +
 .../internal/LocatorLoadSnapshotJUnitTest.java  |  102 +-
 .../internal/ProductUseLogJUnitTest.java        |  105 +-
 .../internal/ServerLocatorJUnitTest.java        |   21 +-
 .../internal/SharedConfigurationJUnitTest.java  |    3 +-
 .../internal/StartupMessageDataJUnitTest.java   |   34 +-
 .../DeadlockDetectorIntegrationTest.java        |  299 ++
 .../deadlock/DeadlockDetectorJUnitTest.java     |  331 --
 .../internal/deadlock/DeadlockDetectorTest.java |  140 +
 .../deadlock/DependencyGraphJUnitTest.java      |   24 +-
 .../GemFireDeadlockDetectorDUnitTest.java       |   12 +-
 .../deadlock/UnsafeThreadLocalJUnitTest.java    |   47 +-
 .../internal/membership/NetViewJUnitTest.java   |   51 +-
 .../membership/gms/GMSMemberJUnitTest.java      |   51 +-
 .../gms/auth/GMSAuthenticatorJUnitTest.java     |  123 +-
 .../locator/GMSLocatorRecoveryJUnitTest.java    |   34 +-
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |    7 +-
 .../gms/membership/GMSJoinLeaveTestHelper.java  |    7 +-
 .../gms/membership/StatRecorderJUnitTest.java   |   60 +-
 .../messenger/GMSQuorumCheckerJUnitTest.java    |  172 +-
 .../gms/mgr/GMSMembershipManagerJUnitTest.java  |   71 +-
 .../TcpServerBackwardCompatDUnitTest.java       |    8 +-
 .../internal/tcpserver/TcpServerJUnitTest.java  |    6 +-
 .../disttx/DistTXDebugDUnitDisabledTest.java    | 1016 -----
 .../gemfire/disttx/DistTXDebugDUnitTest.java    | 1030 +++++
 .../gemfire/disttx/DistTXExpiryJUnitTest.java   |    1 -
 .../disttx/DistTXPersistentDebugDUnitTest.java  |   15 +-
 .../internal/AbstractConfigJUnitTest.java       |  125 +-
 .../gemfire/internal/ArrayEqualsJUnitTest.java  |  193 -
 .../internal/AvailablePortJUnitTest.java        |   12 +-
 .../gemstone/gemfire/internal/ClassBuilder.java |   15 +-
 .../ClassPathLoaderIntegrationTest.java         |  503 +++
 .../internal/ClassPathLoaderJUnitTest.java      | 1261 ------
 .../gemfire/internal/ClassPathLoaderTest.java   |  890 +++++
 .../gemfire/internal/ConfigSourceJUnitTest.java |    9 +-
 .../internal/CopyOnWriteHashSetJUnitTest.java   |   17 +-
 .../internal/DataSerializableJUnitTest.java     |  772 ++--
 .../gemfire/internal/FileUtilJUnitTest.java     |    7 +-
 .../internal/GemFireVersionJUnitTest.java       |   16 +-
 .../internal/HeapDataOutputStreamJUnitTest.java |   17 +-
 .../gemfire/internal/JSSESocketJUnitTest.java   |   11 +-
 .../internal/JarClassLoaderJUnitTest.java       |   17 +
 .../gemfire/internal/LineWrapUnitJUnitTest.java |   13 +-
 .../gemfire/internal/NanoTimerJUnitTest.java    |   31 +-
 .../gemfire/internal/ObjIdMapJUnitTest.java     |   29 +-
 .../internal/OneTaskOnlyDecoratorJUnitTest.java |   22 +-
 .../PutAllOperationContextJUnitTest.java        |   14 +-
 ...lityShouldUseArrayEqualsIntegrationTest.java |  194 +
 ...hreadPoolExecutorWithKeepAliveJUnitTest.java |   19 +-
 .../gemfire/internal/SocketCloserJUnitTest.java |    6 +-
 .../internal/SocketCloserWithWaitJUnitTest.java |    1 +
 .../gemfire/internal/StatSamplerJUnitTest.java  |   69 +-
 .../internal/UniqueIdGeneratorJUnitTest.java    |   18 +-
 .../AbstractDistributedRegionJUnitTest.java     |    8 +-
 .../internal/cache/AbstractRegionJUnitTest.java |    2 -
 .../internal/cache/AbstractRegionMapTest.java   |   23 +-
 .../internal/cache/BucketRegionJUnitTest.java   |   32 +-
 .../cache/ClientServerTransactionDUnitTest.java |    2 -
 .../gemfire/internal/cache/CommitFunction.java  |  142 +
 .../internal/cache/DeltaFaultInDUnitTest.java   |    2 +-
 .../internal/cache/DeltaSizingDUnitTest.java    |    2 +-
 .../gemfire/internal/cache/DiskIdJUnitTest.java |   51 +-
 .../internal/cache/DiskInitFileJUnitTest.java   |   35 +-
 .../cache/DiskWriteAttributesJUnitTest.java     |   99 +-
 .../cache/DistributedRegionJUnitTest.java       |   29 +-
 .../internal/cache/EntryEventImplTest.java      |   78 +
 .../cache/EnumListenerEventJUnitTest.java       |   22 +-
 .../cache/FixedPRSinglehopDUnitTest.java        |   20 +
 .../internal/cache/GIIDeltaDUnitTest.java       |    9 +-
 .../cache/NestedTransactionFunction.java        |  116 +
 .../cache/NetSearchMessagingDUnitTest.java      |   12 +-
 .../cache/OffHeapValueWrapperJUnitTest.java     |    9 +-
 .../gemfire/internal/cache/OldVLJUnitTest.java  |   19 +-
 .../cache/OldValueImporterTestBase.java         |   17 +-
 .../cache/OplogEntryIdMapJUnitTest.java         |   12 +-
 .../cache/OplogEntryIdSetJUnitTest.java         |   12 +-
 .../gemfire/internal/cache/OplogJUnitTest.java  |   53 +-
 .../internal/cache/OplogRVVJUnitTest.java       |   32 +-
 .../cache/OrderedTombstoneMapJUnitTest.java     |   10 +-
 .../cache/PartitionAttributesImplJUnitTest.java |   11 +-
 .../PartitionedRegionCacheCloseDUnitTest.java   |    2 +-
 .../PartitionedRegionCreationDUnitTest.java     |   17 +-
 .../cache/PartitionedRegionDUnitTestCase.java   |    2 +-
 ...rtitionedRegionDelayedRecoveryDUnitTest.java |   13 +-
 .../PartitionedRegionDestroyDUnitTest.java      |    2 +-
 .../PartitionedRegionEvictionDUnitTest.java     |    4 +-
 .../cache/PartitionedRegionHelperJUnitTest.java |   15 +-
 .../PartitionedRegionQueryEvaluatorTest.java    |   69 +-
 ...artitionedRegionRedundancyZoneDUnitTest.java |    6 +-
 .../PartitionedRegionSingleHopDUnitTest.java    |    7 +-
 ...onedRegionSingleNodeOperationsJUnitTest.java |   12 +-
 .../cache/PartitionedRegionStatsJUnitTest.java  |   22 +-
 .../PartitionedRegionTestUtilsDUnitTest.java    |   12 +-
 .../cache/RemoteTransactionDUnitTest.java       |   22 +-
 .../internal/cache/RollbackFunction.java        |  137 +
 .../cache/SearchLoadAndWriteProcessorTest.java  |   67 +
 .../cache/SimpleDiskRegionJUnitTest.java        |    6 +-
 .../internal/cache/SingleHopStatsDUnitTest.java |  451 +--
 .../internal/cache/UpdateVersionJUnitTest.java  |    4 +-
 .../gemfire/internal/cache/VLJUnitTest.java     |   35 +-
 .../cache/control/FilterByPathJUnitTest.java    |   24 +-
 .../control/MemoryThresholdsJUnitTest.java      |    7 +-
 .../control/RebalanceOperationDUnitTest.java    |   28 +-
 ...ributedRegionFunctionExecutionDUnitTest.java |   11 +-
 .../cache/execute/FunctionServiceBase.java      |  287 ++
 .../FunctionServiceLocalPRDUnitTest.java        |   54 +
 .../FunctionServiceLocalRRDUnitTest.java        |   52 +
 ...unctionServiceMultipleOnMemberDUnitTest.java |   57 +
 .../FunctionServicePeerAccessorPRDUnitTest.java |   73 +
 .../FunctionServicePeerAccessorRRDUnitTest.java |   63 +
 .../FunctionServiceSingleOnMemberDUnitTest.java |   49 +
 ...onFunctionExecutionNoSingleHopDUnitTest.java |    9 +-
 ...onExecutionSelectorNoSingleHopDUnitTest.java |    2 +-
 ...gionFunctionExecutionSingleHopDUnitTest.java |    2 +-
 .../execute/PRCustomPartitioningDUnitTest.java  |    2 +-
 .../execute/PRFunctionExecutionDUnitTest.java   |   12 +-
 .../PRFunctionExecutionTimeOutDUnitTest.java    |   17 +-
 .../execute/PRPerformanceTestDUnitTest.java     |    2 +-
 .../SimpleExtensionPointJUnitTest.java          |    7 +-
 .../extension/mock/MockExtensionCommands.java   |   23 +-
 .../internal/cache/ha/Bug48571DUnitTest.java    |   38 +-
 .../cache/ha/EventIdOptimizationDUnitTest.java  |    5 +-
 .../cache/ha/EventIdOptimizationJUnitTest.java  |  129 +-
 .../internal/cache/ha/HAGIIDUnitTest.java       |   12 +-
 .../cache/ha/HARQAddOperationJUnitTest.java     |    2 +-
 .../cache/ha/HARegionQueueDUnitTest.java        |   16 +-
 .../cache/ha/ThreadIdentifierJUnitTest.java     |   12 +-
 .../cache/locks/TXLockServiceDUnitTest.java     |    2 +-
 .../FetchEntriesMessageJUnitTest.java           |   13 +-
 .../OfflineMembersDetailsJUnitTest.java         |   11 +-
 .../PartitionedRegionLoadModelJUnitTest.java    |  121 +-
 ...tentColocatedPartitionedRegionDUnitTest.java |   16 +-
 .../PersistentPartitionedRegionDUnitTest.java   |   15 +-
 ...tentPartitionedRegionOldConfigDUnitTest.java |    6 +-
 .../cache/partitioned/ShutdownAllDUnitTest.java |   10 +-
 .../fixed/FixedPartitioningDUnitTest.java       |   12 +-
 .../persistence/BackupInspectorJUnitTest.java   |   52 +-
 .../PersistentRecoveryOrderDUnitTest.java       |    6 +-
 .../TemporaryResultSetFactoryJUnitTest.java     |   44 +-
 .../RegionEntryFactoryBuilderJUnitTest.java     |   11 +-
 .../cache/tier/sockets/Bug37805DUnitTest.java   |    2 +-
 .../CacheServerTransactionsDUnitTest.java       |    8 +-
 .../sockets/ClientHealthMonitorJUnitTest.java   |    8 +-
 .../ClientServerForceInvalidateDUnitTest.java   |  414 ++
 .../tier/sockets/ClientServerMiscDUnitTest.java |   22 +-
 .../cache/tier/sockets/ConflationDUnitTest.java |    4 +-
 .../DestroyEntryPropagationDUnitTest.java       |   19 +-
 .../DurableClientReconnectDUnitTest.java        |    2 +-
 .../tier/sockets/FilterProfileJUnitTest.java    |   20 +-
 .../tier/sockets/HAInterestPart2DUnitTest.java  |    2 +
 .../sockets/HAStartupAndFailoverDUnitTest.java  |   25 +-
 .../sockets/InterestListFailoverDUnitTest.java  |    2 +-
 .../cache/tier/sockets/MessageJUnitTest.java    |   20 +-
 .../tier/sockets/ObjectPartListJUnitTest.java   |   27 +-
 .../sockets/RedundancyLevelPart1DUnitTest.java  |   88 +-
 .../sockets/RedundancyLevelPart2DUnitTest.java  |   96 +-
 .../tier/sockets/RedundancyLevelTestBase.java   |    4 +-
 .../sockets/ReliableMessagingDUnitTest.java     |   12 +-
 .../sockets/UpdatePropagationDUnitTest.java     |   17 +-
 .../tier/sockets/command/CommitCommandTest.java |   12 +-
 .../cache/tx/AbstractPeerTXRegionStubTest.java  |  164 +
 .../cache/versions/RVVExceptionJUnitTest.java   |   14 +-
 .../versions/RegionVersionHolder2JUnitTest.java |    5 +-
 .../versions/RegionVersionHolderJUnitTest.java  |   52 +-
 .../RegionVersionHolderRandomJUnitTest.java     |   47 +-
 ...RegionVersionHolderSmallBitSetJUnitTest.java |   15 +-
 .../versions/RegionVersionVectorJUnitTest.java  |   39 +-
 .../cache/wan/AsyncEventQueueTestBase.java      |   40 -
 .../asyncqueue/AsyncEventListenerDUnitTest.java | 1115 +++---
 .../AsyncEventListenerOffHeapDUnitTest.java     |    4 +-
 .../AsyncEventQueueStatsDUnitTest.java          |  186 +-
 .../ConcurrentAsyncEventQueueDUnitTest.java     |  168 +-
 .../CommonParallelAsyncEventQueueDUnitTest.java |    8 +-
 .../ParallelGatewaySenderQueueJUnitTest.java    |   10 +-
 ...ialGatewaySenderEventProcessorJUnitTest.java |   16 +-
 .../xmlcache/AbstractEntityResolverTest.java    |  128 +
 .../xmlcache/AbstractXmlParserJUnitTest.java    |    3 +-
 .../cache/xmlcache/CacheCreationJUnitTest.java  |    9 +-
 .../cache/xmlcache/CacheXmlParserJUnitTest.java |    4 +-
 .../xmlcache/CacheXmlVersionJUnitTest.java      |   31 +-
 .../xmlcache/GeodeEntityResolverJUnitTest.java  |   51 +
 .../PivotalEntityResolverJUnitTest.java         |  119 +-
 .../cache/xmlcache/RegionCreationJUnitTest.java |    3 -
 .../xmlcache/XmlGeneratorUtilsJUnitTest.java    |   29 +-
 .../compression/SnappyCompressorJUnitTest.java  |   28 +-
 .../internal/i18n/BasicI18nJUnitTest.java       |  331 +-
 .../io/CompositeOutputStreamJUnitTest.java      |    2 +-
 .../gemfire/internal/jndi/ContextJUnitTest.java |  305 +-
 .../internal/lang/ObjectUtilsJUnitTest.java     |    2 +-
 .../internal/lang/ThreadUtilsJUnitTest.java     |   14 +-
 .../internal/lang/ThrowableUtilsTest.java       |  242 ++
 .../internal/logging/LogServiceJUnitTest.java   |   16 +-
 .../internal/logging/SortLogFileJUnitTest.java  |   10 +-
 .../logging/log4j/AlertAppenderJUnitTest.java   |    6 +-
 .../logging/log4j/ConfigLocatorJUnitTest.java   |    4 +-
 .../logging/log4j/FastLoggerJUnitTest.java      |    4 +-
 .../log4j/LocalizedMessageJUnitTest.java        |    6 +-
 .../log4j/LogWriterAppenderJUnitTest.java       |    1 -
 .../logging/log4j/custom/BasicAppender.java     |   76 +
 .../CustomConfigWithCacheIntegrationTest.java   |  148 +
 ...stomConfigWithLogServiceIntegrationTest.java |  119 +
 .../log4j/custom/CustomConfiguration.java       |   64 +
 .../offheap/AbstractStoredObjectTestBase.java   |  256 +-
 .../internal/offheap/DataTypeJUnitTest.java     |  142 +-
 ...tingOutOfOffHeapMemoryListenerJUnitTest.java |    8 +-
 .../internal/offheap/FragmentJUnitTest.java     |   29 +-
 .../internal/offheap/FreeListManagerTest.java   |   34 +-
 .../offheap/LifecycleListenerJUnitTest.java     |   96 +-
 .../MemoryAllocatorFillPatternJUnitTest.java    |    4 +-
 .../offheap/MemoryAllocatorJUnitTest.java       |   16 +-
 .../offheap/MemoryBlockNodeJUnitTest.java       |   38 +-
 .../offheap/MemoryInspectorImplJUnitTest.java   |   18 +-
 .../offheap/OffHeapHelperJUnitTest.java         |   17 +-
 .../internal/offheap/OffHeapRegionBase.java     |   64 +
 .../OffHeapRegionEntryHelperJUnitTest.java      |    9 +-
 .../offheap/OffHeapStorageJUnitTest.java        |   82 +-
 ...ffHeapStoredObjectAddressStackJUnitTest.java |   24 -
 .../offheap/OffHeapStoredObjectJUnitTest.java   |   18 +-
 .../OffHeapStoredObjectSliceJUnitTest.java      |    4 +-
 ...ffHeapStoredObjectWithHeapFormJUnitTest.java |    7 +-
 .../OffHeapWriteObjectAsByteArrayJUnitTest.java |    6 -
 .../offheap/RefCountChangeInfoJUnitTest.java    |   14 +-
 .../offheap/ReferenceCountHelperImplTest.java   |  974 +++++
 .../offheap/ReferenceCountHelperJUnitTest.java  |  208 +
 .../offheap/TinyMemoryBlockJUnitTest.java       |   33 +-
 .../offheap/TinyStoredObjectJUnitTest.java      |  502 ++-
 .../BlockingProcessStreamReaderJUnitTest.java   |   16 -
 ...leProcessControllerIntegrationJUnitTest.java |   13 +-
 .../LocalProcessControllerJUnitTest.java        |   36 +-
 .../process/LocalProcessLauncherDUnitTest.java  |    4 -
 .../process/LocalProcessLauncherJUnitTest.java  |   36 +-
 ...NonBlockingProcessStreamReaderJUnitTest.java |   24 -
 .../internal/process/PidFileJUnitTest.java      |    4 +-
 ...tractSignalNotificationHandlerJUnitTest.java |   10 +-
 .../internal/size/ObjectSizerJUnitTest.java     |   21 +-
 .../internal/size/ObjectTraverserJUnitTest.java |   53 +-
 .../size/ReflectionObjectSizerJUnitTest.java    |   68 +
 .../size/SizeClassOnceObjectSizerJUnitTest.java |   15 +-
 .../size/WellKnownClassSizerJUnitTest.java      |   18 +-
 .../statistics/SampleCollectorJUnitTest.java    |   54 +-
 .../statistics/StatMonitorHandlerJUnitTest.java |   42 +-
 .../statistics/StatisticsMonitorJUnitTest.java  |   51 +-
 .../internal/tcp/ConnectionJUnitTest.java       |    5 +-
 .../util/AbortableTaskServiceJUnitTest.java     |    1 -
 .../internal/util/ArrayUtilsJUnitTest.java      |    3 +-
 .../gemfire/internal/util/BytesJUnitTest.java   |   35 +-
 .../internal/util/CollectionUtilsJUnitTest.java |    1 -
 .../internal/util/DelayedActionJUnitTest.java   |    9 +-
 .../gemfire/internal/util/IOUtilsJUnitTest.java |    4 +-
 .../CompactConcurrentHashSetJUnitTest.java      |   26 +-
 .../concurrent/ReentrantSemaphoreJUnitTest.java |   98 +-
 .../SemaphoreReadWriteLockJUnitTest.java        |  110 +-
 .../management/DLockManagementDUnitTest.java    |   22 +-
 .../gemfire/management/QueryDataDUnitTest.java  |    6 +-
 ...ersalMembershipListenerAdapterDUnitTest.java |    7 +-
 .../stats/GatewayReceiverStatsJUnitTest.java    |    8 +-
 .../bean/stats/RegionStatsJUnitTest.java        |    2 +-
 .../bean/stats/StatsRateJUnitTest.java          |   59 +-
 .../internal/JettyHelperJUnitTest.java          |   27 +-
 .../beans/DistributedSystemBridgeJUnitTest.java |    3 +-
 .../cli/ClasspathScanLoadHelperJUnitTest.java   |   22 +-
 .../internal/cli/CliUtilDUnitTest.java          |    2 +-
 .../internal/cli/CommandManagerJUnitTest.java   |   57 +-
 .../cli/CommandSeparatorEscapeJUnitTest.java    |   47 +-
 .../internal/cli/DataCommandJsonJUnitTest.java  |   14 +-
 .../internal/cli/GfshParserJUnitTest.java       |  144 +-
 .../management/internal/cli/HeadlessGfsh.java   |   25 +-
 .../cli/HeadlessGfshIntegrationTest.java        |   90 +
 .../internal/cli/HeadlessGfshJUnitTest.java     |   85 -
 .../cli/annotations/CliArgumentJUnitTest.java   |  181 +-
 .../AbstractCommandsSupportJUnitTest.java       |   22 +-
 .../cli/commands/CliCommandTestBase.java        |  212 +-
 .../cli/commands/ConfigCommandsDUnitTest.java   |  394 +-
 .../ConnectCommandWithHttpAndSSLDUnitTest.java  |  305 ++
 ...eateAlterDestroyRegionCommandsDUnitTest.java |  139 +-
 .../cli/commands/DeployCommandsDUnitTest.java   |   80 +-
 .../commands/DiskStoreCommandsDUnitTest.java    |  102 +-
 .../commands/DiskStoreCommandsJUnitTest.java    |   24 +-
 .../cli/commands/FunctionCommandsDUnitTest.java |  193 +-
 .../commands/GemfireDataCommandsDUnitTest.java  |  286 +-
 ...WithCacheLoaderDuringCacheMissDUnitTest.java |  177 +-
 .../HTTPServiceSSLSupportJUnitTest.java         |   14 +-
 .../cli/commands/IndexCommandsDUnitTest.java    |   34 +-
 .../cli/commands/IndexCommandsJUnitTest.java    |   24 +-
 ...stAndDescribeDiskStoreCommandsDUnitTest.java |  126 +-
 .../ListAndDescribeRegionDUnitTest.java         |   58 +-
 .../cli/commands/ListIndexCommandDUnitTest.java |  132 +-
 .../cli/commands/MemberCommandsDUnitTest.java   |   62 +-
 .../MiscellaneousCommandsDUnitTest.java         |  105 +-
 ...laneousCommandsExportLogsPart1DUnitTest.java |   40 +-
 ...laneousCommandsExportLogsPart2DUnitTest.java |   41 +-
 ...laneousCommandsExportLogsPart3DUnitTest.java |   49 +-
 ...laneousCommandsExportLogsPart4DUnitTest.java |   39 +-
 .../cli/commands/QueueCommandsDUnitTest.java    |   43 +-
 .../SharedConfigurationCommandsDUnitTest.java   |  323 +-
 .../cli/commands/ShellCommandsDUnitTest.java    |   94 +-
 .../cli/commands/ShowDeadlockDUnitTest.java     |   56 +-
 .../cli/commands/ShowMetricsDUnitTest.java      |   73 +-
 .../cli/commands/ShowStackTraceDUnitTest.java   |   43 +-
 .../cli/commands/ToUpperResultCollector.java    |   65 +
 .../cli/commands/UserCommandsDUnitTest.java     |   26 +-
 .../RegionPathConverterJUnitTest.java           |   23 +-
 .../DescribeDiskStoreFunctionJUnitTest.java     |   64 +-
 .../ListDiskStoresFunctionJUnitTest.java        |   30 +-
 .../functions/ListIndexFunctionJUnitTest.java   |  112 +-
 .../cli/parser/ParserUtilsJUnitTest.java        |   14 +-
 .../preprocessor/PreprocessorJUnitTest.java     |    7 +-
 .../PreprocessorUtilsJUnitTest.java             |   17 +-
 .../cli/shell/GfshConfigInitFileJUnitTest.java  |   20 +-
 .../shell/GfshExecutionStrategyJUnitTest.java   |   39 +-
 .../cli/shell/GfshHistoryJUnitTest.java         |   35 +-
 .../cli/shell/GfshInitFileJUnitTest.java        |   22 +-
 .../SharedConfigurationDUnitTest.java           |  227 +-
 .../SharedConfigurationTestUtils.java           |   40 +
 .../SharedConfigurationUsingDirDUnitTest.java   |  128 +-
 .../configuration/ZipUtilsJUnitTest.java        |  114 +-
 .../domain/CacheElementJUnitTest.java           |   17 +-
 .../utils/XmlUtilsAddNewNodeJUnitTest.java      |   26 +-
 .../configuration/utils/XmlUtilsJUnitTest.java  |   58 +-
 .../security/AccessControlMBeanJUnitTest.java   |   58 +
 ...rDistributedSystemMXBeanIntegrationTest.java |   50 -
 ...horizeOperationForMBeansIntegrationTest.java |  323 --
 ...erationForRegionCommandsIntegrationTest.java |  136 -
 ...CacheServerMBeanAuthenticationJUnitTest.java |   58 +
 .../CacheServerMBeanAuthorizationJUnitTest.java |   90 +
 .../CacheServerMBeanShiroJUnitTest.java         |   93 +
 .../security/CliCommandsSecurityTest.java       |   83 +
 .../security/DataCommandsSecurityTest.java      |   83 +
 .../DiskStoreMXBeanSecurityJUnitTest.java       |   83 +
 .../security/ExampleJSONAuthorization.java      |  197 +
 .../GatewayReceiverMBeanSecurityTest.java       |   90 +
 .../GatewaySenderMBeanSecurityTest.java         |  105 +
 .../GeodeSecurityUtilCustomRealmJUnitTest.java  |   52 +
 .../GeodeSecurityUtilWithIniFileJUnitTest.java  |  147 +
 .../security/GfshCommandsSecurityTest.java      |  152 +
 .../security/GfshShellConnectionRule.java       |  109 +
 .../security/JMXConnectionConfiguration.java    |   33 +
 .../internal/security/JSONAuthorization.java    |  201 +
 ...JSONAuthorizationDetailsIntegrationTest.java |  163 -
 .../JsonAuthorizationCacheStartRule.java        |   83 +
 .../LockServiceMBeanAuthorizationJUnitTest.java |   90 +
 .../security/MBeanSecurityJUnitTest.java        |  117 +
 .../security/MBeanServerConnectionRule.java     |  130 +
 .../ManagerMBeanAuthorizationJUnitTest.java     |   78 +
 .../security/MemberMBeanSecurityJUnitTest.java  |  110 +
 ...tionCodesForDataCommandsIntegrationTest.java |  101 -
 ...tionCodesForDistributedSystemMXBeanTest.java |   76 -
 .../ResourceOperationContextJUnitTest.java      |   88 +
 .../internal/security/ShiroCacheStartRule.java  |   63 +
 .../internal/security/TestCommand.java          |  227 ++
 .../ReadOpFileAccessControllerJUnitTest.java    |   19 +-
 .../WanCommandsControllerJUnitTest.java         |   11 +-
 .../GemcachedDevelopmentJUnitTest.java          |    2 +
 .../gemfire/pdx/ByteSourceJUnitTest.java        |    8 +-
 .../pdx/DistributedSystemIdDUnitTest.java       |   17 +-
 .../pdx/JSONPdxClientServerDUnitTest.java       |    2 +-
 .../gemfire/pdx/OffHeapByteSourceJUnitTest.java |    4 +-
 .../pdx/PdxDeserializationDUnitTest.java        |   12 +-
 .../gemfire/pdx/PdxSerializableDUnitTest.java   |  106 +
 .../gemfire/redis/RedisDistDUnitTest.java       |    4 +
 .../security/ClientAuthenticationDUnitTest.java |    8 +-
 .../ClientAuthenticationPart2DUnitTest.java     |    6 +-
 .../security/ClientAuthenticationTestCase.java  |    3 +
 .../security/ClientAuthorizationDUnitTest.java  |   23 +-
 .../security/ClientAuthorizationTestCase.java   |   46 +-
 .../security/ClientMultiUserAuthzDUnitTest.java |   10 +-
 .../DeltaClientAuthorizationDUnitTest.java      |   10 +-
 .../DeltaClientPostAuthorizationDUnitTest.java  |   35 +-
 .../security/GemFireSecurityExceptionTest.java  |    6 +-
 .../security/NotAuthorizedExceptionTest.java    |   10 +-
 .../security/P2PAuthenticationDUnitTest.java    |   15 +-
 .../gemfire/security/SecurityTestUtils.java     |   13 +-
 .../generator/AuthzCredentialGenerator.java     |   15 +-
 .../security/generator/CredentialGenerator.java |    3 +-
 .../generator/DummyCredentialGenerator.java     |    6 +-
 .../generator/LdapUserCredentialGenerator.java  |   15 +-
 .../generator/PKCSCredentialGenerator.java      |    8 +-
 .../generator/SSLCredentialGenerator.java       |    9 +-
 .../UserPasswordWithExtraPropsAuthInit.java     |    6 +-
 .../generator/XmlAuthzCredentialGenerator.java  |   10 +-
 .../security/templates/DummyAuthorization.java  |    8 +-
 .../templates/LdapUserAuthenticator.java        |    3 +-
 .../security/templates/PKCSAuthInit.java        |    3 +-
 .../security/templates/PKCSAuthenticator.java   |    3 +-
 .../security/templates/PKCSPrincipalTest.java   |   12 +-
 .../templates/UserPasswordAuthInit.java         |    4 +-
 .../templates/UsernamePrincipalTest.java        |   12 +-
 .../security/templates/XmlAuthorization.java    |   21 +-
 .../security/templates/XmlErrorHandler.java     |    5 +-
 .../com/gemstone/gemfire/test/dunit/Assert.java |    2 +-
 .../gemfire/test/dunit/AsyncInvocation.java     |  511 ++-
 .../gemfire/test/dunit/DistributedTestCase.java |    8 +-
 .../test/dunit/DistributedTestUtils.java        |    2 +-
 .../gemfire/test/dunit/RMIException.java        |    2 +-
 .../test/dunit/SerializableCallable.java        |    2 +-
 .../test/dunit/SerializableRunnable.java        |    2 +-
 .../gemfire/test/dunit/ThreadUtils.java         |   13 +-
 .../com/gemstone/gemfire/test/dunit/VM.java     |  523 ++-
 .../com/gemstone/gemfire/test/dunit/Wait.java   |    2 +-
 .../cache/internal/JUnit4CacheTestCase.java     |    4 +-
 .../internal/JUnit3DistributedTestCase.java     |    9 +-
 .../internal/JUnit4DistributedTestCase.java     |   24 +-
 .../internal/tests/JUnit3BasicDUnitTest.java    |  189 -
 .../JUnit3GetDefaultDiskStoreNameDUnitTest.java |   66 -
 .../tests/JUnit3GetTestMethodNameDUnitTest.java |   53 -
 .../dunit/internal/tests/JUnit3VMDUnitTest.java |  192 -
 .../internal/tests/JUnit4BasicDUnitTest.java    |  202 -
 .../JUnit4GetDefaultDiskStoreNameDUnitTest.java |   65 -
 .../tests/JUnit4GetTestMethodNameDUnitTest.java |   52 -
 .../dunit/internal/tests/JUnit4VMDUnitTest.java |  200 -
 .../DistributedRestoreSystemProperties.java     |    3 +-
 .../gemfire/test/dunit/rules/RemoteInvoker.java |    3 +-
 .../gemfire/test/dunit/standalone/ChildVM.java  |    5 +-
 .../test/dunit/standalone/DUnitLauncher.java    |   15 +-
 .../test/dunit/standalone/ProcessManager.java   |   50 +-
 .../test/dunit/standalone/RemoteDUnitVM.java    |    5 +-
 .../test/dunit/standalone/RemoteDUnitVMIF.java  |    4 +-
 .../test/dunit/tests/BasicDUnitTest.java        |  221 +-
 .../tests/GetDefaultDiskStoreNameDUnitTest.java |    1 -
 .../dunit/tests/GetTestMethodNameDUnitTest.java |    1 -
 .../test/dunit/tests/JUnit4BasicDUnitTest.java  |  234 ++
 .../JUnit4GetDefaultDiskStoreNameDUnitTest.java |   66 +
 .../tests/JUnit4GetTestMethodNameDUnitTest.java |   53 +
 ...ingGetPropertiesDisconnectsAllDUnitTest.java |   60 +
 .../test/dunit/tests/JUnit4VMDUnitTest.java     |  201 +
 ...ingGetPropertiesDisconnectsAllDUnitTest.java |    3 +
 .../test/process/MainLauncherJUnitTest.java     |    9 +-
 .../gemstone/gemfire/util/test/TestUtil.java    |    8 +-
 .../gemfire/codeAnalysis/excludedClasses.txt    |   28 +-
 .../sanctionedDataSerializables.txt             |   92 +-
 .../codeAnalysis/sanctionedSerializables.txt    |   33 +-
 .../logging/log4j/custom/log4j2-custom.xml      |   27 +
 .../domain/CacheElementJUnitTest.xml            |    6 +-
 ...dNewNodeJUnitTest.testAddNewNodeNewNamed.xml |    6 +-
 ...ewNodeJUnitTest.testAddNewNodeNewUnnamed.xml |    6 +-
 ...itTest.testAddNewNodeNewUnnamedExtension.xml |    6 +-
 ...NodeJUnitTest.testAddNewNodeReplaceNamed.xml |    6 +-
 ...deJUnitTest.testAddNewNodeReplaceUnnamed.xml |    6 +-
 ...st.testAddNewNodeReplaceUnnamedExtension.xml |    6 +-
 ...ddNewNodeJUnitTest.testDeleteNodeUnnamed.xml |    6 +-
 .../utils/XmlUtilsAddNewNodeJUnitTest.xml       |    6 +-
 ...Test.testBuildSchemaLocationMapAttribute.xml |    6 +-
 ...testBuildSchemaLocationMapEmptyAttribute.xml |    4 +-
 ...ationMapMapOfStringListOfStringAttribute.xml |    6 +-
 ....testBuildSchemaLocationMapNullAttribute.xml |    4 +-
 ...XmlUtilsJUnitTest.testQuerySingleElement.xml |    6 +-
 .../management/internal/security/auth1.json     |   28 +-
 .../management/internal/security/auth3.json     |   55 +-
 .../internal/security/cacheServer.json          |  188 +
 .../management/internal/security/shiro-ini.json |   87 +
 .../internal/security/testInheritRole.json      |   40 -
 .../security/testSimpleUserAndRole.json         |   14 -
 .../testUserAndRoleRegionServerGroup.json       |   16 -
 .../internal/security/testUserMultipleRole.json |   20 -
 geode-core/src/test/resources/shiro.ini         |   40 +
 .../src/test/resources/ssl/trusted.keystore     |  Bin 1176 -> 1078 bytes
 .../src/test/resources/ssl/untrusted.keystore   |  Bin 1181 -> 1083 bytes
 geode-cq/build.gradle                           |    2 +-
 .../cache/query/internal/cq/CqServiceImpl.java  |    2 +-
 .../cache/query/internal/cq/ServerCQImpl.java   |    7 +-
 .../cache/query/cq/dunit/CqPerfDUnitTest.java   |    5 +-
 .../cq/dunit/CqPerfUsingPoolDUnitTest.java      |    9 +-
 .../cache/query/cq/dunit/CqQueryDUnitTest.java  |    4 +-
 .../cq/dunit/CqQueryUsingPoolDUnitTest.java     |   26 +-
 .../cq/dunit/CqResultSetUsingPoolDUnitTest.java |   24 +-
 .../cache/query/cq/dunit/CqStatsDUnitTest.java  |    2 +-
 .../cq/dunit/CqStatsUsingPoolDUnitTest.java     |    2 +-
 .../PartitionedRegionCqQueryDUnitTest.java      |    2 +-
 .../query/cq/dunit/PrCqUsingPoolDUnitTest.java  |   18 +-
 .../query/dunit/QueryMonitorDUnitTest.java      |    8 +-
 .../internal/cache/PutAllCSDUnitTest.java       |  336 +-
 .../cache/RemoteCQTransactionDUnitTest.java     |   37 +-
 .../internal/cache/ha/CQListGIIDUnitTest.java   |    2 +-
 .../sockets/DurableClientSimpleDUnitTest.java   |  203 +-
 .../tier/sockets/DurableClientTestCase.java     |    9 +-
 .../CacheServerManagementDUnitTest.java         |    2 +-
 .../cli/commands/ClientCommandsDUnitTest.java   | 1796 ++++-----
 .../DurableClientCommandsDUnitTest.java         |   55 +-
 .../ClientAuthorizationTwoDUnitTest.java        |    8 +-
 .../security/ClientAuthzObjectModDUnitTest.java |   48 +-
 .../ClientCQPostAuthorizationDUnitTest.java     |   16 +-
 .../ClientPostAuthorizationDUnitTest.java       |   28 +-
 .../gemfire/security/MultiUserAPIDUnitTest.java |    8 +-
 .../MultiUserDurableCQAuthzDUnitTest.java       |   16 +-
 .../test/junit/categories/FlakyTest.java        |   24 +
 .../test/junit/categories/SecurityTest.java     |   23 +
 .../junit/rules/DescribedExternalResource.java  |   63 +
 .../gemfire/test/junit/rules/RetryRule.java     |    2 +-
 .../test/junit/categories/CategoryOne.java      |   20 +
 .../test/junit/categories/CategoryTest.java     |  169 +
 .../test/junit/categories/CategoryTwo.java      |   20 +
 geode-lucene/build.gradle                       |    6 +-
 .../gemfire/cache/lucene/LuceneIndex.java       |    2 +-
 .../cache/lucene/LuceneServiceProvider.java     |    9 +-
 .../LuceneIndexForPartitionedRegion.java        |  145 +-
 .../LuceneIndexForReplicatedRegion.java         |    2 +-
 .../cache/lucene/internal/LuceneIndexImpl.java  |   14 +-
 .../lucene/internal/LuceneServiceImpl.java      |   23 +-
 .../internal/directory/RegionDirectory.java     |   20 +-
 .../lucene/internal/directory/package-info.java |   23 +
 .../internal/distributed/CollectorManager.java  |    3 +-
 .../internal/distributed/LuceneFunction.java    |   31 +-
 .../distributed/TopEntriesCollectorManager.java |    2 +-
 .../TopEntriesFunctionCollector.java            |    9 +-
 .../internal/distributed/package-info.java      |   25 +
 .../lucene/internal/filesystem/FileSystem.java  |   16 +-
 .../internal/filesystem/package-info.java       |   26 +
 .../cache/lucene/internal/package-info.java     |   23 +
 .../repository/IndexRepositoryImpl.java         |    2 +-
 .../internal/repository/package-info.java       |   25 +
 .../HeterogeneousLuceneSerializer.java          |   82 +
 .../HeterogenousLuceneSerializer.java           |   83 -
 .../repository/serializer/SerializerUtil.java   |   16 +-
 .../repository/serializer/package-info.java     |   23 +
 .../internal/xml/LuceneIndexCreation.java       |   42 +-
 .../internal/xml/LuceneIndexXmlGenerator.java   |    5 +
 .../lucene/internal/xml/LuceneXmlConstants.java |    1 +
 .../lucene/internal/xml/LuceneXmlParser.java    |   27 +-
 .../cache/lucene/internal/xml/package-info.java |   24 +
 .../gemfire/cache/lucene/package-info.java      |   32 +
 .../geode.apache.org/lucene/lucene-1.0.xsd      |   13 +-
 .../gemfire/cache/lucene/LuceneQueriesBase.java |  148 +
 .../lucene/LuceneQueriesIntegrationTest.java    |   88 +
 .../cache/lucene/LuceneQueriesPRBase.java       |   75 +
 .../lucene/LuceneQueriesPeerPRDUnitTest.java    |   36 +
 .../LuceneQueriesPeerPROverflowDUnitTest.java   |   41 +
 .../internal/LuceneEventListenerJUnitTest.java  |    8 +-
 .../LuceneIndexForPartitionedRegionTest.java    |  345 ++
 .../LuceneIndexRecoveryHAIntegrationTest.java   |  211 +
 .../LuceneIndexRecoveryHAJUnitTest.java         |  201 -
 .../LuceneQueryImplIntegrationTest.java         |  123 +
 .../internal/LuceneQueryImplJUnitTest.java      |  123 -
 .../LuceneQueryResultsImplJUnitTest.java        |    4 -
 .../LuceneResultStructImpJUnitTest.java         |    2 -
 .../LuceneServiceImplIntegrationTest.java       |  292 ++
 .../internal/LuceneServiceImplJUnitTest.java    |  226 --
 .../PartitionedRepositoryManagerJUnitTest.java  |   15 +-
 .../internal/StringQueryProviderJUnitTest.java  |    4 +-
 .../directory/RegionDirectoryJUnitTest.java     |    7 +-
 .../DistributedScoringJUnitTest.java            |   29 +-
 .../distributed/EntryScoreJUnitTest.java        |    9 +-
 .../LuceneFunctionContextJUnitTest.java         |    9 +-
 .../distributed/LuceneFunctionJUnitTest.java    |  406 +-
 .../LuceneFunctionReadPathDUnitTest.java        |  239 --
 .../TopEntriesCollectorJUnitTest.java           |   31 +-
 .../TopEntriesFunctionCollectorJUnitTest.java   |    4 +-
 .../distributed/TopEntriesJUnitTest.java        |   18 +-
 .../internal/filesystem/ChunkKeyJUnitTest.java  |    1 -
 .../internal/filesystem/FileJUnitTest.java      |    5 +-
 .../filesystem/FileSystemJUnitTest.java         |   49 +-
 .../IndexRepositoryImplJUnitTest.java           |    6 +-
 .../IndexRepositoryImplPerformanceTest.java     |   10 +-
 .../HeterogeneousLuceneSerializerJUnitTest.java |   86 +
 .../HeterogenousLuceneSerializerJUnitTest.java  |   90 -
 .../serializer/PdxFieldMapperJUnitTest.java     |   36 +-
 .../ReflectionFieldMapperJUnitTest.java         |    8 +-
 ...neIndexXmlGeneratorIntegrationJUnitTest.java |   10 +-
 .../xml/LuceneIndexXmlGeneratorJUnitTest.java   |   29 +-
 ...uceneIndexXmlParserIntegrationJUnitTest.java |   52 +-
 .../xml/LuceneIndexXmlParserJUnitTest.java      |  106 +-
 ...erIntegrationJUnitTest.createIndex.cache.xml |   15 +-
 ...serIntegrationJUnitTest.parseIndex.cache.xml |    8 +-
 ...nJUnitTest.parseIndexWithAnalyzers.cache.xml |   36 +
 geode-pulse/build.gradle                        |    1 +
 .../tools/pulse/internal/PulseAppListener.java  |   68 +-
 .../internal/controllers/PulseController.java   |   28 +-
 .../tools/pulse/internal/data/Cluster.java      |   23 +-
 .../pulse/internal/data/JMXDataUpdater.java     |  214 +-
 .../pulse/internal/data/PulseConstants.java     |   15 +-
 .../tools/pulse/internal/data/Repository.java   |   54 +-
 .../pulse/internal/log/PulseLogWriter.java      |    4 -
 .../security/GemFireAuthentication.java         |   91 +
 .../security/GemFireAuthenticationProvider.java |   80 +
 .../pulse/internal/security/LogoutHandler.java  |   55 +
 .../internal/service/ClusterRegionService.java  |   11 -
 .../internal/service/ClusterRegionsService.java |   11 -
 .../service/ClusterSelectedRegionService.java   |    6 -
 geode-pulse/src/main/resources/pulse.properties |   12 +-
 .../src/main/webapp/META-INF/MANIFEST.MF        |    3 -
 geode-pulse/src/main/webapp/META-INF/NOTICE     |   76 +
 .../src/main/webapp/WEB-INF/spring-security.xml |   59 +-
 .../scripts/pulsescript/PulseCallbacks.js       |    2 -
 .../webapp/scripts/pulsescript/clusterDetail.js |    7 +-
 .../controllers/PulseControllerJUnitTest.java   |   91 +-
 .../tools/pulse/testbed/driver/PulseUITest.java |    4 +-
 .../pulse/tests/DataBrowserResultLoader.java    |   14 +-
 .../tools/pulse/tests/PulseAbstractTest.java    | 1047 +++++
 .../tools/pulse/tests/PulseAuthTest.java        |   33 +
 .../tools/pulse/tests/PulseAutomatedTest.java   |   17 +-
 .../tools/pulse/tests/PulseBaseTest.java        |    4 +-
 .../tools/pulse/tests/PulseNoAuthTest.java      |   33 +
 .../gemfire/tools/pulse/tests/PulseTest.java    | 1039 -----
 .../gemfire/tools/pulse/tests/Region.java       |   11 +-
 .../gemfire/tools/pulse/tests/Server.java       |  156 +-
 geode-pulse/src/test/resources/pulse-auth.json  |   21 +
 geode-pulse/src/test/resources/test.properties  |    6 +-
 geode-rebalancer/build.gradle                   |    8 +-
 .../util/AutoBalancerIntegrationJUnitTest.java  |   12 +-
 .../cache/util/AutoBalancerJUnitTest.java       |    6 +-
 geode-site/website/Rules                        |    6 +
 geode-site/website/content/community/index.html |    8 +-
 geode-site/website/content/docs/index.html      |    2 +-
 geode-site/website/content/releases/index.html  |   54 +-
 .../website/content/schema/cache/cache-1.0.xsd  | 1469 +++++++
 geode-site/website/layouts/default.html         |    2 +-
 geode-site/website/layouts/footer.html          |   12 -
 geode-site/website/layouts/header.html          |   14 +-
 geode-site/website/layouts/releases.html        |    1 +
 geode-spark-connector/doc/10_demos.md           |   12 +-
 geode-spark-connector/doc/1_building.md         |   18 +-
 geode-spark-connector/doc/2_quick.md            |   26 +-
 geode-spark-connector/doc/3_connecting.md       |   38 +-
 geode-spark-connector/doc/4_loading.md          |   30 +-
 geode-spark-connector/doc/5_rdd_join.md         |   26 +-
 geode-spark-connector/doc/6_save_rdd.md         |   20 +-
 geode-spark-connector/doc/7_save_dstream.md     |   10 +-
 geode-spark-connector/doc/8_oql.md              |    8 +-
 geode-spark-connector/doc/9_java_api.md         |   36 +-
 .../connector/internal/RegionMetadata.java      |   93 -
 .../gemfirefunctions/QueryFunction.java         |   99 -
 .../RetrieveRegionFunction.java                 |  208 -
 .../RetrieveRegionMetadataFunction.java         |  118 -
 .../StructStreamingResultSender.java            |  219 -
 .../gemfire/spark/connector/Employee.java       |   54 -
 .../spark/connector/JavaApiIntegrationTest.java |  424 --
 .../gemfire/spark/connector/Portfolio.java      |  109 -
 .../gemfire/spark/connector/Position.java       |   73 -
 .../src/it/resources/test-regions.xml           |   49 -
 .../src/it/resources/test-retrieve-regions.xml  |   57 -
 .../spark/connector/BasicIntegrationTest.scala  |  598 ---
 .../RDDJoinRegionIntegrationTest.scala          |  300 --
 .../RetrieveRegionIntegrationTest.scala         |  253 --
 .../gemfire/spark/connector/package.scala       |   29 -
 .../connector/testkit/GemFireCluster.scala      |   47 -
 .../spark/connector/testkit/GemFireRunner.scala |  148 -
 .../spark/connector/testkit/IOUtils.scala       |   94 -
 .../spark/streaming/ManualClockHelper.scala     |   28 -
 .../spark/streaming/TestInputDStream.scala      |   44 -
 .../javaapi/GemFireJavaDStreamFunctions.java    |   86 -
 .../GemFireJavaPairDStreamFunctions.java        |   77 -
 .../javaapi/GemFireJavaPairRDDFunctions.java    |  238 --
 .../javaapi/GemFireJavaRDDFunctions.java        |  178 -
 .../javaapi/GemFireJavaSQLContextFunctions.java |   49 -
 .../GemFireJavaSparkContextFunctions.java       |   87 -
 .../connector/javaapi/GemFireJavaUtil.java      |  122 -
 .../spark/connector/GemFireConnection.scala     |   67 -
 .../spark/connector/GemFireConnectionConf.scala |   73 -
 .../connector/GemFireConnectionManager.scala    |   31 -
 .../connector/GemFireFunctionDeployer.scala     |   81 -
 .../connector/GemFireKryoRegistrator.scala      |   29 -
 .../connector/GemFirePairRDDFunctions.scala     |  140 -
 .../spark/connector/GemFireRDDFunctions.scala   |  120 -
 .../connector/GemFireSQLContextFunctions.scala  |   42 -
 .../GemFireSparkContextFunctions.scala          |   39 -
 .../internal/DefaultGemFireConnection.scala     |  164 -
 .../DefaultGemFireConnectionManager.scala       |   77 -
 .../connector/internal/LocatorHelper.scala      |  135 -
 .../StructStreamingResultCollector.scala        |  152 -
 .../connector/internal/oql/QueryParser.scala    |   58 -
 .../spark/connector/internal/oql/QueryRDD.scala |   83 -
 .../internal/oql/QueryResultCollector.scala     |   69 -
 .../connector/internal/oql/RDDConverter.scala   |   40 -
 .../connector/internal/oql/RowBuilder.scala     |   38 -
 .../connector/internal/oql/SchemaBuilder.scala  |   73 -
 .../internal/oql/UndefinedSerializer.scala      |   46 -
 .../connector/internal/rdd/GemFireJoinRDD.scala |   67 -
 .../internal/rdd/GemFireOuterJoinRDD.scala      |   69 -
 .../internal/rdd/GemFireRDDPartition.scala      |   36 -
 .../internal/rdd/GemFireRDDPartitioner.scala    |   59 -
 .../rdd/GemFireRDDPartitionerImpl.scala         |   89 -
 .../internal/rdd/GemFireRDDWriter.scala         |   82 -
 .../internal/rdd/GemFireRegionRDD.scala         |  138 -
 .../javaapi/GemFireJavaRegionRDD.scala          |   26 -
 .../spark/connector/javaapi/JavaAPIHelper.scala |   53 -
 .../gemfire/spark/connector/package.scala       |   69 -
 .../streaming/GemFireDStreamFunctions.scala     |   89 -
 .../spark/connector/streaming/package.scala     |   32 -
 .../gemfire/spark/connector/JavaAPITest.java    |  163 -
 .../connector/GemFireFunctionDeployerTest.scala |   58 -
 .../DefaultGemFireConnectionManagerTest.scala   |   82 -
 ...tStreamingResultSenderAndCollectorTest.scala |  254 --
 .../internal/oql/QueryParserTest.scala          |   83 -
 .../connector/ConnectorImplicitsTest.scala      |   50 -
 .../connector/GemFireConnectionConfTest.scala   |  100 -
 .../connector/GemFireDStreamFunctionsTest.scala |   79 -
 .../connector/GemFireRDDFunctionsTest.scala     |  139 -
 .../spark/connector/LocatorHelperTest.scala     |  168 -
 .../rdd/GemFireRDDPartitionerTest.scala         |  190 -
 .../connector/rdd/GemFireRegionRDDTest.scala    |  117 -
 .../basic-demos/src/main/java/demo/Emp.java     |   95 -
 .../src/main/java/demo/OQLJavaDemo.java         |   59 -
 .../src/main/java/demo/PairRDDSaveJavaDemo.java |   86 -
 .../src/main/java/demo/RDDSaveJavaDemo.java     |   85 -
 .../src/main/java/demo/RegionToRDDJavaDemo.java |   57 -
 .../src/main/scala/demo/NetworkWordCount.scala  |   75 -
 .../connector/internal/RegionMetadata.java      |   93 +
 .../internal/geodefunctions/QueryFunction.java  |   99 +
 .../geodefunctions/RetrieveRegionFunction.java  |  208 +
 .../RetrieveRegionMetadataFunction.java         |  118 +
 .../StructStreamingResultSender.java            |  219 +
 .../pivotal/geode/spark/connector/Employee.java |   54 +
 .../spark/connector/JavaApiIntegrationTest.java |  424 ++
 .../geode/spark/connector/Portfolio.java        |  109 +
 .../pivotal/geode/spark/connector/Position.java |   73 +
 .../src/it/resources/test-regions.xml           |   49 +
 .../src/it/resources/test-retrieve-regions.xml  |   57 +
 .../spark/connector/BasicIntegrationTest.scala  |  598 +++
 .../RDDJoinRegionIntegrationTest.scala          |  300 ++
 .../RetrieveRegionIntegrationTest.scala         |  253 ++
 .../pivotal/geode/spark/connector/package.scala |   29 +
 .../spark/connector/testkit/GeodeCluster.scala  |   47 +
 .../spark/connector/testkit/GeodeRunner.scala   |  148 +
 .../geode/spark/connector/testkit/IOUtils.scala |   94 +
 .../spark/streaming/ManualClockHelper.scala     |   28 +
 .../spark/streaming/TestInputDStream.scala      |   44 +
 .../javaapi/GeodeJavaDStreamFunctions.java      |   86 +
 .../javaapi/GeodeJavaPairDStreamFunctions.java  |   77 +
 .../javaapi/GeodeJavaPairRDDFunctions.java      |  238 ++
 .../javaapi/GeodeJavaRDDFunctions.java          |  178 +
 .../javaapi/GeodeJavaSQLContextFunctions.java   |   49 +
 .../javaapi/GeodeJavaSparkContextFunctions.java |   87 +
 .../spark/connector/javaapi/GeodeJavaUtil.java  |  122 +
 .../geode/spark/connector/GeodeConnection.scala |   67 +
 .../spark/connector/GeodeConnectionConf.scala   |   73 +
 .../connector/GeodeConnectionManager.scala      |   31 +
 .../spark/connector/GeodeFunctionDeployer.scala |   81 +
 .../spark/connector/GeodeKryoRegistrator.scala  |   29 +
 .../spark/connector/GeodePairRDDFunctions.scala |  140 +
 .../spark/connector/GeodeRDDFunctions.scala     |  120 +
 .../connector/GeodeSQLContextFunctions.scala    |   42 +
 .../connector/GeodeSparkContextFunctions.scala  |   39 +
 .../internal/DefaultGeodeConnection.scala       |  164 +
 .../DefaultGeodeConnectionManager.scala         |   77 +
 .../connector/internal/LocatorHelper.scala      |  135 +
 .../StructStreamingResultCollector.scala        |  152 +
 .../connector/internal/oql/QueryParser.scala    |   58 +
 .../spark/connector/internal/oql/QueryRDD.scala |   83 +
 .../internal/oql/QueryResultCollector.scala     |   69 +
 .../connector/internal/oql/RDDConverter.scala   |   40 +
 .../connector/internal/oql/RowBuilder.scala     |   38 +
 .../connector/internal/oql/SchemaBuilder.scala  |   73 +
 .../internal/oql/UndefinedSerializer.scala      |   46 +
 .../connector/internal/rdd/GeodeJoinRDD.scala   |   67 +
 .../internal/rdd/GeodeOuterJoinRDD.scala        |   69 +
 .../internal/rdd/GeodeRDDPartition.scala        |   36 +
 .../internal/rdd/GeodeRDDPartitioner.scala      |   59 +
 .../internal/rdd/GeodeRDDPartitionerImpl.scala  |   89 +
 .../connector/internal/rdd/GeodeRDDWriter.scala |   82 +
 .../connector/internal/rdd/GeodeRegionRDD.scala |  138 +
 .../connector/javaapi/GeodeJavaRegionRDD.scala  |   26 +
 .../spark/connector/javaapi/JavaAPIHelper.scala |   53 +
 .../pivotal/geode/spark/connector/package.scala |   69 +
 .../streaming/GeodeDStreamFunctions.scala       |   89 +
 .../spark/connector/streaming/package.scala     |   32 +
 .../geode/spark/connector/JavaAPITest.java      |  163 +
 .../connector/GeodeFunctionDeployerTest.scala   |   58 +
 .../DefaultGeodeConnectionManagerTest.scala     |   82 +
 ...tStreamingResultSenderAndCollectorTest.scala |  254 ++
 .../internal/oql/QueryParserTest.scala          |   83 +
 .../connector/ConnectorImplicitsTest.scala      |   50 +
 .../connector/GeodeConnectionConfTest.scala     |  100 +
 .../connector/GeodeDStreamFunctionsTest.scala   |   79 +
 .../spark/connector/GeodeRDDFunctionsTest.scala |  139 +
 .../spark/connector/LocatorHelperTest.scala     |  168 +
 .../connector/rdd/GeodeRDDPartitionerTest.scala |  190 +
 .../connector/rdd/GeodeRegionRDDTest.scala      |  117 +
 .../basic-demos/src/main/java/demo/Emp.java     |   95 +
 .../src/main/java/demo/OQLJavaDemo.java         |   59 +
 .../src/main/java/demo/PairRDDSaveJavaDemo.java |   86 +
 .../src/main/java/demo/RDDSaveJavaDemo.java     |   85 +
 .../src/main/java/demo/RegionToRDDJavaDemo.java |   57 +
 .../src/main/scala/demo/NetworkWordCount.scala  |   75 +
 .../project/Dependencies.scala                  |    8 +-
 .../project/GemFireSparkBuild.scala             |   76 -
 .../project/GeodeSparkBuild.scala               |   76 +
 geode-spark-connector/project/Settings.scala    |    4 +-
 geode-wan/build.gradle                          |    2 +-
 .../client/internal/GatewaySenderBatchOp.java   |   26 +-
 .../cache/client/internal/SenderProxy.java      |    4 +-
 .../internal/locator/wan/LocatorDiscovery.java  |   16 +-
 .../locator/wan/WanLocatorDiscovererImpl.java   |   19 +-
 .../wan/GatewaySenderEventRemoteDispatcher.java |   45 +-
 .../cache/wan/GatewaySenderFactoryImpl.java     |    4 -
 .../cache/CacheXml70GatewayDUnitTest.java       |   22 +-
 .../cache/CacheXml80GatewayDUnitTest.java       |    4 +-
 .../internal/cache/UpdateVersionDUnitTest.java  |   10 +-
 .../cache/wan/CacheClientNotifierDUnitTest.java |  285 ++
 .../cache/wan/Simple2CacheServerDUnitTest.java  |  143 +
 .../gemfire/internal/cache/wan/WANTestBase.java | 2416 +++---------
 ...oncurrentParallelGatewaySenderDUnitTest.java |  210 +-
 ...allelGatewaySenderOperation_1_DUnitTest.java |  175 +-
 ...allelGatewaySenderOperation_2_DUnitTest.java |  177 +-
 .../ConcurrentWANPropogation_1_DUnitTest.java   |  133 +-
 .../ConcurrentWANPropogation_2_DUnitTest.java   |  143 +-
 .../cache/wan/disttx/DistTXWANDUnitTest.java    |   42 +-
 .../CommonParallelGatewaySenderDUnitTest.java   |   53 +-
 ...wWANConcurrencyCheckForDestroyDUnitTest.java |   29 +-
 .../wan/misc/NewWanAuthenticationDUnitTest.java |  309 ++
 .../cache/wan/misc/PDXNewWanDUnitTest.java      |  116 +-
 ...dRegion_ParallelWANPersistenceDUnitTest.java |   97 +-
 ...dRegion_ParallelWANPropogationDUnitTest.java |  155 +-
 ...downAllPersistentGatewaySenderDUnitTest.java |    4 +-
 .../wan/misc/WANConfigurationJUnitTest.java     |   11 +-
 .../cache/wan/misc/WANSSLDUnitTest.java         |    7 +-
 .../wan/misc/WanAutoDiscoveryDUnitTest.java     |   42 +-
 .../cache/wan/misc/WanValidationsDUnitTest.java |  231 +-
 .../ParallelWANPropogationOffHeapDUnitTest.java |    3 +-
 .../SerialWANPropogationOffHeapDUnitTest.java   |    3 +-
 ...ation_PartitionedRegionOffHeapDUnitTest.java |    3 +-
 ...arallelGatewaySenderOperationsDUnitTest.java |   57 +-
 ...llelGatewaySenderQueueOverflowDUnitTest.java |   74 +-
 .../ParallelWANConflationDUnitTest.java         |   40 +-
 ...ersistenceEnabledGatewaySenderDUnitTest.java |  377 +-
 ...llelWANPropagationClientServerDUnitTest.java |    7 +-
 ...lelWANPropagationConcurrentOpsDUnitTest.java |   45 +-
 .../ParallelWANPropagationDUnitTest.java        |  363 +-
 ...ParallelWANPropagationLoopBackDUnitTest.java |   72 +-
 .../wan/parallel/ParallelWANStatsDUnitTest.java |   74 +-
 ...tewaySenderDistributedDeadlockDUnitTest.java |   12 +-
 ...rialGatewaySenderEventListenerDUnitTest.java |   44 +-
 .../SerialGatewaySenderOperationsDUnitTest.java |   74 +-
 .../SerialGatewaySenderQueueDUnitTest.java      |   24 +-
 ...ersistenceEnabledGatewaySenderDUnitTest.java |   84 +-
 .../SerialWANPropagationLoopBackDUnitTest.java  |   50 +-
 .../serial/SerialWANPropogationDUnitTest.java   |  442 +--
 ...NPropogation_PartitionedRegionDUnitTest.java |   98 +-
 .../SerialWANPropogationsFeatureDUnitTest.java  |   90 +-
 .../wan/serial/SerialWANStatsDUnitTest.java     |  122 +-
 .../wan/wancommand/WANCommandTestBase.java      |  109 +-
 ...anCommandCreateGatewayReceiverDUnitTest.java |  219 +-
 .../WanCommandCreateGatewaySenderDUnitTest.java |  235 +-
 ...WanCommandGatewayReceiverStartDUnitTest.java |  159 +-
 .../WanCommandGatewayReceiverStopDUnitTest.java |  157 +-
 .../WanCommandGatewaySenderStartDUnitTest.java  |  209 +-
 .../WanCommandGatewaySenderStopDUnitTest.java   |  197 +-
 .../wan/wancommand/WanCommandListDUnitTest.java |  175 +-
 .../WanCommandPauseResumeDUnitTest.java         |  490 +--
 .../wancommand/WanCommandStatusDUnitTest.java   |  259 +-
 .../management/WANManagementDUnitTest.java      |   18 +-
 .../ClusterConfigurationDUnitTest.java          | 1278 +++---
 .../pulse/TestRemoteClusterDUnitTest.java       |    6 +-
 .../web/swagger/config/RestApiPathProvider.java |   27 +-
 .../web/swagger/config/SwaggerConfig.java       |   13 +-
 geode-web-api/src/main/webapp/META-INF/NOTICE   |   79 +
 geode-web/build.gradle                          |    7 +-
 geode-web/src/main/webapp/META-INF/NOTICE       |   36 +
 .../src/main/webapp/WEB-INF/gemfire-servlet.xml |    2 +-
 .../ShellCommandsControllerJUnitTest.java       |   19 +-
 ...entVariablesHandlerInterceptorJUnitTest.java |  267 --
 .../LoginHandlerInterceptorJUnitTest.java       |  273 ++
 .../web/http/ClientHttpRequestJUnitTest.java    |   12 +-
 ...ableObjectHttpMessageConverterJUnitTest.java |    6 +-
 .../RestHttpOperationInvokerJUnitTest.java      |   32 +-
 .../SimpleHttpOperationInvokerJUnitTest.java    |    8 +-
 .../web/util/ConvertUtilsJUnitTest.java         |    4 +-
 gradle.properties                               |    3 +-
 gradle/dependency-resolution.gradle             |    1 +
 gradle/dependency-versions.properties           |   23 +-
 gradle/ide.gradle                               |   10 +-
 gradle/java.gradle                              |    5 +-
 gradle/publish.gradle                           |   35 +
 gradle/rat.gradle                               |    6 +-
 gradle/test.gradle                              |    7 +-
 gradle/utilities.gradle                         |   14 +-
 gradle/wrapper/gradle-wrapper.jar               |  Bin 53637 -> 53639 bytes
 gradle/wrapper/gradle-wrapper.properties        |    2 +-
 settings.gradle                                 |    1 -
 1518 files changed, 68348 insertions(+), 81495 deletions(-)
----------------------------------------------------------------------




[44/55] [abbrv] incubator-geode git commit: fixed a failure and added source headers

Posted by sa...@apache.org.
fixed a failure and added source headers


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/5fd6ed3d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/5fd6ed3d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/5fd6ed3d

Branch: refs/heads/feature/GEODE-1153
Commit: 5fd6ed3dc810b70e8d81116776cf4d2b2fcf8d2e
Parents: 603e6f5
Author: Sai Boorlagadda <sb...@pivotal.io>
Authored: Tue May 10 22:29:40 2016 -0700
Committer: Sai Boorlagadda <sb...@pivotal.io>
Committed: Tue May 10 22:29:40 2016 -0700

----------------------------------------------------------------------
 .../partitioned/rebalance/BucketOperatorImpl.java   | 16 ++++++++++++++++
 .../rebalance/BucketOperatorWrapper.java            | 16 ++++++++++++++++
 .../rebalance/PartitionedRegionLoadModel.java       |  2 ++
 .../rebalance/BucketOperatorImplTest.java           | 16 ++++++++++++++++
 .../rebalance/BucketOperatorWrapperTest.java        | 16 ++++++++++++++++
 5 files changed, 66 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5fd6ed3d/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorImpl.java
index 62ef630..2f38752 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorImpl.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.internal.cache.partitioned.rebalance;
 
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5fd6ed3d/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorWrapper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorWrapper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorWrapper.java
index c5ae30d..d058a04 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorWrapper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorWrapper.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.internal.cache.partitioned.rebalance;
 
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5fd6ed3d/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
index e024011..1cfa4a4 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
@@ -402,6 +402,8 @@ public class PartitionedRegionLoadModel {
         //If the bucket creation failed, we need to undo the changes
         //we made to the model
         attemptedBucketCreations.add(move);
+        //remove the bucket from lowRedundancyBuckets before mutating the state
+        lowRedundancyBuckets.remove(bucket);
         bucket.removeMember(targetMember);
         if(bucket.getRedundancy() < requiredRedundancy) {
           lowRedundancyBuckets.add(bucket);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5fd6ed3d/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorImplTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorImplTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorImplTest.java
index 5d79d0e..a5c8982 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorImplTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorImplTest.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.internal.cache.partitioned.rebalance;
 
 import static org.mockito.Mockito.doReturn;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5fd6ed3d/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorWrapperTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorWrapperTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorWrapperTest.java
index 6b1551b..558062b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorWrapperTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/BucketOperatorWrapperTest.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.internal.cache.partitioned.rebalance;
 
 import static org.mockito.Matchers.any;


[21/55] [abbrv] incubator-geode git commit: GEODE-1346: Typo "Emtpy" affects Exception name and some help strings

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f24b9fb0/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
old mode 100644
new mode 100755
index a6bbb86..d3d232e
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
@@ -40,13 +40,2024 @@ import com.gemstone.gemfire.i18n.StringId;
  * @since 6.0
  *
  */
-public class LocalizedStrings extends ParentLocalizedStrings {
+public class LocalizedStrings {
+  /** reserved space for commonly used strings, messageId 0-1024 **/
+  public static final StringId EMPTY = new StringId(0, "");
+  public static final StringId ONE_ARG = StringId.LITERAL;
+  //alias for use in temporarily adding debugging to the product
+  public static final StringId DEBUG = ONE_ARG;
+
+  public static final StringId DONT_RELEASE = ONE_ARG;
+
+  //alias for use in the test tree
+  public static final StringId TESTING = ONE_ARG;
+  public static final StringId TWO_ARG = new StringId(2, "{0} {1}");
+  public static final StringId TWO_ARG_COLON = new StringId(3, "{0} : {1}");
+  public static final StringId ERROR = new StringId(4, "ERROR");
+  public static final StringId CACHE_IS_CLOSING = new StringId(1021, "Cache is closing");
+  public static final StringId NOT_A_REAL_GEMFIREVM = new StringId(1022, "Not a real GemFireVM");
+  public static final StringId SHOULDNT_INVOKE = new StringId(1023, "Should not be invoked");
+  public static final StringId UNSUPPORTED_AT_THIS_TIME = new StringId(1024, "Unsupported at this time");
+
+  /**Gemfire strings, messageId 1025-15000 **/
+  public static final StringId AbstractHealthEvaluator_OKAY_HEALTH__0 = new StringId(1025, "OKAY_HEALTH:  {0}");
+  public static final StringId AbstractHealthEvaluator_POOR_HEALTH__0 = new StringId(1026, "POOR_HEALTH:  {0}");
+  public static final StringId AbstractRegion_CACHECALLBACK_CLOSE_EXCEPTION = new StringId(1027, "CacheCallback close exception");
+  public static final StringId PoolManagerImpl_POOL_NAMED_0_ALREADY_EXISTS = new StringId(1028, "A pool named \"{0}\" already exists");
+  public static final StringId AcceptorImpl_CACHE_SERVER_CONNECTION_LISTENER_BOUND_TO_ADDRESS_0_WITH_BACKLOG_1 = new StringId(1029, "Cache server connection listener bound to address {0} with backlog {1}.");
+  public static final StringId AcceptorImpl_CACHE_SERVER_FAILED_ACCEPTING_CLIENT_CONNECTION_DUE_TO_SOCKET_TIMEOUT = new StringId(1030, "Cache server: failed accepting client connection due to socket timeout.");
+  public static final StringId AcceptorImpl_CACHE_SERVER_FAILED_ACCEPTING_CLIENT_CONNECTION__0 = new StringId(1031, "Cache server: failed accepting client connection  {0}");
+  public static final StringId AcceptorImpl_CACHE_SERVER_ON_PORT_0_IS_SHUTTING_DOWN = new StringId(1032, "Cache server on port {0} is shutting down.");
+  public static final StringId AcceptorImpl_CACHE_SERVER_TIMED_OUT_WAITING_FOR_HANDSHAKE_FROM__0 = new StringId(1033, "Cache server: timed out waiting for handshake from  {0}");
+  public static final StringId AcceptorImpl_CACHE_SERVER_UNEXPECTED_EXCEPTION = new StringId(1034, "Cache server: Unexpected Exception");
+  public static final StringId AcceptorImpl_CACHE_SERVER_UNEXPECTED_IOEXCEPTION_FROM_ACCEPT = new StringId(1035, "Cache server: Unexpected IOException from accept");
+  public static final StringId AcceptorImpl_EXCEEDED_MAX_CONNECTIONS_0 = new StringId(1036, "exceeded max-connections {0}");
+  public static final StringId AcceptorImpl_IGNORING = new StringId(1037, "ignoring");
+  public static final StringId AcceptorImpl_IGNORING_EVENT_ON_SELECTOR_KEY__0 = new StringId(1038, "ignoring event on selector key  {0}");
+  public static final StringId CacheClientNotifier_CACHECLIENTNOTIFIER_A_PREVIOUS_CONNECTION_ATTEMPT_FROM_THIS_CLIENT_IS_STILL_BEING_PROCESSED__0 = new StringId(1039, "A previous connection attempt from this client is still being processed: {0}");
+  public static final StringId AcceptorImpl_REJECTED_CONNECTION_FROM_0_BECAUSE_CURRENT_CONNECTION_COUNT_OF_1_IS_GREATER_THAN_OR_EQUAL_TO_THE_CONFIGURED_MAX_OF_2 = new StringId(1040, "Rejected connection from {0} because current connection count of {1} is greater than or equal to the configured max of {2}");
+  public static final StringId AcceptorImpl_SELECTOR_ENABLED = new StringId(1041, "SELECTOR enabled");
+  public static final StringId AcceptorImpl_UNEXPECTED = new StringId(1042, "unexpected");
+  public static final StringId AdminDistributedSystem_COULD_NOT_SET_THE_GEMFIRE_VM = new StringId(1043, "Could not set the GemFire VM.");
+  public static final StringId AdminDistributedSystemImpl_ADDING_NEW_APPLICATION_FOR__0 = new StringId(1044, "Adding new Application for  {0}");
+  public static final StringId AdminDistributedSystemImpl_ADDING_NEW_CACHESERVER_FOR__0 = new StringId(1045, "Adding new CacheServer for  {0}");
+  public static final StringId AdminDistributedSystemImpl_WHILE_GETTING_CANONICAL_FILE = new StringId(1046, "While getting canonical file");
+  public static final StringId AdminRequest_RESPONSE_TO__0__WAS_CANCELLED = new StringId(1047, "Response to  {0}  was cancelled.");
+  public static final StringId AdminWaiters_COULD_NOT_SEND_REQUEST_0 = new StringId(1048, "Could not send request.{0}");
+  public static final StringId AdminWaiters_REQUEST_SEND_TO_0_WAS_CANCELLED_1 = new StringId(1049, "Request sent to {0} was cancelled. {1}");
+  public static final StringId AdminWaiters_REQUEST_SENT_TO_0_FAILED_SINCE_MEMBER_DEPARTED_1 = new StringId(1050, "Request sent to {0} failed since member departed.{1}");
+  public static final StringId AgentImpl_0__IS_ALREADY_REGISTERED = new StringId(1051, "{0}  is already registered.");
+  public static final StringId AgentImpl_AGENT_HAS_STOPPED = new StringId(1052, "Agent has stopped");
+  public static final StringId AgentImpl_AUTO_CONNECT_FAILED__0 = new StringId(1053, "auto connect failed:  {0}");
+  public static final StringId AgentImpl_FAILED_TO_START_HTTPADAPTOR__0 = new StringId(1054, "Failed to start HttpAdaptor:  {0}");
+  public static final StringId AgentImpl_FAILED_TO_START_RMICONNECTORSERVER = new StringId(1055, "Failed to start RMIConnectorServer:");
+  public static final StringId AgentImpl_FAILED_TO_START_SNMPADAPTOR__0 = new StringId(1056, "Failed to start SnmpAdaptor:  {0}");
+  public static final StringId AgentImpl_GEMFIRE_JMX_AGENT_IS_RUNNING = new StringId(1057, "GemFire JMX Agent is running...");
+  public static final StringId AgentImpl_HTTPADAPTOR_ALREADY_REGISTERED_AS__0 = new StringId(1058, "HttpAdaptor already registered as  {0}");
+  public static final StringId AgentImpl_HTTP_ADAPTOR_LISTENING_ON_ADDRESS__0 = new StringId(1059, "HTTP adaptor listening on address:  {0}");
+  public static final StringId AgentImpl_HTTP_ADAPTOR_LISTENING_ON_PORT__0 = new StringId(1060, "HTTP adaptor listening on port:  {0}");
+  public static final StringId AgentImpl_INCORRECT_NULL_HOSTNAME = new StringId(1061, "Incorrect null hostname");
+  public static final StringId AgentImpl_INCORRECT_PORT_VALUE__0 = new StringId(1062, "Incorrect port value  {0}");
+  public static final StringId AgentImpl_RMICONNECTORSERVER_ALREADY_REGISTERED_AS__0 = new StringId(1063, "RMIConnectorServer already registered as  {0}");
+  public static final StringId AgentImpl_SNMPADAPTOR_ALREADY_REGISTERED_AS__0 = new StringId(1064, "SnmpAdaptor already registered as  {0}");
+  public static final StringId AgentImpl_STOPPING_JMX_AGENT = new StringId(1065, "Stopping JMX agent");
+  public static final StringId AgentImpl_XSLTPROCESSOR_ALREADY_REGISTERED_AS__0 = new StringId(1066, "XsltProcessor already registered as  {0}");
+  public static final StringId AbstractRegion_THE_CONNECTION_POOL_0_HAS_NOT_BEEN_CREATED = new StringId(1067, "The connection pool \"{0}\" has not been created");
+
+  public static final StringId AttributesFactory_ADDCACHELISTENER_PARAMETER_WAS_NULL = new StringId(1069, "addCacheListener parameter was null");
+  public static final StringId AttributesFactory_AN_EVICTION_CONTROLLER_WITH_LOCAL_DESTROY_EVICTION_ACTION_IS_INCOMPATIBLE_WITH_DISTRIBUTED_REPLICATION = new StringId(1070, "An Eviction Controller with local destroy eviction action is incompatible with distributed replication");
+
+  public static final StringId AttributesFactory_CONCURRENCYLEVEL_MUST_BE_0 = new StringId(1072, "concurrencyLevel must be > 0");
+  public static final StringId AttributesFactory_DATAPOLICY_MUST_NOT_BE_NULL = new StringId(1073, "dataPolicy must not be null");
+  public static final StringId AttributesFactory_DATA_POLICIES_OTHER_THAN_0_ARE_NOT_ALLOWED_IN_PARTITIONED_REGIONS = new StringId(1074, "Data policies other than {0} are not allowed in  partitioned regions.");
+  public static final StringId AttributesFactory_DATA_POLICIES_OTHER_THAN_0_ARE_NOT_SUPPORTED_FOR_PARTITIONED_REGIONS = new StringId(1075, "Data policies other than {0} are not supported for Partitioned Regions");
+  public static final StringId AttributesFactory_DATA_POLICY_0_IS_NOT_ALLOWED_FOR_A_PARTITIONED_REGION_DATAPOLICIES_OTHER_THAN_1_ARE_NOT_ALLOWED = new StringId(1076, "Data policy {0} is not allowed for a partitioned region. DataPolicies other than {1} are not allowed.");
+  public static final StringId AttributesFactory_DIR_SIZE_CANNOT_BE_NEGATIVE_0 = new StringId(1077, "Dir size cannot be negative : {0}");
+
+  public static final StringId AttributesFactory_EXPIRATIONACTIONLOCAL_DESTROY_ON_THE_ENTRIES_IS_INCOMPATIBLE_WITH_DISTRIBUTED_REPLICATION = new StringId(1079, "ExpirationAction.LOCAL_DESTROY on the entries is incompatible with distributed replication");
+  public static final StringId AttributesFactory_EXPIRATIONACTIONLOCAL_INVALIDATE_ON_THE_ENTRIES_IS_INCOMPATIBLE_WITH_DISTRIBUTED_REPLICATION = new StringId(1080, "ExpirationAction.LOCAL_INVALIDATE on the entries is incompatible with distributed replication");
+  public static final StringId AttributesFactory_EXPIRATIONACTIONLOCAL_INVALIDATE_ON_THE_REGION_IS_INCOMPATIBLE_WITH_DISTRIBUTED_REPLICATION = new StringId(1081, "ExpirationAction.LOCAL_INVALIDATE on the region is incompatible with distributed replication");
+
+  public static final StringId AttributesFactory_IDLETIMEOUT_MUST_NOT_BE_NULL = new StringId(1085, "idleTimeout must not be null");
+  public static final StringId AttributesFactory_IF_THE_DATA_POLICY_IS_0_THEN_ENTRY_EXPIRATION_IS_NOT_ALLOWED = new StringId(1086, "If the data policy is {0} then entry expiration is not allowed.");
+  public static final StringId AttributesFactory_IF_THE_DATA_POLICY_IS_0_THEN_EVICTION_IS_NOT_ALLOWED = new StringId(1087, "If the data policy is {0} then eviction is not allowed.");
+  public static final StringId AttributesFactory_IF_THE_MEMBERSHIP_ATTRIBUTES_HAS_REQUIRED_ROLES_THEN_SCOPE_MUST_NOT_BE_LOCAL = new StringId(1088, "If the membership attributes has required roles then scope must not be LOCAL.");
+  public static final StringId AttributesFactory_INITCACHELISTENERS_PARAMETER_HAD_A_NULL_ELEMENT = new StringId(1089, "initCacheListeners parameter had a null element");
+  public static final StringId AttributesFactory_INITIALCAPACITY_MUST_BE_0 = new StringId(1090, "initialCapacity must be >= 0");
+  public static final StringId AttributesFactory_KEYCONSTRAINT_MUST_NOT_BE_A_PRIMITIVE_TYPE = new StringId(1091, "keyConstraint must not be a primitive type");
+  public static final StringId AttributesFactory_LOADFACTOR_MUST_BE_0_VALUE_IS_0 = new StringId(1092, "loadFactor must be > 0, value is {0}");
+  public static final StringId AttributesFactory_MIRRORTYPE_MUST_NOT_BE_NULL = new StringId(1093, "mirrorType must not be null");
+  public static final StringId AttributesFactory_MORE_THAN_ONE_CACHE_LISTENER_EXISTS = new StringId(1094, "More than one cache listener exists.");
+  public static final StringId AttributesFactory_NO_MIRROR_TYPE_CORRESPONDS_TO_DATA_POLICY_0 = new StringId(1095, "No mirror type corresponds to data policy \"{0}\".");
+  public static final StringId AttributesFactory_NUMBER_OF_DISKSIZES_IS_0_WHICH_IS_NOT_EQUAL_TO_NUMBER_OF_DISK_DIRS_WHICH_IS_1 = new StringId(1096, " Number of diskSizes is {0} which is not equal to number of disk Dirs which is {1}");
+  public static final StringId AttributesFactory_PARTITIONATTRIBUTES_LOCALMAXMEMORY_MUST_NOT_BE_NEGATIVE = new StringId(1097, "PartitionAttributes localMaxMemory must not be negative.");
+  public static final StringId AttributesFactory_SCOPETYPE_MUST_NOT_BE_NULL = new StringId(1098, "scopeType must not be null");
+  public static final StringId AttributesFactory_SETLOCKGRANTERTRUE_IS_NOT_ALLOWED_IN_PARTITIONED_REGIONS = new StringId(1099, "setLockGranter(true) is not allowed in Partitioned Regions.");
+  public static final StringId AttributesFactory_SETTING_SCOPE_ON_A_PARTITIONED_REGIONS_IS_NOT_ALLOWED = new StringId(1100, "Setting Scope on a Partitioned Regions is not allowed.");
+  public static final StringId AttributesFactory_STATISTICS_MUST_BE_ENABLED_FOR_EXPIRATION = new StringId(1101, "Statistics must be enabled for expiration");
+  public static final StringId AttributesFactory_TIMETOLIVE_MUST_NOT_BE_NULL = new StringId(1102, "timeToLive must not be null");
+  public static final StringId AttributesFactory_TOTAL_SIZE_OF_PARTITION_REGION_MUST_BE_0 = new StringId(1103, "Total size of partition region must be > 0.");
+  public static final StringId AttributesFactory_VALUECONSTRAINT_MUST_NOT_BE_A_PRIMITIVE_TYPE = new StringId(1104, "valueConstraint must not be a primitive type");
+  public static final StringId BaseCommand_0_CONNECTION_DISCONNECT_DETECTED_BY_EOF = new StringId(1105, "{0}: connection disconnect detected by EOF.");
+  public static final StringId BaseCommand_0_EOFEXCEPTION_DURING_A_WRITE_OPERATION_ON_REGION__1_KEY_2_MESSAGEID_3 = new StringId(1106, "{0}: EOFException during a write operation on region : {1} key: {2} messageId: {3}");
+  public static final StringId BaseCommand_0_QUERYSTRING_IS_1 = new StringId(1107, "{0} : QueryString is: {1}.");
+  public static final StringId BaseCommand_0_UNEXPECTED_ERROR_ON_SERVER = new StringId(1108, "{0} : Unexpected Error on server");
+  public static final StringId BaseCommand_0_UNEXPECTED_EXCEPTION = new StringId(1109, "{0}: Unexpected Exception");
+  public static final StringId BaseCommand_0_UNEXPECTED_EXCEPTION_DURING_OPERATION_ON_REGION_1_KEY_2_MESSAGEID_3 = new StringId(1110, "{0}: Unexpected Exception during operation on region: {1} key: {2} messageId: {3}");
+  public static final StringId BaseCommand_0_UNEXPECTED_IOEXCEPTION = new StringId(1111, "{0}: Unexpected IOException: ");
+  public static final StringId BaseCommand_0_UNEXPECTED_IOEXCEPTION_DURING_OPERATION_FOR_REGION_1_KEY_2_MESSID_3 = new StringId(1112, "{0}: Unexpected IOException during operation for region: {1} key: {2} messId: {3}");
+  public static final StringId BaseCommand_0_UNEXPECTED_SHUTDOWNEXCEPTION = new StringId(1113, "{0}: Unexpected ShutdownException: ");
+  public static final StringId BaseCommand_0_UNEXPECTED_SHUTDOWNEXCEPTION_DURING_OPERATION_ON_REGION_1_KEY_2_MESSAGEID_3 = new StringId(1114, "{0}: Unexpected ShutdownException during operation on region: {1} key: {2} messageId: {3}");
+  public static final StringId BaseCommand_0_UNEXPECTED_THREADINTERRUPTEDEXCEPTION = new StringId(1115, "{0}: Unexpected ThreadInterruptedException: ");
+  public static final StringId BaseCommand_0_UNEXPECTED_THREADINTERRUPTEDEXCEPTION_DURING_OPERATION_ON_REGION_1_KEY_2_MESSAGEID_3 = new StringId(1116, "{0}: Unexpected ThreadInterruptedException during operation on region: {1} key: {2} messageId: {3}");
+  public static final StringId BaseCommand_UNKNOWN_QUERY_EXCEPTION = new StringId(1117, "Uknown query Exception.");
+  public static final StringId BaseCommand_SEVERE_CACHE_EXCEPTION_0 = new StringId(1118, "Severe cache exception : {0}");
+  public static final StringId BaseCommand_UNEXPECTED_QUERYINVALIDEXCEPTION_WHILE_PROCESSING_QUERY_0 = new StringId(1119, "Unexpected QueryInvalidException while processing query {0}");
+  public static final StringId LocalRegion_THE_REGION_0_WAS_CONFIGURED_TO_USE_OFF_HEAP_MEMORY_BUT_OFF_HEAP_NOT_CONFIGURED = new StringId(1120, "The region {0} was configured to use off heap memory but no off heap memory was configured");
+
+  public static final StringId CacheServerImpl_CACHESERVER_CONFIGURATION___0 = new StringId(1122, "CacheServer Configuration:   {0}");
+  public static final StringId CacheServerImpl_FORCING_NOTIFYBYSUBSCRIPTION_TO_SUPPORT_DYNAMIC_REGIONS = new StringId(1123, "Forcing notifyBySubscription to support dynamic regions");
+
+  public static final StringId BucketAdvisor_ATTEMPTED_TO_CLOSE_BUCKETADVISOR_THAT_IS_ALREADY_CLOSED = new StringId(1131, "Attempted to close BucketAdvisor that is already CLOSED");
+  public static final StringId AgentImpl_COULD_NOT_TAIL_0_BECAUSE_1 = new StringId(1132, "Could not tail \"{0}\" because: {1}");
+  public static final StringId SystemAdmin_USED_TO_SPECIFY_A_HOST_NAME_OR_IP_ADDRESS_TO_GIVE_TO_CLIENTS_SO_THEY_CAN_CONNECT_TO_A_LOCATOR = new StringId(1133, "Used to specify a host name or IP address to give to clients so they can connect to a locator.");
+  public static final StringId BucketAdvisor_BUCKETADVISOR_WAS_NOT_CLOSED_PROPERLY = new StringId(1134, "BucketAdvisor was not closed properly.");
+  public static final StringId BucketBackupMessage_BUCKETBACKUPMESSAGE_DATA_STORE_NOT_CONFIGURED_FOR_THIS_MEMBER = new StringId(1135, "BucketBackupMessage: data store not configured for this member");
+
+  public static final StringId CacheClientNotifier_0_REGISTERCLIENT_EXCEPTION_ENCOUNTERED_IN_REGISTRATION_1 = new StringId(1140, "{0} :registerClient: Exception encountered in registration {1}");
+  public static final StringId CacheClientNotifier_CACHECLIENTNOTIFIER_KEEPING_PROXY_FOR_DURABLE_CLIENT_NAMED_0_FOR_1_SECONDS_2 = new StringId(1141, "CacheClientNotifier: Keeping proxy for durable client named {0} for {1} seconds {2}.");
+  public static final StringId CacheClientNotifier_CACHECLIENTNOTIFIER_THE_REQUESTED_DURABLE_CLIENT_HAS_THE_SAME_IDENTIFIER__0__AS_AN_EXISTING_DURABLE_CLIENT__1__DUPLICATE_DURABLE_CLIENTS_ARE_NOT_ALLOWED = new StringId(1142, "CacheClientNotifier: The requested durable client has the same identifier ( {0} ) as an existing durable client ( {1} ). Duplicate durable clients are not allowed.");
+  public static final StringId CacheClientNotifier_CACHECLIENTNOTIFIER_UNSUCCESSFULLY_REGISTERED_CLIENT_WITH_IDENTIFIER__0 = new StringId(1143, "CacheClientNotifier: Unsuccessfully registered client with identifier  {0}");
+  public static final StringId CacheClientNotifier_CANNOT_NOTIFY_CLIENTS_TO_PERFORM_OPERATION_0_ON_EVENT_1 = new StringId(1144, "CacheClientNotifier: Cannot notify clients to perform operation {0} on event {1}");
+  public static final StringId CacheClientNotifier_EXCEPTION_OCCURRED_WHILE_PROCESSING_CQS = new StringId(1145, "Exception occurred while processing CQs");
+
+  public static final StringId CacheClientNotifier_UNABLE_TO_CLOSE_CQS_FOR_THE_CLIENT__0 = new StringId(1147, "Unable to close CQs for the client:  {0}");
+  public static final StringId CacheClientNotifier_UNABLE_TO_GET_THE_CQSERVICE_WHILE_CLOSING_THE_DEAD_PROXIES = new StringId(1148, "Unable to get the CqService while closing the dead proxies");
+  public static final StringId CacheClientProxy_0_AN_UNEXPECTED_IOEXCEPTION_OCCURRED_SO_THE_PROXY_WILL_BE_CLOSED = new StringId(1149, "{0}: An unexpected IOException occurred so the proxy will be closed.");
+  public static final StringId CacheClientProxy_0_CANCELLING_EXPIRATION_TASK_SINCE_THE_CLIENT_HAS_RECONNECTED = new StringId(1150, "{0}: Cancelling expiration task since the client has reconnected.");
+  public static final StringId CacheClientProxy_0_COULD_NOT_STOP_MESSAGE_DISPATCHER_THREAD = new StringId(1151, "{0}: Could not stop message dispatcher thread.");
+  public static final StringId CacheClientProxy_0_EXCEPTION_IN_CLOSING_THE_UNDERLYING_HAREGION_OF_THE_HAREGIONQUEUE = new StringId(1152, "{0}: Exception in closing the underlying HARegion of the HARegionQueue");
+  public static final StringId CacheClientProxy_0_EXCEPTION_OCCURRED_WHILE_ATTEMPTING_TO_ADD_MESSAGE_TO_QUEUE = new StringId(1153, "{0}: Exception occurred while attempting to add message to queue");
+  public static final StringId CacheClientProxy_0_POSSIBILITY_OF_NOT_BEING_ABLE_TO_SEND_SOME_OR_ALL_THE_MESSAGES_TO_CLIENTS_TOTAL_MESSAGES_CURRENTLY_PRESENT_IN_THE_LIST_1 = new StringId(1154, "{0} Possibility of not being able to send some or all of the messages to clients. Total messages currently present in the list {1}.");
+  public static final StringId CacheClientProxy_0_PROXY_CLOSING_DUE_TO_SOCKET_BEING_CLOSED_LOCALLY = new StringId(1155, "{0}: Proxy closing due to socket being closed locally.");
+  public static final StringId CacheClientProxy_0_PROXY_CLOSING_DUE_TO_UNEXPECTED_BROKEN_PIPE_ON_SOCKET_CONNECTION = new StringId(1156, "{0}: Proxy closing due to unexpected broken pipe on socket connection.");
+  public static final StringId CacheClientProxy_0_PROXY_CLOSING_DUE_TO_UNEXPECTED_RESET_BY_PEER_ON_SOCKET_CONNECTION = new StringId(1157, "{0}: Proxy closing due to unexpected reset by peer on socket connection.");
+  public static final StringId CacheClientProxy_0_PROXY_CLOSING_DUE_TO_UNEXPECTED_RESET_ON_SOCKET_CONNECTION = new StringId(1158, "{0}: Proxy closing due to unexpected reset on socket connection.");
+  public static final StringId CacheClientProxy_0__AN_UNEXPECTED_EXCEPTION_OCCURRED = new StringId(1159, "{0} : An unexpected Exception occurred");
+  public static final StringId CacheClientProxy_0__EXCEPTION_OCCURRED_WHILE_ATTEMPTING_TO_ADD_MESSAGE_TO_QUEUE = new StringId(1160, "{0} : Exception occurred while attempting to add message to queue");
+  public static final StringId CacheClientProxy_0__PAUSING_PROCESSING = new StringId(1161, "{0} : Pausing processing");
+  public static final StringId CacheClientProxy_0__RESUMING_PROCESSING = new StringId(1162, "{0} : Resuming processing");
+  public static final StringId CacheClientProxy_0__THE_EXPIRATION_TASK_HAS_FIRED_SO_THIS_PROXY_IS_BEING_TERMINATED = new StringId(1163, "{0} : The expiration task has fired, so this proxy is being terminated.");
+
+  public static final StringId CacheClientProxy_PROBLEM_CAUSED_BY_BROKEN_PIPE_ON_SOCKET = new StringId(1166, "Problem caused by broken pipe on socket.");
+  public static final StringId CacheClientProxy_PROBLEM_CAUSED_BY_MESSAGE_QUEUE_BEING_CLOSED = new StringId(1167, "Problem caused by message queue being closed.");
+  public static final StringId CacheClientUpdater_0_CAUGHT_FOLLOWING_EXECPTION_WHILE_ATTEMPTING_TO_CREATE_A_SERVER_TO_CLIENT_COMMUNICATION_SOCKET_AND_WILL_EXIT_1 = new StringId(1168, "{0}: Caught following exception while attempting to create a server-to-client communication socket and will exit: {1}");
+  public static final StringId CacheClientUpdater_0_CONNECTION_WAS_REFUSED = new StringId(1169, "{0} connection was refused");
+  public static final StringId CacheClientUpdater_SSL_NEGOTIATION_FAILED_WITH_ENDPOINT_0 = new StringId(1170, "SSL negotiation failed with endpoint: {0}");
+
+  public static final StringId CacheClientUpdater_0_RECEIVED_AN_UNSUPPORTED_MESSAGE_TYPE_1 = new StringId(1172, "{0}: Received an unsupported message (type={1})");
+  public static final StringId CacheClientUpdater_0__1__2 = new StringId(1173, "{0} :  {1} : {2}");
+  public static final StringId CacheClientUpdater_THE_FOLLOWING_EXCEPTION_OCCURRED_WHILE_ATTEMPTING_TO_DESTROY_ENTRY_REGION_0_KEY_1 = new StringId(1174, "The following exception occurred while attempting to destroy entry (region: {0} key: {1})");
+
+  public static final StringId CacheClientUpdater_FAILED_TO_INVOKE_CQ_DISPATCHER_ERROR___0 = new StringId(1177, "Failed to invoke CQ Dispatcher. Error :  {0}");
+
+  public static final StringId CacheFactory_0_AN_OPEN_CACHE_ALREADY_EXISTS = new StringId(1179, "{0}: An open cache already exists.");
+  public static final StringId InternalDistributedSystem_shutdownHook_shuttingdown = new StringId(1180, "VM is exiting - shutting down distributed system");
+  public static final StringId GroupMembershipService_entered_into_membership_in_group_0_with_id_1 = new StringId(1181, "Finished joining (took {0}ms).");
+  public static final StringId CacheServerLauncher_CACHE_SERVER_ERROR = new StringId(1182, "Cache server error");
+  public static final StringId CacheXmlParser_XML_PARSER_CHARACTERS_APPENDED_CHARACTER_DATA_0 = new StringId(1183, "XML Parser characters, appended character data: {0}");
+  public static final StringId CacheXmlParser_XML_PARSER_CHARACTERS_NEW_CHARACTER_DATA_0 = new StringId(1184, "XML Parser characters, new character data: {0}");
+  public static final StringId CacheXmlParser_XML_PARSER_CREATEDECLARABLE_CLASS_NAME_0 = new StringId(1185, "XML Parser createDeclarable class name: {0}");
+  public static final StringId CacheXmlParser_XML_PARSER_CREATEDECLARABLE_PROPERTIES__0 = new StringId(1186, "XML Parser createDeclarable properties:  {0}");
+  public static final StringId ClearRegion_0_THE_INPUT_REGION_NAME_FOR_THE_CLEAR_REGION_REQUEST_IS_NULL = new StringId(1187, "{0}: The input region name for the clear region request is null");
+  public static final StringId ClearRegion_THE_INPUT_REGION_NAME_FOR_THE_CLEAR_REGION_REQUEST_IS_NULL = new StringId(1188, " The input region name for the clear region request is null");
+  public static final StringId ClearRegion_WAS_NOT_FOUND_DURING_CLEAR_REGION_REGUEST = new StringId(1189, " was not found during clear region request");
+  public static final StringId ClientHealtMonitor_0_IS_BEING_TERMINATED_BECAUSE_ITS_CLIENT_TIMEOUT_OF_1_HAS_EXPIRED = new StringId(1190, "{0} is being terminated because its client timeout of {1} has expired.");
+  public static final StringId ClientHealthMonitor_0_AN_UNEXPECTED_EXCEPTION_OCCURRED = new StringId(1191, "{0}: An unexpected Exception occurred");
+  public static final StringId ClientHealthMonitor_CLIENTHEALTHMONITORTHREAD_MAXIMUM_ALLOWED_TIME_BETWEEN_PINGS_0 = new StringId(1192, "ClientHealthMonitorThread maximum allowed time between pings: {0}");
+  public static final StringId ClientHealthMonitor_CLIENTHEALTHMONITOR_REGISTERING_CLIENT_WITH_MEMBER_ID_0 = new StringId(1193, "ClientHealthMonitor: Registering client with member id {0}");
+  public static final StringId ClientHealthMonitor_CLIENTHEALTHMONITOR_UNREGISTERING_CLIENT_WITH_MEMBER_ID_0 = new StringId(1194, "ClientHealthMonitor: Unregistering client with member id {0}");
+  public static final StringId ClientHealthMonitor_CLIENT_HEALTH_MONITOR_THREAD_DISABLED_DUE_TO_MAXIMUMTIMEBETWEENPINGS_SETTING__0 = new StringId(1195, "Client health monitor thread disabled due to maximumTimeBetweenPings setting:  {0}");
+  public static final StringId ClientHealthMonitor_MONITORING_CLIENT_WITH_MEMBER_ID_0_IT_HAD_BEEN_1_MS_SINCE_THE_LATEST_HEARTBEAT_MAX_INTERVAL_IS_2_TERMINATED_CLIENT = new StringId(1196, "Monitoring client with member id {0}. It had been {1} ms since the latest heartbeat. Max interval is {2}. Terminated client.");
+  public static final StringId ClientHealthMonitor_UNEXPECTED_INTERRUPT_EXITING = new StringId(1197, "Unexpected interrupt, exiting");
+  public static final StringId ClientProxyMembershipID_UNABLE_TO_DESERIALIZE_MEMBERSHIP_ID = new StringId(1198, "Unable to deserialize membership id");
+  public static final StringId DiskStore_IS_USED_IN_NONPERSISTENT_REGION = new StringId(1199, "Only regions with persistence or overflow to disk can specify DiskStore");
+  public static final StringId DiskRegion_COMPLEXDISKREGIONGETNEXTDIR_MAX_DIRECTORY_SIZE_WILL_GET_VIOLATED__GOING_AHEAD_WITH_THE_SWITCHING_OF_OPLOG_ANY_WAYS_CURRENTLY_AVAILABLE_SPACE_IN_THE_DIRECTORY_IS__0__THE_CAPACITY_OF_DIRECTORY_IS___1 = new StringId(1200, "Even though the configured directory size limit has been exceeded a new oplog will be created because compaction is enabled. The configured limit is {1}. The current space used in the directory by this disk store is {0}.");
+
+  public static final StringId AttributesFactory_CLONENOTSUPPORTEDEXCEPTION_THROWN_IN_CLASS_THAT_IMPLEMENTS_CLONEABLE = new StringId(1213, "CloneNotSupportedException thrown in class that implements cloneable.");
+
+  public static final StringId CqQueryImpl_CQ_IS_CLOSED_CQNAME_0 = new StringId(1215, "CQ is closed, CqName : {0}");
+
+  public static final StringId Connection_DISCONNECTED_AS_A_SLOWRECEIVER = new StringId(1226, "Disconnected as a slow-receiver");
+
+  public static final StringId ConnectionTable_FAILED_TO_ACCEPT_CONNECTION_FROM_0_BECAUSE_1 = new StringId(1240, "Failed to accept connection from {0} because: {1}");
+
+  public static final StringId Connection_0_ASYNC_CONFIGURATION_RECEIVED_1 = new StringId(1243, "{0} async configuration received {1}.");
+  public static final StringId Connection_0_ERROR_READING_MESSAGE = new StringId(1244, "{0} Error reading message");
+  public static final StringId Connection_0_EXCEPTION_IN_CHANNEL_READ = new StringId(1245, "{0} exception in channel read");
+  public static final StringId Connection_0_EXCEPTION_RECEIVED = new StringId(1246, "{0} exception received");
+  public static final StringId Connection_0_STRAY_INTERRUPT_READING_MESSAGE = new StringId(1247, "{0} Stray interrupt reading message");
+  public static final StringId Connection_0_SUCCESSFULLY_REESTABLISHED_CONNECTION_TO_PEER_1 = new StringId(1248, "{0}: Successfully reestablished connection to peer {1}");
+  public static final StringId Connection_ACK_READ_EXCEPTION = new StringId(1249, "ack read exception");
+  public static final StringId Connection_ACK_READ_EXCEPTION_0 = new StringId(1250, "ack read exception: {0}");
+
+  public static final StringId Connection_ALLOCATING_LARGER_NETWORK_READ_BUFFER_NEW_SIZE_IS_0_OLD_SIZE_WAS_1 = new StringId(1254, "Allocating larger network read buffer, new size is {0} old size was {1}.");
+  public static final StringId Connection_BLOCKED_FOR_0_MS_WHICH_IS_LONGER_THAN_THE_MAX_OF_1_MS_ASKING_SLOW_RECEIVER_2_TO_DISCONNECT = new StringId(1255, "Blocked for {0}ms which is longer than the max of {1}ms, asking slow receiver {2} to disconnect.");
+  public static final StringId Connection_CLASSNOTFOUND_DESERIALIZING_MESSAGE_0 = new StringId(1256, "ClassNotFound deserializing message: {0}");
+  public static final StringId Connection_CONNECTION_ATTEMPTING_RECONNECT_TO_PEER__0 = new StringId(1257, "Connection: Attempting reconnect to peer  {0}");
+  public static final StringId Connection_CONNECTION_FAILED_TO_CONNECT_TO_PEER_0_BECAUSE_1 = new StringId(1258, "Connection: shared={0} ordered={1} failed to connect to peer {2} because: {3}");
+  public static final StringId Connection_CONNECTION_HANDSHAKE_FAILED_TO_CONNECT_TO_PEER_0_BECAUSE_1 = new StringId(1259, "Connection: shared={0} ordered={1} handshake failed to connect to peer {2} because: {3}");
+  public static final StringId Connection_DETECTED_OLD_VERSION_PRE_5_0_1_OF_GEMFIRE_OR_NONGEMFIRE_DURING_HANDSHAKE_DUE_TO_INITIAL_BYTE_BEING_0 = new StringId(1260, "Detected old version (pre 5.0.1) of GemFire or non-GemFire during handshake due to initial byte being {0}");
+  public static final StringId Connection_END_OF_FILE_ON_ACK_STREAM = new StringId(1261, "end of file on ack stream");
+  public static final StringId Connection_ERROR_DESERIALIZING_MESSAGE = new StringId(1262, "Error deserializing message");
+  public static final StringId Connection_ERROR_DESERIALIZING_P2P_HANDSHAKE_MESSAGE = new StringId(1263, "Error deserializing P2P handshake message");
+  public static final StringId Connection_ERROR_DESERIALIZING_P2P_HANDSHAKE_REPLY = new StringId(1264, "Error deserializing P2P handshake reply");
+  public static final StringId Connection_ERROR_DISPATCHING_MESSAGE = new StringId(1265, "Error dispatching message");
+  public static final StringId Connection_EXCEPTION_FLUSHING_BATCH_SEND_BUFFER_0 = new StringId(1266, "Exception flushing batch send buffer: {0}");
+  public static final StringId Connection_FAILED_HANDLING_CHUNK_MESSAGE = new StringId(1267, "Failed handling chunk message");
+  public static final StringId Connection_FAILED_HANDLING_END_CHUNK_MESSAGE = new StringId(1268, "Failed handling end chunk message");
+  public static final StringId Connection_FAILED_SETTING_CHANNEL_TO_BLOCKING_MODE_0 = new StringId(1269, "Failed setting channel to blocking mode {0}");
+  public static final StringId Connection_FINISHED_WAITING_FOR_REPLY_FROM_0 = new StringId(1270, "Finished waiting for reply from {0}");
+  public static final StringId Connection_IOEXCEPTION_DESERIALIZING_MESSAGE = new StringId(1271, "IOException deserializing message");
+  public static final StringId Connection_OWNER_SHOULD_NOT_BE_NULL = new StringId(1272, "\"owner\" should not be null");
+  public static final StringId Connection_P2P_PUSHER_EXCEPTION_0 = new StringId(1273, "P2P pusher exception: {0}");
+  public static final StringId Connection_QUEUED_BYTES_0_EXCEEDS_MAX_OF_1_ASKING_SLOW_RECEIVER_2_TO_DISCONNECT = new StringId(1274, "Queued bytes {0} exceeds max of {1}, asking slow receiver {2} to disconnect.");
+  public static final StringId Connection_SOCKET_0_IS_1_INSTEAD_OF_THE_REQUESTED_2 = new StringId(1275, "Socket {0} is {1} instead of the requested {2}.");
+  public static final StringId Connection_THROWABLE_DESERIALIZING_P2P_HANDSHAKE_REPLY = new StringId(1276, "Throwable deserializing P2P handshake reply");
+  public static final StringId Connection_THROWABLE_DISPATCHING_MESSAGE = new StringId(1277, "Throwable dispatching message");
+  public static final StringId Connection_TIMED_OUT_WAITING_FOR_READERTHREAD_ON_0_TO_FINISH = new StringId(1278, "Timed out waiting for readerThread on {0} to finish.");
+  public static final StringId Connection_UNABLE_TO_GET_INPUT_STREAM = new StringId(1279, "Unable to get input stream");
+  public static final StringId Connection_UNABLE_TO_GET_P2P_CONNECTION_STREAMS = new StringId(1280, "Unable to get P2P connection streams");
+  public static final StringId Connection_UNEXPECTED_FAILURE_DESERIALIZING_MESSAGE = new StringId(1281, "Unexpected failure deserializing message");
+  public static final StringId Connection_UNKNOWN_HANDSHAKE_REPLY_CODE_0 = new StringId(1282, "Unknown handshake reply code: {0}");
+  public static final StringId Connection_UNKNOWN_HANDSHAKE_REPLY_CODE_0_NIOMESSAGELENGTH_1_PROCESSORTYPE_2 = new StringId(1283, "Unknown handshake reply code: {0} nioMessageLength={1} processorType={2}");
+  public static final StringId Connection_UNKNOWN_P2P_MESSAGE_TYPE_0 = new StringId(1284, "Unknown P2P message type: {0}");
+  public static final StringId Connection_UNKNOWN_PROCESSOR_TYPE_0 = new StringId(1285, "Unknown processor type: {0}");
+  public static final StringId ContainsKeyValueMess_PARTITIONED_REGION_0_IS_NOT_CONFIGURED_TO_STORE_DATA = new StringId(1286, "Partitioned Region {0} is not configured to store data");
+  // ok to reuse 1287
+  public static final StringId ContainsKey_0_THE_INPUT_KEY_FOR_THE_CONTAINSKEY_REQUEST_IS_NULL = new StringId(1288, "{0}: The input key for the containsKey request is null");
+  public static final StringId ContainsKey_0_THE_INPUT_REGION_NAME_FOR_THE_CONTAINSKEY_REQUEST_IS_NULL = new StringId(1289, "{0}: The input region name for the containsKey request is null");
+  public static final StringId ContainsKey_THE_INPUT_KEY_FOR_THE_CONTAINSKEY_REQUEST_IS_NULL = new StringId(1290, " The input key for the containsKey request is null");
+  public static final StringId ContainsKey_THE_INPUT_REGION_NAME_FOR_THE_CONTAINSKEY_REQUEST_IS_NULL = new StringId(1291, " The input region name for the containsKey request is null");
+  public static final StringId ContainsKey_WAS_NOT_FOUND_DURING_CONTAINSKEY_REQUEST = new StringId(1292, " was not found during containsKey request");
+  public static final StringId ContextImpl_CONTEXTIMPL_LOOKUP_ERROR_WHILE_CREATING_USERTRANSACTION_OBJECT = new StringId(1293, "ContextImpl::lookup::Error while creating UserTransaction object");
+  public static final StringId ContextImpl_CONTEXTIMPL_LOOKUP_ERROR_WHILE_LOOKING_UP_0 = new StringId(1294, "ContextImpl::lookup::Error while looking up {0}");
+  public static final StringId CqAttributesFactory_EXCEPTION_CLOSING_CQ_LISTENER_ERROR_0 = new StringId(1295, "Exception closing CQ Listener Error: {0}");
+  public static final StringId CqAttributesFactory_EXCEPTION_OCCURED_WHILE_CLOSING_CQ_LISTENER_ERROR_0 = new StringId(1296, "Exception occurred while closing CQ Listener Error: {0}");
+  public static final StringId CqAttributesFactory_RUNTIME_EXCEPTION_OCCURED_CLOSING_CQ_LISTENER_ERROR_0 = new StringId(1297, "Runtime Exception occurred closing CQ Listener Error: {0}");
+  public static final StringId CqAttributesFactory_RUNTIME_EXCEPTION_OCCURED_WHILE_CLOSING_CQ_LISTENER_ERROR_0 = new StringId(1298, "Runtime Exception occurred while closing CQ Listener Error: {0}");
+  public static final StringId CqQueryImpl_FAILED_TO_STORE_CONTINUOUS_QUERY_IN_THE_REPOSITORY_CQNAME_0_1 = new StringId(1299, "Failed to store Continuous Query in the repository. CqName: {0} {1}");
+
+  public static final StringId PRHARRedundancyProvider_0_IN_THE_PARTITIONED_REGION_REGION_NAME_1 = new StringId(1301, "{0} Region name = {1}");
+  public static final StringId CqQueryImpl_CLASS_NOT_FOUND_EXCEPTION_THE_ANTLRJAR_OR_THE_SPCIFIED_CLASS_MAY_BE_MISSING_FROM_SERVER_SIDE_CLASSPATH_ERROR_0 = new StringId(1302, "Class not found exception. The antlr.jar or the spcified class may be missing from server side classpath. Error : {0}");
+  public static final StringId CqQueryImpl_CQ_IS_NOT_IN_RUNNING_STATE_STOP_CQ_DOES_NOT_APPLY_CQNAME_0 = new StringId(1303, "CQ is not in running state, stop CQ does not apply, CqName : {0}");
+  public static final StringId CqQueryImpl_CQ_QUERIES_CANNOT_HAVE_MORE_THAN_ONE_ITERATOR_IN_THE_FROM_CLAUSE = new StringId(1304, "CQ queries cannot have more than one iterator in the FROM clause");
+  public static final StringId CqQueryImpl_CQ_QUERIES_DO_NOT_SUPPORT_ORDER_BY = new StringId(1305, "CQ queries do not support ORDER BY");
+  public static final StringId CqQueryImpl_CQ_QUERIES_DO_NOT_SUPPORT_PROJECTIONS = new StringId(1306, "CQ queries do not support projections");
+  public static final StringId CqQueryImpl_CQ_QUERIES_MUST_BE_A_SELECT_STATEMENT_ONLY = new StringId(1307, "CQ queries must be a select statement only");
+  public static final StringId CqQueryImpl_CQ_QUERIES_MUST_HAVE_A_REGION_PATH_ONLY_AS_THE_FIRST_ITERATOR_IN_THE_FROM_CLAUSE = new StringId(1308, "CQ queries must have a region path only as the first iterator in the FROM clause");
+  public static final StringId CqQueryImpl_CQ_QUERIES_MUST_REFERENCE_ONE_AND_ONLY_ONE_REGION = new StringId(1309, "CQ queries must reference one and only one region");
+  public static final StringId CqQueryImpl_ERROR_WHILE_PARSING_THE_QUERY_ERROR_0 = new StringId(1310, "Error while parsing the query. Error : {0}");
+  public static final StringId PRHARRedundancyProvider_UNABLE_TO_FIND_ANY_MEMBERS_TO_HOST_A_BUCKET_IN_THE_PARTITIONED_REGION_0 = new StringId(1311, "Unable to find any members to host a bucket in the partitioned region. {0}.{1}");
+  public static final StringId CqQueryImpl_EXCEPTION_OCCOURED_IN_THE_CQLISTENER_OF_THE_CQ_CQNAME_0_ERROR_1 = new StringId(1312, "Exception occurred in the CqListener of the CQ, CqName : {0} Error : {1}");
+
+  public static final StringId CqQueryImpl_FAILED_TO_CLOSE_THE_CQ_CQNAME_0_ERROR_FROM_LAST_ENDPOINT_1 = new StringId(1314, "Failed to close the cq. CqName: {0}. Error from last endpoint: {1}");
+
+  public static final StringId CqQueryImpl_FAILED_TO_STOP_THE_CQ_CQNAME_0_ERROR_FROM_LAST_SERVER_1 = new StringId(1316, "Failed to stop the cq. CqName :{0} Error from last server: {1}");
+
+  public static final StringId CqQueryImpl_REGION_ON_WHICH_QUERY_IS_SPECIFIED_NOT_FOUND_LOCALLY_REGIONNAME_0 = new StringId(1318, "Region on which query is specified not found locally, regionName: {0}");
+  public static final StringId CqQueryImpl_REGION__0_SPECIFIED_WITH_CQ_NOT_FOUND_CQNAME_1 = new StringId(1319, "Region : {0} specified with cq not found. CqName: {1}");
+  public static final StringId CqQueryImpl_RUNTIMEEXCEPTION_OCCOURED_IN_THE_CQLISTENER_OF_THE_CQ_CQNAME_0_ERROR_1 = new StringId(1320, "RuntimeException occurred in the CqListener of the CQ, CqName : {0} Error : {1}");
+  public static final StringId CqQueryImpl_SELECT_DISTINCT_QUERIES_NOT_SUPPORTED_IN_CQ = new StringId(1321, "select DISTINCT queries not supported in CQ");
+
+  public static final StringId CqQueryImpl_THE_WHERE_CLAUSE_IN_CQ_QUERIES_CANNOT_REFER_TO_A_REGION = new StringId(1323, "The WHERE clause in CQ queries cannot refer to a region");
+  public static final StringId CqQueryImpl_UNABLE_TO_CREATE_CQ_0_ERROR__1 = new StringId(1324, "Unable to create cq {0} Error : {1}");
+
+  public static final StringId CqQueryImpl_CQ_IS_IN_RUNNING_STATE_CQNAME_0 = new StringId(1327, "CQ is in running state, CqName : {0}");
+
+  public static final StringId CqService_CLIENT_SIDE_NEWCQ_METHOD_INVOCATION_ON_SERVER = new StringId(1329, "client side newCq() method invocation on server.");
+  public static final StringId CqService_CQ_NOT_FOUND_FAILED_TO_CLOSE_THE_SPECIFIED_CQ_0 = new StringId(1330, "CQ Not found, Failed to close the specified CQ {0}");
+
+  public static final StringId CqService_CQ_NOT_FOUND_IN_THE_CQ_META_REGION_CQNAME_0 = new StringId(1332, "CQ not found in the cq meta region, CqName: {0}");
+  public static final StringId CqService_CQ_WITH_THE_GIVEN_NAME_ALREADY_EXISTS_CQNAME_0 = new StringId(1333, "CQ with the given name already exists. CqName : {0}");
+
+  public static final StringId RemoteGfManagerAgent_LISTENER_THREW_AN_EXCEPTION = new StringId(1335, "Listener threw an exception.");
+  public static final StringId PRHARRedundancyProvider_FOUND_A_MEMBER_TO_HOST_A_BUCKET = new StringId(1336, "Found a member to host a bucket.");
+  public static final StringId CqService_EXCEPTION_IN_THE_CQLISTENER_OF_THE_CQ_CQNAME_0_ERROR__1 = new StringId(1337, "Exception in the CqListener of the CQ, CqName: {0} Error : {1}");
+  public static final StringId CqService_EXCEPTION_WHILE_REGISTERING_CQ_ON_SERVER_CQNAME___0 = new StringId(1338, "Exception while registering CQ on server. CqName :  {0}");
+  public static final StringId CqService_FAILED_TO_CLOSE_CQ__0___1 = new StringId(1339, "Failed to close CQ {0} {1}");
+
+  public static final StringId CqService_INVALID_CQ_MONITOR_REQUEST_RECEIVED = new StringId(1345, "Invalid CQ Monitor request received.");
+
+  public static final StringId CqService_NULL_ARGUMENT_0 = new StringId(1348, "Null argument \"{0}\"");
+  public static final StringId CqService_RUNTIME_EXCEPTION_IN_THE_CQLISTENER_OF_THE_CQ_CQNAME_0_ERROR__1 = new StringId(1349, "Runtime Exception in the CqListener of the CQ, CqName: {0} Error : {1}");
+  public static final StringId CqService_SERVER_SIDE_EXECUTECQ_METHOD_IS_CALLED_ON_CLIENT_CQNAME_0 = new StringId(1350, "Server side executeCq method is called on client. CqName : {0}");
+
+  public static final StringId CqQueryImpl_FAILED_TO_CLOSE_THE_CQ_CQNAME_0_THE_SERVER_ENDPOINTS_ON_WHICH_THIS_CQ_WAS_REGISTERED_WERE_NOT_FOUND = new StringId(1354, "Failed to close the cq. CqName: {0}. The server endpoints on which this cq was registered were not found.");
+
+  public static final StringId CreateRegionProcessor_MORE_THAN_ONE_EXCEPTION_THROWN_IN__0 = new StringId(1356, "More than one exception thrown in  {0}");
+  public static final StringId CreateRegion_0_THE_INPUT_PARENT_REGION_NAME_FOR_THE_CREATE_REGION_REQUEST_IS_NULL = new StringId(1357, "{0}: The input parent region name for the create region request is null");
+  public static final StringId CreateRegion_0_THE_INPUT_REGION_NAME_FOR_THE_CREATE_REGION_REQUEST_IS_NULL = new StringId(1358, "{0}: The input region name for the create region request is null");
+  public static final StringId CreateRegion_THE_INPUT_PARENT_REGION_NAME_FOR_THE_CREATE_REGION_REQUEST_IS_NULL = new StringId(1359, " The input parent region name for the create region request is null");
+  public static final StringId CreateRegion_THE_INPUT_REGION_NAME_FOR_THE_CREATE_REGION_REQUEST_IS_NULL = new StringId(1360, " The input region name for the create region request is null");
+  public static final StringId DLockGrantor_DEBUGHANDLESUSPENDTIMEOUTS_SLEEPING_FOR__0 = new StringId(1361, "debugHandleSuspendTimeouts sleeping for  {0}");
+
+  public static final StringId DLockGrantor_DLOCKGRANTORTHREAD_WAS_UNEXPECTEDLY_INTERRUPTED = new StringId(1363, "DLockGrantorThread was unexpectedly interrupted");
+
+  public static final StringId DLockGrantor_PROCESSING_OF_POSTREMOTERELEASELOCK_THREW_UNEXPECTED_RUNTIMEEXCEPTION = new StringId(1367, "Processing of postRemoteReleaseLock threw unexpected RuntimeException");
+
+  public static final StringId DLockGrantor_RELEASED_REGULAR_LOCK_WITH_WAITING_READ_LOCK_0 = new StringId(1369, "Released regular lock with waiting read lock: {0}");
+
+  public static final StringId DLockRequestProcessor_DLOCKREQUESTMESSAGEPROCESS_CAUGHT_THROWABLE = new StringId(1373, "[DLockRequestMessage.process] Caught throwable:");
+  public static final StringId DLockRequestProcessor_FAILED_TO_FIND_PROCESSOR_FOR__0 = new StringId(1374, "Failed to find processor for {0}");
+  public static final StringId DLockRequestProcessor_HANDLED_LOCAL_ORPHANED_GRANT = new StringId(1375, "Handled local orphaned grant.");
+  public static final StringId DLockRequestProcessor_HANDLED_ORPHANED_GRANT_WITHOUT_RELEASE = new StringId(1376, "Handled orphaned grant without release.");
+  public static final StringId DLockRequestProcessor_HANDLED_ORPHANED_GRANT_WITH_RELEASE = new StringId(1377, "Handled orphaned grant with release.");
+  public static final StringId DLockRequestProcessor_MORE_THAN_ONE_EXCEPTION_THROWN_IN__0 = new StringId(1378, "More than one exception thrown in {0}");
+  public static final StringId DLockRequestProcessor_NO_PROCESSOR_FOUND_FOR_DLOCKRESPONSEMESSAGE__0 = new StringId(1379, "No processor found for DLockResponseMessage: {0}");
+  public static final StringId DLockRequestProcessor_RELEASING_LOCAL_ORPHANED_GRANT_FOR_0 = new StringId(1380, "Releasing local orphaned grant for {0}.");
+  public static final StringId DLockRequestProcessor_RELEASING_ORPHANED_GRANT_FOR__0 = new StringId(1381, "Releasing orphaned grant for  {0}");
+  public static final StringId DLockRequestProcessor_WAITING_TO_PROCESS_DLOCKRESPONSEMESSAGE = new StringId(1382, "Waiting to process DLockResponseMessage");
+  public static final StringId DLockService_DEBUG_GRANTOR_REPORTS_NOT_HOLDER_FOR_0 = new StringId(1383, "DEBUG: Grantor reports NOT_HOLDER for {0}");
+  public static final StringId DLockService_DEBUG_LOCKINTERRUPTIBLY_HAS_GONE_HOT_AND_LOOPED_0_TIMES = new StringId(1384, "DEBUG: lockInterruptibly has gone hot and looped [0] times");
+
+  public static final StringId DLockService_FAILED_TO_NOTIFY_GRANTOR_OF_DESTRUCTION_WITHIN_0_ATTEMPTS = new StringId(1386, "Failed to notify grantor of destruction within {0} attempts.");
+  public static final StringId DLockService_GRANTOR_CREATION_WAS_ABORTED_BUT_GRANTOR_WAS_NOT_DESTROYED = new StringId(1387, "Grantor creation was aborted but grantor was not destroyed");
+  public static final StringId DLockService_GRANTOR_IS_STILL_INITIALIZING = new StringId(1388, "Grantor is still initializing");
+  public static final StringId DLockService_GRANTOR_REPORTS_REENTRANT_LOCK_NOT_HELD_0 = new StringId(1389, "Grantor reports reentrant lock not held: {0}");
+  public static final StringId DLockService_LOCK_WAS_INTERRUPTED = new StringId(1390, "lock() was interrupted");
+
+  public static final StringId DLockToken_ATTEMPTING_TO_USE_DESTROYED_TOKEN_0 = new StringId(1392, "Attempting to use destroyed token: {0}");
+  public static final StringId DataSerializer_CLASS_0_DOES_NOT_HAVE_A_ZEROARGUMENT_CONSTRUCTOR = new StringId(1393, "Class {0} does not have a zero-argument constructor.");
+  public static final StringId DataSerializer_CLASS_0_DOES_NOT_HAVE_A_ZEROARGUMENT_CONSTRUCTOR_IT_IS_AN_INNER_CLASS_OF_1_SHOULD_IT_BE_A_STATIC_INNER_CLASS = new StringId(1394, "Class {0} does not have a zero-argument constructor. It is an inner class of {1}. Should it be a static inner class?");
+  public static final StringId DataSourceFactory_DATASOURCEFACTORYGETMANAGEDDATASOURCEMANAGED_CONNECTION_FACTORY_CLASS_IS_NOT_AVAILABLE = new StringId(1395, "DataSourceFactory::getManagedDataSource:Managed Connection factory class is not available");
+  public static final StringId DataSourceFactory_DATASOURCEFACTORYGETMANAGEDDATASOURCE_EXCEPTION_IN_CREATING_MANAGED_CONNECTION_FACTORY_EXCEPTION_STRING_0 = new StringId(1396, "DataSourceFactory::getManagedDataSource: Exception in creating managed connection factory. Exception string = {0}");
+  public static final StringId DataSourceFactory_DATASOURCEFACTORYGETPOOLEDDATASOURCECONNECTIONPOOLDATASOURCE_CLASS_NAME_FOR_THE_RESOURCEMANAGER_IS_NOT_AVAILABLE = new StringId(1397, "DataSourceFactory::getPooledDataSource:ConnectionPoolDataSource class name for the ResourceManager is not available");
+  public static final StringId DataSourceFactory_DATASOURCEFACTORYGETSIMPLEDATASOURCEJDBC_DRIVER_IS_NOT_AVAILABLE = new StringId(1398, "DataSourceFactory::getSimpleDataSource:JDBC Driver is not available");
+  public static final StringId DataSourceFactory_DATASOURCEFACTORYGETSIMPLEDATASOURCEURL_STRING_TO_DATABASE_IS_NULL = new StringId(1399, "DataSourceFactory::getSimpleDataSource:URL String to Database is null");
+  public static final StringId DataSourceFactory_DATASOURCEFACTORYGETTRANXDATASOURCEXADATASOURCE_CLASS_NAME_FOR_THE_RESOURCEMANAGER_IS_NOT_AVAILABLE = new StringId(1400, "DataSourceFactory::getTranxDataSource:XADataSource class name for the ResourceManager is not available");
+  public static final StringId DataSourceFactory_DATASOURCEFACTORY_GETPOOLEDDATASOURCE_EXCEPTION_CREATING_CONNECTIONPOOLDATASOURCE_EXCEPTION_STRING_0 = new StringId(1401, "DataSourceFactory::getPooledDataSource:Exception creating ConnectionPoolDataSource.Exception string={0}");
+  public static final StringId DataSourceFactory_DATASOURCEFACTORY_GETSIMPLEDATASOURCE_EXCEPTION_WHILE_CREATING_GEMFIREBASICDATASOURCE_EXCEPTION_STRING_0 = new StringId(1402, "DataSourceFactory::getSimpleDataSource:Exception while creating GemfireBasicDataSource.Exception String={0}");
+  public static final StringId DataSourceFactory_DATASOURCEFACTORY_GETTRANXDATASOURCE_EXCEPTION_IN_CREATING_GEMFIRETRANSACTIONDATASOURCE__EXCEPTION_STRING_0 = new StringId(1403, "DataSourceFactory::getTranxDataSource:Exception in creating GemFireTransactionDataSource. Exception string={0}");
+
+  public static final StringId DebuggerSupport_DEBUGGER_CONTINUING = new StringId(1405, "DEBUGGER: Continuing");
+  public static final StringId DebuggerSupport_WAITING_FOR_DEBUGGER_TO_ATTACH_0 = new StringId(1406, "DEBUGGER: Waiting for Java debugger to attach... {0}");
+
+  public static final StringId DefaultQueryService_EXCEPTION_REMOVING_INDEX___0 = new StringId(1408, "Exception removing index :  {0}");
+  public static final StringId DefaultQueryService_EXCEPTION_WHILE_CREATING_INDEX_ON_PR_DEFAULT_QUERY_PROCESSOR = new StringId(1409, "Exception while creating index on pr default query processor.");
+
+  public static final StringId Default_0_UNKNOWN_MESSAGE_TYPE_1_WITH_TX_2_FROM_3 = new StringId(1412, "{0}: Unknown message type ({1}) with tx: {2} from {3}");
+  public static final StringId DestroEntryMessage_FAILED_ATTEMPT_TO_DESTROY_OR_INVALIDATE_ENTRY_0_1_FROM_CONSOLE_AT_2 = new StringId(1413, "Failed attempt to destroy or invalidate entry {0} {1} from console at {2}");
+  public static final StringId DestroRegionMessage_FAILED_ATTEMPT_TO_DESTROY_OR_INVALIDATE_REGION_0_FROM_CONSOLE_AT_1 = new StringId(1414, "Failed attempt to destroy or invalidate region {0} from console at {1}");
+  public static final StringId DestroyRegionOperation_CACHEWRITER_SHOULD_NOT_HAVE_BEEN_CALLED = new StringId(1415, "CacheWriter should not have been called");
+  public static final StringId DestroyRegionOperation_DISTRIBUTEDLOCK_SHOULD_NOT_HAVE_BEEN_ACQUIRED = new StringId(1416, "DistributedLock should not have been acquired");
+  public static final StringId DestroyRegionOperation_EXCEPTION_WHILE_PROCESSING__0_ = new StringId(1417, "Exception while processing [ {0} ]");
+  public static final StringId DestroyRegionOperation_GOT_TIMEOUT_WHEN_TRYING_TO_RECREATE_REGION_DURING_REINITIALIZATION_1 = new StringId(1418, "Got timeout when trying to recreate region during re-initialization: {1}");
+  public static final StringId DestroyRegionOperation_REGION_DESTRUCTION_MESSAGE_IMPLEMENTATION_IS_IN_BASICPROCESS__NOT_THIS_METHOD = new StringId(1419, "Region Destruction message implementation is in basicProcess, not this method");
+  public static final StringId DestroyRegion_0_THE_INPUT_REGION_NAME_FOR_THE_DESTROY_REGION_REQUEST_IS_NULL = new StringId(1420, "{0}: The input region name for the destroy region request is null");
+  public static final StringId Destroy_0_DURING_ENTRY_DESTROY_NO_ENTRY_WAS_FOUND_FOR_KEY_1 = new StringId(1421, "{0}: during entry destroy no entry was found for key {1}");
+  public static final StringId Destroy_0_THE_INPUT_KEY_FOR_THE_DESTROY_REQUEST_IS_NULL = new StringId(1422, "{0}: The input key for the destroy request is null");
+  public static final StringId Destroy_0_THE_INPUT_REGION_NAME_FOR_THE_DESTROY_REQUEST_IS_NULL = new StringId(1423, "{0}: The input region name for the destroy request is null");
+  public static final StringId Destroy_0_UNEXPECTED_EXCEPTION = new StringId(1424, "{0}: Unexpected Exception");
+  public static final StringId AcceptorImpl_IGNORING_MAX_THREADS_DUE_TO_JROCKIT_NIO_BUG = new StringId(1425, "Ignoring max-threads setting and using zero instead due to JRockit NIO bugs.  See GemFire bug #40198");
+  public static final StringId AbstractDistributionConfig_BIND_ADDRESS_0_INVALID_MUST_BE_IN_1 = new StringId(1426, "The bind-address \"{0}\" is not a valid address for this machine.  These are the valid addresses for this machine: {1}");
+  public static final StringId AcceptorImpl_IGNORING_MAX_THREADS_DUE_TO_WINDOWS_IPV6_BUG = new StringId(1427, "Ignoring max-threads setting and using zero instead due to Java bug 6230761: NIO does not work with IPv6 on Windows.  See GemFire bug #40472");
+
+  public static final StringId DirectChannel_0_SECONDS_HAVE_ELAPSED_WHILE_WAITING_FOR_REPLY_FROM_1_ON_2_WHOSE_CURRENT_MEMBERSHIP_LIST_IS_3 = new StringId(1430, "{0} seconds have elapsed while waiting for reply from {1} on {2} whose current membership list is: [{3}]");
+
+  public static final StringId DirectChannel_GEMFIRE_P2P_LISTENER_STARTED_ON__0 = new StringId(1432, "GemFire P2P Listener started on  {0}");
+
+  public static final StringId DirectChannel_UNABLE_TO_INITIALIZE_DIRECT_CHANNEL_BECAUSE__0 = new StringId(1434, "Unable to initialize direct channel because:  {0}");
+  public static final StringId DirectChannel_UNEXPECTED_TIMEOUT_WHILE_WAITING_FOR_ACK_FROM__0 = new StringId(1435, "Unexpected timeout while waiting for ack from  {0}");
+  public static final StringId DirectChannel_VIEW_NO_LONGER_HAS_0_AS_AN_ACTIVE_MEMBER_SO_WE_WILL_NO_LONGER_WAIT_FOR_IT = new StringId(1436, "View no longer has {0} as an active member, so we will no longer wait for it.");
+  public static final StringId DirectChannel_WHILE_PULLING_A_MESSAGE = new StringId(1437, "While pulling a message");
+  public static final StringId TXState_CANNOT_COMMIT_REMOTED_TRANSACTION = new StringId(1438, "Cannot commit a transaction being run on behalf of a remote thread");
+
+  public static final StringId DistributedCacheOperation_EXCEPTION_OCCURRED_WHILE_PROCESSING__0 = new StringId(1441, "Exception occurred while processing  {0}");
+
+  public static final StringId DistributedCacheOperation_WAITFORACKIFNEEDED_EXCEPTION = new StringId(1443, "waitForAckIfNeeded: exception");
+  public static final StringId DistributedRegion_ATTEMPT_TO_ACQUIRE_DISTRIBUTED_LOCK_FOR_0_FAILED_AFTER_WAITING_1_SECONDS = new StringId(1444, "Attempt to acquire distributed lock for {0} failed after waiting {1} seconds.");
+  public static final StringId DistributedRegion_DLS_DESTROY_MAY_HAVE_FAILED_FOR_0 = new StringId(1445, "DLS destroy may have failed for {0}");
+  public static final StringId DistributedRegion_EXCEPTION_OCCURRED_IN_REGIONMEMBERSHIPLISTENER = new StringId(1446, "Exception occurred in RegionMembershipListener");
+  public static final StringId DistributedRegion_NO_REPLICATED_REGION_FOUND_FOR_EXECUTING_FUNCTION_0 = new StringId(1447, "No Replicated Region found for executing function : {0}.");
+  public static final StringId DistributedRegion_TIMED_OUT_AFTER_WAITING_0_SECONDS_FOR_THE_DISTRIBUTED_LOCK_FOR_1 = new StringId(1448, "Timed out after waiting {0} seconds for the distributed lock for {1}.");
+  public static final StringId DistributedRegion_UNEXPECTED_EXCEPTION = new StringId(1449, "Unexpected exception:");
+
+  public static final StringId DistributionAdvisor_UNEXPECTED_EXCEPTION = new StringId(1456, "Unexpected exception:");
+  public static final StringId DistributionChannel_ATTEMPTING_A_SEND_TO_A_DISCONNECTED_DISTRIBUTIONMANAGER = new StringId(1457, "Attempting a send to a disconnected DistributionManager");
+  public static final StringId DistributionLocatorImpl_DONE_WAITING_FOR_LOCATOR = new StringId(1458, "Done waiting for locator");
+  public static final StringId DistributionLocator_COULD_NOT_BIND_LOCATOR_TO__0__1 = new StringId(1459, "Could not bind locator to {0}[{1}]");
+  public static final StringId DistributionLocator_COULD_NOT_START_LOCATOR = new StringId(1460, "Could not start locator");
+  public static final StringId DistributionLocator_LOCATOR_STOPPED = new StringId(1461, "Locator stopped");
+  public static final StringId DistributionManager_0_IS_THE_ELDER_AND_THE_ONLY_MEMBER = new StringId(1462, "{0} is the elder and the only member.");
+
+  public static final StringId DistributionManager_ADMINISTRATION_MEMBER_AT_0_CLOSED_1 = new StringId(1464, "Administration member at {0} closed: {1}");
+  public static final StringId DistributionManager_ADMINISTRATION_MEMBER_AT_0_CRASHED_1 = new StringId(1465, "Administration member at {0} crashed: {1}");
+  public static final StringId DistributionManager_ADMITTING_MEMBER_0_NOW_THERE_ARE_1_NONADMIN_MEMBERS = new StringId(1466, "Admitting member <{0}>. Now there are {1} non-admin member(s).");
+  public static final StringId DistributionManager_AT_LEAST_ONE_EXCEPTION_OCCURRED = new StringId(1467, "At least one Exception occurred.");
+  public static final StringId DistributionManager_CHANGING_ELDER_FROM_0_TO_1 = new StringId(1468, "Changing Elder from {0} to {1}.");
+  public static final StringId DistributionManager_CLOBBERTHREAD_THREAD_REFUSED_TO_DIE__0 = new StringId(1469, "clobberThread: Thread refused to die:  {0}");
+  public static final StringId DistributionManager_DAEMON_THREADS_ARE_SLOW_TO_STOP_CULPRITS_INCLUDE_0 = new StringId(1470, "Daemon threads are slow to stop; culprits include: {0}");
+  public static final StringId DistributionManager_DIDNT_HEAR_BACK_FROM_ANY_OTHER_SYSTEM_I_AM_THE_FIRST_ONE = new StringId(1471, "Did not hear back from any other system. I am the first one.");
+  public static final StringId DistributionManager_DISTRIBUTIONMANAGER_0_STARTED_ON_1_THERE_WERE_2_OTHER_DMS_3_4_5 = new StringId(1472, "DistributionManager {0} started on {1}. There were {2} other DMs. others: {3} {4} {5}");
+  public static final StringId DistributionManager_DISTRIBUTIONMANAGER_STOPPED_IN_0_MS = new StringId(1473, "DistributionManager stopped in {0}ms.");
+  public static final StringId DistributionManager_DMMEMBERSHIP_ADMITTING_NEW_ADMINISTRATION_MEMBER__0_ = new StringId(1474, "DMMembership: Admitting new administration member < {0} >.");
+
+  public static final StringId DistributionManager_ELDER__0__IS_NOT_CURRENTLY_AN_ACTIVE_MEMBER_SELECTING_NEW_ELDER = new StringId(1476, "Elder < {0} > is not currently an active member; selecting new elder.");
+  public static final StringId DistributionManager_EXCEPTION_WHILE_CALLING_MEMBERSHIP_LISTENER_FOR_EVENT__0 = new StringId(1477, "Exception while calling membership listener for event:  {0}");
+  public static final StringId DistributionManager_FAILED_SENDING_SHUTDOWN_MESSAGE_TO_PEERS_TIMEOUT = new StringId(1478, "Failed sending shutdown message to peers (timeout)");
+  public static final StringId DistributionManager_FORCING_AN_ELDER_JOIN_EVENT_SINCE_A_STARTUP_RESPONSE_WAS_NOT_RECEIVED_FROM_ELDER__0_ = new StringId(1479, "Forcing an elder join event since a startup response was not received from elder  {0} .");
+  public static final StringId DistributionManager_FORCING_THREAD_STOP_ON__0_ = new StringId(1480, "Forcing thread stop on < {0} >");
+
+  public static final StringId DistributionManager_INITIAL_MEMBERSHIPMANAGER_VIEW___0 = new StringId(1482, "Initial (distribution manager) view =  {0}");
+  public static final StringId DistributionManager_MARKING_DISTRIBUTIONMANAGER_0_AS_CLOSED = new StringId(1483, "Marking DistributionManager {0} as closed.");
+  public static final StringId DistributionManager_MARKING_THE_SERIALQUEUEDEXECUTOR_WITH_ID__0__USED_BY_THE_MEMBER__1__TO_BE_UNUSED = new StringId(1484, "Marking the SerialQueuedExecutor with id : {0}  used by the member  {1}  to be unused.");
+  public static final StringId DistributionManager_MEMBER_AT_0_GRACEFULLY_LEFT_THE_DISTRIBUTED_CACHE_1 = new StringId(1485, "Member at {0} gracefully left the distributed cache: {1}");
+  public static final StringId DistributionManager_MEMBER_AT_0_UNEXPECTEDLY_LEFT_THE_DISTRIBUTED_CACHE_1 = new StringId(1486, "Member at {0} unexpectedly left the distributed cache: {1}");
+  public static final StringId DistributionManager_NEWLY_SELECTED_ELDER_IS_NOW__0_ = new StringId(1487, "Newly selected elder is now < {0} >");
+  public static final StringId DistributionManager_NEW_ADMINISTRATION_MEMBER_DETECTED_AT_0 = new StringId(1488, "New administration member detected at {0}.");
+  public static final StringId DistributionManager_NOW_CLOSING_DISTRIBUTION_FOR__0 = new StringId(1489, "Now closing distribution for {0}");
+  public static final StringId DistributionManager_SHUTTING_DOWN_DISTRIBUTIONMANAGER_0_1 = new StringId(1490, "Shutting down DistributionManager {0}. {1}");
+  public static final StringId DistributionManager_STARTING_DISTRIBUTIONMANAGER_0_1 = new StringId(1491, "Starting DistributionManager {0}. {1}");
+  public static final StringId DistributionManager_STILL_AWAITING_0_RESPONSES_FROM_1 = new StringId(1492, "Still awaiting {0} response(s) from: {1}.");
+  public static final StringId DistributionManager_STOPPED_WAITING_FOR_STARTUP_REPLY_FROM_0_BECAUSE_THE_PEER_DEPARTED_THE_VIEW = new StringId(1493, "Stopped waiting for startup reply from <{0}> because the peer departed the view.");
+  public static final StringId DistributionManager_STOPPED_WAITING_FOR_STARTUP_REPLY_FROM_0_BECAUSE_THE_REPLY_WAS_FINALLY_RECEIVED = new StringId(1494, "Stopped waiting for startup reply from <{0}> because the reply was finally received.");
+  public static final StringId DistributionManager_TASK_FAILED_WITH_EXCEPTION = new StringId(1495, "Task failed with exception");
+  public static final StringId DistributionManager_UNCAUGHT_EXCEPTION_CALLING_READYFORMESSAGES = new StringId(1496, "Uncaught exception calling readyForMessages");
+  public static final StringId DistributionManager_UNCAUGHT_EXCEPTION_PROCESSING_MEMBER_EVENT = new StringId(1497, "Uncaught exception processing member event");
+  public static final StringId DistributionManager_UNEXPECTED_INTERRUPTEDEXCEPTION = new StringId(1498, "Unexpected InterruptedException");
+
+  public static final StringId DistributionManager_WHILE_PUSHING_MESSAGE_0_TO_1 = new StringId(1500, "While pushing message <{0}> to {1}");
+  public static final StringId DistributionManager_WHILE_SENDING_SHUTDOWN_MESSAGE = new StringId(1501, "While sending shutdown message");
+  public static final StringId DistributionMessage_0__SCHEDULE_REJECTED = new StringId(1502, "{0}  schedule() rejected");
+  public static final StringId DistributionMessage_UNCAUGHT_EXCEPTION_PROCESSING__0 = new StringId(1503, "Uncaught exception processing  {0}");
+
+
+  public static final StringId DynamicRegionFactory_DYNAMICREGIONLISTENER__0__THREW_EXCEPTION_ON_AFTERREGIONCREATED = new StringId(1508, "DynamicRegionListener {0} threw exception on afterRegionCreated");
+  public static final StringId DynamicRegionFactory_DYNAMICREGIONLISTENER__0__THREW_EXCEPTION_ON_AFTERREGIONDESTROYED = new StringId(1509, "DynamicRegionListener {0} threw exception on afterRegionDestroyed");
+  public static final StringId DynamicRegionFactory_DYNAMICREGIONLISTENER__0__THREW_EXCEPTION_ON_BEFOREREGIONCREATED = new StringId(1510, "DynamicRegionListener {0} threw exception on beforeRegionCreated");
+  public static final StringId DynamicRegionFactory_DYNAMICREGIONLISTENER__0__THREW_EXCEPTION_ON_BEFOREREGIONDESTROYED = new StringId(1511, "DynamicRegionListener {0} threw exception on beforeRegionDestroyed");
+  public static final StringId DynamicRegionFactory_ERROR_ATTEMPTING_TO_LOCALLY_CREATE_DYNAMIC_REGION__0 = new StringId(1512, "Error attempting to locally create Dynamic Region: {0}");
+  public static final StringId DynamicRegionFactory_ERROR_ATTEMPTING_TO_LOCALLY_DESTROY_DYNAMIC_REGION__0 = new StringId(1513, "Error attempting to locally destroy Dynamic Region: {0}");
+  public static final StringId DynamicRegionFactory_ERROR_DESTROYING_DYNAMIC_REGION__0 = new StringId(1514, "Error destroying Dynamic Region ''{0}''");
+  public static final StringId DynamicRegionFactory_ERROR_INITIALIZING_DYNAMICREGIONFACTORY = new StringId(1515, "Error initializing DynamicRegionFactory");
+  public static final StringId DynamicRegionFactory_ERROR__COULD_NOT_FIND_A_REGION_NAMED___0_ = new StringId(1516, "Error -- Could not find a region named: ''{0}''");
+  public static final StringId ElderState_ELDERSTATE_PROBLEM_DM_0_BUT_SYSTEM_DISTRIBUTIONMANAGER_1 = new StringId(1517, "ElderState problem: dm={0}, but system DistributionManager={1}");
+  public static final StringId ElderState_ELDERSTATE_PROBLEM_SYSTEM_0 = new StringId(1518, "ElderState problem: system={0}");
+  public static final StringId ElderState_ELDERSTATE_PROBLEM_SYSTEM_DISTRIBUTIONMANAGER_0 = new StringId(1519, "ElderState problem: system DistributionManager={0}");
+
+  public static final StringId EntryEventImpl_DATASTORE_FAILED_TO_CALCULATE_SIZE_OF_NEW_VALUE = new StringId(1540, "DataStore failed to calculate size of new value");
+  public static final StringId EntryEventImpl_DATASTORE_FAILED_TO_CALCULATE_SIZE_OF_OLD_VALUE = new StringId(1541, "DataStore failed to calculate size of old value");
+  public static final StringId ExpirationScheduler_SCHEDULING__0__TO_FIRE_IN__1__MS = new StringId(1542, "Scheduling  {0}  to fire in  {1}  ms");
+  public static final StringId ExpiryTask_EXCEPTION_IN_EXPIRATION_TASK = new StringId(1543, "Exception in expiration task");
+
+  public static final StringId FetchEntriesMessage_FETCHKEYSMESSAGE_DATA_STORE_NOT_CONFIGURED_FOR_THIS_MEMBER = new StringId(1545, "FetchKeysMessage: data store not configured for this member");
+
+  public static final StringId FetchKeysMessage_FETCHKEYSMESSAGE_DATA_STORE_NOT_CONFIGURED_FOR_THIS_MEMBER = new StringId(1547, "FetchKeysMessage: data store not configured for this member");
+  public static final StringId ForceDisconnectOperation_DISCONNECT_FORCED_BY__0__BECAUSE_WE_WERE_TOO_SLOW = new StringId(1548, "Disconnect forced by  {0}  because we were too slow.");
+  public static final StringId GLOBALTRANSACTION__ENLISTRESOURCE__ERROR_WHILE_ENLISTING_XARESOURCE_0_1 = new StringId(1549, "GlobalTransaction::enlistResource::error while enlisting XAResource {0} {1}");
+
+  public static final StringId GatewayEventRemoteDispatcher_0_USING_1 = new StringId(1552, "{0}: Using {1}");
+  public static final StringId GatewayEventRemoteDispatcher_0_USING_1_AFTER_2_FAILED_CONNECT_ATTEMPTS = new StringId(1553, "{0}: Using {1} after {2} failed connect attempts");
+
+  public static final StringId GatewayEventRemoteDispatcher_A_BATCHEXCEPTION_OCCURRED_PROCESSING_EVENT__0 = new StringId(1556, "A BatchException occurred processing events. Index of Array of Exception : {0}");
+  public static final StringId GatewayEventRemoteDispatcher_NO_AVAILABLE_CONNECTION_WAS_FOUND_BUT_THE_FOLLOWING_ACTIVE_SERVERS_EXIST_0 = new StringId(1557, "No available connection was found, but the following active servers exist: {0}");
+  public static final StringId GatewayEventRemoteDispatcher_STOPPING_THE_PROCESSOR_BECAUSE_THE_FOLLOWING_EXCEPTION_OCCURRED_WHILE_PROCESSING_A_BATCH = new StringId(1558, "Stopping the processor because the following exception occurred while processing a batch:");
+
+  public static final StringId GatewayEventRemoteDispatcher_THERE_ARE_NO_ACTIVE_SERVERS = new StringId(1560, "There are no active servers.");
+  public static final StringId GatewayEventRemoteDispatcher_THE_EVENT_BEING_PROCESSED_WHEN_THE_BATCHEXCEPTION_OCCURRED_WAS__0 = new StringId(1561, "The event being processed when the BatchException occurred was:  {0}");
+
+  public static final StringId GatewayEventRemoteDispatcher__0___COULD_NOT_CONNECT = new StringId(1564, "{0}: Could not connect.");
+
+  public static final StringId GatewaySender_0_IS_BECOMING_PRIMARY_GATEWAY_Sender = new StringId(1566, "{0} is becoming primary gateway Sender.");
+
+  public static final StringId GatewaySenderAdvisor_0_THE_THREAD_TO_OBTAIN_THE_FAILOVER_LOCK_WAS_INTERRUPTED__THIS_GATEWAY_SENDER_WILL_NEVER_BECOME_THE_PRIMARY = new StringId(1568, "{0}: The thread to obtain the failover lock was interrupted. This gateway sender will never become the primary.");
+
+  public static final StringId SerialGatewaySenderImpl_0__STARTING_AS_PRIMARY = new StringId(1570, "{0} : Starting as primary");
+
+  public static final StringId GatewaySender_COULD_NOT_STOP_LOCK_OBTAINING_THREAD_DURING_GATEWAY_SENDER_STOP = new StringId(1573, "Could not stop lock obtaining thread during gateway sender stop");
+
+  public static final StringId GatewayImpl_0__MARKING__1__EVENTS_AS_POSSIBLE_DUPLICATES = new StringId(1578, "{0} : Marking  {1}  events as possible duplicates");
+
+  public static final StringId GatewayImpl_0__WAITING_FOR_FAILOVER_COMPLETION = new StringId(1580, "{0} : Waiting for failover completion");
+  public static final StringId GatewayImpl_0__WAITING_TO_BECOME_PRIMARY_GATEWAY = new StringId(1581, "{0} : Waiting to become primary gateway");
+  public static final StringId GatewayImpl_ABOUT_TO_PROCESS_THE_MESSAGE_QUEUE_BUT_NOT_THE_PRIMARY = new StringId(1582, "About to process the message queue but not the primary.");
+
+  public static final StringId GatewayImpl_DESTROYING_GATEWAYEVENTDISPATCHER_WITH_ACTIVELY_QUEUED_DATA = new StringId(1584, "Destroying GatewayEventDispatcher with actively queued data.");
+
+  public static final StringId SerialGatewaySenderImpl_STARTED__0 = new StringId(1586, "Started  {0}");
+  public static final StringId GatewayImpl_STOPPED__0 = new StringId(1587, "Stopped  {0}");
+  public static final StringId SerialGatewaySenderImpl_0__STARTING_AS_SECONDARY_BECAUSE_PRIMARY_GATEWAY_SENDER_IS_AVAIALABLE_ON_MEMBER_2  = new StringId(1588, "{0} starting as secondary because primary gateway sender is available on member :{1}");
+  public static final StringId GemFireBasicDataSource_AN_EXCEPTION_WAS_CAUGHT_WHILE_TRYING_TO_LOAD_THE_DRIVER = new StringId(1589, "An Exception was caught while trying to load the driver. {0}");
+  public static final StringId GemFireBasicDataSource_GEMFIREBASICDATASOURCE_GETCONNECTION_URL_FOR_THE_DATASOURCE_NOT_AVAILABLE = new StringId(1590, "GemFireBasicDataSource::getConnection:Url for the DataSource not available");
+  public static final StringId GemFireCache_0__NOW_CLOSING = new StringId(1591, "{0} : Now closing.");
+  public static final StringId GemFireCache_INITIALIZING_CACHE_USING__0__1 = new StringId(1592, "Initializing cache using \"{0}\":{1}");
+  public static final StringId GemFireCache_FAILED_TO_GET_THE_CQSERVICE_TO_CLOSE_DURING_CACHE_CLOSE_1 = new StringId(1593, "Failed to get the CqService, to close during cache close (1).");
+  public static final StringId GemFireCache_FAILED_TO_GET_THE_CQSERVICE_TO_CLOSE_DURING_CACHE_CLOSE_2 = new StringId(1594, "Failed to get the CqService, to close during cache close (2).");
+  public static final StringId GemFireCache_WHILE_READING_CACHE_XML_0_1 = new StringId(1595, "While reading Cache XML {0}. {1}");
+
+  public static final StringId GemFireConnPooledDataSource_EXCEPTION_CREATING_GEMFIRECONNECTIONPOOLMANAGER = new StringId(1620, "An exception was caught while creating a GemFireConnectionPoolManager. {0}");
+  public static final StringId CqQueryImpl_FAILED_TO_REMOVE_CONTINUOUS_QUERY_FROM_THE_REPOSITORY_CQNAME_0_ERROR_1 = new StringId( 1621, "Failed to remove Continuous Query From the repository. CqName: {0} Error : {1}");
+
+  public static final StringId GemFireStatSampler_ARCHIVING_STATISTICS_TO__0_ = new StringId(1633, "Archiving statistics to \"{0}\".");
+  public static final StringId GemFireStatSampler_COULD_NOT_OPEN_STATISTIC_ARCHIVE_0_CAUSE_1 = new StringId(1634, "Could not open statistic archive {0}. Cause: {1}");
+  public static final StringId GemFireStatSampler_COULD_NOT_RENAME_0_TO_1 = new StringId(1635, "Could not rename \"{0}\" to \"{1}\".");
+  public static final StringId GemFireStatSampler_DISABLING_STATISTIC_ARCHIVAL = new StringId(1636, "Disabling statistic archival.");
+  public static final StringId GemFireStatSampler_RENAMED_OLD_EXISTING_ARCHIVE_TO__0_ = new StringId(1637, "Renamed old existing archive to \"{0}\".");
+  public static final StringId GemFireStatSampler_STATISTIC_ARCHIVE_CLOSE_FAILED_BECAUSE__0 = new StringId(1638, "Statistic archive close failed because: {0}");
+
+  public static final StringId GlobalTransaction_GLOBALTRANSACTIONENLISTRESOURCEONLY_ONE_RESOUCE_MANAGER_SUPPORTED = new StringId(1644, "GlobalTransaction::enlistResource::Only one Resouce Manager supported");
+  public static final StringId GlobalTransaction_GLOBALTRANSACTION_CONSTRUCTOR_ERROR_WHILE_TRYING_TO_CREATE_XID_DUE_TO_0 = new StringId(1645, "GlobalTransaction::Constructor::Error while trying to create Xid due to {0}");
+  public static final StringId GlobalTransaction_GLOBATRANSACTION_EXPIREGTX_ERROR_OCCURED_WHILE_REMOVING_TRANSACTIONAL_MAPPINGS_0 = new StringId(1646, "GlobaTransaction::expireGTX:Error occurred while removing transactional mappings {0}");
+  public static final StringId GlobalTransaction_TRANSACTION_0_HAS_TIMED_OUT = new StringId(1647, "Transaction {0} has timed out.");
+  public static final StringId GrantorRequestProcessor_GRANTORREQUESTPROCESSOR_ELDERSYNCWAIT_THE_CURRENT_ELDER_0_IS_WAITING_FOR_THE_NEW_ELDER_1 = new StringId(1648, "GrantorRequestProcessor.elderSyncWait: The current Elder {0} is waiting for the new Elder {1}.");
+  public static final StringId HARegionQueue_DACEREMOVEEVENTANDSETSEQUENCEID_SINCE_THE_EVENT_WAS_SUCCESSULY_REMOVED_BY_TAKE_OPERATION_IT_SHOULD_HAVE_EXISTED_IN_THE_REGION = new StringId(1649, "DACE::removeEventAndSetSequenceID: Since the event was successuly removed by a take operation, it should have existed in the region");
+  public static final StringId HARegionQueue_DISPATCHEDANDCURRENTEVENTSEXPIREORUPDATE_UNEXPECTEDLY_ENCOUNTERED_EXCEPTION_WHILE_REMOVING_EXPIRY_ENTRY_FOR_THREADIDENTIFIER_0_AND_EXPIRY_VALUE_1 = new StringId(1650, "DispatchedAndCurrentEvents::expireOrUpdate: Unexpectedly encountered exception while removing expiry entry for ThreadIdentifier={0} and expiry value={1}");
+  public static final StringId HARegionQueue_DISPATCHEDANDCURRENTEVENTSEXPIREORUPDATE_UNEXPECTEDLY_ENCOUNTERED_EXCEPTION_WHILE_UPDATING_EXPIRY_ID_FOR_THREADIDENTIFIER_0 = new StringId(1651, "DispatchedAndCurrentEvents::expireOrUpdate: Unexpectedly encountered exception while updating expiry ID for ThreadIdentifier={0}");
+  public static final StringId HARegionQueue_EXCEPTION_OCCURED_WHILE_TRYING_TO_SET_THE_LAST_DISPATCHED_ID = new StringId(1652, "Exception occurred while trying to set the last dispatched id");
+  public static final StringId HARegionQueue_HAREGIONQUEUECREATECACHELISTNEREXCEPTION_IN_THE_EXPIRY_THREAD = new StringId(1653, "HAREgionQueue::createCacheListner::Exception in the expiry thread");
+
+  public static final StringId HARegionQueue_HAREGIONQUEUE_AND_ITS_DERIVED_CLASS_DO_NOT_SUPPORT_THIS_OPERATION = new StringId(1655, "HARegionQueue and its derived class do not support this operation ");
+  public static final StringId ConnectionTable_THE_DISTRIBUTED_SYSTEM_IS_SHUTTING_DOWN = new StringId(1656, "The distributed system is shutting down");
+  public static final StringId HARegionQueue_INTERRUPTEDEXCEPTION_OCCURED_IN_QUEUEREMOVALTHREAD_WHILE_WAITING = new StringId(1657, "InterruptedException occurred in QueueRemovalThread  while waiting ");
+  public static final StringId HealthMonitorImpl_UNEXPECTED_STOP_OF_HEALTH_MONITOR = new StringId(1658, "Unexpected stop of health monitor");
+
+  public static final StringId HARegionQueue_THE_QUEUEREMOVALTHREAD_IS_DONE = new StringId(1660, "The QueueRemovalThread is done.");
+  public static final StringId HighPriorityAckedMessage_0_THERE_ARE_STILL_1_OTHER_THREADS_ACTIVE_IN_THE_HIGH_PRIORITY_THREAD_POOL = new StringId(1661, "{0}: There are still {1} other threads active in the high priority thread pool.");
+  public static final StringId HostStatSampler_HOSTSTATSAMPLER_THREAD_COULD_NOT_BE_STOPPED = new StringId(1662, "HostStatSampler thread could not be stopped during shutdown.");
+  public static final StringId HostStatSampler_STATISIC_ARCHIVER_SHUTDOWN_FAILED_BECAUSE__0 = new StringId(1663, "Statistic archiver shutdown failed because:  {0}");
+  public static final StringId HostStatSampler_STATISTIC_ARCHIVER_SHUTDOWN_FAILED_BECAUSE__0 = new StringId(1664, "Statistic archiver shutdown failed because:  {0}");
+  public static final StringId HostStatSampler_STATISTIC_ARCHIVER_SHUTTING_DOWN_BECAUSE__0 = new StringId(1665, "Statistic archiver shutting down because:  {0}");
+
+  public static final StringId IndexCreationMsg_REGION_IS_LOCALLY_DESTROYED_THROWING_REGIONDESTROYEDEXCEPTION_FOR__0 = new StringId(1673, "Region is locally destroyed, throwing RegionDestroyedException for  {0}");
+  public static final StringId CqQueryImpl_FAILED_TO_STOP_THE_CQ_CQNAME_0_THE_SERVER_ENDPOINTS_ON_WHICH_THIS_CQ_WAS_REGISTERED_WERE_NOT_FOUND = new StringId(1676, "Failed to stop the cq. CqName: {0}. The server endpoints on which this cq was registered were not found.");
+
+  public static final StringId InternalDataSerializer_COULD_NOT_LOAD_DATASERIALIZER_CLASS_0 = new StringId(1679, "Could not load DataSerializer class: {0}");
+  public static final StringId InternalDataSerializer_REGISTER_DATASERIALIZER_0_OF_CLASS_1 = new StringId(1680, "Register DataSerializer {0} of class {1}");
+  public static final StringId InternalDistributedSystem_CONNECTLISTENER_THREW = new StringId(1681, "ConnectListener threw...");
+  public static final StringId InternalDistributedSystem_DISCONNECTLISTENERSHUTDOWN_THREW = new StringId(1682, "DisconnectListener/Shutdown threw...");
+  public static final StringId InternalDistributedSystem_DISCONNECT_LISTENER_IGNORED_ITS_INTERRUPT__0 = new StringId(1683, "Disconnect listener ignored its interrupt: {0}");
+
+  public static final StringId InternalDistributedSystem_DISCONNECT_LISTENER_STILL_RUNNING__0 = new StringId(1685, "Disconnect listener still running: {0}");
+  public static final StringId InternalDistributedSystem_EXCEPTION_OCCURED_WHILE_TRYING_TO_CONNECT_THE_SYSTEM_DURING_RECONNECT = new StringId(1686, "Exception occurred while trying to connect the system during reconnect");
+  public static final StringId InternalDistributedSystem_EXCEPTION_OCCURED_WHILE_TRYING_TO_CREATE_THE_CACHE_DURING_RECONNECT = new StringId(1687, "Exception occurred while trying to create the cache during reconnect");
+  public static final StringId InternalDistributedSystem_INTERRUPTED_WHILE_PROCESSING_DISCONNECT_LISTENER = new StringId(1688, "Interrupted while processing disconnect listener");
+
+  public static final StringId GemFireCacheImpl_RUNNING_IN_LOCAL_MODE = new StringId(1690, "Running in local mode since no locators were specified.");
+  public static final StringId InternalDistributedSystem_SHUTDOWNLISTENER__0__THREW = new StringId(1691, "ShutdownListener < {0} > threw...");
+  public static final StringId InternalDistributedSystem_STARTUP_CONFIGURATIONN_0 = new StringId(1692, "Startup Configuration:\n {0}");
+
+  public static final StringId InternalInstantiator_CLASS_0_DOES_NOT_HAVE_A_TWOARGUMENT_CLASS_INT_CONSTRUCTOR = new StringId(1694, "Class {0} does not have a two-argument (Class, int) constructor.");
+  public static final StringId InternalInstantiator_CLASS_0_DOES_NOT_HAVE_A_TWOARGUMENT_CLASS_INT_CONSTRUCTOR_IT_IS_AN_INNER_CLASS_OF_1_SHOULD_IT_BE_A_STATIC_INNER_CLASS = new StringId(1695, "Class {0} does not have a two-argument (Class, int) constructor. It is an inner class of {1}. Should it be a static inner class?");
+  public static final StringId InternalInstantiator_COULD_NOT_LOAD_INSTANTIATED_CLASS_0 = new StringId(1696, "Could not load instantiated class: {0}");
+  public static final StringId InternalInstantiator_COULD_NOT_LOAD_INSTANTIATOR_CLASS_0 = new StringId(1697, "Could not load instantiator class: {0}");
+  public static final StringId InternalLocator_0__IS_STOPPED = new StringId(1698, "{0}  is stopped");
+  public static final StringId InternalLocator_COULD_NOT_STOP__0__IN_60_SECONDS = new StringId(1699, "Could not stop  {0}  in 60 seconds");
+
+  public static final StringId InternalLocator_INTERRUPTED_WHILE_STOPPING__0 = new StringId(1701, "Interrupted while stopping  {0}");
+  public static final StringId InternalLocator_LOCATOR_STARTED_ON__0 = new StringId(1702, "Locator started on  {0}");
+  public static final StringId StartupMessage_REJECTED_NEW_SYSTEM_NODE_0_BECAUSE_MCAST_PORT_1_DOES_NOT_MATCH_THE_DISTRIBUTED_SYSTEM_2_IT_IS_ATTEMPTING_TO_JOIN = new StringId(1703, "Rejected new system node {0} because its mcast-port {1} does not match the mcast-port {2} of the distributed system it is attempting to join. To fix this make sure the \"mcast-port\" gemfire property is set the same on all members of the same distributed system.");
+  public static final StringId StartupMessage_REJECTED_NEW_SYSTEM_NODE_0_BECAUSE_MCAST_ADDRESS_1_DOES_NOT_MATCH_THE_DISTRIBUTED_SYSTEM_2_IT_IS_ATTEMPTING_TO_JOIN = new StringId(1704, "Rejected new system node {0} because its mcast-address {1} does not match the mcast-address {2} of the distributed system it is attempting to join. To fix this make sure the \"mcast-address\" gemfire property is set the same on all members of the same distributed system.");
+  public static final StringId ReplyProcessor21_UNKNOWN_DSFID_ERROR = new StringId(1705,
+                                                                                          "Exception received due to missing DSFID {0} on remote node \"{1}\" "
+                                                                                                  + "running version \"{2}\".");
+
+  public static final StringId InternalLocator_STARTING_DISTRIBUTED_SYSTEM = new StringId(1707, "Starting distributed system");
+
+  public static final StringId InternalLocator_STOPPING__0 = new StringId(1709, "Stopping {0}");
+  public static final StringId InternalLocator_USING_EXISTING_DISTRIBUTED_SYSTEM__0 = new StringId(1710, "Using existing distributed system:  {0}");
+  public static final StringId Invalid_0_INVALID_MESSAGE_TYPE_WITH_TX_1_FROM_2 = new StringId(1711, "{0}: INVALID message type with tx: {1} from {2}");
+
+  public static final StringId JCAConnectionManagerImpl_EXCEPTION_CAUGHT_WHILE_INITIALIZING = new StringId(1713, "JCAConnectionManagerImpl::Constructor: An exception was caught while initialising due to {0}" );
+  public static final StringId GroupMembershipService_JOINED_TOOK__0__MS = new StringId(1714, "Joined the distributed system (took  {0}  ms)");
+  public static final StringId GroupMembershipService_FAILED_TO_SEND_MESSAGE_0_TO_MEMBER_1_VIEW_2 = new StringId(1715, "Failed to send message <{0}> to member <{1}> view = {2}");
+
+
+  public static final StringId GroupMembershipService_MEMBERSHIP_ERROR_HANDLING_STARTUP_EVENT = new StringId(1720, "Membership: Error handling startup event");
+  public static final StringId GroupMembershipService_MEMBERSHIP_FAULT_WHILE_PROCESSING_VIEW_ADDITION_OF__0 = new StringId(1721, "Membership: Fault while processing view addition of  {0}");
+  public static final StringId GroupMembershipService_MEMBERSHIP_FAULT_WHILE_PROCESSING_VIEW_REMOVAL_OF__0 = new StringId(1722, "Membership: Fault while processing view removal of  {0}");
+
+  public static final StringId GroupMembershipService_MEMBERSHIP_IGNORING_SURPRISE_CONNECT_FROM_SHUNNED_MEMBER_0 = new StringId(1726, "Membership: Ignoring surprise connect from shunned member <{0}>");
+
+  public static final StringId GroupMembershipService_MEMBERSHIP_PROCESSING_ADDITION__0_ = new StringId(1730, "Membership: Processing addition < {0} >");
+
+  public static final StringId JNDIInvoker_JNDIINVOKERMAPTRANSACTIONSNAMINGEXCEPTION_WHILE_BINDING_TRANSACTIONMANAGERUSERTRANSACTION_TO_APPLICATION_SERVER_JNDI_TREE = new StringId(1737, "JNDIInvoker::mapTransactions::NamingException while binding TransactionManager/UserTransaction to Application Server JNDI Tree");
+  public static final StringId JNDIInvoker_JNDIINVOKERMAPTRANSACTIONSNAMINGEXCEPTION_WHILE_BINDING_TRANSACTIONMANAGERUSERTRANSACTION_TO_GEMFIRE_JNDI_TREE = new StringId(1738, "JNDIInvoker::mapTransactions::NamingException while binding TransactionManager/UserTransaction to GemFire JNDI Tree");
+  public static final StringId JNDIInvoker_JNDIINVOKERMAPTRANSACTIONSSYSTEMEXCEPTION_WHILE_BINDING_TRANSACTIONMANAGERUSERTRANSACTION_TO_APPLICATION_SERVER_JNDI_TREE = new StringId(1739, "JNDIInvoker::mapTransactions::SystemException while binding TransactionManager/UserTransaction to Application Server JNDI Tree");
+  public static final StringId JNDIInvoker_JNDIINVOKERMAPTRANSACTIONSSYSTEMEXCEPTION_WHILE_BINDING_USERTRANSACTION_TO_GEMFIRE_JNDI_TREE = new StringId(1740, "JNDIInvoker::mapTransactions::SystemException while binding UserTransaction to GemFire JNDI Tree");
+  public static final StringId JNDIInvoker_JNDIINVOKER_DOTRANSACTIONLOOKUP_FOUND_WEBSPHERE_TRANSACTIONMANAGER_FACTORY_CLASS_0_BUT_COULDNT_INVOKE_ITS_STATIC_GETTRANSACTIONMANAGER_METHOD = new StringId(1741, "JNDIInvoker::doTransactionLookup::Found WebSphere TransactionManager factory class [{0}], but could not invoke its static ''getTransactionManager'' method");
+  public static final StringId JNDIInvoker_JNDIINVOKER_MAPDATASOURCE_0_WHILE_BINDING_1_TO_JNDI_CONTEXT = new StringId(1742, "JNDIInvoker::mapDataSource::{0} while binding {1} to JNDI Context");
+  public static final StringId GemFireStatSampler_OS_STATISTICS_FAILED_TO_INITIALIZE_PROPERLY_SOME_STATS_MAY_BE_MISSING_SEE_BUGNOTE_37160 = new StringId(1743, "OS statistics failed to initialize properly, some stats may be missing. See bugnote #37160.");
+  public static final StringId GemFireStatSampler_OS_STATISTIC_COLLECTION_DISABLED_BY_OSSTATSDISABLED_SYSTEM_PROPERTY = new StringId(1744, "OS statistic collection disabled by setting the \"osStatsDisabled\" system property to true.");
+  public static final StringId KeySet_0_THE_INPUT_REGION_NAME_FOR_THE_KEY_SET_REQUEST_IS_NULL = new StringId(1745, "{0}: The input region name for the key set request is null");
+  public static final StringId DataSerializer_ENUM_TO_SERIALIZE_IS_NULL = new StringId(1746, "The enum constant to serialize is null");
+  public static final StringId DataSerializer_ENUM_CLASS_TO_DESERIALIZE_IS_NULL = new StringId(1747, "the enum class to deserialize is null");
+
+  public static final StringId LocalRegion_0_EVENT_NOT_DISPATCHED_DUE_TO_REJECTED_EXECUTION = new StringId(1766, "{0} Event not dispatched due to rejected execution");
+  public static final StringId LocalRegion_0_OPERATIONS_ARE_NOT_ALLOWED_BECAUSE_THIS_THREAD_HAS_AN_ACTIVE_TRANSACTION = new StringId(1767, "{0} operations are not allowed because this thread has an active transaction");
+  public static final StringId LocalRegion_EXCEPTION_IN_EXPIRATION_TASK = new StringId(1768, "Exception in expiration task");
+  public static final StringId LocalRegion_EXCEPTION_OCCURRED_IN_CACHELISTENER = new StringId(1769, "Exception occurred in CacheListener");
+  public static final StringId LocalRegion_EXCEPTION_OCCURRED_WHILE_CLOSING_CQS_ON_REGION_DESTORY = new StringId(1770, "Exception occurred while closing CQs on region destroy.");
+  public static final StringId LocalRegion_REGIONENTRY_SHOULD_NOT_BE_NULL = new StringId(1771, "regionEntry should not be null");
+  public static final StringId LocalRegion_REGIONENTRY_WAS_CREATED_WITH_TRANSACTION_THAT_IS_NO_LONGER_ACTIVE = new StringId(1772, "Region.Entry was created with transaction that is no longer active.");
+  public static final StringId LocalRegion_REGION_CO

<TRUNCATED>


[22/55] [abbrv] incubator-geode git commit: GEODE-1346: Typo "Emtpy" affects Exception name and some help strings

Posted by sa...@apache.org.
GEODE-1346: Typo "Emtpy" affects Exception name and some help strings

Fixed the typos and removed many now-unused StringIds from LocalizedStrings
and ParentLocalizedStrings.  The number of StringIds is now small enough
that I removed ParentLocalizedStrings.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f24b9fb0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f24b9fb0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f24b9fb0

Branch: refs/heads/feature/GEODE-1153
Commit: f24b9fb07e0f79b8c11e9cbe94c0885ff20fb909
Parents: dc024d0
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon May 9 08:23:47 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon May 9 08:26:28 2016 -0700

----------------------------------------------------------------------
 .../execute/EmptyRegionFunctionException.java   |   63 +
 .../execute/EmtpyRegionFunctionException.java   |   63 -
 .../internal/cache/PartitionedRegion.java       |    6 +-
 .../gemfire/internal/i18n/LocalizedStrings.java | 2456 +++++++++++++++---
 .../internal/i18n/BasicI18nJUnitTest.java       |    4 +-
 .../codeAnalysis/sanctionedSerializables.txt    |    2 +-
 6 files changed, 2113 insertions(+), 481 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f24b9fb0/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/EmptyRegionFunctionException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/EmptyRegionFunctionException.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/EmptyRegionFunctionException.java
new file mode 100755
index 0000000..a077779
--- /dev/null
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/EmptyRegionFunctionException.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.cache.execute;
+
+import com.gemstone.gemfire.distributed.DistributedMember;
+
+/**
+ * Exception to indicate that Region is empty for data aware functions.
+ * 
+ * @since 6.5
+ * 
+ */
+public class EmptyRegionFunctionException extends FunctionException {
+
+  private static final long serialVersionUID = 1L;
+
+  /**
+   * Construct an instance of EmtpyRegionFunctionException
+   * 
+   * @param cause
+   *                a Throwable cause of this exception
+   */
+  public EmptyRegionFunctionException(Throwable cause) {
+    super(cause);
+  }
+
+  /**
+   * Construct an instance of EmtpyRegionFunctionException
+   * 
+   * @param msg
+   *                Exception message
+   */
+  public EmptyRegionFunctionException(String msg) {
+    super(msg);
+  }
+
+  /**
+   * Construct an instance of EmtpyRegionFunctionException
+   * 
+   * @param msg
+   *                the error message
+   * @param cause
+   *                a Throwable cause of this exception
+   */
+  public EmptyRegionFunctionException(String msg, Throwable cause) {
+    super(msg, cause);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f24b9fb0/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/EmtpyRegionFunctionException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/EmtpyRegionFunctionException.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/EmtpyRegionFunctionException.java
deleted file mode 100644
index 6aff9eb..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/EmtpyRegionFunctionException.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.cache.execute;
-
-import com.gemstone.gemfire.distributed.DistributedMember;
-
-/**
- * Exception to indicate that Region is empty for data aware functions.
- * 
- * @since 6.5
- * 
- */
-public class EmtpyRegionFunctionException extends FunctionException {
-
-  private static final long serialVersionUID = 1L;
-
-  /**
-   * Construct an instance of EmtpyRegionFunctionException
-   * 
-   * @param cause
-   *                a Throwable cause of this exception
-   */
-  public EmtpyRegionFunctionException(Throwable cause) {
-    super(cause);
-  }
-
-  /**
-   * Construct an instance of EmtpyRegionFunctionException
-   * 
-   * @param msg
-   *                Exception message
-   */
-  public EmtpyRegionFunctionException(String msg) {
-    super(msg);
-  }
-
-  /**
-   * Construct an instance of EmtpyRegionFunctionException
-   * 
-   * @param msg
-   *                the error message
-   * @param cause
-   *                a Throwable cause of this exception
-   */
-  public EmtpyRegionFunctionException(String msg, Throwable cause) {
-    super(msg, cause);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f24b9fb0/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
index 328c196..4460a8a 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
@@ -92,7 +92,7 @@ import com.gemstone.gemfire.cache.TransactionDataNotColocatedException;
 import com.gemstone.gemfire.cache.TransactionDataRebalancedException;
 import com.gemstone.gemfire.cache.TransactionException;
 import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
-import com.gemstone.gemfire.cache.execute.EmtpyRegionFunctionException;
+import com.gemstone.gemfire.cache.execute.EmptyRegionFunctionException;
 import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.FunctionException;
@@ -3879,7 +3879,7 @@ public class PartitionedRegion extends LocalRegion implements
         logger.debug("Executing on bucketset : {} executeOnBucketSet Member to buckets map is : {} bucketSet is empty",
             bucketSet, memberToBuckets);
       }
-      throw new EmtpyRegionFunctionException(
+      throw new EmptyRegionFunctionException(
           LocalizedStrings.PartitionedRegion_FUNCTION_NOT_EXECUTED_AS_REGION_IS_EMPTY
               .toLocalizedString());
     }
@@ -4023,7 +4023,7 @@ public class PartitionedRegion extends LocalRegion implements
         .groupByMemberToBuckets(this, bucketSet, function.optimizeForWrite());
 
     if (memberToBuckets.isEmpty()) {
-      throw new EmtpyRegionFunctionException(LocalizedStrings.PartitionedRegion_FUNCTION_NOT_EXECUTED_AS_REGION_IS_EMPTY.toLocalizedString()
+      throw new EmptyRegionFunctionException(LocalizedStrings.PartitionedRegion_FUNCTION_NOT_EXECUTED_AS_REGION_IS_EMPTY.toLocalizedString()
           );
     }