geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [04/11] geode git commit: GEODE-2632: use immutable SecurityService impls to improve performance
Date Fri, 09 Jun 2017 17:17:29 GMT
http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 c946e8a..6d346f7 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
@@ -98,7 +98,7 @@ public class CreateRegionTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.createRegion.cmdExecute(this.message, this.serverConnection, 0);
+    this.createRegion.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.responseMessage).send(this.serverConnection);
   }
@@ -110,7 +110,7 @@ public class CreateRegionTest {
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
     // act
-    this.createRegion.cmdExecute(this.message, this.serverConnection, 0);
+    this.createRegion.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     // assert
     verify(this.securityService).authorizeDataManage();
@@ -123,7 +123,7 @@ public class CreateRegionTest {
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
     doThrow(new NotAuthorizedException("")).when(this.securityService).authorizeDataManage();
 
-    this.createRegion.cmdExecute(this.message, this.serverConnection, 0);
+    this.createRegion.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeDataManage();
     verify(this.errorResponseMessage).send(eq(this.serverConnection));
@@ -134,7 +134,7 @@ public class CreateRegionTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.createRegion.cmdExecute(this.message, this.serverConnection, 0);
+    this.createRegion.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).createRegionAuthorize(eq(PARENT_REGION_NAME + '/' + REGION_NAME));
     verify(this.responseMessage).send(this.serverConnection);
@@ -147,7 +147,7 @@ public class CreateRegionTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .createRegionAuthorize(eq(PARENT_REGION_NAME + '/' + REGION_NAME));
 
-    this.createRegion.cmdExecute(this.message, this.serverConnection, 0);
+    this.createRegion.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).createRegionAuthorize(eq(PARENT_REGION_NAME + '/' + REGION_NAME));
     verify(this.errorResponseMessage).send(eq(this.serverConnection));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 d3f68f2..a482a8c 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
@@ -118,7 +118,7 @@ public class Destroy65Test {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.destroy65.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroy65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.responseMessage).send(this.serverConnection);
   }
@@ -128,7 +128,7 @@ public class Destroy65Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.destroy65.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroy65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
     verify(this.responseMessage).send(this.serverConnection);
@@ -141,7 +141,7 @@ public class Destroy65Test {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
 
-    this.destroy65.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroy65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
     verify(this.errorResponseMessage).send(eq(this.serverConnection));
@@ -152,7 +152,7 @@ public class Destroy65Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.destroy65.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroy65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).destroyAuthorize(eq(REGION_NAME), eq(KEY), eq(CALLBACK_ARG));
     verify(this.responseMessage).send(this.serverConnection);
@@ -165,7 +165,7 @@ public class Destroy65Test {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .destroyAuthorize(eq(REGION_NAME), eq(KEY), eq(CALLBACK_ARG));
 
-    this.destroy65.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroy65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).destroyAuthorize(eq(REGION_NAME), eq(KEY), eq(CALLBACK_ARG));
     verify(this.errorResponseMessage).send(eq(this.serverConnection));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 4abdebf..6b367c1 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
@@ -110,7 +110,7 @@ public class DestroyRegionTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.destroyRegion.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroyRegion.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeDataManage();
     verify(this.responseMessage).send(this.serverConnection);
@@ -121,7 +121,7 @@ public class DestroyRegionTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.destroyRegion.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroyRegion.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeDataManage();
     verify(this.responseMessage).send(this.serverConnection);
@@ -133,7 +133,7 @@ public class DestroyRegionTest {
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
     doThrow(new NotAuthorizedException("")).when(this.securityService).authorizeDataManage();
 
-    this.destroyRegion.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroyRegion.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.errorResponseMessage).send(this.serverConnection);
   }
@@ -143,7 +143,7 @@ public class DestroyRegionTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.destroyRegion.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroyRegion.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).destroyRegionAuthorize(eq(REGION_NAME), eq(CALLBACK_ARG));
     verify(this.responseMessage).send(this.serverConnection);
@@ -156,7 +156,7 @@ public class DestroyRegionTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .destroyRegionAuthorize(eq(REGION_NAME), eq(CALLBACK_ARG));
 
-    this.destroyRegion.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroyRegion.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).destroyRegionAuthorize(eq(REGION_NAME), eq(CALLBACK_ARG));
     verify(this.errorResponseMessage).send(this.serverConnection);

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 24105a6..a4a6820 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
@@ -121,7 +121,7 @@ public class DestroyTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.destroy.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroy.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.replyMessage).send(this.serverConnection);
   }
@@ -131,7 +131,7 @@ public class DestroyTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.destroy.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroy.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
     verify(this.replyMessage).send(this.serverConnection);
