geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [03/49] geode git commit: GEODE-2632: change dependencies on GemFireCacheImpl to InternalCache
Date Tue, 09 May 2017 18:17:34 GMT
http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRColocationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRColocationDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRColocationDUnitTest.java
index b018bfd..c2fcccc 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRColocationDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRColocationDUnitTest.java
@@ -1710,7 +1710,8 @@ public class PRColocationDUnitTest extends JUnit4CacheTestCase {
         } catch (InterruptedException e) {
           throw new RuntimeException(e);
         }
-        assertEquals(0, region1.getDataStore().getAllLocalBucketIds().size());
+        assertEquals("Unexpected local bucketIds: " + region1.getDataStore().getAllLocalBucketIds(),
+            0, region1.getDataStore().getAllLocalBucketIds().size());
         assertEquals(0, region1.getDataStore().getAllLocalPrimaryBucketIds().size());
       }
     };
@@ -2587,55 +2588,54 @@ public class PRColocationDUnitTest extends JUnit4CacheTestCase {
     }
     return buf.toString();
   }
-}
-
 
-class DummyKeyBasedRoutingResolver implements PartitionResolver, DataSerializable {
-  Integer dummyID;
+  static class DummyKeyBasedRoutingResolver implements PartitionResolver, DataSerializable {
+    Integer dummyID;
 
-  public DummyKeyBasedRoutingResolver() {}
+    public DummyKeyBasedRoutingResolver() {}
 
-  public DummyKeyBasedRoutingResolver(int id) {
-    this.dummyID = new Integer(id);
-  }
+    public DummyKeyBasedRoutingResolver(int id) {
+      this.dummyID = new Integer(id);
+    }
 
-  public String getName() {
-    // TODO Auto-generated method stub
-    return null;
-  }
+    public String getName() {
+      // TODO Auto-generated method stub
+      return null;
+    }
 
-  public Serializable getRoutingObject(EntryOperation opDetails) {
-    return (Serializable) opDetails.getKey();
-  }
+    public Serializable getRoutingObject(EntryOperation opDetails) {
+      return (Serializable) opDetails.getKey();
+    }
 
-  public void close() {
-    // TODO Auto-generated method stub
-  }
+    public void close() {
+      // TODO Auto-generated method stub
+    }
 
-  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
-    this.dummyID = DataSerializer.readInteger(in);
-  }
+    public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+      this.dummyID = DataSerializer.readInteger(in);
+    }
 
-  public void toData(DataOutput out) throws IOException {
-    DataSerializer.writeInteger(this.dummyID, out);
-  }
+    public void toData(DataOutput out) throws IOException {
+      DataSerializer.writeInteger(this.dummyID, out);
+    }
 
-  @Override
-  public int hashCode() {
-    int i = this.dummyID.intValue();
-    return i;
-  }
+    @Override
+    public int hashCode() {
+      int i = this.dummyID.intValue();
+      return i;
+    }
 