@@ -144,7 +144,7 @@ public class DestroyTest {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
 
-    this.destroy.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroy.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
 
     verify(this.errorResponseMessage).send(eq(this.serverConnection));
@@ -155,7 +155,7 @@ public class DestroyTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.destroy.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroy.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).destroyAuthorize(eq(REGION_NAME), eq(KEY), eq(CALLBACK_ARG));
     verify(this.replyMessage).send(this.serverConnection);
@@ -168,7 +168,7 @@ public class DestroyTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .destroyAuthorize(eq(REGION_NAME), eq(KEY), eq(CALLBACK_ARG));
 
-    this.destroy.cmdExecute(this.message, this.serverConnection, 0);
+    this.destroy.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).destroyAuthorize(eq(REGION_NAME), eq(KEY), eq(CALLBACK_ARG));
     verify(this.errorResponseMessage).send(eq(this.serverConnection));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction65Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction65Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction65Test.java
index 8df33ab..c64bbb9 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction65Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction65Test.java
@@ -41,7 +41,6 @@ import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.control.HeapMemoryMonitor;
 import org.apache.geode.internal.cache.control.InternalResourceManager;
-import org.apache.geode.internal.cache.execute.AbstractExecution;
 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.ChunkedMessage;
@@ -153,7 +152,7 @@ public class ExecuteFunction65Test {
   public void nonSecureShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.executeFunction65.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     // verify(this.functionResponseMessage).sendChunk(this.serverConnection); // TODO: why do none
     // of the reply message types get sent?
@@ -164,7 +163,7 @@ public class ExecuteFunction65Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.executeFunction65.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeDataWrite();
     // verify(this.replyMessage).send(this.serverConnection); TODO: why do none of the reply message
@@ -177,7 +176,7 @@ public class ExecuteFunction65Test {
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
     doThrow(new NotAuthorizedException("")).when(this.securityService).authorizeDataWrite();
 
-    this.executeFunction65.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeDataWrite();
     // verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -188,7 +187,7 @@ public class ExecuteFunction65Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.executeFunction65.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).executeFunctionAuthorize(eq(FUNCTION_ID), any(), any(), any(),
         eq(false));
@@ -203,7 +202,7 @@ public class ExecuteFunction65Test {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .executeFunctionAuthorize(eq(FUNCTION_ID), any(), any(), any(), eq(false));
 
-    this.executeFunction65.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeDataWrite();
     // verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66Test.java
index 3c60419..74104a4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66Test.java
@@ -150,7 +150,7 @@ public class ExecuteFunction66Test {
   public void nonSecureShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.executeFunction66.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction66.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     // verify(this.functionResponseMessage).sendChunk(this.serverConnection); // TODO: why do none
     // of the reply message types get sent?
@@ -161,7 +161,7 @@ public class ExecuteFunction66Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.executeFunction66.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction66.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeDataWrite();
     // verify(this.replyMessage).send(this.serverConnection); TODO: why do none of the reply message
@@ -174,9 +174,8 @@ public class ExecuteFunction66Test {
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
     doThrow(new NotAuthorizedException("")).when(this.securityService).authorizeDataWrite();
 
-    assertThatThrownBy(
-        () -> this.executeFunction66.cmdExecute(this.message, this.serverConnection, 0))
-            .isExactlyInstanceOf(NullPointerException.class);
+    assertThatThrownBy(() -> this.executeFunction66.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0)).isExactlyInstanceOf(NullPointerException.class);
 
     verify(this.securityService).authorizeDataWrite();
     // verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -187,7 +186,7 @@ public class ExecuteFunction66Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.executeFunction66.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction66.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).executeFunctionAuthorize(eq(FUNCTION_ID), any(), any(), any(),
         eq(false));
@@ -202,9 +201,8 @@ public class ExecuteFunction66Test {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .executeFunctionAuthorize(eq(FUNCTION_ID), any(), any(), any(), eq(false));
 
-    assertThatThrownBy(
-        () -> this.executeFunction66.cmdExecute(this.message, this.serverConnection, 0))
-            .isExactlyInstanceOf(NullPointerException.class);
+    assertThatThrownBy(() -> this.executeFunction66.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0)).isExactlyInstanceOf(NullPointerException.class);
 
     verify(this.securityService).authorizeDataWrite();
     // verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunctionTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunctionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunctionTest.java
index 67b5ca6..a9d9498 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunctionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunctionTest.java
@@ -33,7 +33,6 @@ import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 
 import org.apache.geode.CancelCriterion;
-import org.apache.geode.cache.control.ResourceManager;
 import org.apache.geode.cache.execute.FunctionService;
 import org.apache.geode.cache.operations.ExecuteFunctionOperationContext;
 import org.apache.geode.distributed.internal.DistributionConfig;
@@ -156,7 +155,7 @@ public class ExecuteFunctionTest {
   public void nonSecureShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.executeFunction.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     // verify(this.functionResponseMessage).sendChunk(this.serverConnection); // TODO: why do none
     // of the reply message types get sent?
@@ -167,7 +166,7 @@ public class ExecuteFunctionTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.executeFunction.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeDataWrite();
     // verify(this.replyMessage).send(this.serverConnection); TODO: why do none of the reply message
@@ -180,7 +179,7 @@ public class ExecuteFunctionTest {
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
     doThrow(new NotAuthorizedException("")).when(this.securityService).authorizeDataWrite();
 
-    this.executeFunction.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeDataWrite();
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -191,7 +190,7 @@ public class ExecuteFunctionTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.executeFunction.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).executeFunctionAuthorize(eq(FUNCTION_ID), any(), any(), any(),
         eq(false));
@@ -206,7 +205,7 @@ public class ExecuteFunctionTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .executeFunctionAuthorize(eq(FUNCTION_ID), any(), any(), any(), eq(false));
 
-    this.executeFunction.cmdExecute(this.message, this.serverConnection, 0);
+    this.executeFunction.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 d81dfd7..734eb51 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
@@ -114,7 +114,7 @@ public class Get70Test {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.get70.cmdExecute(this.message, this.serverConnection, 0);
+    this.get70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
     verify(this.responseMessage).send(this.serverConnection);
   }
 
@@ -123,7 +123,7 @@ public class Get70Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.get70.cmdExecute(this.message, this.serverConnection, 0);
+    this.get70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(KEY));
     verify(this.responseMessage).send(this.serverConnection);
@@ -136,7 +136,7 @@ public class Get70Test {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionRead(eq(REGION_NAME), eq(KEY));
 
-    this.get70.cmdExecute(this.message, this.serverConnection, 0);
+    this.get70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(KEY));
     verify(this.errorResponseMessage).send(eq(this.serverConnection));
@@ -147,7 +147,7 @@ public class Get70Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.get70.cmdExecute(this.message, this.serverConnection, 0);
+    this.get70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).getAuthorize(eq(REGION_NAME), eq(KEY), eq(CALLBACK_ARG));
     verify(this.responseMessage).send(this.serverConnection);
@@ -160,7 +160,7 @@ public class Get70Test {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest).getAuthorize(eq(REGION_NAME),
         eq(KEY), eq(CALLBACK_ARG));
 
-    this.get70.cmdExecute(this.message, this.serverConnection, 0);
+    this.get70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).getAuthorize(eq(REGION_NAME), eq(KEY), eq(CALLBACK_ARG));
     verify(this.errorResponseMessage).send(eq(this.serverConnection));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 974fa05..4bf4a5c 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
@@ -100,7 +100,7 @@ public class GetAll651Test {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.getAll651.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll651.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.chunkedResponseMessage).sendChunk(eq(this.serverConnection));
   }
@@ -110,7 +110,7 @@ public class GetAll651Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.getAll651.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll651.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPart(argument.capture(), eq(false));
@@ -136,7 +136,7 @@ public class GetAll651Test {
           .authorizeRegionRead(eq(REGION_NAME), eq(key.toString()));
     }
 
-    this.getAll651.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll651.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     for (Object key : KEYS) {
       verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(key.toString()));
@@ -158,7 +158,7 @@ public class GetAll651Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.getAll651.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll651.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPart(argument.capture(), eq(false));
@@ -184,7 +184,7 @@ public class GetAll651Test {
       doThrow(new NotAuthorizedException("")).when(this.authzRequest).getAuthorize(eq(REGION_NAME),
           eq(key.toString()), eq(null));
     }
-    this.getAll651.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll651.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPart(argument.capture(), eq(false));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 018993c..95e95f5 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
@@ -113,7 +113,7 @@ public class GetAll70Test {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.getAll70.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
   }
@@ -123,7 +123,7 @@ public class GetAll70Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.getAll70.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPartNoCopying(argument.capture());
@@ -149,7 +149,7 @@ public class GetAll70Test {
           .authorizeRegionRead(eq(REGION_NAME), eq(key.toString()));
     }
 
-    this.getAll70.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     for (Object key : KEYS) {
       verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(key.toString()));
@@ -171,7 +171,7 @@ public class GetAll70Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.getAll70.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPartNoCopying(argument.capture());
@@ -198,7 +198,7 @@ public class GetAll70Test {
           eq(key.toString()), eq(null));
     }
 
-    this.getAll70.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPartNoCopying(argument.capture());

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 cebf988..0aa1aaf 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
@@ -97,7 +97,7 @@ public class GetAllTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.getAll.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.chunkedResponseMessage).sendChunk(eq(this.serverConnection));
   }