-  @Override
-  public boolean equals(Object o) {
-    if (this == o)
-      return true;
+    @Override
+    public boolean equals(Object o) {
+      if (this == o)
+        return true;
 
-    if (!(o instanceof DummyKeyBasedRoutingResolver))
-      return false;
+      if (!(o instanceof DummyKeyBasedRoutingResolver))
+        return false;
 
-    DummyKeyBasedRoutingResolver otherDummyID = (DummyKeyBasedRoutingResolver) o;
-    return (otherDummyID.dummyID.equals(dummyID));
+      DummyKeyBasedRoutingResolver otherDummyID = (DummyKeyBasedRoutingResolver) o;
+      return (otherDummyID.dummyID.equals(dummyID));
 
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/extension/mock/MockExtensionCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/extension/mock/MockExtensionCommands.java b/geode-core/src/test/java/org/apache/geode/internal/cache/extension/mock/MockExtensionCommands.java
index 793abf6..59d8a77 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/extension/mock/MockExtensionCommands.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/extension/mock/MockExtensionCommands.java
@@ -15,12 +15,18 @@
 
 package org.apache.geode.internal.cache.extension.mock;
 
-import org.apache.geode.cache.Cache;
-import org.apache.geode.cache.CacheFactory;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.springframework.shell.core.annotation.CliCommand;
+import org.springframework.shell.core.annotation.CliOption;
+
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.execute.Function;
 import org.apache.geode.cache.execute.ResultCollector;
 import org.apache.geode.distributed.DistributedMember;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.management.cli.Result;
 import org.apache.geode.management.cli.Result.Status;
 import org.apache.geode.management.internal.cli.CliUtil;
@@ -32,16 +38,9 @@ import org.apache.geode.management.internal.configuration.domain.XmlEntity;
 import org.apache.geode.management.internal.security.ResourceOperation;
 import org.apache.geode.security.ResourcePermission.Operation;
 import org.apache.geode.security.ResourcePermission.Resource;
-import org.springframework.shell.core.annotation.CliCommand;
-import org.springframework.shell.core.annotation.CliOption;
-
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicReference;
 
 /**
  * Mock Extension gfsh commands.
- * 
  *
  * @since GemFire 8.1
  */
@@ -173,7 +172,7 @@ public class MockExtensionCommands extends AbstractCommandsSupport {
    */
   protected Result executeFunctionOnAllMembersTabulateResultPersist(final Function function,
       final boolean addXmlElement, final Object... args) {
-    final Cache cache = CacheFactory.getAnyInstance();
+    final InternalCache cache = getCache();
     final Set<DistributedMember> members = CliUtil.getAllNormalMembers(cache);
 
     @SuppressWarnings("unchecked")

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/BlockingHARegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/BlockingHARegionJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/BlockingHARegionJUnitTest.java
index b802b8e..2f0d138 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/BlockingHARegionJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/BlockingHARegionJUnitTest.java
@@ -19,6 +19,7 @@ import static org.junit.Assert.*;
 
 import java.util.Properties;
 
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.test.junit.categories.ClientSubscriptionTest;
 import org.junit.Before;
 import org.junit.Ignore;
@@ -37,7 +38,7 @@ import org.apache.geode.test.junit.categories.IntegrationTest;
 @Category({IntegrationTest.class, ClientSubscriptionTest.class})
 public class BlockingHARegionJUnitTest {
 
-  private static Cache cache = null;
+  private static InternalCache cache = null;
 
   /** boolean to record an exception occurence in another thread **/
   private static volatile boolean exceptionOccured = false;
@@ -53,7 +54,7 @@ public class BlockingHARegionJUnitTest {
     if (cache != null) {
       cache.close(); // fault tolerance
     }
-    cache = CacheFactory.create(DistributedSystem.connect(props));
+    cache = (InternalCache) CacheFactory.create(DistributedSystem.connect(props));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAExpiryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAExpiryDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAExpiryDUnitTest.java
index e568896..3dda4c8 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAExpiryDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAExpiryDUnitTest.java
@@ -18,6 +18,7 @@ import static org.junit.Assert.*;
 
 import java.util.Properties;
 
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.test.junit.categories.ClientSubscriptionTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -65,7 +66,7 @@ public class HAExpiryDUnitTest extends JUnit4DistributedTestCase {
 
   VM vm3 = null;
 
-  protected static Cache cache = null;
+  protected static InternalCache cache = null;
 
   static String regionQueueName = "regionQueue1";
 
@@ -227,7 +228,7 @@ public class HAExpiryDUnitTest extends JUnit4DistributedTestCase {
     assertNotNull(ds);
     ds.disconnect();
     ds = getSystem(props);
-    cache = CacheFactory.create(ds);
+    cache = (InternalCache) CacheFactory.create(ds);
     assertNotNull(cache);
   }
 
@@ -242,7 +243,7 @@ public class HAExpiryDUnitTest extends JUnit4DistributedTestCase {
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.DISTRIBUTED_ACK);
     factory.setDataPolicy(DataPolicy.REPLICATE);
-    CacheListener serverListener = new vmListener();
+    CacheListener serverListener = new VMListener();
     factory.setCacheListener(serverListener);
     RegionAttributes attrs = factory.create();
     cache.createRegion(REGION_NAME, attrs);
@@ -255,24 +256,22 @@ public class HAExpiryDUnitTest extends JUnit4DistributedTestCase {
       cache.getDistributedSystem().disconnect();
     }
   }
-}
-
-
-/**
- * This listener performs the put of Conflatable object in the regionqueue.
- */
 
-class vmListener extends CacheListenerAdapter {
-  public void afterCreate(EntryEvent event) {
-    Cache cache = event.getRegion().getCache();
-    HARegion regionForQueue = (HARegion) cache.getRegion(
-        Region.SEPARATOR + HARegionQueue.createRegionName(HAExpiryDUnitTest.regionQueueName));
-    HARegionQueue regionqueue = regionForQueue.getOwner();
-    try {
-      regionqueue.put(new ConflatableObject(event.getKey(), event.getNewValue(),
-          new EventID(new byte[] {1}, 1, 1), false, "region1"));
-    } catch (Exception e) {
-      e.printStackTrace();
+  /**
+   * This listener performs the put of Conflatable object in the regionqueue.
+   */
+  static class VMListener extends CacheListenerAdapter {
+    public void afterCreate(EntryEvent event) {
+      Cache cache = event.getRegion().getCache();
+      HARegion regionForQueue = (HARegion) cache.getRegion(
+          Region.SEPARATOR + HARegionQueue.createRegionName(HAExpiryDUnitTest.regionQueueName));
+      HARegionQueue regionqueue = regionForQueue.getOwner();
+      try {
+        regionqueue.put(new ConflatableObject(event.getKey(), event.getNewValue(),
+            new EventID(new byte[] {1}, 1, 1), false, "region1"));
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAGIIBugDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAGIIBugDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAGIIBugDUnitTest.java
index 27777e1..c2e778e 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAGIIBugDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAGIIBugDUnitTest.java
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Properties;
 
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.test.junit.categories.ClientSubscriptionTest;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -72,7 +73,7 @@ public class HAGIIBugDUnitTest extends JUnit4DistributedTestCase {
 
   VM vm3 = null;
 
-  protected static Cache cache = null;
+  protected static InternalCache cache = null;
 
   static String regionQueueName = "regionQueue1";
 
@@ -135,7 +136,7 @@ public class HAGIIBugDUnitTest extends JUnit4DistributedTestCase {
     assertNotNull(ds);
     ds.disconnect();
     ds = getSystem(props);
-    cache = CacheFactory.create(ds);
+    cache = (InternalCache) CacheFactory.create(ds);
     assertNotNull(cache);
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAHelper.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAHelper.java
index bff156d..0d67544 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAHelper.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HAHelper.java
@@ -17,15 +17,15 @@ package org.apache.geode.internal.cache.ha;
 import java.util.Map;
 
 import org.apache.geode.internal.cache.HARegion;
+import org.apache.geode.internal.cache.ha.HARegionQueue.MapWrapper;
 
 /**
  * Helper class to access the required functions of this package from outside the package.
  */
-
 public class HAHelper {
 
   public static String getRegionQueueName(String proxyId) {
-    return HARegionQueue.createRegionName(proxyId.toString());
+    return HARegionQueue.createRegionName(proxyId);
   }
 
   public static HARegionQueue getRegionQueue(HARegion hr) {

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARQAddOperationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARQAddOperationJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARQAddOperationJUnitTest.java
index 5fb0295..470426e 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARQAddOperationJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARQAddOperationJUnitTest.java
@@ -22,6 +22,8 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.internal.cache.ha.HARegionQueue.MapWrapper;
 import org.apache.geode.test.junit.categories.ClientSubscriptionTest;
 import org.apache.logging.log4j.Logger;
 import org.junit.After;
@@ -54,7 +56,7 @@ public class HARQAddOperationJUnitTest {
   private static final Logger logger = LogService.getLogger();
 
   /** The cache instance */
-  protected Cache cache = null;
+  protected InternalCache cache = null;
 
   /** Logger for this test */
   protected LogWriter logWriter = null;
@@ -92,8 +94,8 @@ public class HARQAddOperationJUnitTest {
   /**
    * Creates the cache instance for the test
    */
-  private Cache createCache() throws CacheException {
-    return new CacheFactory().set(MCAST_PORT, "0").create();
+  private InternalCache createCache() throws CacheException {
+    return (InternalCache) new CacheFactory().set(MCAST_PORT, "0").create();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionDUnitTest.java
index e46782a..c73fa68 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionDUnitTest.java
@@ -18,6 +18,7 @@ import static org.junit.Assert.*;
 
 import java.util.Properties;
 
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.test.junit.categories.ClientSubscriptionTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -50,7 +51,7 @@ public class HARegionDUnitTest extends JUnit4DistributedTestCase {
 
   VM vm1 = null;
 
-  private static Cache cache = null;
+  private static InternalCache cache = null;
   private static final String REGION_NAME = "HARegionDUnitTest_region";
 
   /** constructor */
@@ -83,13 +84,13 @@ public class HARegionDUnitTest extends JUnit4DistributedTestCase {
    * @return
    * @throws Exception
    */
-  private Cache createCache() throws Exception {
+  private InternalCache createCache() throws Exception {
     Properties props = new Properties();
     DistributedSystem ds = getSystem(props);
     ds.disconnect();
     ds = getSystem(props);
-    Cache cache = null;
-    cache = CacheFactory.create(ds);
+    InternalCache cache = null;
+    cache = (InternalCache) CacheFactory.create(ds);
     if (cache == null) {
       throw new Exception("CacheFactory.create() returned null ");
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueDUnitTest.java
index 14be90e..38ee631 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueDUnitTest.java
@@ -22,6 +22,7 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.test.junit.categories.ClientSubscriptionTest;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -59,7 +60,7 @@ public class HARegionQueueDUnitTest extends JUnit4DistributedTestCase {
   private static volatile boolean toCnt = true;
   private static volatile Thread createQueuesThread;
 
-  private static Cache cache = null;
+  private static InternalCache cache = null;
   private static HARegionQueue hrq = null;
   private static Thread[] opThreads;
 
@@ -98,14 +99,15 @@ public class HARegionQueueDUnitTest extends JUnit4DistributedTestCase {
   /**
    * create cache
    */
-  private Cache createCache() throws CacheException {
+  private InternalCache createCache() throws CacheException {
     Properties props = new Properties();
     DistributedSystem ds = getSystem(props);
     ds.disconnect();
     ds = getSystem(props);
-    Cache cache = null;
-    cache = CacheFactory.create(ds);
+    InternalCache cache = null;
+    cache = (InternalCache) CacheFactory.create(ds);
     if (cache == null) {
+      // TODO: never throw an anonymous inner class
       throw new CacheException("CacheFactory.create() returned null ") {};
     }
     return cache;
@@ -125,7 +127,6 @@ public class HARegionQueueDUnitTest extends JUnit4DistributedTestCase {
     vm1.invoke(() -> HARegionQueueDUnitTest.putValue2());
     vm0.invoke(() -> HARegionQueueDUnitTest.getValue1());
     vm1.invoke(() -> HARegionQueueDUnitTest.getValue2());
-
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueJUnitTest.java
index 30386ba..62cc47b 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueJUnitTest.java
@@ -32,6 +32,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.awaitility.Awaitility;
 
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.test.junit.categories.ClientSubscriptionTest;
 import org.junit.After;
 import org.junit.Before;
@@ -63,7 +64,7 @@ import org.apache.geode.test.junit.categories.IntegrationTest;
 public class HARegionQueueJUnitTest {
 
   /** The cache instance */
-  protected Cache cache = null;
+  protected InternalCache cache = null;
 
   /** Logger for this test */
   protected LogWriter logger;
@@ -95,8 +96,8 @@ public class HARegionQueueJUnitTest {
   /**
    * Creates the cache instance for the test
    */
-  private Cache createCache() throws CacheException {
-    return new CacheFactory().set(MCAST_PORT, "0").create();
+  private InternalCache createCache() throws CacheException {
+    return (InternalCache) new CacheFactory().set(MCAST_PORT, "0").create();
   }
 
   /**
@@ -817,7 +818,7 @@ public class HARegionQueueJUnitTest {
    */
   static class HARQTestClass extends HARegionQueue.TestOnlyHARegionQueue {
 
-    public HARQTestClass(String REGION_NAME, Cache cache, HARegionQueueJUnitTest test)
+    public HARQTestClass(String REGION_NAME, InternalCache cache, HARegionQueueJUnitTest test)
         throws IOException, ClassNotFoundException, CacheException, InterruptedException {
       super(REGION_NAME, cache);
     }
@@ -1544,7 +1545,7 @@ public class HARegionQueueJUnitTest {
     props.put(LOG_LEVEL, "config");
     // props.put("mcast-port","11111");
     try {
-      cache = CacheFactory.create(DistributedSystem.connect(props));
+      cache = (InternalCache) CacheFactory.create(DistributedSystem.connect(props));
     } catch (Exception e1) {
       throw new AssertionError("Test failed because of exception. Exception=", e1);
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueStartStopJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueStartStopJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueStartStopJUnitTest.java
index 3445b33..f7ee8eb 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueStartStopJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueStartStopJUnitTest.java
@@ -23,6 +23,7 @@ import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.RegionQueue;
 import org.apache.geode.test.junit.categories.ClientSubscriptionTest;
 import org.apache.geode.test.junit.categories.IntegrationTest;
@@ -48,11 +49,11 @@ public class HARegionQueueStartStopJUnitTest {
    * @return the cache instance
    * @throws CacheException - thrown if any exception occurs in cache creation
    */
-  private Cache createCache() throws CacheException {
+  private InternalCache createCache() throws CacheException {
     final Properties props = new Properties();
     props.setProperty(LOCATORS, "");
     props.setProperty(MCAST_PORT, "0");
-    return CacheFactory.create(DistributedSystem.connect(props));
+    return (InternalCache) CacheFactory.create(DistributedSystem.connect(props));
   }
 
   /**
@@ -64,7 +65,7 @@ public class HARegionQueueStartStopJUnitTest {
    * @throws CacheException
    * @throws InterruptedException
    */
-  private RegionQueue createHARegionQueue(String name, Cache cache)
+  private RegionQueue createHARegionQueue(String name, InternalCache cache)
       throws IOException, ClassNotFoundException, CacheException, InterruptedException {
     RegionQueue regionqueue = HARegionQueue.getHARegionQueueInstance(name, cache,
         HARegionQueue.NON_BLOCKING_HA_QUEUE, false);
@@ -75,7 +76,7 @@ public class HARegionQueueStartStopJUnitTest {
   public void testStartStop() {
     try {
       boolean exceptionOccured = false;
-      Cache cache = createCache();
+      InternalCache cache = createCache();
       createHARegionQueue("test", cache);
       Assert.assertTrue(HARegionQueue.getDispatchedMessagesMapForTesting() != null);
       HARegionQueue.stopHAServices();

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueStatsJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueStatsJUnitTest.java
index 49efed7..f7fe5de 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueStatsJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARegionQueueStatsJUnitTest.java
@@ -17,6 +17,7 @@ package org.apache.geode.internal.cache.ha;
 import org.apache.geode.cache.*;
 import org.apache.geode.internal.cache.Conflatable;
 import org.apache.geode.internal.cache.EventID;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.test.junit.categories.ClientSubscriptionTest;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.junit.After;
@@ -39,7 +40,7 @@ import static org.junit.Assert.assertNotNull;
 public class HARegionQueueStatsJUnitTest {
 
   /** The cache instance */
-  protected Cache cache = null;
+  protected InternalCache cache = null;
 
   /**
    * Create the cache in setup. Currently the HA related stats are active under fine logging only.
@@ -67,8 +68,8 @@ public class HARegionQueueStatsJUnitTest {
    * @return the cache instance
    * @throws CacheException - thrown if any exception occurs in cache creation
    */
-  private Cache createCache() throws CacheException {
-    return new CacheFactory().set(MCAST_PORT, "0").create();
+  private InternalCache createCache() throws CacheException {
+    return (InternalCache) new CacheFactory().set(MCAST_PORT, "0").create();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/ha/TestBlockingHARegionQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/TestBlockingHARegionQueue.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/TestBlockingHARegionQueue.java
index c445d60..2ae699e 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/TestBlockingHARegionQueue.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/TestBlockingHARegionQueue.java
@@ -20,6 +20,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheException;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.logging.LogService;
 
 /**
@@ -43,7 +44,7 @@ public class TestBlockingHARegionQueue extends HARegionQueue.TestOnlyHARegionQue
 
   boolean takeWhenPeekInProgress = false;
 
-  public TestBlockingHARegionQueue(String regionName, Cache cache)
+  public TestBlockingHARegionQueue(String regionName, InternalCache cache)
       throws IOException, ClassNotFoundException, CacheException, InterruptedException {
     super(regionName, cache);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PartitionMessageTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PartitionMessageTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PartitionMessageTest.java
index f842470..b3bb02b 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PartitionMessageTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PartitionMessageTest.java
@@ -59,7 +59,7 @@ public class PartitionMessageTest {
     when(msg.checkCacheClosing(dm)).thenReturn(false);
     when(msg.checkDSClosing(dm)).thenReturn(false);
     when(msg.getPartitionedRegion()).thenReturn(pr);
-    when(msg.getGemFireCacheImpl()).thenReturn(cache);
+    when(msg.getInternalCache()).thenReturn(cache);
     when(msg.getStartPartitionMessageProcessingTime(pr)).thenReturn(startTime);
     when(msg.getTXManagerImpl(cache)).thenReturn(txMgr);
 
@@ -100,7 +100,7 @@ public class PartitionMessageTest {
       DataLocationException, InterruptedException, IOException {
     txMgr = new TXManagerImpl(null, cache);
     when(msg.getPartitionedRegion()).thenReturn(pr);
-    when(msg.getGemFireCacheImpl()).thenReturn(cache);
+    when(msg.getInternalCache()).thenReturn(cache);
     when(msg.getStartPartitionMessageProcessingTime(pr)).thenReturn(startTime);
     when(msg.getTXManagerImpl(cache)).thenReturn(txMgr);
     when(msg.canParticipateInTransaction()).thenReturn(true);

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
index 8748df6..3706e1c 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
@@ -1492,7 +1492,6 @@ public class PersistentColocatedPartitionedRegionDUnitTest
     Set<Integer> vm2PrimaryBuckets = getPrimaryBucketList(vm2, PR_REGION_NAME);
     assertEquals(vm2PrimaryBuckets, getPrimaryBucketList(vm2, "region2"));
 
-
     closeCache(vm2);
     // Make sure the other members notice that vm2 has gone
     // TODO use a callback for this.
@@ -1513,8 +1512,6 @@ public class PersistentColocatedPartitionedRegionDUnitTest
     waitForBucketRecovery(vm0, vm0Buckets);
     waitForBucketRecovery(vm1, vm1Buckets);
 
-
-
     checkData(vm0, 0, NUM_BUCKETS, "a");
 
     // region 2 didn't have persistent data, so it nothing should be recovered

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ShutdownAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ShutdownAllDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ShutdownAllDUnitTest.java
index 11254e7..7b88679 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ShutdownAllDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ShutdownAllDUnitTest.java
@@ -51,6 +51,7 @@ import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.internal.cache.CacheLifecycleListener;
 import org.apache.geode.internal.cache.DiskRegion;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.internal.cache.control.InternalResourceManager;
 import org.apache.geode.internal.cache.control.InternalResourceManager.ResourceObserver;
@@ -209,13 +210,13 @@ public class ShutdownAllDUnitTest extends JUnit4CacheTestCase {
     AsyncInvocation<?> asyncCreate = vm0.invokeAsync(() -> {
       cll = new CacheLifecycleListener() {
         @Override
-        public void cacheCreated(GemFireCacheImpl cache) {
+        public void cacheCreated(InternalCache cache) {
           calledCreateCache.set(true);
           Awaitility.await().atMost(90, TimeUnit.SECONDS).until(() -> cache.isCacheAtShutdownAll());
         }
 
         @Override
-        public void cacheClosed(GemFireCacheImpl cache) {
+        public void cacheClosed(InternalCache cache) {
           calledCloseCache.set(true);
         }
       };
@@ -544,9 +545,6 @@ public class ShutdownAllDUnitTest extends JUnit4CacheTestCase {
 
     assertEquals(vm0Buckets, getBucketList(vm0, "region"));
 
-    // checkRecoveredFromDisk(vm0, 0, true);
-    // checkRecoveredFromDisk(vm1, 0, false);
-
     checkData(vm0, 0, numBuckets, "a", "region");
     checkData(vm1, 0, numBuckets, "a", "region");
 
@@ -554,20 +552,8 @@ public class ShutdownAllDUnitTest extends JUnit4CacheTestCase {
     checkData(vm0, numBuckets, 113, "b", "region");
   }
 
-
-  // public void testRepeat() throws Throwable {
-  // for (int i=0; i<10; i++) {
-  // System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> run #"+i);
-  // testShutdownAllWithMembersWaiting();
-  // tearDown();
-  // setUp();
-  // }
-  // }
-
   /**
    * Test for 43551. Do a shutdown all with some members waiting on recovery.
-   * 
-   * @throws Throwable
    */
   @Test
   public void testShutdownAllWithMembersWaiting() throws Throwable {
@@ -664,11 +650,9 @@ public class ShutdownAllDUnitTest extends JUnit4CacheTestCase {
 
   private SerializableRunnable getCreateDRRunnable(final String regionName,
       final String diskStoreName) {
-    SerializableRunnable createDR = new SerializableRunnable("create DR") {
-      Cache cache;
-
+    return new SerializableRunnable("create DR") {
       public void run() {
-        cache = getCache();
+        Cache cache = ShutdownAllDUnitTest.this.getCache();
 
         DiskStore ds = cache.findDiskStore(diskStoreName);
         if (ds == null) {
@@ -681,7 +665,6 @@ public class ShutdownAllDUnitTest extends JUnit4CacheTestCase {
         cache.createRegion(regionName, af.create());
       }
     };
-    return createDR;
   }
 
   protected void addCacheServer(VM vm, final int port) {
@@ -723,8 +706,8 @@ public class ShutdownAllDUnitTest extends JUnit4CacheTestCase {
 
   private SerializableRunnable getCreatePRRunnable(final String regionName,
       final String diskStoreName, final int redundancy) {
-    SerializableRunnable createPR = new SerializableRunnable("create pr") {
-
+    return new SerializableRunnable("create pr") {
+      @Override
       public void run() {
         final CountDownLatch recoveryDone;
         if (redundancy > 0) {
@@ -741,7 +724,7 @@ public class ShutdownAllDUnitTest extends JUnit4CacheTestCase {
           recoveryDone = null;
         }
 
-        Cache cache = getCache();
+        Cache cache = ShutdownAllDUnitTest.this.getCache();
 
         if (diskStoreName != null) {
           DiskStore ds = cache.findDiskStore(diskStoreName);
@@ -772,7 +755,6 @@ public class ShutdownAllDUnitTest extends JUnit4CacheTestCase {
         }
       }
     };
-    return createPR;
   }
 
   protected void createData(VM vm, final int startKey, final int endKey, final String value,
@@ -888,7 +870,7 @@ public class ShutdownAllDUnitTest extends JUnit4CacheTestCase {
     public void afterUpdate(EntryEvent event) {
       try {
         latch.await();
-      } catch (InterruptedException e) {
+      } catch (InterruptedException ignore) {
         Thread.currentThread().interrupt();
       }
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
index 5d4096e..de06a5e 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
@@ -42,6 +42,7 @@ import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.cache.FixedPartitionAttributesImpl;
 import org.apache.geode.internal.cache.HARegion;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.PartitionRegionConfig;
 import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.internal.cache.PartitionedRegionHelper;
@@ -94,7 +95,7 @@ public class FixedPartitioningTestBase extends JUnit4DistributedTestCase {
 
   protected static VM member4 = null;
 
-  static Cache cache = null;
+  static InternalCache cache = null;
 
   protected static PartitionedRegion region_FPR = null;
 
@@ -148,7 +149,7 @@ public class FixedPartitioningTestBase extends JUnit4DistributedTestCase {
       assertNotNull(ds);
       ds.disconnect();
       ds = getSystem(props);
-      cache = CacheFactory.create(ds);
+      cache = (InternalCache) CacheFactory.create(ds);
       assertNotNull(cache);
     } catch (Exception e) {
       org.apache.geode.test.dunit.Assert.fail("Failed while creating the cache", e);

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CommitCommandTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CommitCommandTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CommitCommandTest.java
index a3b2afe..7963e97 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CommitCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CommitCommandTest.java
@@ -20,7 +20,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.tier.sockets.Message;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
 import org.apache.geode.test.junit.categories.UnitTest;
@@ -39,7 +39,7 @@ public class CommitCommandTest {
    */
   @Test
   public void testWriteNullResponse() throws Exception {
-    Cache cache = mock(Cache.class);
+    InternalCache cache = mock(InternalCache.class);
     Message origMsg = mock(Message.class);
     ServerConnection servConn = mock(ServerConnection.class);
     when(servConn.getResponseMessage()).thenReturn(mock(Message.class));

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKey66Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKey66Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKey66Test.java
index 1297a62..3a6c2a3 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKey66Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKey66Test.java
@@ -14,12 +14,10 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -27,8 +25,8 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
 import org.apache.geode.internal.cache.tier.sockets.Message;
@@ -56,7 +54,7 @@ public class ContainsKey66Test {
   @Mock
   private LocalRegion region;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private CacheServerStats cacheServerStats;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKeyTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKeyTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKeyTest.java
index eee2ca6..bc1be3e 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKeyTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKeyTest.java
@@ -14,11 +14,8 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.*;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -26,8 +23,8 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.Region;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
 import org.apache.geode.internal.cache.tier.sockets.Message;
@@ -66,7 +63,7 @@ public class ContainsKeyTest {
     Region region = mock(LocalRegion.class);
     when(region.containsKey(isA(String.class))).thenReturn(true);
 
-    Cache cache = mock(Cache.class);
+    InternalCache cache = mock(InternalCache.class);
     when(cache.getRegion(isA(String.class))).thenReturn(region);
 
     CacheServerStats cacheServerStats = mock(CacheServerStats.class);

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CreateRegionTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CreateRegionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CreateRegionTest.java
index 0b411dd..c946e8a 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CreateRegionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CreateRegionTest.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;
@@ -26,8 +26,8 @@ import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.AttributesFactory;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
 import org.apache.geode.internal.cache.tier.sockets.Message;
@@ -57,7 +57,7 @@ public class CreateRegionTest {
   @Mock
   private LocalRegion parentRegion;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Message errorResponseMessage;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Destroy65Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Destroy65Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Destroy65Test.java
index ffc462a..d3f68f2 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Destroy65Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Destroy65Test.java
@@ -14,12 +14,10 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -28,9 +26,9 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.DestroyOperationContext;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -61,7 +59,7 @@ public class Destroy65Test {
   @Mock
   private LocalRegion region;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private CacheServerStats cacheServerStats;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyRegionTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyRegionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyRegionTest.java
index 808792a..4abdebf 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyRegionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyRegionTest.java
@@ -14,7 +14,8 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;
@@ -25,9 +26,9 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.RegionDestroyOperationContext;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -41,6 +42,7 @@ import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class DestroyRegionTest {
+
   private static final String REGION_NAME = "region1";
   private static final String KEY = "key1";
   private static final Object CALLBACK_ARG = "arg";
@@ -57,7 +59,7 @@ public class DestroyRegionTest {
   @Mock
   private LocalRegion region;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private CacheServerStats cacheServerStats;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyTest.java
index ce869ab..24105a6 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyTest.java
@@ -14,13 +14,10 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.nio.ByteBuffer;
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -29,9 +26,9 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.DestroyOperationContext;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -62,7 +59,7 @@ public class DestroyTest {
   @Mock
   private LocalRegion region;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private CacheServerStats cacheServerStats;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Get70Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Get70Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Get70Test.java
index ca08f03..d81dfd7 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Get70Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Get70Test.java
@@ -14,12 +14,11 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -28,10 +27,9 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
-import org.apache.geode.cache.operations.DestroyOperationContext;
 import org.apache.geode.cache.operations.GetOperationContext;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -45,6 +43,7 @@ import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class Get70Test {
+
   private static final String REGION_NAME = "region1";
   private static final String KEY = "key1";
   private static final Object CALLBACK_ARG = "arg";
@@ -61,7 +60,7 @@ public class Get70Test {
   @Mock
   private LocalRegion region;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private CacheServerStats cacheServerStats;
   @Mock
@@ -167,5 +166,4 @@ public class Get70Test {
     verify(this.errorResponseMessage).send(eq(this.serverConnection));
   }
 
-
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAll651Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAll651Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAll651Test.java
index e82b1f2..974fa05 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAll651Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAll651Test.java
@@ -15,12 +15,12 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Matchers.*;
+import static org.assertj.core.api.Assertions.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -30,8 +30,8 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.GetOperationContext;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -47,6 +47,7 @@ import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class GetAll651Test {
+
   private static final String REGION_NAME = "region1";
   private static final Object[] KEYS = new Object[] {"key1", "key2", "key3"};
 
@@ -59,7 +60,7 @@ public class GetAll651Test {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Part regionNamePart;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAll70Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAll70Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAll70Test.java
index 9806c6e..018993c 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAll70Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAll70Test.java
@@ -14,12 +14,12 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Matchers.*;
+import static org.assertj.core.api.Assertions.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -29,9 +29,9 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.RegionAttributes;
 import org.apache.geode.cache.operations.GetOperationContext;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -47,6 +47,7 @@ import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class GetAll70Test {
+
   private static final String REGION_NAME = "region1";
   private static final Object[] KEYS = new Object[] {"key1", "key2", "key3"};
 
@@ -59,7 +60,7 @@ public class GetAll70Test {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private LocalRegion region;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAllTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAllTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAllTest.java
index 2554560..cebf988 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAllTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAllTest.java
@@ -18,8 +18,6 @@ import static org.assertj.core.api.Assertions.*;
 import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -29,8 +27,8 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.GetOperationContext;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -59,7 +57,7 @@ public class GetAllTest {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Part regionNamePart;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAllWithCallbackTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAllWithCallbackTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAllWithCallbackTest.java
index 415f8f9..112ea64 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAllWithCallbackTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetAllWithCallbackTest.java
@@ -14,12 +14,12 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Matchers.*;
+import static org.assertj.core.api.Assertions.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -28,13 +28,10 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
-import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.RegionAttributes;
 import org.apache.geode.cache.operations.GetOperationContext;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
-import org.apache.geode.internal.cache.tier.CachedRegionHelper;
-import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
 import org.apache.geode.internal.cache.tier.sockets.ChunkedMessage;
 import org.apache.geode.internal.cache.tier.sockets.Message;
 import org.apache.geode.internal.cache.tier.sockets.ObjectPartList;
@@ -47,6 +44,7 @@ import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class GetAllWithCallbackTest {
+
   private static final String REGION_NAME = "region1";
   private static final Object[] KEYS = new Object[] {"key1", "key2", "key3"};
 
@@ -59,7 +57,7 @@ public class GetAllWithCallbackTest {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private LocalRegion region;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetClientPartitionAttributesCommand66Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetClientPartitionAttributesCommand66Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetClientPartitionAttributesCommand66Test.java
index e93e874..c86ecb4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetClientPartitionAttributesCommand66Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetClientPartitionAttributesCommand66Test.java
@@ -14,13 +14,10 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -28,7 +25,7 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
-import org.apache.geode.cache.Cache;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.sockets.Message;
 import org.apache.geode.internal.cache.tier.sockets.Part;
@@ -48,7 +45,7 @@ public class GetClientPartitionAttributesCommand66Test {
   @Mock
   private ServerConnection serverConnection;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Part regionNamePart;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetClientPartitionAttributesCommandTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetClientPartitionAttributesCommandTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetClientPartitionAttributesCommandTest.java
index 1f71777..fe144d7 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetClientPartitionAttributesCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GetClientPartitionAttributesCommandTest.java
@@ -28,7 +28,7 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
-import org.apache.geode.cache.Cache;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.internal.cache.tier.sockets.Message;
 import org.apache.geode.internal.cache.tier.sockets.Part;
@@ -48,7 +48,7 @@ public class GetClientPartitionAttributesCommandTest {
   @Mock
   private ServerConnection serverConnection;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Part regionNamePart;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/InvalidateTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/InvalidateTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/InvalidateTest.java
index 971179c..b261347 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/InvalidateTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/InvalidateTest.java
@@ -15,11 +15,11 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -29,16 +29,13 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
-import org.apache.geode.cache.operations.GetOperationContext;
 import org.apache.geode.cache.operations.InvalidateOperationContext;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
-import org.apache.geode.internal.cache.tier.sockets.ChunkedMessage;
 import org.apache.geode.internal.cache.tier.sockets.Message;
-import org.apache.geode.internal.cache.tier.sockets.ObjectPartList;
 import org.apache.geode.internal.cache.tier.sockets.Part;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
 import org.apache.geode.internal.security.AuthorizeRequest;
@@ -63,7 +60,7 @@ public class InvalidateTest {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Message errorResponseMessage;
   @Mock
@@ -103,7 +100,6 @@ public class InvalidateTest {
     when(this.message.getPart(eq(2))).thenReturn(this.eventPart);
     when(this.message.getPart(eq(3))).thenReturn(this.callbackArgPart);
 
-
     when(this.regionNamePart.getString()).thenReturn(REGION_NAME);
 
     when(this.serverConnection.getCache()).thenReturn(this.cache);

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/KeySetTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/KeySetTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/KeySetTest.java
index 3ca8b3b..5f09eaa 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/KeySetTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/KeySetTest.java
@@ -15,11 +15,10 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -29,15 +28,13 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
-import org.apache.geode.cache.operations.DestroyOperationContext;
 import org.apache.geode.cache.operations.KeySetOperationContext;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
 import org.apache.geode.internal.cache.tier.sockets.ChunkedMessage;
 import org.apache.geode.internal.cache.tier.sockets.Message;
-import org.apache.geode.internal.cache.tier.sockets.ObjectPartList;
 import org.apache.geode.internal.cache.tier.sockets.Part;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
 import org.apache.geode.internal.security.AuthorizeRequest;
@@ -64,7 +61,7 @@ public class KeySetTest {
   @Mock
   private LocalRegion region;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private ChunkedMessage chunkedResponseMessage;
   @Mock
@@ -158,5 +155,4 @@ public class KeySetTest {
     verify(this.chunkedResponseMessage).sendChunk(eq(this.serverConnection));
   }
 
-
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
index 03a9321..2b4110e 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
@@ -15,11 +15,11 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -29,10 +29,10 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.PutOperationContext;
 import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.EntryEventImpl;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -64,7 +64,7 @@ public class Put61Test {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private LocalRegion localRegion;
   @Mock
@@ -204,6 +204,4 @@ public class Put61Test {
     verify(this.errorResponseMessage).send(this.serverConnection);
   }
 
-
-
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
index cf30b35..8a1c870 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
@@ -15,11 +15,11 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -29,12 +29,10 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
-import org.apache.geode.cache.CacheTransactionManager;
-import org.apache.geode.cache.Operation;
 import org.apache.geode.cache.operations.PutOperationContext;
 import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.EntryEventImpl;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.TXManagerImpl;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
@@ -67,7 +65,7 @@ public class Put65Test {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private LocalRegion localRegion;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
index 5197b21..abd6649 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
@@ -15,11 +15,11 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -29,10 +29,10 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.PutOperationContext;
 import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.EntryEventImpl;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -64,7 +64,7 @@ public class PutTest {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private LocalRegion localRegion;
   @Mock

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterest61Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterest61Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterest61Test.java
index 495f772..6f6da3a 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterest61Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterest61Test.java
@@ -27,9 +27,9 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.RegisterInterestOperationContext;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.AcceptorImpl;
@@ -44,11 +44,11 @@ import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class RegisterInterest61Test {
+
   private static final String REGION_NAME = "region1";
   private static final String KEY = "key1";
   private static final byte[] DURABLE = new byte[8];
 
-
   @Mock
   private SecurityService securityService;
   @Mock
@@ -58,7 +58,7 @@ public class RegisterInterest61Test {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Part regionNamePart;
   @Mock
@@ -82,7 +82,6 @@ public class RegisterInterest61Test {
     this.registerInterest61 = new RegisterInterest61();
     MockitoAnnotations.initMocks(this);
 
-
     when(this.authzRequest.registerInterestAuthorize(eq(REGION_NAME), eq(KEY), anyInt(), any()))
         .thenReturn(this.registerInterestOperationContext);
 
@@ -181,6 +180,4 @@ public class RegisterInterest61Test {
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
   }
 
-
-
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList61Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList61Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList61Test.java
index 94bd633..2b91b99 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList61Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList61Test.java
@@ -14,8 +14,10 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Matchers.*;
+import static org.assertj.core.api.Assertions.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;
@@ -27,9 +29,9 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.RegisterInterestOperationContext;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.AcceptorImpl;
@@ -44,11 +46,11 @@ import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class RegisterInterestList61Test {
+
   private static final String REGION_NAME = "region1";
   private static final String KEY = "key1";
   private static final byte[] DURABLE = new byte[8];
 
-
   @Mock
   private SecurityService securityService;
   @Mock
@@ -58,7 +60,7 @@ public class RegisterInterestList61Test {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Part regionNamePart;
   @Mock
@@ -84,7 +86,6 @@ public class RegisterInterestList61Test {
     this.registerInterestList61 = new RegisterInterestList61();
     MockitoAnnotations.initMocks(this);
 
-
     when(this.authzRequest.registerInterestListAuthorize(eq(REGION_NAME), any(), any()))
         .thenReturn(this.registerInterestOperationContext);
 

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList66Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList66Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList66Test.java
index bc92d54..94163ea 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList66Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList66Test.java
@@ -29,9 +29,9 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.RegisterInterestOperationContext;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.AcceptorImpl;
@@ -46,12 +46,12 @@ import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class RegisterInterestList66Test {
+
   private static final String REGION_NAME = "region1";
   private static final String KEY = "key1";
   private static final byte[] DURABLE = new byte[8];
   private static final byte[] DATA_POLICY = new byte[] {0x01, 0x01};
 
-
   @Mock
   private SecurityService securityService;
   @Mock
@@ -61,7 +61,7 @@ public class RegisterInterestList66Test {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Part regionNamePart;
   @Mock
@@ -89,7 +89,6 @@ public class RegisterInterestList66Test {
     this.registerInterestList66 = new RegisterInterestList66();
     MockitoAnnotations.initMocks(this);
 
-
     when(this.authzRequest.registerInterestListAuthorize(eq(REGION_NAME), any(), any()))
         .thenReturn(this.registerInterestOperationContext);
 

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestListTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestListTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestListTest.java
index 1832ca2..514eb9b 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestListTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestListTest.java
@@ -14,8 +14,10 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Matchers.*;
+import static org.assertj.core.api.Assertions.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;
@@ -27,9 +29,9 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.RegisterInterestOperationContext;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.AcceptorImpl;
@@ -44,11 +46,11 @@ import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
 public class RegisterInterestListTest {
+
   private static final String REGION_NAME = "region1";
   private static final String KEY = "key1";
   private static final byte[] DURABLE = new byte[8];
 
-
   @Mock
   private SecurityService securityService;
   @Mock
@@ -58,7 +60,7 @@ public class RegisterInterestListTest {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Part regionNamePart;
   @Mock
@@ -84,7 +86,6 @@ public class RegisterInterestListTest {
     this.registerInterestList = new RegisterInterestList();
     MockitoAnnotations.initMocks(this);
 
-
     when(this.authzRequest.registerInterestListAuthorize(eq(REGION_NAME), any(), any()))
         .thenReturn(this.registerInterestOperationContext);
 

http://git-wip-us.apache.org/repos/asf/geode/blob/80bc00f0/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestTest.java
index 317347f..0b02a2c 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestTest.java
@@ -15,11 +15,12 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
-import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -29,20 +30,12 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.Cache;
-import org.apache.geode.cache.InterestResultPolicy;
-import org.apache.geode.cache.operations.GetOperationContext;
 import org.apache.geode.cache.operations.RegisterInterestOperationContext;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
-import org.apache.geode.internal.cache.tier.sockets.AcceptorImpl;
-import org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier;
-import org.apache.geode.internal.cache.tier.sockets.CacheClientProxy;
-import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
 import org.apache.geode.internal.cache.tier.sockets.ChunkedMessage;
-import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
 import org.apache.geode.internal.cache.tier.sockets.Message;
-import org.apache.geode.internal.cache.tier.sockets.ObjectPartList;
 import org.apache.geode.internal.cache.tier.sockets.Part;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
 import org.apache.geode.internal.security.AuthorizeRequest;
@@ -57,7 +50,6 @@ public class RegisterInterestTest {
   private static final String KEY = "key1";
   private static final byte[] DURABLE = new byte[8];
 
-
   @Mock
   private SecurityService securityService;
   @Mock
@@ -67,7 +59,7 @@ public class RegisterInterestTest {
   @Mock
   private AuthorizeRequest authzRequest;
   @Mock
-  private Cache cache;
+  private InternalCache cache;
   @Mock
   private Part regionNamePart;
   @Mock
@@ -89,7 +81,6 @@ public class RegisterInterestTest {
     this.registerInterest = new RegisterInterest();
     MockitoAnnotations.initMocks(this);
 
-
     when(this.authzRequest.registerInterestAuthorize(eq(REGION_NAME), eq(KEY), anyInt(), any()))
         .thenReturn(mock(RegisterInterestOperationContext.class));
 


Mime
View raw message