@@ -107,7 +107,7 @@ public class GetAllTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.getAll.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPart(argument.capture(), eq(false));
@@ -133,7 +133,7 @@ public class GetAllTest {
           .authorizeRegionRead(eq(REGION_NAME), eq(key.toString()));
     }
 
-    this.getAll.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     for (Object key : KEYS) {
       verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(key.toString()));
@@ -155,7 +155,7 @@ public class GetAllTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.getAll.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPart(argument.capture(), eq(false));
@@ -181,7 +181,7 @@ public class GetAllTest {
       doThrow(new NotAuthorizedException("")).when(this.authzRequest).getAuthorize(eq(REGION_NAME),
           eq(key.toString()), eq(null));
     }
-    this.getAll.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPart(argument.capture(), eq(false));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 112ea64..5e84448 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
@@ -107,7 +107,7 @@ public class GetAllWithCallbackTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.getAll70.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.chunkedResponseMessage).sendChunk(eq(this.serverConnection));
   }
@@ -117,7 +117,7 @@ public class GetAllWithCallbackTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.getAll70.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPartNoCopying(argument.capture());
@@ -143,7 +143,7 @@ public class GetAllWithCallbackTest {
           .authorizeRegionRead(eq(REGION_NAME), eq(key.toString()));
     }
 
-    this.getAll70.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     for (Object key : KEYS) {
       verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(key.toString()));
@@ -165,7 +165,7 @@ public class GetAllWithCallbackTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.getAll70.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPartNoCopying(argument.capture());
@@ -192,7 +192,7 @@ public class GetAllWithCallbackTest {
           eq(key.toString()), eq(null));
     }
 
-    this.getAll70.cmdExecute(this.message, this.serverConnection, 0);
+    this.getAll70.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<ObjectPartList> argument = ArgumentCaptor.forClass(ObjectPartList.class);
     verify(this.chunkedResponseMessage).addObjPartNoCopying(argument.capture());

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 c86ecb4..0c3433f 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
@@ -73,7 +73,8 @@ public class GetClientPartitionAttributesCommand66Test {
   public void noSecuirtyShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.getClientPartitionAttributesCommand66.cmdExecute(this.message, this.serverConnection, 0);
+    this.getClientPartitionAttributesCommand66.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.responseMessage).send();
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 fe144d7..7d35d4e 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
@@ -19,8 +19,6 @@ 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;
@@ -76,7 +74,8 @@ public class GetClientPartitionAttributesCommandTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.getClientPartitionAttributesCommand.cmdExecute(this.message, this.serverConnection, 0);
+    this.getClientPartitionAttributesCommand.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.responseMessage).send();
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 b261347..0a9fdae 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
@@ -115,7 +115,7 @@ public class InvalidateTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.invalidate.cmdExecute(this.message, this.serverConnection, 0);
+    this.invalidate.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.responseMessage).send(this.serverConnection);
   }
@@ -125,7 +125,7 @@ public class InvalidateTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.invalidate.cmdExecute(this.message, this.serverConnection, 0);
+    this.invalidate.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY_STRING));
     verify(this.responseMessage).send(this.serverConnection);
@@ -138,7 +138,7 @@ public class InvalidateTest {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionWrite(eq(REGION_NAME), eq(KEY_STRING));
 
-    this.invalidate.cmdExecute(this.message, this.serverConnection, 0);
+    this.invalidate.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY_STRING));
     verify(this.errorResponseMessage).send(this.serverConnection);
@@ -149,7 +149,7 @@ public class InvalidateTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.invalidate.cmdExecute(this.message, this.serverConnection, 0);
+    this.invalidate.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).invalidateAuthorize(eq(REGION_NAME), eq(KEY_STRING),
         eq(CALLBACK_ARG));
@@ -163,7 +163,7 @@ public class InvalidateTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .invalidateAuthorize(eq(REGION_NAME), eq(KEY_STRING), eq(CALLBACK_ARG));
 
-    this.invalidate.cmdExecute(this.message, this.serverConnection, 0);
+    this.invalidate.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).invalidateAuthorize(eq(REGION_NAME), eq(KEY_STRING),
         eq(CALLBACK_ARG));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 5f09eaa..976a8c8 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
@@ -97,7 +97,7 @@ public class KeySetTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.keySet.cmdExecute(this.message, this.serverConnection, 0);
+    this.keySet.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
   }
@@ -107,7 +107,7 @@ public class KeySetTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.keySet.cmdExecute(this.message, this.serverConnection, 0);
+    this.keySet.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -120,7 +120,7 @@ public class KeySetTest {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionRead(eq(REGION_NAME));
 
-    this.keySet.cmdExecute(this.message, this.serverConnection, 0);
+    this.keySet.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -131,7 +131,7 @@ public class KeySetTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.keySet.cmdExecute(this.message, this.serverConnection, 0);
+    this.keySet.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).keySetAuthorize(eq(REGION_NAME));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -144,7 +144,7 @@ public class KeySetTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .keySetAuthorize(eq(REGION_NAME));
 
-    this.keySet.cmdExecute(this.message, this.serverConnection, 0);
+    this.keySet.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).keySetAuthorize(eq(REGION_NAME));
 

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 2b4110e..d30a137 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
@@ -139,7 +139,7 @@ public class Put61Test {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.put61.cmdExecute(this.message, this.serverConnection, 0);
+    this.put61.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.replyMessage).send(this.serverConnection);
   }
@@ -149,7 +149,7 @@ public class Put61Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.put61.cmdExecute(this.message, this.serverConnection, 0);
+    this.put61.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
     verify(this.replyMessage).send(this.serverConnection);
@@ -162,7 +162,7 @@ public class Put61Test {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
 
-    this.put61.cmdExecute(this.message, this.serverConnection, 0);
+    this.put61.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
     verify(this.errorResponseMessage).send(this.serverConnection);
@@ -173,7 +173,7 @@ public class Put61Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.put61.cmdExecute(this.message, this.serverConnection, 0);
+    this.put61.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<byte[]> argument = ArgumentCaptor.forClass(byte[].class);
     verify(this.replyMessage).addBytesPart(argument.capture());
@@ -192,7 +192,7 @@ public class Put61Test {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest).putAuthorize(eq(REGION_NAME),
         eq(KEY), eq(null), eq(true), eq(CALLBACK_ARG));
 
-    this.put61.cmdExecute(this.message, this.serverConnection, 0);
+    this.put61.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).putAuthorize(eq(REGION_NAME), eq(KEY), eq(null), eq(true),
         eq(CALLBACK_ARG));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 8a1c870..728c3f6 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
@@ -160,7 +160,7 @@ public class Put65Test {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.put65.cmdExecute(this.message, this.serverConnection, 0);
+    this.put65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.replyMessage).send(this.serverConnection);
   }
@@ -170,7 +170,7 @@ public class Put65Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.put65.cmdExecute(this.message, this.serverConnection, 0);
+    this.put65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
     verify(this.replyMessage).send(this.serverConnection);
@@ -183,7 +183,7 @@ public class Put65Test {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
 
-    this.put65.cmdExecute(this.message, this.serverConnection, 0);
+    this.put65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
     verify(this.errorResponseMessage).send(this.serverConnection);
@@ -194,7 +194,7 @@ public class Put65Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.put65.cmdExecute(this.message, this.serverConnection, 0);
+    this.put65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<byte[]> argument = ArgumentCaptor.forClass(byte[].class);
     verify(this.replyMessage).addBytesPart(argument.capture());
@@ -213,7 +213,7 @@ public class Put65Test {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest).putAuthorize(eq(REGION_NAME),
         eq(KEY), eq(VALUE), eq(true), eq(CALLBACK_ARG));
 
-    this.put65.cmdExecute(this.message, this.serverConnection, 0);
+    this.put65.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).putAuthorize(eq(REGION_NAME), eq(KEY), eq(VALUE), eq(true),
         eq(CALLBACK_ARG));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 abd6649..a339f4d 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
@@ -135,7 +135,7 @@ public class PutTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.put.cmdExecute(this.message, this.serverConnection, 0);
+    this.put.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.replyMessage).send(this.serverConnection);
   }
@@ -145,7 +145,7 @@ public class PutTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.put.cmdExecute(this.message, this.serverConnection, 0);
+    this.put.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
     verify(this.replyMessage).send(this.serverConnection);
@@ -158,7 +158,7 @@ public class PutTest {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
 
-    this.put.cmdExecute(this.message, this.serverConnection, 0);
+    this.put.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME), eq(KEY));
     verify(this.errorResponseMessage).send(this.serverConnection);
@@ -169,7 +169,7 @@ public class PutTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.put.cmdExecute(this.message, this.serverConnection, 0);
+    this.put.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     ArgumentCaptor<byte[]> argument = ArgumentCaptor.forClass(byte[].class);
     verify(this.replyMessage).addBytesPart(argument.capture());
@@ -188,7 +188,7 @@ public class PutTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest).putAuthorize(eq(REGION_NAME),
         eq(KEY), eq(VALUE), eq(true), eq(CALLBACK_ARG));
 
-    this.put.cmdExecute(this.message, this.serverConnection, 0);
+    this.put.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).putAuthorize(eq(REGION_NAME), eq(KEY), eq(VALUE), eq(true),
         eq(CALLBACK_ARG));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 6f6da3a..a1e77d4 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
@@ -120,7 +120,8 @@ public class RegisterInterest61Test {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.registerInterest61.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterest61.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
   }
@@ -130,7 +131,8 @@ public class RegisterInterest61Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.registerInterest61.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterest61.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(KEY));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -143,7 +145,8 @@ public class RegisterInterest61Test {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionRead(eq(REGION_NAME), eq(KEY));
 
-    this.registerInterest61.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterest61.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(KEY));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -154,7 +157,8 @@ public class RegisterInterest61Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.registerInterest61.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterest61.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.authzRequest).registerInterestAuthorize(eq(REGION_NAME), eq(KEY), anyInt(), any());
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -168,7 +172,8 @@ public class RegisterInterest61Test {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .registerInterestAuthorize(eq(REGION_NAME), eq(KEY), anyInt(), any());
 
-    this.registerInterest61.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterest61.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.authzRequest).registerInterestAuthorize(eq(REGION_NAME), eq(KEY), anyInt(), any());
 

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 2b91b99..96085fb 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
@@ -126,7 +126,8 @@ public class RegisterInterestList61Test {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.registerInterestList61.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList61.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
   }
@@ -136,7 +137,8 @@ public class RegisterInterestList61Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.registerInterestList61.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList61.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -149,7 +151,8 @@ public class RegisterInterestList61Test {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionRead(eq(REGION_NAME));
 
-    this.registerInterestList61.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList61.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -160,7 +163,8 @@ public class RegisterInterestList61Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.registerInterestList61.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList61.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.authzRequest).registerInterestListAuthorize(eq(REGION_NAME), any(), any());
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -174,7 +178,8 @@ public class RegisterInterestList61Test {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .registerInterestListAuthorize(eq(REGION_NAME), any(), any());
 
-    this.registerInterestList61.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList61.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.authzRequest).registerInterestListAuthorize(eq(REGION_NAME), any(), any());
 

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 94163ea..2f06b64 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
@@ -131,7 +131,8 @@ public class RegisterInterestList66Test {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.registerInterestList66.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList66.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
   }
@@ -141,7 +142,8 @@ public class RegisterInterestList66Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.registerInterestList66.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList66.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -154,7 +156,8 @@ public class RegisterInterestList66Test {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionRead(eq(REGION_NAME));
 
-    this.registerInterestList66.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList66.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -165,7 +168,8 @@ public class RegisterInterestList66Test {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.registerInterestList66.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList66.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.authzRequest).registerInterestListAuthorize(eq(REGION_NAME), any(), any());
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -179,7 +183,8 @@ public class RegisterInterestList66Test {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .registerInterestListAuthorize(eq(REGION_NAME), any(), any());
 
-    this.registerInterestList66.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList66.cmdExecute(this.message, this.serverConnection,
+        this.securityService, 0);
 
     verify(this.authzRequest).registerInterestListAuthorize(eq(REGION_NAME), any(), any());
 

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 514eb9b..57610d2 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
@@ -126,7 +126,8 @@ public class RegisterInterestListTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.registerInterestList.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
   }
@@ -136,7 +137,8 @@ public class RegisterInterestListTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.registerInterestList.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -149,7 +151,8 @@ public class RegisterInterestListTest {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionRead(eq(REGION_NAME));
 
-    this.registerInterestList.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -160,7 +163,8 @@ public class RegisterInterestListTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.registerInterestList.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.authzRequest).registerInterestListAuthorize(eq(REGION_NAME), any(), any());
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -174,7 +178,8 @@ public class RegisterInterestListTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .registerInterestListAuthorize(eq(REGION_NAME), any(), any());
 
-    this.registerInterestList.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterestList.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.authzRequest).registerInterestListAuthorize(eq(REGION_NAME), any(), any());
 

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/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 0b02a2c..e7c7efc 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
@@ -115,7 +115,7 @@ public class RegisterInterestTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.registerInterest.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterest.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
   }
@@ -125,7 +125,7 @@ public class RegisterInterestTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.registerInterest.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterest.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(KEY));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -138,7 +138,7 @@ public class RegisterInterestTest {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionRead(eq(REGION_NAME), eq(KEY));
 
-    this.registerInterest.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterest.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(KEY));
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -149,7 +149,7 @@ public class RegisterInterestTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.registerInterest.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterest.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).registerInterestAuthorize(eq(REGION_NAME), eq(KEY), anyInt(), any());
     verify(this.chunkedResponseMessage).sendChunk(this.serverConnection);
@@ -163,7 +163,7 @@ public class RegisterInterestTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest)
         .registerInterestAuthorize(eq(REGION_NAME), eq(KEY), anyInt(), any());
 
-    this.registerInterest.cmdExecute(this.message, this.serverConnection, 0);
+    this.registerInterest.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).registerInterestAuthorize(eq(REGION_NAME), eq(KEY), anyInt(), any());
 

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RemoveAllTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RemoveAllTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RemoveAllTest.java
index 97cd581..7d4a5a4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RemoveAllTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RemoveAllTest.java
@@ -123,7 +123,7 @@ public class RemoveAllTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.removeAll.cmdExecute(this.message, this.serverConnection, 0);
+    this.removeAll.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.chunkedResponseMessage).sendChunk(eq(this.serverConnection));
   }
@@ -133,7 +133,7 @@ public class RemoveAllTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.removeAll.cmdExecute(this.message, this.serverConnection, 0);
+    this.removeAll.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     for (Object key : KEYS) {
       verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME));
@@ -152,7 +152,7 @@ public class RemoveAllTest {
           .authorizeRegionRead(eq(REGION_NAME), eq(key.toString()));
     }
 
-    this.removeAll.cmdExecute(this.message, this.serverConnection, 0);
+    this.removeAll.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     for (Object key : KEYS) {
       verify(this.securityService).authorizeRegionWrite(eq(REGION_NAME));
@@ -166,7 +166,7 @@ public class RemoveAllTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.removeAll.cmdExecute(this.message, this.serverConnection, 0);
+    this.removeAll.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     for (Object key : KEYS) {
       verify(this.authzRequest).removeAllAuthorize(eq(REGION_NAME), any(), any());
@@ -184,7 +184,7 @@ public class RemoveAllTest {
       doThrow(new NotAuthorizedException("")).when(this.authzRequest).getAuthorize(eq(REGION_NAME),
           eq(key.toString()), eq(null));
     }
-    this.removeAll.cmdExecute(this.message, this.serverConnection, 0);
+    this.removeAll.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     for (Object key : KEYS) {
       verify(this.authzRequest).removeAllAuthorize(eq(REGION_NAME), any(), any());

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RequestTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RequestTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RequestTest.java
index 428ddde..271c078 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RequestTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RequestTest.java
@@ -112,7 +112,7 @@ public class RequestTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.request.cmdExecute(this.message, this.serverConnection, 0);
+    this.request.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
     verify(this.responseMessage).send(this.serverConnection);
   }
 
@@ -121,7 +121,7 @@ public class RequestTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.request.cmdExecute(this.message, this.serverConnection, 0);
+    this.request.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(KEY));
     verify(this.responseMessage).send(this.serverConnection);
@@ -134,7 +134,7 @@ public class RequestTest {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionRead(eq(REGION_NAME), eq(KEY));
 
-    this.request.cmdExecute(this.message, this.serverConnection, 0);
+    this.request.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(KEY));
     verify(this.errorResponseMessage).send(eq(this.serverConnection));
@@ -145,7 +145,7 @@ public class RequestTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.request.cmdExecute(this.message, this.serverConnection, 0);
+    this.request.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).getAuthorize(eq(REGION_NAME), eq(KEY), eq(CALLBACK_ARG));
     verify(this.responseMessage).send(this.serverConnection);
@@ -158,7 +158,7 @@ public class RequestTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest).getAuthorize(eq(REGION_NAME),
         eq(KEY), eq(CALLBACK_ARG));
 
-    this.request.cmdExecute(this.message, this.serverConnection, 0);
+    this.request.cmdExecute(this.message, this.serverConnection, this.securityService, 0);
 
     verify(this.authzRequest).getAuthorize(eq(REGION_NAME), eq(KEY), eq(CALLBACK_ARG));
     verify(this.errorResponseMessage).send(eq(this.serverConnection));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/UnregisterInterestTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/UnregisterInterestTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/UnregisterInterestTest.java
index b894590..6c4d242 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/UnregisterInterestTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/UnregisterInterestTest.java
@@ -150,7 +150,8 @@ public class UnregisterInterestTest {
   public void noSecurityShouldSucceed() throws Exception {
     when(this.securityService.isClientSecurityRequired()).thenReturn(false);
 
-    this.unregisterInterest.cmdExecute(this.message, this.serverConnection, 0);
+    this.unregisterInterest.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
     verify(this.replyMessage).send(this.serverConnection);
   }
 
@@ -159,7 +160,8 @@ public class UnregisterInterestTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(true);
 
-    this.unregisterInterest.cmdExecute(this.message, this.serverConnection, 0);
+    this.unregisterInterest.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(KEY));
     verify(this.replyMessage).send(this.serverConnection);
@@ -172,7 +174,8 @@ public class UnregisterInterestTest {
     doThrow(new NotAuthorizedException("")).when(this.securityService)
         .authorizeRegionRead(eq(REGION_NAME), eq(KEY));
 
-    this.unregisterInterest.cmdExecute(this.message, this.serverConnection, 0);
+    this.unregisterInterest.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.securityService).authorizeRegionRead(eq(REGION_NAME), eq(KEY));
     verify(this.errorResponseMessage).send(eq(this.serverConnection));
@@ -183,7 +186,8 @@ public class UnregisterInterestTest {
     when(this.securityService.isClientSecurityRequired()).thenReturn(true);
     when(this.securityService.isIntegratedSecurity()).thenReturn(false);
 
-    this.unregisterInterest.cmdExecute(this.message, this.serverConnection, 0);
+    this.unregisterInterest.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.authzRequest).unregisterInterestAuthorize(eq(REGION_NAME), eq(KEY), anyInt());
     verify(this.replyMessage).send(this.serverConnection);
@@ -196,7 +200,8 @@ public class UnregisterInterestTest {
     doThrow(new NotAuthorizedException("")).when(this.authzRequest).getAuthorize(eq(REGION_NAME),
         eq(KEY), any());
 
-    this.unregisterInterest.cmdExecute(this.message, this.serverConnection, 0);
+    this.unregisterInterest.cmdExecute(this.message, this.serverConnection, this.securityService,
+        0);
 
     verify(this.authzRequest).unregisterInterestAuthorize(eq(REGION_NAME), eq(KEY), anyInt());
     verify(this.replyMessage).send(eq(this.serverConnection));

http://git-wip-us.apache.org/repos/asf/geode/blob/0211029b/geode-core/src/test/java/org/apache/geode/internal/security/CallbackInstantiatorTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/CallbackInstantiatorTest.java b/geode-core/src/test/java/org/apache/geode/internal/security/CallbackInstantiatorTest.java
new file mode 100644
index 0000000..72d93cd
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/security/CallbackInstantiatorTest.java
@@ -0,0 +1,98 @@
+/*
+ * 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 org.apache.geode.internal.security;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import org.apache.geode.security.GemFireSecurityException;
+import org.apache.geode.test.junit.categories.SecurityTest;
+import org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category({UnitTest.class, SecurityTest.class})
+public class CallbackInstantiatorTest {
+
+  private static final String STRING = "STRING";
+  private static final String NULL_STRING = null;
+  private static final String STRING_NON_STATIC = "STRING_NON_STATIC";
+  private static final Boolean BOOLEAN = Boolean.TRUE;
+
+  @Test
+  public void testGetObjectFromConstructor() {
+    String string = CallbackInstantiator.getObjectOfType(String.class.getName(), String.class);
+    assertThat(string).isNotNull().isEqualTo("");
+
+    CharSequence charSequence =
+        CallbackInstantiator.getObjectOfType(String.class.getName(), CharSequence.class);
+    assertThat(charSequence).isNotNull().isEqualTo("");
+
+    assertThatThrownBy(
+        () -> CallbackInstantiator.getObjectOfType("com.abc.testString", String.class))
+            .isInstanceOf(GemFireSecurityException.class);
+
+    assertThatThrownBy(
+        () -> CallbackInstantiator.getObjectOfType(String.class.getName(), Boolean.class))
+            .isInstanceOf(GemFireSecurityException.class);
+
+    assertThatThrownBy(() -> CallbackInstantiator.getObjectOfType("", String.class))
+        .isInstanceOf(GemFireSecurityException.class);
+
+    assertThatThrownBy(() -> CallbackInstantiator.getObjectOfType(null, String.class))
+        .isInstanceOf(GemFireSecurityException.class);
+
+    assertThatThrownBy(() -> CallbackInstantiator.getObjectOfType("  ", String.class))
+        .isInstanceOf(GemFireSecurityException.class);
+  }
+
+  @Test
+  public void testGetObjectFromFactoryMethod() {
+    String string = CallbackInstantiator.getObjectOfType(Factories.class.getName() + ".getString",
+        String.class);
+    assertThat(string).isNotNull().isEqualTo(STRING);
+
+    CharSequence charSequence = CallbackInstantiator
+        .getObjectOfType(Factories.class.getName() + ".getString", String.class);
+    assertThat(charSequence).isNotNull().isEqualTo(STRING);
+
+    assertThatThrownBy(() -> CallbackInstantiator
+        .getObjectOfType(Factories.class.getName() + ".getStringNonStatic", String.class))
+            .isInstanceOf(GemFireSecurityException.class);
+
+    assertThatThrownBy(() -> CallbackInstantiator
+        .getObjectOfType(Factories.class.getName() + ".getNullString", String.class))
+            .isInstanceOf(GemFireSecurityException.class);
+  }
+
+  private static class Factories {
+
+    public static String getString() {
+      return STRING;
+    }
+
+    public static String getNullString() {
+      return NULL_STRING;
+    }
+
+    public String getStringNonStatic() {
+      return STRING_NON_STATIC;
+    }
+
+    public static Boolean getBoolean() {
+      return BOOLEAN;
+    }
+  }
+}


Mime
View raw message