You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2017/06/19 15:23:34 UTC

[01/24] geode git commit: GEODE-2818: add aliases to the undeploy command

Repository: geode
Updated Branches:
  refs/heads/feature/GEODE-3071 07e8986e3 -> dba7dcd30


GEODE-2818: add aliases to the undeploy command

* this closes #560


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

Branch: refs/heads/feature/GEODE-3071
Commit: a6433273251528d2cda3b5f1e6dc4dad4360275f
Parents: db8e1df
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Wed Jun 7 16:10:56 2017 -0700
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Wed Jun 14 08:59:51 2017 -0700

----------------------------------------------------------------------
 .../internal/cli/commands/ConfigCommands.java   |  7 +--
 .../internal/cli/commands/DeployCommands.java   | 50 +++++++++++---------
 .../internal/cli/functions/DeployFunction.java  |  3 --
 .../cli/functions/UndeployFunction.java         |  9 ++--
 .../cli/GfshParserAutoCompletionTest.java       |  6 +--
 .../cli/commands/DeployCommandsDUnitTest.java   | 36 +++++++++++++-
 6 files changed, 74 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/a6433273/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigCommands.java
index 19c72c3..a8afa7d 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigCommands.java
@@ -81,9 +81,10 @@ public class ConfigCommands implements GfshCommand {
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
   public Result describeConfig(
       @CliOption(key = CliStrings.MEMBER, optionContext = ConverterHint.ALL_MEMBER_IDNAME,
-          help = CliStrings.DESCRIBE_CONFIG__MEMBER__HELP, mandatory = true)
-
-      String memberNameOrId, @CliOption(key = CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS, help = CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS__HELP, unspecifiedDefaultValue = "true", specifiedDefaultValue = "true") boolean hideDefaults) {
+          help = CliStrings.DESCRIBE_CONFIG__MEMBER__HELP, mandatory = true) String memberNameOrId,
+      @CliOption(key = CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS,
+          help = CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS__HELP, unspecifiedDefaultValue = "true",
+          specifiedDefaultValue = "true") boolean hideDefaults) {
 
     Result result = null;
     try {

http://git-wip-us.apache.org/repos/asf/geode/blob/a6433273/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommands.java
index 43a748e..9b79e1d 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommands.java
@@ -15,6 +15,8 @@
 package org.apache.geode.management.internal.cli.commands;
 
 import static org.apache.commons.io.FileUtils.ONE_MB;
+import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.lang.StringUtils;
 
 import org.apache.geode.SystemFailure;
 import org.apache.geode.cache.execute.ResultCollector;
@@ -66,7 +68,7 @@ public class DeployCommands implements GfshCommand {
    * Deploy one or more JAR files to members of a group or all members.
    * 
    * @param groups Group(s) to deploy the JAR to or null for all members
-   * @param jar JAR file to deploy
+   * @param jars JAR file to deploy
    * @param dir Directory of JAR files to deploy
    * @return The result of the attempt to deploy
    */
@@ -77,7 +79,8 @@ public class DeployCommands implements GfshCommand {
   public Result deploy(
       @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, help = CliStrings.DEPLOY__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) String[] groups,
-      @CliOption(key = {CliStrings.JAR}, help = CliStrings.DEPLOY__JAR__HELP) String jar,
+      @CliOption(key = {CliStrings.JAR, CliStrings.JARS},
+          help = CliStrings.DEPLOY__JAR__HELP) String[] jars,
       @CliOption(key = {CliStrings.DEPLOY__DIR}, help = CliStrings.DEPLOY__DIR__HELP) String dir) {
     try {
 
@@ -157,8 +160,8 @@ public class DeployCommands implements GfshCommand {
       @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           help = CliStrings.UNDEPLOY__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) String[] groups,
-      @CliOption(key = {CliStrings.JAR}, help = CliStrings.UNDEPLOY__JAR__HELP,
-          unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE) String jars) {
+      @CliOption(key = {CliStrings.JAR, CliStrings.JARS}, help = CliStrings.UNDEPLOY__JAR__HELP,
+          unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE) String[] jars) {
 
     try {
       TabularResultData tabularData = ResultBuilder.createTabularResultData();
@@ -175,6 +178,7 @@ public class DeployCommands implements GfshCommand {
       List<CliFunctionResult> results = CliFunctionResult.cleanResults((List<?>) rc.getResult());
 
       for (CliFunctionResult result : results) {
+
         if (result.getThrowable() != null) {
           tabularData.accumulate("Member", result.getMemberIdOrName());
           tabularData.accumulate("Un-Deployed JAR", "");
@@ -200,8 +204,8 @@ public class DeployCommands implements GfshCommand {
 
       Result result = ResultBuilder.buildResult(tabularData);
       if (tabularData.getStatus().equals(Status.OK)) {
-        persistClusterConfiguration(result, () -> getSharedConfiguration()
-            .removeJars(jars == null ? null : jars.split(","), groups));
+        persistClusterConfiguration(result,
+            () -> getSharedConfiguration().removeJars(jars, groups));
       }
       return result;
     } catch (VirtualMachineError e) {
@@ -283,29 +287,31 @@ public class DeployCommands implements GfshCommand {
 
     @Override
     public Result preExecution(GfshParseResult parseResult) {
-      Map<String, String> paramValueMap = parseResult.getParamValueStrings();
-
-      String jar = paramValueMap.get("jar");
-      jar = jar == null ? null : jar.trim();
-
-      String dir = paramValueMap.get("dir");
-      dir = dir == null ? null : dir.trim();
-
-      String group = paramValueMap.get("group");
-      group = group == null ? null : group.trim();
-
-      String jarOrDir = jar != null ? jar : dir;
+      // 2nd argument is the jar
+      String[] jars = (String[]) parseResult.getArguments()[1];
+      // 3rd arguemnt is the dir
+      String dir = (String) parseResult.getArguments()[2];
 
-      if (jar == null && dir == null) {
+      if (ArrayUtils.isEmpty(jars) && StringUtils.isBlank(dir)) {
         return ResultBuilder.createUserErrorResult(
             "Parameter \"jar\" or \"dir\" is required. Use \"help <command name>\" for assistance.");
       }
 
+      if (ArrayUtils.isNotEmpty(jars) && StringUtils.isNotBlank(dir)) {
+        return ResultBuilder
+            .createUserErrorResult("Parameters \"jar\" and \"dir\" can not both be specified.");
+      }
+
       FileResult fileResult;
+      String[] filesToUpload = jars;
+      if (filesToUpload == null) {
+        filesToUpload = new String[] {dir};
+      }
       try {
-        fileResult = new FileResult(new String[] {jar != null ? jar : dir});
+
+        fileResult = new FileResult(filesToUpload);
       } catch (FileNotFoundException fnfex) {
-        return ResultBuilder.createGemFireErrorResult("'" + jarOrDir + "' not found.");
+        return ResultBuilder.createGemFireErrorResult("'" + filesToUpload + "' not found.");
       } catch (IOException ioex) {
         return ResultBuilder.createGemFireErrorResult("I/O error when reading jar/dir: "
             + ioex.getClass().getName() + ": " + ioex.getMessage());
@@ -320,7 +326,7 @@ public class DeployCommands implements GfshCommand {
 
         if (readYesNo(message, Response.YES) == Response.NO) {
           return ResultBuilder
-              .createShellClientAbortOperationResult("Aborted deploy of " + jarOrDir + ".");
+              .createShellClientAbortOperationResult("Aborted deploy of " + filesToUpload + ".");
         }
       }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/a6433273/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DeployFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DeployFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DeployFunction.java
index f1b1cd6..401a368 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DeployFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DeployFunction.java
@@ -54,9 +54,6 @@ public class DeployFunction implements Function, InternalEntity {
       final byte[][] jarBytes = (byte[][]) args[1];
       InternalCache cache = getCache();
 
-      final JarDeployer jarDeployer =
-          new JarDeployer(cache.getInternalDistributedSystem().getConfig().getDeployWorkingDir());
-
       DistributedMember member = cache.getDistributedSystem().getDistributedMember();
 
       memberId = member.getId();

http://git-wip-us.apache.org/repos/asf/geode/blob/a6433273/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/UndeployFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/UndeployFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/UndeployFunction.java
index 64ed367..031c855 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/UndeployFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/UndeployFunction.java
@@ -18,6 +18,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.StringTokenizer;
 
+import org.apache.commons.lang.ArrayUtils;
 import org.apache.geode.internal.ClassPathLoader;
 import org.apache.logging.log4j.Logger;
 
@@ -51,7 +52,7 @@ public class UndeployFunction implements Function, InternalEntity {
 
     try {
       final Object[] args = (Object[]) context.getArguments();
-      final String jarFilenameList = (String) args[0]; // Comma separated
+      final String[] jarFilenameList = (String[]) args[0]; // Comma separated
       InternalCache cache = getCache();
 
       final JarDeployer jarDeployer = ClassPathLoader.getLatest().getJarDeployer();
@@ -65,7 +66,7 @@ public class UndeployFunction implements Function, InternalEntity {
       }
 
       String[] undeployedJars = new String[0];
-      if (jarFilenameList == null || jarFilenameList.equals("")) {
+      if (ArrayUtils.isEmpty(jarFilenameList)) {
         final List<DeployedJar> jarClassLoaders = jarDeployer.findDeployedJars();
         undeployedJars = new String[jarClassLoaders.size() * 2];
         int index = 0;
@@ -81,9 +82,7 @@ public class UndeployFunction implements Function, InternalEntity {
         }
       } else {
         List<String> undeployedList = new ArrayList<String>();
-        StringTokenizer jarTokenizer = new StringTokenizer(jarFilenameList, ",");
-        while (jarTokenizer.hasMoreTokens()) {
-          String jarFilename = jarTokenizer.nextToken().trim();
+        for (String jarFilename : jarFilenameList) {
           try {
             undeployedList.add(jarFilename);
             undeployedList.add(ClassPathLoader.getLatest().getJarDeployer().undeploy(jarFilename));

http://git-wip-us.apache.org/repos/asf/geode/blob/a6433273/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserAutoCompletionTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserAutoCompletionTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserAutoCompletionTest.java
index a2946d4..4069c06 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserAutoCompletionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserAutoCompletionTest.java
@@ -53,7 +53,7 @@ public class GfshParserAutoCompletionTest {
   public void testCompletionDeploy() throws Exception {
     buffer = "deploy";
     candidate = parser.complete(buffer);
-    assertThat(candidate.size()).isEqualTo(3);
+    assertThat(candidate.size()).isEqualTo(5);
     assertThat(candidate.getFirstCandidate()).isEqualTo(buffer + " --dir");
   }
 
@@ -61,7 +61,7 @@ public class GfshParserAutoCompletionTest {
   public void testCompletionDeployWithSpace() throws Exception {
     buffer = "deploy ";
     candidate = parser.complete(buffer);
-    assertThat(candidate.size()).isEqualTo(3);
+    assertThat(candidate.size()).isEqualTo(5);
     assertThat(candidate.getFirstCandidate()).isEqualTo(buffer + "--dir");
   }
 
@@ -244,7 +244,7 @@ public class GfshParserAutoCompletionTest {
   public void testCompletWithRegionTypeWithSpace() throws Exception {
     buffer = "create region --name=test --type=REPLICATE ";
     candidate = parser.complete(buffer);
-    assertThat(candidate.size()).isEqualTo(37);
+    assertThat(candidate.size()).isEqualTo(38);
     assertThat(candidate.getFirstCandidate()).isEqualTo(buffer + "--async-event-queue-id");
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/a6433273/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandsDUnitTest.java
index 3a88faa..846a8d9 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandsDUnitTest.java
@@ -120,7 +120,7 @@ public class DeployCommandsDUnitTest implements Serializable {
   }
 
   @Test
-  public void deployMultipleJarsToOneGroup() throws Exception {
+  public void deployJarsInDirToOneGroup() throws Exception {
     // Deploy of multiple JARs to a single group
     gfshConnector.executeAndVerifyCommand(
         "deploy --group=" + GROUP1 + " --dir=" + subdirWithJars3and4.getCanonicalPath());
@@ -153,6 +153,40 @@ public class DeployCommandsDUnitTest implements Serializable {
   }
 
   @Test
+  public void deployMultipleJarsToOneGroup() throws Exception {
+    // Deploy of multiple JARs to a single group
+    gfshConnector.executeAndVerifyCommand("deploy --group=" + GROUP1 + " --jars="
+        + jar3.getAbsolutePath() + "," + jar4.getAbsolutePath());
+    String resultString = gfshConnector.getGfshOutput();
+
+    assertThat(resultString).describedAs(resultString).contains(server1.getName());
+    assertThat(resultString).doesNotContain(server2.getName());
+    assertThat(resultString).contains(jarName3);
+    assertThat(resultString).contains(jarName4);
+
+    server1.invoke(() -> {
+      assertThatCanLoad(jarName3, class3);
+      assertThatCanLoad(jarName4, class4);
+    });
+    server2.invoke(() -> {
+      assertThatCannotLoad(jarName3, class3);
+      assertThatCannotLoad(jarName4, class4);
+    });
+
+    // Undeploy of multiple jars by specifying group
+    gfshConnector.executeAndVerifyCommand("undeploy --jars=" + jarName3 + "," + jarName4);
+    server1.invoke(() -> {
+      assertThatCannotLoad(jarName3, class3);
+      assertThatCannotLoad(jarName4, class4);
+    });
+    server2.invoke(() -> {
+      assertThatCannotLoad(jarName3, class3);
+      assertThatCannotLoad(jarName4, class4);
+    });
+  }
+
+
+  @Test
   public void deployJarToAllServers() throws Exception {
     // Deploy a jar to all servers
     gfshConnector.executeAndVerifyCommand("deploy --jar=" + jar1);


[24/24] geode git commit: Merge branch 'develop' into feature/GEODE-3071

Posted by je...@apache.org.
Merge branch 'develop' into feature/GEODE-3071


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

Branch: refs/heads/feature/GEODE-3071
Commit: dba7dcd3042ae7cf9776822bb4e69f47291fc296
Parents: 07e8986 78f08e8
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon Jun 19 08:23:24 2017 -0700
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Jun 19 08:23:24 2017 -0700

----------------------------------------------------------------------
 .../cli/commands/StatusLocatorRealGfshTest.java |  50 +++
 ...erConfigurationServiceEndToEndDUnitTest.java |   8 +-
 .../geode/test/dunit/rules/gfsh/GfshRule.java   | 116 ++++++
 .../geode/test/dunit/rules/gfsh/GfshScript.java | 124 ++++++
 .../source/subnavs/geode-subnav.erb             |   8 +-
 geode-core/build.gradle                         |   4 -
 .../internal/InternalDistributedSystem.java     |  62 +--
 .../apache/geode/internal/cache/EventID.java    |   2 +-
 .../geode/internal/cache/GemFireCacheImpl.java  |   2 -
 .../geode/internal/jta/GlobalTransaction.java   |   4 +
 .../geode/internal/jta/TransactionImpl.java     |   3 +
 .../internal/jta/TransactionManagerImpl.java    |  15 +
 .../geode/internal/jta/UserTransactionImpl.java |   4 +
 .../org/apache/geode/internal/jta/XidImpl.java  |   4 +
 .../internal/security/CallbackInstantiator.java |  28 ++
 .../security/CustomSecurityService.java         | 346 ----------------
 .../security/DisabledSecurityService.java       | 221 -----------
 .../security/EnabledSecurityService.java        | 393 -------------------
 .../security/IntegratedSecurityService.java     | 374 ++++++++++++++++++
 .../security/LegacySecurityService.java         | 186 +--------
 .../internal/security/SecurityService.java      |  99 +++--
 .../security/SecurityServiceFactory.java        | 188 +++------
 .../internal/security/SecurityServiceType.java  |  28 --
 .../security/shiro/ConfigInitializer.java       |  43 --
 .../security/shiro/CustomAuthRealm.java         |  19 +-
 .../security/shiro/RealmInitializer.java        |  54 ---
 .../security/shiro/SecurityManagerProvider.java |  83 ++++
 .../internal/cli/commands/ConfigCommands.java   |  17 +-
 .../CreateAlterDestroyRegionCommands.java       |  24 +-
 .../internal/cli/commands/DataCommands.java     |   4 +-
 .../internal/cli/commands/DeployCommands.java   |  57 +--
 .../cli/commands/DiskStoreCommands.java         |  12 +-
 .../cli/commands/DurableClientCommands.java     |  22 +-
 .../cli/commands/ExportLogsCommand.java         |   4 +-
 .../internal/cli/commands/FunctionCommands.java |  20 +-
 .../internal/cli/commands/IndexCommands.java    |  14 +-
 .../cli/commands/LauncherLifecycleCommands.java |   4 +-
 .../internal/cli/commands/MemberCommands.java   |   4 +-
 .../cli/commands/MiscellaneousCommands.java     |  34 +-
 .../internal/cli/commands/QueueCommands.java    |   2 +-
 .../internal/cli/commands/RegionCommands.java   |   6 +-
 .../internal/cli/commands/WanCommands.java      | 116 +++---
 .../internal/cli/functions/DeployFunction.java  |   3 -
 .../cli/functions/UndeployFunction.java         |   9 +-
 .../internal/cli/i18n/CliStrings.java           |  99 +----
 .../controllers/ConfigCommandsController.java   |  24 +-
 .../web/controllers/DataCommandsController.java |   4 +-
 .../controllers/DeployCommandsController.java   |  26 +-
 .../DiskStoreCommandsController.java            |  22 +-
 .../DurableClientCommandsController.java        |  50 +--
 .../web/controllers/ExportLogController.java    |  10 +-
 .../controllers/FunctionCommandsController.java |  32 +-
 .../controllers/IndexCommandsController.java    |  36 +-
 .../controllers/MemberCommandsController.java   |   6 +-
 .../MiscellaneousCommandsController.java        |  36 +-
 .../controllers/QueueCommandsController.java    |   6 +-
 .../controllers/RegionCommandsController.java   |  20 +-
 .../web/controllers/WanCommandsController.java  | 143 +++----
 .../internal/index/HashIndexSetJUnitTest.java   |   2 +-
 .../membership/MembershipJUnitTest.java         |   3 -
 .../messenger/JGroupsMessengerJUnitTest.java    |   6 +-
 .../gms/mgr/GMSMembershipManagerJUnitTest.java  |   8 +-
 .../DeposePrimaryBucketMessageTest.java         |   1 -
 .../partitioned/FetchEntryMessageTest.java      |   1 -
 .../FetchPartitionDetailsMessageTest.java       |   1 -
 .../partitioned/MoveBucketMessageTest.java      |   1 -
 .../partitioned/RemoveBucketMessageTest.java    |   1 -
 .../sockets/ClientServerMiscBCDUnitTest.java    |  42 ++
 .../tier/sockets/ClientServerMiscDUnitTest.java |   4 +-
 .../tier/sockets/command/ContainsKey66Test.java |   2 +-
 .../tier/sockets/command/CreateRegionTest.java  |   2 +-
 .../tier/sockets/command/Destroy65Test.java     |   2 +-
 .../tier/sockets/command/DestroyRegionTest.java |   2 +-
 .../cache/tier/sockets/command/DestroyTest.java |   2 +-
 .../sockets/command/ExecuteFunction65Test.java  |   2 +-
 .../sockets/command/ExecuteFunction66Test.java  |   2 +-
 .../sockets/command/ExecuteFunctionTest.java    |   2 +-
 .../cache/tier/sockets/command/Get70Test.java   |   2 +-
 .../tier/sockets/command/GetAll651Test.java     |   2 +-
 .../tier/sockets/command/GetAll70Test.java      |   2 +-
 .../cache/tier/sockets/command/GetAllTest.java  |   2 +-
 .../sockets/command/GetAllWithCallbackTest.java |   2 +-
 .../tier/sockets/command/InvalidateTest.java    |   2 +-
 .../cache/tier/sockets/command/KeySetTest.java  |   2 +-
 .../cache/tier/sockets/command/Put61Test.java   |  30 +-
 .../cache/tier/sockets/command/Put65Test.java   |  28 +-
 .../cache/tier/sockets/command/PutTest.java     |  34 +-
 .../sockets/command/RegisterInterest61Test.java |   2 +-
 .../command/RegisterInterestList61Test.java     |   2 +-
 .../command/RegisterInterestList66Test.java     |   2 +-
 .../command/RegisterInterestListTest.java       |   2 +-
 .../sockets/command/RegisterInterestTest.java   |   2 +-
 .../tier/sockets/command/RemoveAllTest.java     |   2 +-
 .../cache/tier/sockets/command/RequestTest.java |   2 +-
 .../sockets/command/UnregisterInterestTest.java |   2 +-
 .../cache/wan/serial/DestroyMessageTest.java    |   1 -
 .../xmlcache/DefaultEntityResolver2Test.java    |   1 -
 .../logging/log4j/FastLoggerJUnitTest.java      |   3 +-
 .../security/DisabledSecurityServiceTest.java   | 164 --------
 .../security/EnabledSecurityServiceTest.java    | 184 ---------
 .../internal/security/FakePostProcessor.java    | 103 -----
 .../internal/security/FakeSecurityManager.java  | 103 -----
 ...ntegratedSecurityServiceConstructorTest.java |  93 +++++
 .../security/IntegratedSecurityServiceTest.java | 166 ++++++++
 .../security/LegacySecurityServiceTest.java     |  58 +++
 ...urityServiceFactoryShiroIntegrationTest.java |  38 +-
 .../security/SecurityServiceFactoryTest.java    | 314 ++++++---------
 .../internal/security/SecurityServiceTest.java  |  21 +-
 .../shiro/ConfigInitializerIntegrationTest.java |  91 -----
 .../internal/statistics/StatisticsImplTest.java |  61 +--
 .../geode/internal/tcp/ConnectionJUnitTest.java |   2 +-
 .../internal/CompositeBuilderViaFromTest.java   |   1 -
 .../internal/CompositeBuilderViaProxyTest.java  |   1 -
 .../beans/DistributedSystemBridgeJUnitTest.java |   2 +-
 .../cli/GfshParserAutoCompletionTest.java       |   6 +-
 .../cli/commands/ConfigCommandsDUnitTest.java   |   4 +-
 ...eateAlterDestroyRegionCommandsDUnitTest.java |  26 +-
 .../cli/commands/DeployCommandsDUnitTest.java   |  36 +-
 .../commands/DiskStoreCommandsDUnitTest.java    |  16 +-
 .../commands/GemfireDataCommandsDUnitTest.java  |  60 ++-
 .../cli/commands/IndexCommandsDUnitTest.java    |  16 +-
 .../ListAndDescribeRegionDUnitTest.java         |   8 +-
 .../cli/commands/MemberCommandsDUnitTest.java   |   2 +-
 .../MiscellaneousCommandsDUnitTest.java         |  17 +-
 .../cli/commands/QueueCommandsDUnitTest.java    |   6 +-
 .../cli/commands/ShowMetricsDUnitTest.java      |   6 +-
 .../cli/commands/ShowStackTraceDUnitTest.java   |   8 +-
 .../cli/shell/GfshMultilineCommandTest.java     |   7 +-
 .../ClusterConfigDistributionDUnitTest.java     |   2 +-
 ...tyServiceWithCustomRealmIntegrationTest.java |   2 +-
 ...urityServiceWithShiroIniIntegrationTest.java |   2 +-
 .../WanCommandsControllerJUnitTest.java         |  14 +-
 .../executor/AbstractScanExecutorTest.java      |   1 -
 .../CacheFactoryWithSecurityObjectTest.java     |  68 +++-
 ...SecurityManagerLifecycleDistributedTest.java |   4 +-
 .../transactions/JTA_transactions.html.md.erb   |  22 +-
 geode-docs/rest_apps/setup_config.html.md.erb   | 269 ++++++++-----
 .../tools_modules/gfsh/tour_of_gfsh.html.md.erb |  86 ++--
 .../lucene/internal/LuceneIndexFactorySpy.java  |   3 +-
 .../PartitionedRepositoryManagerJUnitTest.java  |   2 +-
 .../LuceneClusterConfigurationDUnitTest.java    |   4 +-
 .../LuceneQueryFunctionJUnitTest.java           |  12 +-
 .../TopEntriesFunctionCollectorJUnitTest.java   |   4 +-
 .../cache/lucene/test/IndexRepositorySpy.java   |   2 +-
 geode-pulse/build.gradle                        |   3 -
 .../apache/geode/tools/pulse/tests/Server.java  |  19 +-
 .../tools/pulse/tests/rules/ServerRule.java     |   6 +-
 ...mandCreateDestroyGatewaySenderDUnitTest.java |  56 +--
 ...anCommandCreateGatewayReceiverDUnitTest.java |  57 ++-
 ...WanCommandGatewayReceiverStartDUnitTest.java |  39 +-
 .../WanCommandGatewayReceiverStopDUnitTest.java |  39 +-
 .../WanCommandGatewaySenderStartDUnitTest.java  |  40 +-
 .../WanCommandGatewaySenderStopDUnitTest.java   |  34 +-
 .../wan/wancommand/WanCommandListDUnitTest.java |  32 +-
 .../WanCommandPauseResumeDUnitTest.java         |  68 ++--
 .../wancommand/WanCommandStatusDUnitTest.java   |  56 ++-
 .../ClusterConfigurationDUnitTest.java          |  10 +-
 ...nfigurationIndexWithFromClauseDUnitTest.java |   4 +-
 gradle/dependency-versions.properties           |   4 +-
 gradle/test.gradle                              |   7 +-
 160 files changed, 2604 insertions(+), 3534 deletions(-)
----------------------------------------------------------------------



[22/24] geode git commit: GEODE-3072: Ignore dunit test

Posted by je...@apache.org.
GEODE-3072: Ignore dunit test


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

Branch: refs/heads/feature/GEODE-3071
Commit: dbc3197f3645f6beab058ad1bfe82e12860617c6
Parents: 4bf80a6
Author: Barry Oglesby <bo...@pivotal.io>
Authored: Fri Jun 16 14:17:23 2017 -0700
Committer: Barry Oglesby <bo...@pivotal.io>
Committed: Fri Jun 16 14:17:23 2017 -0700

----------------------------------------------------------------------
 .../internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/dbc3197f/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
index fa68781..5fb8fa2 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
@@ -96,7 +96,7 @@ public class ClientServerMiscBCDUnitTest extends ClientServerMiscDUnitTest {
     });
   }
 
-  //@Test
+  // @Test
   @Ignore
   public void testDistributedMemberBytesWithCurrentServerAndOldClient() throws Exception {
     // Start current version server


[17/24] geode git commit: GEODE-3072: Changed getMembershipId to use the client version

Posted by je...@apache.org.
GEODE-3072: Changed getMembershipId to use the client version


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

Branch: refs/heads/feature/GEODE-3071
Commit: dd90c71d036d9d28b8c593ab8cbae57357a64b03
Parents: a21c971
Author: Barry Oglesby <bo...@pivotal.io>
Authored: Tue Jun 13 18:18:19 2017 -0700
Committer: Barry Oglesby <bo...@pivotal.io>
Committed: Thu Jun 15 09:19:36 2017 -0700

----------------------------------------------------------------------
 .../apache/geode/internal/cache/EventID.java    |  2 +-
 .../sockets/ClientServerMiscBCDUnitTest.java    | 40 ++++++++++++++++++++
 .../tier/sockets/ClientServerMiscDUnitTest.java |  4 +-
 3 files changed, 43 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/dd90c71d/geode-core/src/main/java/org/apache/geode/internal/cache/EventID.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/EventID.java b/geode-core/src/main/java/org/apache/geode/internal/cache/EventID.java
index 71acdc9..4d2ddc1 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/EventID.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/EventID.java
@@ -164,7 +164,7 @@ public class EventID implements DataSerializableFixedID, Serializable, Externali
    */
   public static byte[] getMembershipId(ClientProxyMembershipID client) {
     try {
-      HeapDataOutputStream hdos = new HeapDataOutputStream(256, Version.CURRENT);
+      HeapDataOutputStream hdos = new HeapDataOutputStream(256, client.getClientVersion());
       ((InternalDistributedMember) client.getDistributedMember()).writeEssentialData(hdos);
       return hdos.toByteArray();
     } catch (IOException ioe) {

http://git-wip-us.apache.org/repos/asf/geode/blob/dd90c71d/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
index d51c196..c732662 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
@@ -14,10 +14,13 @@
  */
 package org.apache.geode.internal.cache.tier.sockets;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.client.Pool;
+import org.apache.geode.internal.cache.EventID;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.NetworkUtils;
@@ -33,8 +36,10 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
 @Category({DistributedTest.class, ClientServerTest.class, BackwardCompatibilityTest.class})
@@ -90,4 +95,39 @@ public class ClientServerMiscBCDUnitTest extends ClientServerMiscDUnitTest {
     });
   }
 
+  @Test
+  public void testDistributedMemberBytesWithCurrentServerAndOldClient() throws Exception {
+    // Start current version server
+    int serverPort = initServerCache(true);
+
+    // Start old version client and do puts
+    VM client = Host.getHost(0).getVM(testVersion, 1);
+    String hostname = NetworkUtils.getServerHostName(Host.getHost(0));
+    client.invoke("create client cache", () -> {
+      createClientCache(hostname, serverPort);
+      populateCache();
+    });
+
+    // Get client member id byte array on client
+    byte[] clientMembershipIdBytesOnClient =
+        client.invoke(() -> getClientMembershipIdBytesOnClient());
+
+    // Get client member id byte array on server
+    byte[] clientMembershipIdBytesOnServer =
+        server1.invoke(() -> getClientMembershipIdBytesOnServer());
+
+    // Verify member id bytes on client and server are equal
+    assertTrue(Arrays.equals(clientMembershipIdBytesOnClient, clientMembershipIdBytesOnServer));
+  }
+
+  private byte[] getClientMembershipIdBytesOnClient() {
+    return EventID.getMembershipId(getCache().getDistributedSystem());
+  }
+
+  private byte[] getClientMembershipIdBytesOnServer() {
+    Set cpmIds = ClientHealthMonitor.getInstance().getClientHeartbeats().keySet();
+    assertEquals(1, cpmIds.size());
+    ClientProxyMembershipID cpmId = (ClientProxyMembershipID) cpmIds.iterator().next();
+    return EventID.getMembershipId(cpmId);
+  }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/dd90c71d/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
index bbaea9d..bfe4646 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
@@ -110,9 +110,9 @@ public class ClientServerMiscDUnitTest extends JUnit4CacheTestCase {
 
   private static Host host;
 
-  private static VM server1;
+  protected static VM server1;
 
-  private static VM server2;
+  protected static VM server2;
 
   private static RegionAttributes attrs;
 


[12/24] geode git commit: GEODE-2626: fix FastLoggerJUnitTest use of Mockito 2.7.11

Posted by je...@apache.org.
GEODE-2626: fix FastLoggerJUnitTest use of Mockito 2.7.11


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

Branch: refs/heads/feature/GEODE-3071
Commit: e3a1ae07c4837a5df5b1874490b9ec96f4c16ac8
Parents: c41d788
Author: Kirk Lund <kl...@apache.org>
Authored: Tue Jun 13 11:00:07 2017 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed Jun 14 11:06:33 2017 -0700

----------------------------------------------------------------------
 .../apache/geode/internal/logging/log4j/FastLoggerJUnitTest.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/e3a1ae07/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/FastLoggerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/FastLoggerJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/FastLoggerJUnitTest.java
index e162087..891ac3c 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/FastLoggerJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/FastLoggerJUnitTest.java
@@ -16,7 +16,6 @@ package org.apache.geode.internal.logging.log4j;
 
 import static org.hamcrest.CoreMatchers.*;
 import static org.junit.Assert.*;
-import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.*;
 
 import org.apache.logging.log4j.Level;
@@ -97,7 +96,7 @@ public class FastLoggerJUnitTest {
 
     assertThat(fastLogger.isDebugEnabled(), is(true));
     assertThat(fastLogger.isDebugEnabled(this.mockedMarker), is(true));
-    verify(this.mockedLogger, times(1)).isEnabled(eq(Level.DEBUG), any(Marker.class),
+    verify(this.mockedLogger, times(1)).isEnabled(eq(Level.DEBUG), isNull(Marker.class),
         isNull(String.class));
     verify(this.mockedLogger, times(1)).isEnabled(eq(Level.DEBUG), eq(this.mockedMarker),
         isNull(Object.class), isNull(Throwable.class));


[19/24] geode git commit: GEODE-2632: consolidate different types of SecurityService

Posted by je...@apache.org.
GEODE-2632: consolidate different types of SecurityService

* combine EnabledSecurityService and CustomSecurityService into IntegratedSecurityService
* combine DisabledSecurityService and LegacySecurityService
* combine ConfigInitializer and RealmInitializer
* provide default impelementations of SecurityService
* consolidate SecurityService creation.


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

Branch: refs/heads/feature/GEODE-3071
Commit: 5546a8732203baec09fd3922a8e4cb86e5048492
Parents: dd90c71
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Fri Jun 9 12:29:10 2017 -0700
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Thu Jun 15 11:32:30 2017 -0700

----------------------------------------------------------------------
 .../internal/InternalDistributedSystem.java     |  62 +--
 .../geode/internal/cache/GemFireCacheImpl.java  |   2 -
 .../internal/security/CallbackInstantiator.java |  28 ++
 .../security/CustomSecurityService.java         | 346 ----------------
 .../security/DisabledSecurityService.java       | 221 -----------
 .../security/EnabledSecurityService.java        | 393 -------------------
 .../security/IntegratedSecurityService.java     | 374 ++++++++++++++++++
 .../security/LegacySecurityService.java         | 186 +--------
 .../internal/security/SecurityService.java      |  99 +++--
 .../security/SecurityServiceFactory.java        | 188 +++------
 .../internal/security/SecurityServiceType.java  |  28 --
 .../security/shiro/ConfigInitializer.java       |  43 --
 .../security/shiro/CustomAuthRealm.java         |  19 +-
 .../security/shiro/RealmInitializer.java        |  54 ---
 .../security/shiro/SecurityManagerProvider.java |  83 ++++
 .../membership/MembershipJUnitTest.java         |   3 -
 .../security/DisabledSecurityServiceTest.java   | 164 --------
 .../security/EnabledSecurityServiceTest.java    | 184 ---------
 .../internal/security/FakePostProcessor.java    | 103 -----
 .../internal/security/FakeSecurityManager.java  | 103 -----
 ...ntegratedSecurityServiceConstructorTest.java |  93 +++++
 .../security/IntegratedSecurityServiceTest.java | 166 ++++++++
 .../security/LegacySecurityServiceTest.java     |  58 +++
 ...urityServiceFactoryShiroIntegrationTest.java |  38 +-
 .../security/SecurityServiceFactoryTest.java    | 314 ++++++---------
 .../internal/security/SecurityServiceTest.java  |  21 +-
 .../shiro/ConfigInitializerIntegrationTest.java |  91 -----
 ...tyServiceWithCustomRealmIntegrationTest.java |   2 +-
 ...urityServiceWithShiroIniIntegrationTest.java |   2 +-
 .../CacheFactoryWithSecurityObjectTest.java     |  68 +++-
 ...SecurityManagerLifecycleDistributedTest.java |   4 +-
 .../apache/geode/tools/pulse/tests/Server.java  |  19 +-
 .../tools/pulse/tests/rules/ServerRule.java     |   6 +-
 33 files changed, 1161 insertions(+), 2404 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
index 22edb6f..85f9146 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
@@ -15,35 +15,8 @@
 
 package org.apache.geode.distributed.internal;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.Reader;
-import java.lang.reflect.Array;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.geode.cache.CacheXmlException;
-import org.apache.geode.internal.security.SecurityService;
-import org.apache.geode.internal.security.SecurityServiceFactory;
-import org.apache.geode.security.PostProcessor;
-import org.apache.logging.log4j.Logger;
+import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
+import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
 
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.CancelException;
@@ -60,6 +33,7 @@ import org.apache.geode.SystemFailure;
 import org.apache.geode.admin.AlertLevel;
 import org.apache.geode.cache.CacheClosedException;
 import org.apache.geode.cache.CacheFactory;
+import org.apache.geode.cache.CacheXmlException;
 import org.apache.geode.cache.execute.internal.FunctionServiceManager;
 import org.apache.geode.cache.server.CacheServer;
 import org.apache.geode.distributed.DistributedMember;
@@ -100,6 +74,8 @@ import org.apache.geode.internal.logging.log4j.LogWriterAppenders;
 import org.apache.geode.internal.net.SocketCreatorFactory;
 import org.apache.geode.internal.offheap.MemoryAllocator;
 import org.apache.geode.internal.offheap.OffHeapStorage;
+import org.apache.geode.internal.security.SecurityService;
+import org.apache.geode.internal.security.SecurityServiceFactory;
 import org.apache.geode.internal.statistics.DummyStatisticsImpl;
 import org.apache.geode.internal.statistics.GemFireStatSampler;
 import org.apache.geode.internal.statistics.LocalStatisticsImpl;
@@ -111,7 +87,31 @@ import org.apache.geode.internal.statistics.platform.OsStatisticsFactory;
 import org.apache.geode.internal.tcp.ConnectionTable;
 import org.apache.geode.management.ManagementException;
 import org.apache.geode.security.GemFireSecurityException;
+import org.apache.geode.security.PostProcessor;
 import org.apache.geode.security.SecurityManager;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Reader;
+import java.lang.reflect.Array;
+import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.StringTokenizer;
+import java.util.TreeSet;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
 
 /**
  * The concrete implementation of {@link DistributedSystem} that provides internal-only
@@ -586,8 +586,8 @@ public class InternalDistributedSystem extends DistributedSystem
 
     this.config = new RuntimeDistributionConfigImpl(this);
 
-    this.securityService =
-        SecurityServiceFactory.create(this.config, securityManager, postProcessor);
+    this.securityService = SecurityServiceFactory.create(this.config.getSecurityProps(),
+        securityManager, postProcessor);
 
     if (!this.isLoner) {
       this.attemptingToReconnect = (reconnectAttemptCounter > 0);

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index 40df0c7..5eaa5a4 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -126,7 +126,6 @@ import org.apache.geode.cache.client.PoolFactory;
 import org.apache.geode.cache.client.PoolManager;
 import org.apache.geode.cache.client.internal.ClientMetadataService;
 import org.apache.geode.cache.client.internal.ClientRegionFactoryImpl;
-import org.apache.geode.cache.client.internal.ConnectionImpl;
 import org.apache.geode.cache.client.internal.InternalClientCache;
 import org.apache.geode.cache.client.internal.PoolImpl;
 import org.apache.geode.cache.control.ResourceManager;
@@ -213,7 +212,6 @@ import org.apache.geode.internal.net.SocketCreator;
 import org.apache.geode.internal.offheap.MemoryAllocator;
 import org.apache.geode.internal.process.ClusterConfigurationNotAvailableException;
 import org.apache.geode.internal.security.SecurityService;
-import org.apache.geode.internal.security.SecurityServiceFactory;
 import org.apache.geode.internal.sequencelog.SequenceLoggerImpl;
 import org.apache.geode.internal.tcp.ConnectionTable;
 import org.apache.geode.internal.util.concurrent.FutureResult;

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/CallbackInstantiator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/CallbackInstantiator.java b/geode-core/src/main/java/org/apache/geode/internal/security/CallbackInstantiator.java
index 3ff632d..2cb8d08 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/CallbackInstantiator.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/CallbackInstantiator.java
@@ -14,12 +14,18 @@
  */
 package org.apache.geode.internal.security;
 
+import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANAGER;
+import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_POST_PROCESSOR;
 import static org.apache.geode.internal.ClassLoadUtil.classFromName;
 import static org.apache.geode.internal.ClassLoadUtil.methodFromName;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.geode.security.GemFireSecurityException;
+import org.apache.geode.security.PostProcessor;
+import org.apache.geode.security.SecurityManager;
 
 import java.lang.reflect.Method;
+import java.util.Properties;
 
 /**
  * Utility methods for instantiating security callback objects by reflection.
@@ -50,6 +56,28 @@ public class CallbackInstantiator {
     }
   }
 
+  public static SecurityManager getSecurityManager(Properties properties) {
+    String securityManagerConfig = properties.getProperty(SECURITY_MANAGER);
+    if (StringUtils.isBlank(securityManagerConfig)) {
+      return null;
+    }
+    SecurityManager securityManager =
+        getObjectOfTypeFromClassName(securityManagerConfig, SecurityManager.class);
+    securityManager.init(properties);
+    return securityManager;
+  }
+
+  public static PostProcessor getPostProcessor(Properties properties) {
+    String postProcessorConfig = properties.getProperty(SECURITY_POST_PROCESSOR);
+    if (StringUtils.isBlank(postProcessorConfig)) {
+      return null;
+    }
+    PostProcessor postProcessor =
+        getObjectOfTypeFromClassName(postProcessorConfig, PostProcessor.class);
+    postProcessor.init(properties);
+    return postProcessor;
+  }
+
   /**
    * this method would never return null, it either throws an exception or returns an object
    */

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/CustomSecurityService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/CustomSecurityService.java b/geode-core/src/main/java/org/apache/geode/internal/security/CustomSecurityService.java
deleted file mode 100644
index 0ba1cb6..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/security/CustomSecurityService.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security;
-
-import org.apache.commons.lang.SerializationException;
-import org.apache.commons.lang.StringUtils;
-import org.apache.geode.GemFireIOException;
-import org.apache.geode.internal.cache.EntryEventImpl;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.security.shiro.GeodeAuthenticationToken;
-import org.apache.geode.internal.security.shiro.ShiroPrincipal;
-import org.apache.geode.internal.util.BlobHelper;
-import org.apache.geode.security.AuthenticationFailedException;
-import org.apache.geode.security.GemFireSecurityException;
-import org.apache.geode.security.NotAuthorizedException;
-import org.apache.geode.security.PostProcessor;
-import org.apache.geode.security.ResourcePermission;
-import org.apache.geode.security.ResourcePermission.Operation;
-import org.apache.geode.security.ResourcePermission.Resource;
-import org.apache.geode.security.ResourcePermission.Target;
-import org.apache.geode.security.SecurityManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.ShiroException;
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.subject.support.SubjectThreadState;
-import org.apache.shiro.util.ThreadContext;
-import org.apache.shiro.util.ThreadState;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.security.AccessController;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.Callable;
-
-public class CustomSecurityService implements SecurityService {
-  private static Logger logger = LogService.getLogger(LogService.SECURITY_LOGGER_NAME);
-
-  private final PostProcessor postProcessor;
-
-  CustomSecurityService(PostProcessor postProcessor) {
-    this.postProcessor = postProcessor;
-  }
-
-  @Override
-  public void initSecurity(final Properties securityProps) {
-    if (this.postProcessor != null) {
-      this.postProcessor.init(securityProps);
-    }
-  }
-
-  @Override
-  public ThreadState bindSubject(final Subject subject) {
-    if (subject == null) {
-      return null;
-    }
-
-    ThreadState threadState = new SubjectThreadState(subject);
-    threadState.bind();
-    return threadState;
-  }
-
-  @Override
-  public Subject getSubject() {
-    Subject currentUser;
-
-    // First try get the principal out of AccessControlContext instead of Shiro's Thread context
-    // since threads can be shared between JMX clients.
-    javax.security.auth.Subject jmxSubject =
-        javax.security.auth.Subject.getSubject(AccessController.getContext());
-
-    if (jmxSubject != null) {
-      Set<ShiroPrincipal> principals = jmxSubject.getPrincipals(ShiroPrincipal.class);
-      if (principals.size() > 0) {
-        ShiroPrincipal principal = principals.iterator().next();
-        currentUser = principal.getSubject();
-        ThreadContext.bind(currentUser);
-        return currentUser;
-      }
-    }
-
-    // in other cases like rest call, client operations, we get it from the current thread
-    currentUser = SecurityUtils.getSubject();
-
-    if (currentUser == null || currentUser.getPrincipal() == null) {
-      throw new GemFireSecurityException("Error: Anonymous User");
-    }
-
-    return currentUser;
-  }
-
-  @Override
-  public Subject login(final Properties credentials) {
-    if (credentials == null) {
-      return null;
-    }
-
-    // this makes sure it starts with a clean user object
-    ThreadContext.remove();
-
-    Subject currentUser = SecurityUtils.getSubject();
-    GeodeAuthenticationToken token = new GeodeAuthenticationToken(credentials);
-    try {
-      logger.debug("Logging in " + token.getPrincipal());
-      currentUser.login(token);
-    } catch (ShiroException e) {
-      logger.info(e.getMessage(), e);
-      throw new AuthenticationFailedException(
-          "Authentication error. Please check your credentials.", e);
-    }
-
-    return currentUser;
-  }
-
-  @Override
-  public void logout() {
-    Subject currentUser = getSubject();
-    if (currentUser == null) {
-      return;
-    }
-
-    try {
-      logger.debug("Logging out " + currentUser.getPrincipal());
-      currentUser.logout();
-    } catch (ShiroException e) {
-      logger.info(e.getMessage(), e);
-      throw new GemFireSecurityException(e.getMessage(), e);
-    }
-    // clean out Shiro's thread local content
-    ThreadContext.remove();
-  }
-
-  @Override
-  public Callable associateWith(final Callable callable) {
-    Subject currentUser = getSubject();
-    if (currentUser == null) {
-      return callable;
-    }
-
-    return currentUser.associateWith(callable);
-  }
-
-  public void authorizeClusterManage() {
-    authorize(Resource.CLUSTER, Operation.MANAGE, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeClusterWrite() {
-    authorize(Resource.CLUSTER, Operation.WRITE, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeClusterRead() {
-    authorize(Resource.CLUSTER, Operation.READ, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeDataManage() {
-    authorize(Resource.DATA, Operation.MANAGE, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeDataWrite() {
-    authorize(Resource.DATA, Operation.WRITE, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeDataRead() {
-    authorize(Resource.DATA, Operation.READ, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeDiskManage() {
-    authorize(Resource.CLUSTER, Operation.MANAGE, Target.DISK, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeGatewayManage() {
-    authorize(Resource.CLUSTER, Operation.MANAGE, Target.GATEWAY, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeJarManage() {
-    authorize(Resource.CLUSTER, Operation.MANAGE, Target.JAR, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeQueryManage() {
-    authorize(Resource.CLUSTER, Operation.MANAGE, Target.QUERY, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeRegionManage(final String regionName) {
-    authorize(Resource.DATA, Operation.MANAGE, regionName, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeRegionManage(final String regionName, final String key) {
-    authorize(Resource.DATA, Operation.MANAGE, regionName, key);
-  }
-
-  @Override
-  public void authorizeRegionWrite(final String regionName) {
-    authorize(Resource.DATA, Operation.WRITE, regionName, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeRegionWrite(final String regionName, final String key) {
-    authorize(Resource.DATA, Operation.WRITE, regionName, key);
-  }
-
-  @Override
-  public void authorizeRegionRead(final String regionName) {
-    authorize(Resource.DATA, Operation.READ, regionName, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeRegionRead(final String regionName, final String key) {
-    authorize(Resource.DATA, Operation.READ, regionName, key);
-  }
-
-  public void authorize(Resource resource, Operation operation, ResourcePermission.Target target,
-      String key) {
-    authorize(resource, operation, target.getName(), key);
-  }
-
-  public void authorize(Resource resource, Operation operation, ResourcePermission.Target target) {
-    authorize(resource, operation, target, ResourcePermission.ALL);
-  }
-
-  public void authorize(Resource resource, Operation operation, String target, String key) {
-    authorize(new ResourcePermission(resource, operation, target, key));
-  }
-
-  @Override
-  public void authorize(final ResourcePermission context) {
-    Subject currentUser = getSubject();
-    if (currentUser == null) {
-      return;
-    }
-    if (context == null) {
-      return;
-    }
-    if (context.getResource() == Resource.NULL && context.getOperation() == Operation.NULL) {
-      return;
-    }
-
-    try {
-      currentUser.checkPermission(context);
-    } catch (ShiroException e) {
-      String msg = currentUser.getPrincipal() + " not authorized for " + context;
-      logger.info(msg);
-      throw new NotAuthorizedException(msg, e);
-    }
-  }
-
-  @Override
-  public void close() {
-    ThreadContext.remove();
-    SecurityUtils.setSecurityManager(null);
-  }
-
-  @Override
-  public boolean needPostProcess() {
-    return this.postProcessor != null;
-  }
-
-  @Override
-  public Object postProcess(final String regionPath, final Object key, final Object value,
-      final boolean valueIsSerialized) {
-    return postProcess(null, regionPath, key, value, valueIsSerialized);
-  }
-
-  @Override
-  public Object postProcess(Object principal, final String regionPath, final Object key,
-      final Object value, final boolean valueIsSerialized) {
-    if (!needPostProcess()) {
-      return value;
-    }
-
-    if (principal == null) {
-      Subject subject = getSubject();
-      if (subject == null) {
-        return value;
-      }
-      principal = (Serializable) subject.getPrincipal();
-    }
-
-    String regionName = StringUtils.stripStart(regionPath, "/");
-    Object newValue;
-
-    // if the data is a byte array, but the data itself is supposed to be an object, we need to
-    // deserialize it before we pass it to the callback.
-    if (valueIsSerialized && value instanceof byte[]) {
-      try {
-        Object oldObj = EntryEventImpl.deserialize((byte[]) value);
-        Object newObj = this.postProcessor.processRegionValue(principal, regionName, key, oldObj);
-        newValue = BlobHelper.serializeToBlob(newObj);
-      } catch (IOException | SerializationException e) {
-        throw new GemFireIOException("Exception de/serializing entry value", e);
-      }
-    } else {
-      newValue = this.postProcessor.processRegionValue(principal, regionName, key, value);
-    }
-
-    return newValue;
-  }
-
-  @Override
-  public boolean isClientSecurityRequired() {
-    return true;
-  }
-
-  @Override
-  public boolean isIntegratedSecurity() {
-    return true;
-  }
-
-  @Override
-  public boolean isPeerSecurityRequired() {
-    return true;
-  }
-
-  @Override
-  public SecurityManager getSecurityManager() {
-    return null;
-  }
-
-  @Override
-  public PostProcessor getPostProcessor() {
-    return this.postProcessor;
-  }
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/DisabledSecurityService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/DisabledSecurityService.java b/geode-core/src/main/java/org/apache/geode/internal/security/DisabledSecurityService.java
deleted file mode 100644
index b505690..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/security/DisabledSecurityService.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security;
-
-import org.apache.geode.security.PostProcessor;
-import org.apache.geode.security.ResourcePermission;
-import org.apache.geode.security.SecurityManager;
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.subject.support.SubjectThreadState;
-import org.apache.shiro.util.ThreadState;
-
-import java.util.Properties;
-import java.util.concurrent.Callable;
-
-/**
- * No-op security service that does nothing.
- */
-public class DisabledSecurityService implements SecurityService {
-
-  public DisabledSecurityService() {
-    // nothing
-  }
-
-  @Override
-  public void initSecurity(final Properties securityProps) {
-    // nothing
-  }
-
-  @Override
-  public ThreadState bindSubject(final Subject subject) {
-    if (subject == null) {
-      return null;
-    }
-
-    ThreadState threadState = new SubjectThreadState(subject);
-    threadState.bind();
-    return threadState;
-  }
-
-  @Override
-  public Subject getSubject() {
-    return null;
-  }
-
-  @Override
-  public Subject login(final Properties credentials) {
-    return null;
-  }
-
-  @Override
-  public void logout() {
-    // nothing
-  }
-
-  @Override
-  public Callable associateWith(final Callable callable) {
-    return callable;
-  }
-
-  @Override
-  public void authorize(ResourcePermission.Resource resource,
-      ResourcePermission.Operation operation, String target, String key) {
-
-  }
-
-  @Override
-  public void authorize(ResourcePermission.Resource resource,
-      ResourcePermission.Operation operation, ResourcePermission.Target target, String key) {
-
-  }
-
-  @Override
-  public void authorize(ResourcePermission.Resource resource,
-      ResourcePermission.Operation operation, ResourcePermission.Target target) {
-
-  }
-
-  @Override
-  public void authorizeClusterManage() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeClusterWrite() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeClusterRead() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeDataManage() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeDataWrite() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeDataRead() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeDiskManage() {
-
-  }
-
-  @Override
-  public void authorizeGatewayManage() {
-
-  }
-
-  @Override
-  public void authorizeJarManage() {
-
-  }
-
-  @Override
-  public void authorizeQueryManage() {
-
-  }
-
-  @Override
-  public void authorizeRegionManage(final String regionName) {
-    // nothing
-  }
-
-  @Override
-  public void authorizeRegionManage(final String regionName, final String key) {
-    // nothing
-  }
-
-  @Override
-  public void authorizeRegionWrite(final String regionName) {
-    // nothing
-  }
-
-  @Override
-  public void authorizeRegionWrite(final String regionName, final String key) {
-    // nothing
-  }
-
-  @Override
-  public void authorizeRegionRead(final String regionName) {
-    // nothing
-  }
-
-  @Override
-  public void authorizeRegionRead(final String regionName, final String key) {
-    // nothing
-  }
-
-  @Override
-  public void authorize(final ResourcePermission context) {
-    // nothing
-  }
-
-  @Override
-  public void close() {
-    // nothing
-  }
-
-  @Override
-  public boolean needPostProcess() {
-    return false;
-  }
-
-  @Override
-  public Object postProcess(final String regionPath, final Object key, final Object value,
-      final boolean valueIsSerialized) {
-    return value;
-  }
-
-  @Override
-  public Object postProcess(final Object principal, final String regionPath, final Object key,
-      final Object value, final boolean valueIsSerialized) {
-    return value;
-  }
-
-  @Override
-  public boolean isClientSecurityRequired() {
-    return false;
-  }
-
-  @Override
-  public boolean isIntegratedSecurity() {
-    return false;
-  }
-
-  @Override
-  public boolean isPeerSecurityRequired() {
-    return false;
-  }
-
-  @Override
-  public SecurityManager getSecurityManager() {
-    return null;
-  }
-
-  @Override
-  public PostProcessor getPostProcessor() {
-    return null;
-  }
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/EnabledSecurityService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/EnabledSecurityService.java b/geode-core/src/main/java/org/apache/geode/internal/security/EnabledSecurityService.java
deleted file mode 100644
index f0568c0..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/security/EnabledSecurityService.java
+++ /dev/null
@@ -1,393 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security;
-
-import org.apache.commons.lang.SerializationException;
-import org.apache.commons.lang.StringUtils;
-import org.apache.geode.GemFireIOException;
-import org.apache.geode.internal.cache.EntryEventImpl;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.security.shiro.GeodeAuthenticationToken;
-import org.apache.geode.internal.security.shiro.RealmInitializer;
-import org.apache.geode.internal.security.shiro.ShiroPrincipal;
-import org.apache.geode.internal.util.BlobHelper;
-import org.apache.geode.management.internal.security.ResourceOperation;
-import org.apache.geode.security.AuthenticationFailedException;
-import org.apache.geode.security.GemFireSecurityException;
-import org.apache.geode.security.NotAuthorizedException;
-import org.apache.geode.security.PostProcessor;
-import org.apache.geode.security.ResourcePermission;
-import org.apache.geode.security.ResourcePermission.Operation;
-import org.apache.geode.security.ResourcePermission.Resource;
-import org.apache.geode.security.ResourcePermission.Target;
-import org.apache.geode.security.SecurityManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.ShiroException;
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.subject.support.SubjectThreadState;
-import org.apache.shiro.util.ThreadContext;
-import org.apache.shiro.util.ThreadState;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.security.AccessController;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.Callable;
-
-/**
- * Security service with SecurityManager and an optional PostProcessor.
- */
-public class EnabledSecurityService implements SecurityService {
-  private static Logger logger = LogService.getLogger(LogService.SECURITY_LOGGER_NAME);
-
-  private final SecurityManager securityManager;
-
-  private final PostProcessor postProcessor;
-
-  EnabledSecurityService(final SecurityManager securityManager, final PostProcessor postProcessor,
-      final RealmInitializer realmInitializer) {
-    this.securityManager = securityManager;
-    this.postProcessor = postProcessor;
-    realmInitializer.initialize(this.securityManager);
-  }
-
-  @Override
-  public void initSecurity(final Properties securityProps) {
-    this.securityManager.init(securityProps);
-    if (this.postProcessor != null) {
-      this.postProcessor.init(securityProps);
-    }
-  }
-
-  /**
-   * It first looks the shiro subject in AccessControlContext since JMX will use multiple threads to
-   * process operations from the same client, then it looks into Shiro's thead context.
-   *
-   * @return the shiro subject, null if security is not enabled
-   */
-  @Override
-  public Subject getSubject() {
-    Subject currentUser;
-
-    // First try get the principal out of AccessControlContext instead of Shiro's Thread context
-    // since threads can be shared between JMX clients.
-    javax.security.auth.Subject jmxSubject =
-        javax.security.auth.Subject.getSubject(AccessController.getContext());
-
-    if (jmxSubject != null) {
-      Set<ShiroPrincipal> principals = jmxSubject.getPrincipals(ShiroPrincipal.class);
-      if (!principals.isEmpty()) {
-        ShiroPrincipal principal = principals.iterator().next();
-        currentUser = principal.getSubject();
-        ThreadContext.bind(currentUser);
-        return currentUser;
-      }
-    }
-
-    // in other cases like rest call, client operations, we get it from the current thread
-    currentUser = SecurityUtils.getSubject();
-
-    if (currentUser == null || currentUser.getPrincipal() == null) {
-      throw new GemFireSecurityException("Error: Anonymous User");
-    }
-
-    return currentUser;
-  }
-
-  /**
-   * @return null if security is not enabled, otherwise return a shiro subject
-   */
-  @Override
-  public Subject login(final Properties credentials) {
-    if (credentials == null) {
-      return null;
-    }
-
-    // this makes sure it starts with a clean user object
-    ThreadContext.remove();
-
-    Subject currentUser = SecurityUtils.getSubject();
-    GeodeAuthenticationToken token = new GeodeAuthenticationToken(credentials);
-    try {
-      logger.info("Logging in " + token.getPrincipal());
-      currentUser.login(token);
-    } catch (ShiroException e) {
-      logger.info(e.getMessage(), e);
-      throw new AuthenticationFailedException(
-          "Authentication error. Please check your credentials.", e);
-    }
-
-    return currentUser;
-  }
-
-  @Override
-  public void logout() {
-    Subject currentUser = getSubject();
-    if (currentUser == null) {
-      return;
-    }
-
-    try {
-      logger.info("Logging out " + currentUser.getPrincipal());
-      currentUser.logout();
-    } catch (ShiroException e) {
-      logger.info(e.getMessage(), e);
-      throw new GemFireSecurityException(e.getMessage(), e);
-    }
-
-    // clean out Shiro's thread local content
-    ThreadContext.remove();
-  }
-
-  @Override
-  public Callable associateWith(final Callable callable) {
-    Subject currentUser = getSubject();
-    if (currentUser == null) {
-      return callable;
-    }
-
-    return currentUser.associateWith(callable);
-  }
-
-  /**
-   * Binds the passed-in subject to the executing thread. Usage:
-   *
-   * <pre>
-   * ThreadState state = null;
-   * try {
-   *   state = securityService.bindSubject(subject);
-   *   // do the rest of the work as this subject
-   * } finally {
-   *   if (state != null)
-   *     state.clear();
-   * }
-   * </pre>
-   */
-  @Override
-  public ThreadState bindSubject(final Subject subject) {
-    if (subject == null) {
-      return null;
-    }
-
-    ThreadState threadState = new SubjectThreadState(subject);
-    threadState.bind();
-    return threadState;
-  }
-
-  public void authorizeClusterManage() {
-    authorize(Resource.CLUSTER, Operation.MANAGE, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeClusterWrite() {
-    authorize(Resource.CLUSTER, Operation.WRITE, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeClusterRead() {
-    authorize(Resource.CLUSTER, Operation.READ, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeDataManage() {
-    authorize(Resource.DATA, Operation.MANAGE, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeDataWrite() {
-    authorize(Resource.DATA, Operation.WRITE, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeDataRead() {
-    authorize(Resource.DATA, Operation.READ, Target.ALL, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeDiskManage() {
-    authorize(Resource.CLUSTER, Operation.MANAGE, Target.DISK, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeGatewayManage() {
-    authorize(Resource.CLUSTER, Operation.MANAGE, Target.GATEWAY, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeJarManage() {
-    authorize(Resource.CLUSTER, Operation.MANAGE, Target.JAR, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeQueryManage() {
-    authorize(Resource.CLUSTER, Operation.MANAGE, Target.QUERY, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeRegionManage(final String regionName) {
-    authorize(Resource.DATA, Operation.MANAGE, regionName, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeRegionManage(final String regionName, final String key) {
-    authorize(Resource.DATA, Operation.MANAGE, regionName, key);
-  }
-
-  @Override
-  public void authorizeRegionWrite(final String regionName) {
-    authorize(Resource.DATA, Operation.WRITE, regionName, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeRegionWrite(final String regionName, final String key) {
-    authorize(Resource.DATA, Operation.WRITE, regionName, key);
-  }
-
-  @Override
-  public void authorizeRegionRead(final String regionName) {
-    authorize(Resource.DATA, Operation.READ, regionName, ResourcePermission.ALL);
-  }
-
-  @Override
-  public void authorizeRegionRead(final String regionName, final String key) {
-    authorize(Resource.DATA, Operation.READ, regionName, key);
-  }
-
-  public void authorize(Resource resource, Operation operation, Target target, String key) {
-    authorize(resource, operation, target.getName(), key);
-  }
-
-  public void authorize(Resource resource, Operation operation, Target target) {
-    authorize(resource, operation, target, ResourcePermission.ALL);
-  }
-
-  public void authorize(Resource resource, Operation operation, String target, String key) {
-    authorize(new ResourcePermission(resource, operation, target, key));
-  }
-
-  @Override
-  public void authorize(final ResourcePermission context) {
-    if (context == null) {
-      return;
-    }
-    if (context.getResource() == Resource.NULL && context.getOperation() == Operation.NULL) {
-      return;
-    }
-
-    // if currentUser is null, let it throw NPE, since in a EnabledSecurityService,
-    // user can not be null
-    Subject currentUser = getSubject();
-
-    try {
-      currentUser.checkPermission(context);
-    } catch (ShiroException e) {
-      String msg = currentUser.getPrincipal() + " not authorized for " + context;
-      logger.info(msg);
-      throw new NotAuthorizedException(msg, e);
-    }
-  }
-
-  @Override
-  public void close() {
-    if (this.securityManager != null) {
-      this.securityManager.close();
-    }
-
-    if (this.postProcessor != null) {
-      this.postProcessor.close();
-    }
-
-    ThreadContext.remove();
-    SecurityUtils.setSecurityManager(null);
-  }
-
-  /**
-   * postProcess call already has this logic built in, you don't need to call this everytime you
-   * call postProcess. But if your postProcess is pretty involved with preparations and you need to
-   * bypass it entirely, call this first.
-   */
-  @Override
-  public boolean needPostProcess() {
-    return this.postProcessor != null;
-  }
-
-  @Override
-  public Object postProcess(final String regionPath, final Object key, final Object value,
-      final boolean valueIsSerialized) {
-    return postProcess(null, regionPath, key, value, valueIsSerialized);
-  }
-
-  @Override
-  public Object postProcess(Object principal, final String regionPath, final Object key,
-      final Object value, final boolean valueIsSerialized) {
-    if (!needPostProcess()) {
-      return value;
-    }
-
-    if (principal == null) {
-      Subject subject = getSubject();
-      if (subject == null) {
-        return value;
-      }
-      principal = (Serializable) subject.getPrincipal();
-    }
-
-    String regionName = StringUtils.stripStart(regionPath, "/");
-    Object newValue;
-
-    // if the data is a byte array, but the data itself is supposed to be an object, we need to
-    // deserialize it before we pass it to the callback.
-    if (valueIsSerialized && value instanceof byte[]) {
-      try {
-        Object oldObj = EntryEventImpl.deserialize((byte[]) value);
-        Object newObj = this.postProcessor.processRegionValue(principal, regionName, key, oldObj);
-        newValue = BlobHelper.serializeToBlob(newObj);
-      } catch (IOException | SerializationException e) {
-        throw new GemFireIOException("Exception de/serializing entry value", e);
-      }
-    } else {
-      newValue = this.postProcessor.processRegionValue(principal, regionName, key, value);
-    }
-
-    return newValue;
-  }
-
-  @Override
-  public SecurityManager getSecurityManager() {
-    return this.securityManager;
-  }
-
-  @Override
-  public PostProcessor getPostProcessor() {
-    return this.postProcessor;
-  }
-
-  @Override
-  public boolean isIntegratedSecurity() {
-    return true;
-  }
-
-  @Override
-  public boolean isClientSecurityRequired() {
-    return true;
-  }
-
-  @Override
-  public boolean isPeerSecurityRequired() {
-    return true;
-  }
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java b/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
new file mode 100644
index 0000000..171cfb7
--- /dev/null
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
@@ -0,0 +1,374 @@
+/*
+ * 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 java.io.IOException;
+import java.security.AccessController;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.Callable;
+
+import org.apache.commons.lang.SerializationException;
+import org.apache.commons.lang.StringUtils;
+import org.apache.logging.log4j.Logger;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.ShiroException;
+import org.apache.shiro.subject.Subject;
+import org.apache.shiro.subject.support.SubjectThreadState;
+import org.apache.shiro.util.ThreadContext;
+import org.apache.shiro.util.ThreadState;
+
+import org.apache.geode.GemFireIOException;
+import org.apache.geode.internal.cache.EntryEventImpl;
+import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.security.shiro.GeodeAuthenticationToken;
+import org.apache.geode.internal.security.shiro.SecurityManagerProvider;
+import org.apache.geode.internal.security.shiro.ShiroPrincipal;
+import org.apache.geode.internal.util.BlobHelper;
+import org.apache.geode.security.AuthenticationFailedException;
+import org.apache.geode.security.AuthenticationRequiredException;
+import org.apache.geode.security.GemFireSecurityException;
+import org.apache.geode.security.NotAuthorizedException;
+import org.apache.geode.security.PostProcessor;
+import org.apache.geode.security.ResourcePermission;
+import org.apache.geode.security.ResourcePermission.Operation;
+import org.apache.geode.security.ResourcePermission.Resource;
+import org.apache.geode.security.ResourcePermission.Target;
+
+/**
+ * Security service with SecurityManager and an optional PostProcessor.
+ */
+public class IntegratedSecurityService implements SecurityService {
+  private static Logger logger = LogService.getLogger(LogService.SECURITY_LOGGER_NAME);
+
+  private final PostProcessor postProcessor;
+  private final org.apache.geode.security.SecurityManager securityManager;
+
+  /**
+   * this creates a security service using a SecurityManager
+   * 
+   * @param provider this provides shiro security manager
+   * @param postProcessor this can be null
+   */
+  IntegratedSecurityService(SecurityManagerProvider provider, PostProcessor postProcessor) {
+    // provider must provide a shiro security manager, otherwise, this is not integrated security
+    // service at all.
+    assert provider.getShiroSecurityManager() != null;
+    SecurityUtils.setSecurityManager(provider.getShiroSecurityManager());
+
+    this.securityManager = provider.getSecurityManager();
+    this.postProcessor = postProcessor;
+  }
+
+  public PostProcessor getPostProcessor() {
+    return this.postProcessor;
+  }
+
+  public org.apache.geode.security.SecurityManager getSecurityManager() {
+    return this.securityManager;
+  }
+
+  /**
+   * It first looks the shiro subject in AccessControlContext since JMX will use multiple threads to
+   * process operations from the same client, then it looks into Shiro's thead context.
+   *
+   * @return the shiro subject, null if security is not enabled
+   */
+  @Override
+  public Subject getSubject() {
+    Subject currentUser;
+
+    // First try get the principal out of AccessControlContext instead of Shiro's Thread context
+    // since threads can be shared between JMX clients.
+    javax.security.auth.Subject jmxSubject =
+        javax.security.auth.Subject.getSubject(AccessController.getContext());
+
+    if (jmxSubject != null) {
+      Set<ShiroPrincipal> principals = jmxSubject.getPrincipals(ShiroPrincipal.class);
+      if (!principals.isEmpty()) {
+        ShiroPrincipal principal = principals.iterator().next();
+        currentUser = principal.getSubject();
+        ThreadContext.bind(currentUser);
+        return currentUser;
+      }
+    }
+
+    // in other cases like rest call, client operations, we get it from the current thread
+    currentUser = SecurityUtils.getSubject();
+
+    if (currentUser == null || currentUser.getPrincipal() == null) {
+      throw new GemFireSecurityException("Error: Anonymous User");
+    }
+
+    return currentUser;
+  }
+
+  /**
+   * @return return a shiro subject
+   */
+  @Override
+  public Subject login(final Properties credentials) {
+    if (credentials == null) {
+      throw new AuthenticationRequiredException("credentials are null");
+    }
+
+    // this makes sure it starts with a clean user object
+    ThreadContext.remove();
+
+    Subject currentUser = SecurityUtils.getSubject();
+    GeodeAuthenticationToken token = new GeodeAuthenticationToken(credentials);
+    try {
+      logger.debug("Logging in " + token.getPrincipal());
+      currentUser.login(token);
+    } catch (ShiroException e) {
+      logger.info(e.getMessage(), e);
+      throw new AuthenticationFailedException(
+          "Authentication error. Please check your credentials.", e);
+    }
+
+    return currentUser;
+  }
+
+  @Override
+  public void logout() {
+    Subject currentUser = getSubject();
+    try {
+      logger.debug("Logging out " + currentUser.getPrincipal());
+      currentUser.logout();
+    } catch (ShiroException e) {
+      logger.info(e.getMessage(), e);
+      throw new GemFireSecurityException(e.getMessage(), e);
+    }
+
+    // clean out Shiro's thread local content
+    ThreadContext.remove();
+  }
+
+  @Override
+  public Callable associateWith(final Callable callable) {
+    Subject currentUser = getSubject();
+    return currentUser.associateWith(callable);
+  }
+
+  /**
+   * Binds the passed-in subject to the executing thread. Usage:
+   *
+   * <pre>
+   * ThreadState state = null;
+   * try {
+   *   state = securityService.bindSubject(subject);
+   *   // do the rest of the work as this subject
+   * } finally {
+   *   if (state != null)
+   *     state.clear();
+   * }
+   * </pre>
+   */
+  @Override
+  public ThreadState bindSubject(final Subject subject) {
+    if (subject == null) {
+      throw new GemFireSecurityException("Error: Anonymous User");
+    }
+
+    ThreadState threadState = new SubjectThreadState(subject);
+    threadState.bind();
+    return threadState;
+  }
+
+  public void authorizeClusterManage() {
+    authorize(Resource.CLUSTER, Operation.MANAGE, Target.ALL, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeClusterWrite() {
+    authorize(Resource.CLUSTER, Operation.WRITE, Target.ALL, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeClusterRead() {
+    authorize(Resource.CLUSTER, Operation.READ, Target.ALL, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeDataManage() {
+    authorize(Resource.DATA, Operation.MANAGE, Target.ALL, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeDataWrite() {
+    authorize(Resource.DATA, Operation.WRITE, Target.ALL, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeDataRead() {
+    authorize(Resource.DATA, Operation.READ, Target.ALL, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeDiskManage() {
+    authorize(Resource.CLUSTER, Operation.MANAGE, Target.DISK, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeGatewayManage() {
+    authorize(Resource.CLUSTER, Operation.MANAGE, Target.GATEWAY, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeJarManage() {
+    authorize(Resource.CLUSTER, Operation.MANAGE, Target.JAR, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeQueryManage() {
+    authorize(Resource.CLUSTER, Operation.MANAGE, Target.QUERY, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeRegionManage(final String regionName) {
+    authorize(Resource.DATA, Operation.MANAGE, regionName, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeRegionManage(final String regionName, final String key) {
+    authorize(Resource.DATA, Operation.MANAGE, regionName, key);
+  }
+
+  @Override
+  public void authorizeRegionWrite(final String regionName) {
+    authorize(Resource.DATA, Operation.WRITE, regionName, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeRegionWrite(final String regionName, final String key) {
+    authorize(Resource.DATA, Operation.WRITE, regionName, key);
+  }
+
+  @Override
+  public void authorizeRegionRead(final String regionName) {
+    authorize(Resource.DATA, Operation.READ, regionName, ResourcePermission.ALL);
+  }
+
+  @Override
+  public void authorizeRegionRead(final String regionName, final String key) {
+    authorize(Resource.DATA, Operation.READ, regionName, key);
+  }
+
+  public void authorize(Resource resource, Operation operation, Target target, String key) {
+    authorize(resource, operation, target.getName(), key);
+  }
+
+  public void authorize(Resource resource, Operation operation, Target target) {
+    authorize(resource, operation, target, ResourcePermission.ALL);
+  }
+
+  public void authorize(Resource resource, Operation operation, String target, String key) {
+    authorize(new ResourcePermission(resource, operation, target, key));
+  }
+
+  @Override
+  public void authorize(final ResourcePermission context) {
+    if (context == null) {
+      return;
+    }
+    if (context.getResource() == Resource.NULL && context.getOperation() == Operation.NULL) {
+      return;
+    }
+
+    Subject currentUser = getSubject();
+    try {
+      currentUser.checkPermission(context);
+    } catch (ShiroException e) {
+      String msg = currentUser.getPrincipal() + " not authorized for " + context;
+      logger.info(msg);
+      throw new NotAuthorizedException(msg, e);
+    }
+  }
+
+  @Override
+  public void close() {
+    if (this.securityManager != null) {
+      securityManager.close();
+    }
+    if (this.postProcessor != null) {
+      this.postProcessor.close();
+    }
+
+    ThreadContext.remove();
+    SecurityUtils.setSecurityManager(null);
+  }
+
+  /**
+   * postProcess call already has this logic built in, you don't need to call this everytime you
+   * call postProcess. But if your postProcess is pretty involved with preparations and you need to
+   * bypass it entirely, call this first.
+   */
+  @Override
+  public boolean needPostProcess() {
+    return this.postProcessor != null;
+  }
+
+  @Override
+  public Object postProcess(final String regionPath, final Object key, final Object value,
+      final boolean valueIsSerialized) {
+    return postProcess(null, regionPath, key, value, valueIsSerialized);
+  }
+
+  @Override
+  public Object postProcess(Object principal, final String regionPath, final Object key,
+      final Object value, final boolean valueIsSerialized) {
+    if (!needPostProcess()) {
+      return value;
+    }
+
+    if (principal == null) {
+      principal = getSubject().getPrincipal();
+    }
+
+    String regionName = StringUtils.stripStart(regionPath, "/");
+    Object newValue;
+
+    // if the data is a byte array, but the data itself is supposed to be an object, we need to
+    // deserialize it before we pass it to the callback.
+    if (valueIsSerialized && value instanceof byte[]) {
+      try {
+        Object oldObj = EntryEventImpl.deserialize((byte[]) value);
+        Object newObj = this.postProcessor.processRegionValue(principal, regionName, key, oldObj);
+        newValue = BlobHelper.serializeToBlob(newObj);
+      } catch (IOException | SerializationException e) {
+        throw new GemFireIOException("Exception de/serializing entry value", e);
+      }
+    } else {
+      newValue = this.postProcessor.processRegionValue(principal, regionName, key, value);
+    }
+
+    return newValue;
+  }
+
+  @Override
+  public boolean isIntegratedSecurity() {
+    return true;
+  }
+
+  @Override
+  public boolean isClientSecurityRequired() {
+    return true;
+  }
+
+  @Override
+  public boolean isPeerSecurityRequired() {
+    return true;
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/LegacySecurityService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/LegacySecurityService.java b/geode-core/src/main/java/org/apache/geode/internal/security/LegacySecurityService.java
index 4456253..c594bf9 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/LegacySecurityService.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/LegacySecurityService.java
@@ -14,17 +14,20 @@
  */
 package org.apache.geode.internal.security;
 
-import org.apache.geode.security.PostProcessor;
-import org.apache.geode.security.ResourcePermission;
-import org.apache.geode.security.SecurityManager;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+
+import org.apache.commons.lang.StringUtils;
 import org.apache.shiro.subject.Subject;
 import org.apache.shiro.util.ThreadState;
 
-import java.util.Properties;
-import java.util.concurrent.Callable;
+import org.apache.geode.management.internal.security.ResourceOperation;
+import org.apache.geode.security.PostProcessor;
+import org.apache.geode.security.ResourcePermission;
+import org.apache.geode.security.SecurityManager;
 
 /**
- * Legacy security service with ClientAuthenticator and/or PeerAuthenticator.
+ * implementing SecurityService when only legacy authenticators are specified
  */
 public class LegacySecurityService implements SecurityService {
 
@@ -32,164 +35,14 @@ public class LegacySecurityService implements SecurityService {
 
   private final boolean hasPeerAuthenticator;
 
-  LegacySecurityService(final String clientAuthenticator, final String peerAuthenticator) {
-    this.hasClientAuthenticator = clientAuthenticator != null;
-    this.hasPeerAuthenticator = peerAuthenticator != null;
-  }
-
-  @Override
-  public void initSecurity(final Properties securityProps) {
-    // nothing
-  }
-
-  @Override
-  public ThreadState bindSubject(final Subject subject) {
-    return null;
-  }
-
-  @Override
-  public Subject getSubject() {
-    return null;
-  }
-
-  @Override
-  public Subject login(final Properties credentials) {
-    return null;
-  }
-
-  @Override
-  public void logout() {
-    // nothing
-  }
-
-  @Override
-  public Callable associateWith(final Callable callable) {
-    return null;
-  }
-
-  @Override
-  public void authorize(ResourcePermission.Resource resource,
-      ResourcePermission.Operation operation, String target, String key) {
-
-  }
-
-  @Override
-  public void authorize(ResourcePermission.Resource resource,
-      ResourcePermission.Operation operation, ResourcePermission.Target target, String key) {
-
-  }
-
-  @Override
-  public void authorize(ResourcePermission.Resource resource,
-      ResourcePermission.Operation operation, ResourcePermission.Target target) {
-
-  }
-
-  @Override
-  public void authorizeClusterManage() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeClusterWrite() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeClusterRead() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeDataManage() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeDataWrite() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeDataRead() {
-    // nothing
-  }
-
-  @Override
-  public void authorizeDiskManage() {
-
-  }
-
-  @Override
-  public void authorizeGatewayManage() {
-
-  }
-
-  @Override
-  public void authorizeJarManage() {
-
+  LegacySecurityService() {
+    hasClientAuthenticator = false;
+    hasPeerAuthenticator = false;
   }
 
-  @Override
-  public void authorizeQueryManage() {
-
-  }
-
-  @Override
-  public void authorizeRegionManage(final String regionName) {
-    // nothing
-  }
-
-  @Override
-  public void authorizeRegionManage(final String regionName, final String key) {
-    // nothing
-  }
-
-  @Override
-  public void authorizeRegionWrite(final String regionName) {
-    // nothing
-  }
-
-  @Override
-  public void authorizeRegionWrite(final String regionName, final String key) {
-    // nothing
-  }
-
-  @Override
-  public void authorizeRegionRead(final String regionName) {
-    // nothing
-  }
-
-  @Override
-  public void authorizeRegionRead(final String regionName, final String key) {
-    // nothing
-  }
-
-  @Override
-  public void authorize(final ResourcePermission context) {
-    // nothing
-  }
-
-  @Override
-  public void close() {
-    // nothing
-  }
-
-  @Override
-  public boolean needPostProcess() {
-    return false;
-  }
-
-  @Override
-  public Object postProcess(final String regionPath, final Object key, final Object value,
-      final boolean valueIsSerialized) {
-    return value;
-  }
-
-  @Override
-  public Object postProcess(final Object principal, final String regionPath, final Object key,
-      final Object value, final boolean valueIsSerialized) {
-    return value;
+  LegacySecurityService(final String clientAuthenticator, final String peerAuthenticator) {
+    this.hasClientAuthenticator = StringUtils.isNotBlank(clientAuthenticator);
+    this.hasPeerAuthenticator = StringUtils.isNotBlank(peerAuthenticator);
   }
 
   @Override
@@ -207,13 +60,4 @@ public class LegacySecurityService implements SecurityService {
     return this.hasPeerAuthenticator;
   }
 
-  @Override
-  public SecurityManager getSecurityManager() {
-    return null;
-  }
-
-  @Override
-  public PostProcessor getPostProcessor() {
-    return null;
-  }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/SecurityService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityService.java b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityService.java
index a4041e1..feea899 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityService.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityService.java
@@ -28,76 +28,97 @@ import java.util.Properties;
 import java.util.concurrent.Callable;
 
 public interface SecurityService {
+  default ThreadState bindSubject(Subject subject) {
+    return null;
+  }
 
-  void initSecurity(Properties securityProps);
+  default Subject getSubject() {
+    return null;
+  }
 
-  ThreadState bindSubject(Subject subject);
+  default Subject login(Properties credentials) {
+    return null;
+  }
 
-  Subject getSubject();
+  default void logout() {};
 
-  Subject login(Properties credentials);
+  default Callable associateWith(Callable callable) {
+    return callable;
+  }
 
-  void logout();
+  default void authorize(Resource resource, Operation operation, String target, String key) {};
 
-  Callable associateWith(Callable callable);
+  default void authorize(Resource resource, Operation operation, Target target, String key) {};
 
-  void authorize(Resource resource, Operation operation, String target, String key);
+  default void authorize(Resource resource, Operation operation, Target target) {};
 
-  void authorize(Resource resource, Operation operation, Target target, String key);
+  default void authorizeClusterManage() {};
 
-  void authorize(Resource resource, Operation operation, Target target);
+  default void authorizeClusterWrite() {};
 
-  void authorizeClusterManage();
+  default void authorizeClusterRead() {};
 
-  void authorizeClusterWrite();
+  default void authorizeDataManage() {};
 
-  void authorizeClusterRead();
+  default void authorizeDataWrite() {};
 
-  void authorizeDataManage();
+  default void authorizeDataRead() {};
 
-  void authorizeDataWrite();
+  default void authorizeDiskManage() {};
 
-  void authorizeDataRead();
+  default void authorizeGatewayManage() {};
 
-  void authorizeDiskManage();
+  default void authorizeJarManage() {};
 
-  void authorizeGatewayManage();
+  default void authorizeQueryManage() {};
 
-  void authorizeJarManage();
+  default void authorizeRegionManage(String regionName) {};
 
-  void authorizeQueryManage();
+  default void authorizeRegionManage(String regionName, String key) {};
 
-  void authorizeRegionManage(String regionName);
+  default void authorizeRegionWrite(String regionName) {};
 
-  void authorizeRegionManage(String regionName, String key);
+  default void authorizeRegionWrite(String regionName, String key) {};
 
-  void authorizeRegionWrite(String regionName);
+  default void authorizeRegionRead(String regionName) {};
 
-  void authorizeRegionWrite(String regionName, String key);
+  default void authorizeRegionRead(String regionName, String key) {};
 
-  void authorizeRegionRead(String regionName);
+  default void authorize(ResourcePermission context) {};
 
-  void authorizeRegionRead(String regionName, String key);
+  default void close() {};
 
-  void authorize(ResourcePermission context);
+  default boolean needPostProcess() {
+    return false;
+  };
 
-  void close();
+  default Object postProcess(String regionPath, Object key, Object value,
+      boolean valueIsSerialized) {
+    return value;
+  }
 
-  boolean needPostProcess();
+  default Object postProcess(Object principal, String regionPath, Object key, Object value,
+      boolean valueIsSerialized) {
+    return value;
+  }
 
-  Object postProcess(String regionPath, Object key, Object value, boolean valueIsSerialized);
+  default boolean isClientSecurityRequired() {
+    return false;
+  }
 
-  Object postProcess(Object principal, String regionPath, Object key, Object value,
-      boolean valueIsSerialized);
+  default boolean isIntegratedSecurity() {
+    return false;
+  }
 
-  boolean isClientSecurityRequired();
+  default boolean isPeerSecurityRequired() {
+    return false;
+  }
 
-  boolean isIntegratedSecurity();
-
-  boolean isPeerSecurityRequired();
-
-  SecurityManager getSecurityManager();
-
-  PostProcessor getPostProcessor();
+  default SecurityManager getSecurityManager() {
+    return null;
+  }
 
+  default PostProcessor getPostProcessor() {
+    return null;
+  }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
index 02f34f1..2e0ad95 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
@@ -14,25 +14,22 @@
  */
 package org.apache.geode.internal.security;
 
-import static org.apache.commons.lang.StringUtils.isNotBlank;
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR;
-import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANAGER;
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_PEER_AUTHENTICATOR;
-import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_POST_PROCESSOR;
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_SHIRO_INIT;
 
-import org.apache.geode.distributed.internal.DistributionConfig;
+import java.util.Properties;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.UnavailableSecurityManagerException;
+
 import org.apache.geode.internal.cache.CacheConfig;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.InternalCache;
-import org.apache.geode.internal.security.shiro.ConfigInitializer;
-import org.apache.geode.internal.security.shiro.RealmInitializer;
+import org.apache.geode.internal.security.shiro.SecurityManagerProvider;
 import org.apache.geode.security.PostProcessor;
 import org.apache.geode.security.SecurityManager;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.UnavailableSecurityManagerException;
-
-import java.util.Properties;
 
 public class SecurityServiceFactory {
 
@@ -40,119 +37,65 @@ public class SecurityServiceFactory {
     // do not instantiate
   }
 
-  public static SecurityService create(CacheConfig cacheConfig,
-      DistributionConfig distributionConfig) {
-    Properties securityConfig = getSecurityConfig(distributionConfig);
-    SecurityManager securityManager =
-        getSecurityManager(getSecurityManagerFromConfig(cacheConfig), securityConfig);
-    PostProcessor postProcessor =
-        getPostProcessor(getPostProcessorFromConfig(cacheConfig), securityConfig);
-    return create(distributionConfig, securityManager, postProcessor);
-  }
-
-  /**
-   * Creates and initializes SecurityService. Initialization will invoke init on both
-   * SecurityManager and PostProcessor if they are specified.
-   */
-  public static SecurityService create(DistributionConfig distributionConfig,
-      SecurityManager securityManager, PostProcessor postProcessor) {
-    Properties securityConfig = getSecurityConfig(distributionConfig);
-
-    securityManager = getSecurityManager(securityManager, securityConfig);
-    postProcessor = getPostProcessor(postProcessor, securityConfig);
-
-    SecurityService securityService = create(securityConfig, securityManager, postProcessor);
-    initialize(securityService, distributionConfig);
-    return securityService;
-  }
-
   public static SecurityService create() {
-    return new DisabledSecurityService();
+    return new LegacySecurityService();
   }
 
-  public static SecurityService create(Properties securityConfig, SecurityManager securityManager,
-      PostProcessor postProcessor) {
-    SecurityServiceType type = determineType(securityConfig, securityManager, postProcessor);
-    switch (type) {
-      case CUSTOM:
-        String shiroConfig = getProperty(securityConfig, SECURITY_SHIRO_INIT);
-        if (isNotBlank(shiroConfig)) {
-          new ConfigInitializer().initialize(shiroConfig);
-        }
-        return new CustomSecurityService(postProcessor);
-      case ENABLED:
-        return new EnabledSecurityService(securityManager, postProcessor, new RealmInitializer());
-      case LEGACY:
-        String clientAuthenticator = getProperty(securityConfig, SECURITY_CLIENT_AUTHENTICATOR);
-        String peerAuthenticator = getProperty(securityConfig, SECURITY_PEER_AUTHENTICATOR);
-        return new LegacySecurityService(clientAuthenticator, peerAuthenticator);
-      default:
-        return new DisabledSecurityService();
-    }
+  public static SecurityService create(Properties securityProps) {
+    return create(securityProps, null, null);
   }
 
-  public static SecurityService findSecurityService() {
-    InternalCache cache = GemFireCacheImpl.getInstance();
-    if (cache != null) {
-      return cache.getSecurityService();
+  public static SecurityService create(Properties securityProps, CacheConfig cacheConfig) {
+    if (cacheConfig == null) {
+      return create(securityProps, null, null);
     }
-    return SecurityServiceFactory.create();
-  }
 
-  static SecurityServiceType determineType(Properties securityConfig,
-      SecurityManager securityManager, PostProcessor postProcessor) {
-    boolean hasShiroConfig = hasProperty(securityConfig, SECURITY_SHIRO_INIT);
-    if (hasShiroConfig) {
-      return SecurityServiceType.CUSTOM;
-    }
+    return create(securityProps, cacheConfig.getSecurityManager(), cacheConfig.getPostProcessor());
+  }
 
-    boolean hasSecurityManager =
-        securityManager != null || hasProperty(securityConfig, SECURITY_MANAGER);
-    if (hasSecurityManager) {
-      return SecurityServiceType.ENABLED;
+  public static SecurityService create(Properties securityProps,
+      SecurityManager preferredSecurityManager, PostProcessor preferredPostProcessor) {
+    if (securityProps == null) {
+      // avoid NPE, and we can stil use preferredSecurityManager to create the service
+      securityProps = new Properties();
     }
 
-    boolean hasClientAuthenticator = hasProperty(securityConfig, SECURITY_CLIENT_AUTHENTICATOR);
-    boolean hasPeerAuthenticator = hasProperty(securityConfig, SECURITY_PEER_AUTHENTICATOR);
-    if (hasClientAuthenticator || hasPeerAuthenticator) {
-      return SecurityServiceType.LEGACY;
-    }
+    String shiroConfig = securityProps.getProperty(SECURITY_SHIRO_INIT);
+    SecurityManager securityManager = CallbackInstantiator.getSecurityManager(securityProps);
+    PostProcessor postProcessor = CallbackInstantiator.getPostProcessor(securityProps);
 
-    boolean isShiroInUse = isShiroInUse();
-    if (isShiroInUse) {
-      return SecurityServiceType.CUSTOM;
+    // cacheConfig's securityManager/postprocessor takes precedence over those defined in
+    // securityProps
+    if (preferredSecurityManager != null) {
+      // cacheConfig's security manager will override property's shiro.ini settings
+      shiroConfig = null;
+      securityManager = preferredSecurityManager;
     }
-
-    return SecurityServiceType.DISABLED;
-  }
-
-  static SecurityManager getSecurityManager(SecurityManager securityManager,
-      Properties securityConfig) {
-    if (securityManager != null) {
-      return securityManager;
+    if (preferredPostProcessor != null) {
+      postProcessor = preferredPostProcessor;
     }
 
-    String securityManagerConfig = getProperty(securityConfig, SECURITY_MANAGER);
-    if (isNotBlank(securityManagerConfig)) {
-      securityManager = CallbackInstantiator.getObjectOfTypeFromClassName(securityManagerConfig,
-          SecurityManager.class);
+    if (StringUtils.isNotBlank(shiroConfig)) {
+      return new IntegratedSecurityService(new SecurityManagerProvider(shiroConfig), postProcessor);
+    } else if (securityManager != null) {
+      return new IntegratedSecurityService(new SecurityManagerProvider(securityManager),
+          postProcessor);
+    } else if (isShiroInUse()) {
+      return new IntegratedSecurityService(new SecurityManagerProvider(), postProcessor);
     }
 
-    return securityManager;
+    // if not return legacy security service
+    String clientAuthenticatorConfig = securityProps.getProperty(SECURITY_CLIENT_AUTHENTICATOR);
+    String peerAuthenticatorConfig = securityProps.getProperty(SECURITY_PEER_AUTHENTICATOR);
+    return new LegacySecurityService(clientAuthenticatorConfig, peerAuthenticatorConfig);
   }
 
-  static PostProcessor getPostProcessor(PostProcessor postProcessor, Properties securityConfig) {
-    if (postProcessor != null) {
-      return postProcessor;
-    }
-
-    String postProcessorConfig = getProperty(securityConfig, SECURITY_POST_PROCESSOR);
-    if (isNotBlank(postProcessorConfig)) {
-      postProcessor = CallbackInstantiator.getObjectOfTypeFromClassName(postProcessorConfig,
-          PostProcessor.class);
+  public static SecurityService findSecurityService() {
+    InternalCache cache = GemFireCacheImpl.getInstance();
+    if (cache != null) {
+      return cache.getSecurityService();
     }
-
-    return postProcessor;
+    return SecurityServiceFactory.create();
   }
 
   private static boolean isShiroInUse() {
@@ -163,42 +106,5 @@ public class SecurityServiceFactory {
     }
   }
 
-  private static Properties getSecurityConfig(DistributionConfig distributionConfig) {
-    if (distributionConfig == null) {
-      return new Properties();
-    }
-    return distributionConfig.getSecurityProps();
-  }
 
-  private static SecurityManager getSecurityManagerFromConfig(CacheConfig cacheConfig) {
-    if (cacheConfig == null) {
-      return null;
-    }
-    return cacheConfig.getSecurityManager();
-  }
-
-  private static PostProcessor getPostProcessorFromConfig(CacheConfig cacheConfig) {
-    if (cacheConfig == null) {
-      return null;
-    }
-    return cacheConfig.getPostProcessor();
-  }
-
-  private static boolean hasProperty(Properties securityConfig, String key) {
-    return securityConfig != null && getProperty(securityConfig, key) != null;
-  }
-
-  private static String getProperty(Properties securityConfig, String key) {
-    if (securityConfig == null) {
-      return null;
-    }
-    return securityConfig.getProperty(key);
-  }
-
-  private static void initialize(SecurityService securityService,
-      DistributionConfig distributionConfig) {
-    if (securityService != null && distributionConfig != null) {
-      securityService.initSecurity(distributionConfig.getSecurityProps());
-    }
-  }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceType.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceType.java b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceType.java
deleted file mode 100644
index 8ae76d2..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceType.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security;
-
-public enum SecurityServiceType {
-  /** Integrated Security is Enabled */
-  ENABLED,
-  /** Security is Disabled */
-  DISABLED,
-  /** Legacy Security is Enabled */
-  LEGACY,
-  /** Shiro Config is specified */
-  CUSTOM,
-  /** Shiro is already configured with SecurityManager */
-  EXTERNAL
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/shiro/ConfigInitializer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/ConfigInitializer.java b/geode-core/src/main/java/org/apache/geode/internal/security/shiro/ConfigInitializer.java
deleted file mode 100644
index 60f014b..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/ConfigInitializer.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security.shiro;
-
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.config.Ini.Section;
-import org.apache.shiro.config.IniSecurityManagerFactory;
-import org.apache.shiro.mgt.SecurityManager;
-
-public class ConfigInitializer {
-
-  public ConfigInitializer() {
-    // nothing
-  }
-
-  public void initialize(String shiroConfig) {
-    IniSecurityManagerFactory factory = new IniSecurityManagerFactory("classpath:" + shiroConfig);
-
-    // we will need to make sure that shiro uses a case sensitive permission resolver
-    Section main = factory.getIni().addSection("main");
-    main.put("geodePermissionResolver", GeodePermissionResolver.class.getName());
-    if (!main.containsKey("iniRealm.permissionResolver")) {
-      main.put("iniRealm.permissionResolver", "$geodePermissionResolver");
-    }
-
-    // logs "Users or Roles are already populated. Configured Ini instance will be ignored."
-    SecurityManager securityManager = factory.getInstance();
-    SecurityUtils.setSecurityManager(securityManager);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/shiro/CustomAuthRealm.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/CustomAuthRealm.java b/geode-core/src/main/java/org/apache/geode/internal/security/shiro/CustomAuthRealm.java
index 51449fd..0e5029b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/CustomAuthRealm.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/shiro/CustomAuthRealm.java
@@ -14,10 +14,6 @@
  */
 package org.apache.geode.internal.security.shiro;
 
-import java.io.Serializable;
-import java.util.Properties;
-
-import org.apache.geode.internal.security.CallbackInstantiator;
 import org.apache.geode.security.ResourcePermission;
 import org.apache.geode.security.SecurityManager;
 import org.apache.shiro.authc.AuthenticationException;
@@ -29,6 +25,9 @@ import org.apache.shiro.authz.Permission;
 import org.apache.shiro.realm.AuthorizingRealm;
 import org.apache.shiro.subject.PrincipalCollection;
 
+import java.io.Serializable;
+import java.util.Properties;
+
 public class CustomAuthRealm extends AuthorizingRealm {
 
   private static final String REALM_NAME = "CUSTOMAUTHREALM";
@@ -46,18 +45,6 @@ public class CustomAuthRealm extends AuthorizingRealm {
     setAuthenticationTokenClass(GeodeAuthenticationToken.class);
   }
 
-  /**
-   * SecurityManager will be constructed and initialized with the provided security properties.
-   *
-   * @param authenticatorFactory name of the SecurityManager implementation to construct
-   * @param securityProperties the security properties to initialize SecurityManager with
-   */
-  public CustomAuthRealm(String authenticatorFactory, Properties securityProperties) {
-    this.securityManager = CallbackInstantiator.getObjectOfTypeFromClassName(authenticatorFactory,
-        SecurityManager.class);
-    this.securityManager.init(securityProperties);
-  }
-
   @Override
   protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token)
       throws AuthenticationException {

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/shiro/RealmInitializer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/RealmInitializer.java b/geode-core/src/main/java/org/apache/geode/internal/security/shiro/RealmInitializer.java
deleted file mode 100644
index 978c4dd..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/RealmInitializer.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security.shiro;
-
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.security.SecurityManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.mgt.DefaultSecurityManager;
-import org.apache.shiro.realm.Realm;
-import org.apache.shiro.session.mgt.DefaultSessionManager;
-import org.apache.shiro.session.mgt.SessionManager;
-
-public class RealmInitializer {
-  private static Logger logger = LogService.getLogger(LogService.SECURITY_LOGGER_NAME);
-
-  public RealmInitializer() {
-    // nothing
-  }
-
-  public void initialize(final SecurityManager securityManager) {
-    Realm realm = new CustomAuthRealm(securityManager);
-    DefaultSecurityManager shiroManager = new DefaultSecurityManager(realm);
-    SecurityUtils.setSecurityManager(shiroManager);
-    increaseShiroGlobalSessionTimeout(shiroManager);
-  }
-
-  private void increaseShiroGlobalSessionTimeout(final DefaultSecurityManager shiroManager) {
-    SessionManager sessionManager = shiroManager.getSessionManager();
-    if (DefaultSessionManager.class.isInstance(sessionManager)) {
-      DefaultSessionManager defaultSessionManager = (DefaultSessionManager) sessionManager;
-      defaultSessionManager.setGlobalSessionTimeout(Long.MAX_VALUE);
-      long value = defaultSessionManager.getGlobalSessionTimeout();
-      if (value != Long.MAX_VALUE) {
-        logger.error("Unable to set Shiro Global Session Timeout. Current value is '{}'.", value);
-      }
-    } else {
-      logger.error("Unable to set Shiro Global Session Timeout. Current SessionManager is '{}'.",
-          sessionManager == null ? "null" : sessionManager.getClass());
-    }
-  }
-}


[20/24] geode git commit: GEODE-2301 Doc note to deprecate Geode JTA trans mgr

Posted by je...@apache.org.
GEODE-2301 Doc note to deprecate Geode JTA trans mgr

    This closes #581


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

Branch: refs/heads/feature/GEODE-3071
Commit: 42350f1ac3a5cac92f60284863a9d704097b5288
Parents: 5546a87
Author: Karen Miller <km...@pivotal.io>
Authored: Thu Jun 15 10:39:44 2017 -0700
Committer: Karen Miller <km...@pivotal.io>
Committed: Fri Jun 16 09:42:35 2017 -0700

----------------------------------------------------------------------
 geode-docs/developing/transactions/JTA_transactions.html.md.erb | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/42350f1a/geode-docs/developing/transactions/JTA_transactions.html.md.erb
----------------------------------------------------------------------
diff --git a/geode-docs/developing/transactions/JTA_transactions.html.md.erb b/geode-docs/developing/transactions/JTA_transactions.html.md.erb
index 3164dce..ffb6082 100644
--- a/geode-docs/developing/transactions/JTA_transactions.html.md.erb
+++ b/geode-docs/developing/transactions/JTA_transactions.html.md.erb
@@ -190,6 +190,7 @@ See [JCA Resource Adapter Example](jca_adapter_example.html#concept_swv_z2p_wk)
 ## <a id="concept_8567sdkbigige" class="no-quick-link"></a>Using Geode as the JTA Transaction Manager
 
 You can also use Geode as the JTA transaction manager.
+As of Geode 1.2, Geode's JTA transaction manager is deprecated.
 
 Geode ships with its own implementation of a JTA transaction manager. However, note that this implementation is not XA-compliant; therefore, it does not persist any state, which could lead to an inconsistent state after recovering a crashed member.
 


[13/24] geode git commit: GEODE-3060: Introduce JUnit rule for testing the fully-assembled GFSH

Posted by je...@apache.org.
GEODE-3060: Introduce JUnit rule for testing the fully-assembled GFSH


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

Branch: refs/heads/feature/GEODE-3071
Commit: d9869ffd5b317c9e577f3ee2107a8d4bf46a166d
Parents: b616e80
Author: Jared Stewart <js...@pivotal.io>
Authored: Wed Jun 7 20:44:56 2017 -0700
Committer: Jared Stewart <js...@pivotal.io>
Committed: Wed Jun 14 11:18:36 2017 -0700

----------------------------------------------------------------------
 .../cli/commands/StatusLocatorRealGfshTest.java |  50 ++++++++
 .../geode/test/dunit/rules/gfsh/GfshRule.java   | 116 +++++++++++++++++
 .../geode/test/dunit/rules/gfsh/GfshScript.java | 124 +++++++++++++++++++
 3 files changed, 290 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/d9869ffd/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java
new file mode 100644
index 0000000..82ee240
--- /dev/null
+++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java
@@ -0,0 +1,50 @@
+/*
+ * 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.management.internal.cli.commands;
+
+import org.apache.geode.test.dunit.rules.gfsh.GfshRule;
+import org.apache.geode.test.dunit.rules.gfsh.GfshScript;
+import org.apache.geode.test.junit.categories.DistributedTest;
+import org.apache.geode.test.junit.categories.IntegrationTest;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.concurrent.TimeUnit;
+
+@Category(DistributedTest.class)
+public class StatusLocatorRealGfshTest {
+  @Rule
+  public GfshRule gfshRule = new GfshRule();
+
+  @Test
+  public void statusLocatorSucceedsWhenConnected() throws Exception {
+    gfshRule.execute(GfshScript.of("start locator --name=locator1").awaitAtMost(1, TimeUnit.MINUTES)
+        .expectExitCode(0));
+
+    gfshRule.execute(GfshScript.of("connect", "status locator --name=locator1")
+        .awaitAtMost(1, TimeUnit.MINUTES).expectExitCode(0));
+  }
+
+  @Test
+  public void statusLocatorFailsWhenNotConnected() throws Exception {
+    gfshRule.execute(GfshScript.of("start locator --name=locator1").awaitAtMost(1, TimeUnit.MINUTES)
+        .expectExitCode(0));
+
+    gfshRule.execute(GfshScript.of("status locator --name=locator1")
+        .awaitAtMost(1, TimeUnit.MINUTES).expectExitCode(1));
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/d9869ffd/geode-assembly/src/test/java/org/apache/geode/test/dunit/rules/gfsh/GfshRule.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/test/dunit/rules/gfsh/GfshRule.java b/geode-assembly/src/test/java/org/apache/geode/test/dunit/rules/gfsh/GfshRule.java
new file mode 100644
index 0000000..8109377
--- /dev/null
+++ b/geode-assembly/src/test/java/org/apache/geode/test/dunit/rules/gfsh/GfshRule.java
@@ -0,0 +1,116 @@
+/*
+ * 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.test.dunit.rules.gfsh;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Predicate;
+
+import org.junit.rules.ExternalResource;
+import org.junit.rules.TemporaryFolder;
+
+import org.apache.geode.management.internal.cli.commands.StatusLocatorRealGfshTest;
+import org.apache.geode.test.dunit.rules.RequiresGeodeHome;
+
+/**
+ * The {@code GfshRule} allows a test to execute Gfsh commands via the actual (fully-assembled) gfsh
+ * binaries. For a usage example, see {@link StatusLocatorRealGfshTest}. Each call to
+ * {@link GfshRule#execute(GfshScript)} will invoke the given gfsh script in a forked JVM. The
+ * {@link GfshRule#after()} method will attempt to clean up all forked JVMs.
+ */
+public class GfshRule extends ExternalResource {
+  private TemporaryFolder temporaryFolder = new TemporaryFolder();
+  private List<Process> processes = new ArrayList<>();
+  private Path gfsh;
+
+  public Process execute(String... commands) {
+    return execute(GfshScript.of(commands));
+  }
+
+  public Process execute(GfshScript gfshScript) {
+    Process process;
+    try {
+      process = gfshScript.toProcessBuilder(gfsh, temporaryFolder.getRoot()).start();
+    } catch (IOException e) {
+      throw new RuntimeException(e);
+    }
+
+    processes.add(process);
+    gfshScript.awaitIfNecessary(process);
+
+    return process;
+  }
+
+  @Override
+  protected void before() throws IOException {
+    gfsh = new RequiresGeodeHome().getGeodeHome().toPath().resolve("bin/gfsh");
+    assertThat(gfsh).exists();
+
+    temporaryFolder.create();
+  }
+
+  /**
+   * Attempts to stop any started servers/locators via pid file and tears down any remaining gfsh
+   * JVMs.
+   */
+  @Override
+  protected void after() {
+    stopMembersQuietly();
+    processes.forEach(Process::destroyForcibly);
+    processes.forEach((Process process) -> {
+      try {
+        // Process.destroyForcibly() may not terminate immediately
+        process.waitFor(1, TimeUnit.MINUTES);
+      } catch (InterruptedException ignore) {
+        // We ignore this exception so that we still attempt the rest of the cleanup.
+      }
+    });
+    temporaryFolder.delete();
+  }
+
+  private void stopMembersQuietly() {
+    File[] directories = temporaryFolder.getRoot().listFiles(File::isDirectory);
+
+    Predicate<File> isServerDir = (File directory) -> Arrays.stream(directory.list())
+        .anyMatch(filename -> filename.endsWith("server.pid"));
+
+    Predicate<File> isLocatorDir = (File directory) -> Arrays.stream(directory.list())
+        .anyMatch(filename -> filename.endsWith("locator.pid"));
+
+    Arrays.stream(directories).filter(isServerDir).forEach(this::stopServerInDir);
+    Arrays.stream(directories).filter(isLocatorDir).forEach(this::stopLocatorInDir);
+  }
+
+  private void stopServerInDir(File dir) {
+    GfshScript stopServerScript = new GfshScript("stop server --dir=" + dir.getAbsolutePath())
+        .awaitQuietlyAtMost(1, TimeUnit.MINUTES);
+
+    execute(stopServerScript);
+  }
+
+  private void stopLocatorInDir(File dir) {
+    GfshScript stopServerScript = new GfshScript("stop locator --dir=" + dir.getAbsolutePath())
+        .awaitQuietlyAtMost(1, TimeUnit.MINUTES);
+
+    execute(stopServerScript);
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/d9869ffd/geode-assembly/src/test/java/org/apache/geode/test/dunit/rules/gfsh/GfshScript.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/test/dunit/rules/gfsh/GfshScript.java b/geode-assembly/src/test/java/org/apache/geode/test/dunit/rules/gfsh/GfshScript.java
new file mode 100644
index 0000000..3ee1402
--- /dev/null
+++ b/geode-assembly/src/test/java/org/apache/geode/test/dunit/rules/gfsh/GfshScript.java
@@ -0,0 +1,124 @@
+/*
+ * 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.test.dunit.rules.gfsh;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.File;
+import java.nio.file.Path;
+import java.util.concurrent.TimeUnit;
+
+public class GfshScript {
+  private final String[] commands;
+  private Integer timeout;
+  private TimeUnit timeoutTimeUnit;
+  private boolean awaitQuietly = false;
+  private Integer expectedExitValue;
+
+  public GfshScript(String... commands) {
+    this.commands = commands;
+  }
+
+  public static GfshScript of(String... commands) {
+    return new GfshScript(commands);
+  }
+
+
+  public GfshScript expectExitCode(int expectedExitCode) {
+    this.expectedExitValue = expectedExitCode;
+
+    return this;
+  }
+
+  /**
+   * Will cause the thread that executes {@link GfshScript#awaitIfNecessary} to wait, if necessary,
+   * until the subprocess executing this Gfsh script has terminated, or the specified waiting time
+   * elapses.
+   * 
+   * @throws RuntimeException if the current thread is interrupted while waiting.
+   * @throws AssertionError if the specified waiting time elapses before the process exits.
+   */
+  public GfshScript awaitAtMost(int timeout, TimeUnit timeUnit) {
+    this.timeout = timeout;
+    this.timeoutTimeUnit = timeUnit;
+
+    return this;
+  }
+
+  /**
+   * Will cause the thread that executes {@link GfshScript#awaitIfNecessary} to wait, if necessary,
+   * until the subprocess executing this Gfsh script has terminated, or the specified waiting time
+   * elapses.
+   */
+  public GfshScript awaitQuietlyAtMost(int timeout, TimeUnit timeUnit) {
+    this.awaitQuietly = true;
+
+    return awaitAtMost(timeout, timeUnit);
+  }
+
+
+  protected ProcessBuilder toProcessBuilder(Path gfshPath, File workingDir) {
+    String[] gfshCommands = new String[commands.length + 1];
+    gfshCommands[0] = gfshPath.toAbsolutePath().toString();
+
+    for (int i = 0; i < commands.length; i++) {
+      gfshCommands[i + 1] = "-e " + commands[i];
+    }
+
+    return new ProcessBuilder(gfshCommands).inheritIO().directory(workingDir);
+  }
+
+  protected void awaitIfNecessary(Process process) {
+    if (shouldAwaitQuietly()) {
+      awaitQuietly(process);
+    } else if (shouldAwaitLoudly()) {
+      awaitLoudly(process);
+    }
+
+    if (expectedExitValue != null) {
+      assertThat(process.exitValue()).isEqualTo(expectedExitValue);
+    }
+  }
+
+  private void awaitQuietly(Process process) {
+    try {
+      process.waitFor(timeout, timeoutTimeUnit);
+    } catch (InterruptedException ignore) {
+      // ignore since we are waiting *quietly*
+    }
+  }
+
+  private void awaitLoudly(Process process) {
+    boolean exited;
+    try {
+      exited = process.waitFor(timeout, timeoutTimeUnit);
+    } catch (InterruptedException e) {
+      throw new RuntimeException(e);
+    }
+    assertThat(exited).isTrue();
+  }
+
+  private boolean shouldAwait() {
+    return timeoutTimeUnit != null;
+  }
+
+  private boolean shouldAwaitQuietly() {
+    return shouldAwait() && awaitQuietly;
+  }
+
+  private boolean shouldAwaitLoudly() {
+    return shouldAwait() && !awaitQuietly;
+  }
+}


[04/24] geode git commit: GEODE-2818: add alias to any command's options that involves "group", "member", "jar" and replace CliString variables with GROUP, MEMBER, JAR, etc.

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
index 2758429..0829495 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
@@ -75,6 +75,13 @@ import java.text.MessageFormat;
  */
 public class CliStrings {
 
+  public static final String GROUP = "group";
+  public static final String GROUPS = "groups";
+  public static final String MEMBER = "member";
+  public static final String MEMBERS = "members";
+  public static final String JAR = "jar";
+  public static final String JARS = "jars";
+
   private static final String LOG_LEVEL_VALUES =
       "Possible values for log-level include: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF.";
 
@@ -301,7 +308,6 @@ public class CliStrings {
       "Alter a region with the given path and configuration.";
   public static final String ALTER_REGION__REGION = "name";
   public static final String ALTER_REGION__REGION__HELP = "Name/Path of the region to be altered.";
-  public static final String ALTER_REGION__GROUP = "group";
   public static final String ALTER_REGION__GROUP__HELP =
       "Group(s) of members on which the region will be altered.";
   public static final String ALTER_REGION__ENTRYEXPIRATIONIDLETIME = "entry-idle-time-expiration";
@@ -384,10 +390,9 @@ public class CliStrings {
   public static final String ALTER_RUNTIME_CONFIG = "alter runtime";
   public static final String ALTER_RUNTIME_CONFIG__HELP =
       "Alter a subset of member or members configuration properties while running.";
-  public static final String ALTER_RUNTIME_CONFIG__MEMBER = "member";
   public static final String ALTER_RUNTIME_CONFIG__MEMBER__HELP =
       "Name/Id of the member in whose configuration will be altered.";
-  public static final String ALTER_RUNTIME_CONFIG__GROUP = "group";
+
   public static final String ALTER_RUNTIME_CONFIG__GROUP__HELP =
       "Group of members whose configuration will be altered.";
   public static final String ALTER_RUNTIME_CONFIG__ARCHIVE__FILE__SIZE__LIMIT =
@@ -481,7 +486,6 @@ public class CliStrings {
   public static final String COMPACT_DISK_STORE__NAME = "name";
   public static final String COMPACT_DISK_STORE__NAME__HELP =
       "Name of the disk store to be compacted.";
-  public static final String COMPACT_DISK_STORE__GROUP = "group";
   public static final String COMPACT_DISK_STORE__GROUP__HELP =
       "Group(s) of members that will perform disk compaction. If no group is specified the disk store will be compacted by all members.";
   public static final String COMPACT_DISK_STORE__DISKSTORE_0_DOESNOT_EXIST =
@@ -657,7 +661,6 @@ public class CliStrings {
   public static final String CREATE_ASYNC_EVENT_QUEUE__LISTENER_PARAM_AND_VALUE = "listener-param";
   public static final String CREATE_ASYNC_EVENT_QUEUE__LISTENER_PARAM_AND_VALUE__HELP =
       "Parameter name for the AsyncEventListener.  Optionally, parameter names may be followed by # and a value for the parameter.  Example: --listener-param=loadAll --listener-param=maxRead#1024";
-  public static final String CREATE_ASYNC_EVENT_QUEUE__GROUP = "group";
   public static final String CREATE_ASYNC_EVENT_QUEUE__GROUP__HELP =
       "Group(s) of members on which queue will be created. If no group is specified the queue will be created on all members.";
   public static final String CREATE_ASYNC_EVENT_QUEUE__ERROR_WHILE_CREATING_REASON_0 =
@@ -701,7 +704,6 @@ public class CliStrings {
   public static final String CREATE_DISK_STORE__DIRECTORY_AND_SIZE = "dir";
   public static final String CREATE_DISK_STORE__DIRECTORY_AND_SIZE__HELP =
       "Directories where the disk store files will be written, the directories will be created if they don't exist.  Optionally, directory names may be followed by # and the maximum number of megabytes that the disk store can use in the directory.  Example: --dir=/data/ds1 --dir=/data/ds2#5000";
-  public static final String CREATE_DISK_STORE__GROUP = "group";
   public static final String CREATE_DISK_STORE__GROUP__HELP =
       "Group(s) of members on which the disk store will be created. If no group is specified the disk store will be created on all members.";
   public static final String CREATE_DISK_STORE__DISK_USAGE_WARNING_PCT =
@@ -727,13 +729,11 @@ public class CliStrings {
   public static final String CREATE_INDEX__REGION = "region";
   public static final String CREATE_INDEX__REGION__HELP =
       "Name/Path of the region which corresponds to the \"from\" clause in a query.";
-  public static final String CREATE_INDEX__MEMBER = "member";
   public static final String CREATE_INDEX__MEMBER__HELP =
       "Name/Id of the member in which the index will be created.";
   public static final String CREATE_INDEX__TYPE = "type";
   public static final String CREATE_INDEX__TYPE__HELP =
       "Type of the index. Valid values are: range, key and hash.";
-  public static final String CREATE_INDEX__GROUP = "group";
   public static final String CREATE_INDEX__GROUP__HELP =
       "Group of members in which the index will be created.";
   public static final String CREATE_INDEX__INVALID__INDEX__TYPE__MESSAGE =
@@ -790,9 +790,7 @@ public class CliStrings {
       "Indexes successfully created. Use list indexes to get details.";
   public static final String CREATE_DEFINED_INDEXES__FAILURE__MSG =
       "Failed to create some or all indexes \"{0}\" due to following reasons";
-  public static final String CREATE_DEFINED_INDEXES__MEMBER = CREATE_INDEX__MEMBER;
   public static final String CREATE_DEFINED_INDEXES__MEMBER__HELP = CREATE_INDEX__MEMBER__HELP;
-  public static final String CREATE_DEFINED_INDEXES__GROUP = CREATE_INDEX__GROUP;
   public static final String CREATE_DEFINED_INDEXES__GROUP__HELP = CREATE_INDEX__GROUP__HELP;
   public static final String CREATE_DEFINED_INDEXES__MEMBER__MSG = CREATE_INDEX__MEMBER__MSG;
   public static final String CREATE_DEFINED_INDEXES__NUMBER__AND__MEMBER =
@@ -815,7 +813,6 @@ public class CliStrings {
   public static final String CREATE_REGION__REGIONSHORTCUT = "type";
   public static final String CREATE_REGION__REGIONSHORTCUT__HELP =
       "Type of region to create. The following types are pre-defined by the product (see RegionShortcut javadocs for more information): PARTITION, PARTITION_REDUNDANT, PARTITION_PERSISTENT, PARTITION_REDUNDANT_PERSISTENT, PARTITION_OVERFLOW, PARTITION_REDUNDANT_OVERFLOW, PARTITION_PERSISTENT_OVERFLOW, PARTITION_REDUNDANT_PERSISTENT_OVERFLOW, PARTITION_HEAP_LRU, PARTITION_REDUNDANT_HEAP_LRU, REPLICATE, REPLICATE_PERSISTENT, REPLICATE_OVERFLOW, REPLICATE_PERSISTENT_OVERFLOW, REPLICATE_HEAP_LRU, LOCAL, LOCAL_PERSISTENT, LOCAL_HEAP_LRU, LOCAL_OVERFLOW, LOCAL_PERSISTENT_OVERFLOW, PARTITION_PROXY, PARTITION_PROXY_REDUNDANT, and REPLICATE_PROXY.";
-  public static final String CREATE_REGION__GROUP = "group";
   public static final String CREATE_REGION__GROUP__HELP =
       "Group(s) of members on which the region will be created.";
   public static final String CREATE_REGION__USEATTRIBUTESFROM = "template-region";
@@ -1069,17 +1066,14 @@ public class CliStrings {
       "Deploy JARs to a member or members.  Only one of either --jar or --dir may be specified.";
   public static final String DEPLOY__DIR = "dir";
   public static final String DEPLOY__DIR__HELP = "Directory from which to deploy the JARs.";
-  public static final String DEPLOY__GROUP = "group";
   public static final String DEPLOY__GROUP__HELP =
       "Group(s) to which the specified JARs will be deployed. If not specified, deploy will occur on all members.";
-  public static final String DEPLOY__JAR = "jar";
   public static final String DEPLOY__JAR__HELP = "Path of the JAR to deploy.";
 
   /* describe config command */
   public static final String DESCRIBE_CONFIG = "describe config";
   public static final String DESCRIBE_CONFIG__HELP =
       "Display configuration details of a member or members.";
-  public static final String DESCRIBE_CONFIG__MEMBER = "member";
   public static final String DESCRIBE_CONFIG__MEMBER__HELP =
       "Name/Id of the member whose configuration will be described.";
   public static final String DESCRIBE_CONFIG__HIDE__DEFAULTS = "hide-defaults";
@@ -1097,7 +1091,6 @@ public class CliStrings {
   public static final String DESCRIBE_DISK_STORE = "describe disk-store";
   public static final String DESCRIBE_DISK_STORE__HELP =
       "Display information about a member's disk store.";
-  public static final String DESCRIBE_DISK_STORE__MEMBER = "member";
   public static final String DESCRIBE_DISK_STORE__MEMBER__HELP =
       "Name/Id of the member with the disk store to be described.";
   public static final String DESCRIBE_DISK_STORE__NAME = "name";
@@ -1182,7 +1175,6 @@ public class CliStrings {
   public static final String DESTROY_DISK_STORE__NAME = "name";
   public static final String DESTROY_DISK_STORE__NAME__HELP =
       "Name of the disk store that will be destroyed.";
-  public static final String DESTROY_DISK_STORE__GROUP = "group";
   public static final String DESTROY_DISK_STORE__GROUP__HELP =
       "Group(s) of members on which the disk store will be destroyed. If no group is specified the disk store will be destroyed on all members.";
   public static final String DESTROY_DISK_STORE__ERROR_WHILE_DESTROYING_REASON_0 =
@@ -1194,10 +1186,8 @@ public class CliStrings {
       "Destroy/Unregister a function. The default is for the function to be unregistered from all members.";
   public static final String DESTROY_FUNCTION__ID = "id";
   public static final String DESTROY_FUNCTION__ID__HELP = "ID of the function.";
-  public static final String DESTROY_FUNCTION__ONGROUPS = "groups";
   public static final String DESTROY_FUNCTION__ONGROUPS__HELP =
       "Groups of members from which this function will be unregistered.";
-  public static final String DESTROY_FUNCTION__ONMEMBER = "member";
   public static final String DESTROY_FUNCTION__ONMEMBER__HELP =
       "Name/Id of the member from which this function will be unregistered.";
   public static final String DESTROY_FUNCTION__MSG__CANNOT_EXECUTE = "Cannot execute";
@@ -1209,13 +1199,11 @@ public class CliStrings {
   public static final String DESTROY_INDEX__HELP = "Destroy/Remove the specified index.";
   public static final String DESTROY_INDEX__NAME = "name";
   public static final String DESTROY_INDEX__NAME__HELP = "Name of the index to remove.";
-  public static final String DESTROY_INDEX__MEMBER = "member";
   public static final String DESTROY_INDEX__MEMBER__HELP =
       "Name/Id of the member from which the index will be removed.";
   public static final String DESTROY_INDEX__REGION = "region";
   public static final String DESTROY_INDEX__REGION__HELP =
       "Name/Path of the region from which the index will be removed.";
-  public static final String DESTROY_INDEX__GROUP = "group";
   public static final String DESTROY_INDEX__GROUP__HELP =
       "Group of members from which the index will be removed.";
   public static final String DESTROY_INDEX__SUCCESS__MSG =
@@ -1290,10 +1278,8 @@ public class CliStrings {
       "Execute the function with the specified ID. By default will execute on all members.";
   public static final String EXECUTE_FUNCTION__ID = "id";
   public static final String EXECUTE_FUNCTION__ID__HELP = "ID of the function to execute.";
-  public static final String EXECUTE_FUNCTION__ONGROUPS = "groups";
   public static final String EXECUTE_FUNCTION__ONGROUPS__HELP =
       "Groups of members on which the function will be executed.";
-  public static final String EXECUTE_FUNCTION__ONMEMBER = "member";
   public static final String EXECUTE_FUNCTION__ONMEMBER__HELP =
       "Name/Id of the member on which the function will be executed.";
   public static final String EXECUTE_FUNCTION__ONREGION = "region";
@@ -1358,10 +1344,8 @@ public class CliStrings {
   public static final String EXPORT_CONFIG = "export config";
   public static final String EXPORT_CONFIG__HELP =
       "Export configuration properties for a member or members.";
-  public static final String EXPORT_CONFIG__GROUP = "group";
   public static final String EXPORT_CONFIG__GROUP__HELP =
       "Group(s) of members whose configuration will be exported.";
-  public static final String EXPORT_CONFIG__MEMBER = "member";
   public static final String EXPORT_CONFIG__MEMBER__HELP =
       "Name/Id of the member(s) whose configuration will be exported.";
   public static final String EXPORT_CONFIG__DIR = "dir";
@@ -1384,7 +1368,6 @@ public class CliStrings {
   public static final String EXPORT_DATA__FILE = "file";
   public static final String EXPORT_DATA__FILE__HELP =
       "File to which the exported data will be written. The file must have an extension of \".gfd\".";
-  public static final String EXPORT_DATA__MEMBER = "member";
   public static final String EXPORT_DATA__MEMBER__HELP =
       "Name/Id of a member which hosts the region. The data will be exported to the specified file on the host where the member is running.";
   public static final String EXPORT_DATA__MEMBER__NOT__FOUND = "Member {0} not found";
@@ -1398,10 +1381,8 @@ public class CliStrings {
   public static final String EXPORT_LOGS__DIR = "dir";
   public static final String EXPORT_LOGS__DIR__HELP =
       "Directory to which logs will be written.  This refers to a local directory when exporting logs using an http connection, but refers to the filesystem of the manager when connected via JMX. If not specified, logs are written to the location specified by the user.dir system property.";
-  public static final String EXPORT_LOGS__MEMBER = "member";
   public static final String EXPORT_LOGS__MEMBER__HELP =
       "Name/Id of the member whose log files will be exported.";
-  public static final String EXPORT_LOGS__GROUP = "group";
   public static final String EXPORT_LOGS__GROUP__HELP =
       "Group of members whose log files will be exported.";
   public static final String EXPORT_LOGS__MSG__CANNOT_EXECUTE = "Cannot execute";
@@ -1451,10 +1432,8 @@ public class CliStrings {
   public static final String EXPORT_STACKTRACE = "export stack-traces";
   public static final String EXPORT_STACKTRACE__HELP =
       "Export the stack trace for a member or members.";
-  public static final String EXPORT_STACKTRACE__MEMBER = "member";
   public static final String EXPORT_STACKTRACE__MEMBER__HELP =
       "Name/Id of the member whose stack trace will be exported.";
-  public static final String EXPORT_STACKTRACE__GROUP = "group";
   public static final String EXPORT_STACKTRACE__GROUP__HELP =
       "Group of members whose stack trace will be exported.";
   public static final String EXPORT_STACKTRACE_ALL_STACKS = "all-stacks";
@@ -1480,10 +1459,8 @@ public class CliStrings {
   public static final String GC = "gc";
   public static final String GC__HELP =
       "Force GC (Garbage Collection) on a member or members. The default is for garbage collection to occur on all caching members.";
-  public static final String GC__MEMBER = "member";
   public static final String GC__MEMBER__HELP =
       "Name/Id of the member on which garbage collection will be done.";
-  public static final String GC__GROUP = "group";
   public static final String GC__GROUP__HELP =
       "Group(s) of members on which garbage collection will be done.";
   public static final String GC__MSG__MEMBER_NOT_FOUND = "Member not found";
@@ -1571,7 +1548,6 @@ public class CliStrings {
   public static final String IMPORT_DATA__FILE = "file";
   public static final String IMPORT_DATA__FILE__HELP =
       "File from which the imported data will be read. The file must have an extension of \".gfd\".";
-  public static final String IMPORT_DATA__MEMBER = "member";
   public static final String IMPORT_DATA__MEMBER__HELP =
       "Name/Id of a member which hosts the region. The data will be imported from the specified file on the host where the member is running.";
   public static final String IMPORT_DATA__MEMBER__NOT__FOUND = "Member {0} not found.";
@@ -1647,7 +1623,6 @@ public class CliStrings {
   public static final String LIST_DEPLOYED = "list deployed";
   public static final String LIST_DEPLOYED__HELP =
       "Display a list of JARs that were deployed to members using the \"deploy\" command.";
-  public static final String LIST_DEPLOYED__GROUP = "group";
   public static final String LIST_DEPLOYED__GROUP__HELP =
       "Group(s) of members for which deployed JARs will be displayed.  If not specified, JARs for all members will be displayed.";
   public static final String LIST_DEPLOYED__NO_JARS_FOUND_MESSAGE = "No JAR Files Found";
@@ -1659,10 +1634,8 @@ public class CliStrings {
   public static final String LIST_FUNCTION__MATCHES = "matches";
   public static final String LIST_FUNCTION__MATCHES__HELP =
       "Pattern that the function ID must match in order to be included. Uses Java pattern matching rules, not UNIX. For example, to match any character any number of times use \".*\" instead of \"*\".";
-  public static final String LIST_FUNCTION__GROUP = "group";
   public static final String LIST_FUNCTION__GROUP__HELP =
       "Group(s) of members for which functions will be displayed.";
-  public static final String LIST_FUNCTION__MEMBER = "member";
   public static final String LIST_FUNCTION__MEMBER__HELP =
       "Name/Id of the member(s) for which functions will be displayed.";
   public static final String LIST_FUNCTION__NO_FUNCTIONS_FOUND_ERROR_MESSAGE = "No Functions Found";
@@ -1670,10 +1643,8 @@ public class CliStrings {
   public static final String LIST_GATEWAY = "list gateways";
   public static final String LIST_GATEWAY__HELP =
       "Display the Gateway Senders and Receivers for a member or members.";
-  public static final String LIST_GATEWAY__GROUP = "group";
   public static final String LIST_GATEWAY__GROUP__HELP =
       "Group(s) of members for which Gateway Senders and Receivers will be displayed.";
-  public static final String LIST_GATEWAY__MEMBER = "member";
   public static final String LIST_GATEWAY__MEMBER__HELP =
       "Member(s) for which Gateway Senders and Receivers will be displayed.";
   /* list index */
@@ -1698,7 +1669,6 @@ public class CliStrings {
   /* 'list member' command */
   public static final String LIST_MEMBER = "list members";
   public static final String LIST_MEMBER__HELP = "Display all or a subset of members.";
-  public static final String LIST_MEMBER__GROUP = "group";
   public static final String LIST_MEMBER__GROUP__HELP =
       "Group name for which members will be displayed.";
   public static final String LIST_MEMBER__MSG__NO_MEMBER_FOUND = NO_MEMBERS_FOUND_MESSAGE;
@@ -1706,10 +1676,8 @@ public class CliStrings {
   /* 'list region' command */
   public static final String LIST_REGION = "list regions";
   public static final String LIST_REGION__HELP = "Display regions of a member or members.";
-  public static final String LIST_REGION__GROUP = "group";
   public static final String LIST_REGION__GROUP__HELP =
       "Group of members for which regions will be displayed.";
-  public static final String LIST_REGION__MEMBER = "member";
   public static final String LIST_REGION__MEMBER__HELP =
       "Name/Id of the member for which regions will be displayed.";
   public static final String LIST_REGION__MSG__NOT_FOUND = "No Regions Found";
@@ -1755,10 +1723,8 @@ public class CliStrings {
   public static final String NETSTAT = "netstat";
   public static final String NETSTAT__HELP =
       "Report network information and statistics via the \"netstat\" operating system command.";
-  public static final String NETSTAT__MEMBER = "member";
   public static final String NETSTAT__MEMBER__HELP =
       "Name/Id of the member(s) on which to run the netstat command.";
-  public static final String NETSTAT__GROUP = "group";
   public static final String NETSTAT__GROUP__HELP =
       "Group of members on which to run the netstat command.";
   public static final String NETSTAT__FILE = "file";
@@ -1784,9 +1750,7 @@ public class CliStrings {
 
   /* pause gateway-sender */
   public static final String PAUSE_GATEWAYSENDER = "pause gateway-sender";
-  public static final String PAUSE_GATEWAYSENDER__ID = "id";;
-  public static final String PAUSE_GATEWAYSENDER__MEMBER = "member";
-  public static final String PAUSE_GATEWAYSENDER__GROUP = "group";
+  public static final String PAUSE_GATEWAYSENDER__ID = "id";
   public static final String PAUSE_GATEWAYSENDER__HELP =
       "Pause the Gateway Sender on a member or members.";
   public static final String PAUSE_GATEWAYSENDER__ID__HELP = "ID of the Gateway Sender.";
@@ -1938,9 +1902,7 @@ public class CliStrings {
 
   /* resume gateway-sender */
   public static final String RESUME_GATEWAYSENDER = "resume gateway-sender";
-  public static final String RESUME_GATEWAYSENDER__ID = "id";;
-  public static final String RESUME_GATEWAYSENDER__MEMBER = "member";
-  public static final String RESUME_GATEWAYSENDER__GROUP = "group";
+  public static final String RESUME_GATEWAYSENDER__ID = "id";
   public static final String RESUME_GATEWAYSENDER__HELP =
       "Resume the Gateway Sender on a member or members.";
   public static final String RESUME_GATEWAYSENDER__ID__HELP = "ID of the Gateway Sender.";
@@ -1977,7 +1939,7 @@ public class CliStrings {
       "Set GFSH variables that can be used by commands. "
           + "For example: if variable \"CACHE_SERVERS_GROUP\" is set then to use it with \""
           + CliStrings.LIST_MEMBER + "\", use \"" + CliStrings.LIST_MEMBER + " --"
-          + CliStrings.LIST_MEMBER__GROUP + "=${CACHE_SERVERS_GROUP}\". "
+          + CliStrings.GROUP + "=${CACHE_SERVERS_GROUP}\". "
           + "The \"echo\" command can be used to know the value of a variable.";
   public static final String SET_VARIABLE__VAR = "name";
   public static final String SET_VARIABLE__VAR__HELP =
@@ -2029,7 +1991,6 @@ public class CliStrings {
   /* Show Log command */
   public static final String SHOW_LOG = "show log";
   public static final String SHOW_LOG_HELP = "Display the log for a member.";
-  public static final String SHOW_LOG_MEMBER = "member";
   public static final String SHOW_LOG_MEMBER_HELP =
       "Name/Id of the member whose log file will be displayed.";
   public static final String SHOW_LOG_LINE_NUM = "lines";
@@ -2047,7 +2008,6 @@ public class CliStrings {
   public static final String SHOW_METRICS__REGION = "region";
   public static final String SHOW_METRICS__REGION__HELP =
       "Name/Path of the region whose metrics will be displayed/exported.";
-  public static final String SHOW_METRICS__MEMBER = "member";
   public static final String SHOW_METRICS__MEMBER__HELP =
       "Name/Id of the member whose metrics will be displayed/exported.";
   public static final String SHOW_METRICS__CATEGORY = "categories";
@@ -2112,10 +2072,8 @@ public class CliStrings {
   public static final String CHANGE_LOGLEVEL = "change loglevel";
   public static final String CHANGE_LOGLEVEL__HELP =
       "This command changes log-level run time on specified servers.";
-  public static final String CHANGE_LOGLEVEL__GROUPS = "groups";
   public static final String CHANGE_LOGLEVEL__GROUPS__HELP =
       "Groups of members to change the log-level";
-  public static final String CHANGE_LOGLEVEL__MEMBER = "members";
   public static final String CHANGE_LOGLEVEL__MEMBER__HELP =
       "Name/Id of the member to change the log-level";
   public static final String CHANGE_LOGLEVEL__LOGLEVEL = "loglevel";
@@ -2143,10 +2101,8 @@ public class CliStrings {
   public static final String CREATE_GATEWAYRECEIVER = "create gateway-receiver";
   public static final String CREATE_GATEWAYRECEIVER__HELP =
       "Create the Gateway Receiver on a member or members.";
-  public static final String CREATE_GATEWAYRECEIVER__GROUP = "group";
   public static final String CREATE_GATEWAYRECEIVER__GROUP__HELP =
       "Group(s) of members on which to create the Gateway Receiver.";
-  public static final String CREATE_GATEWAYRECEIVER__MEMBER = "member";
   public static final String CREATE_GATEWAYRECEIVER__MEMBER__HELP =
       "Name/Id of the member on which to create the Gateway Receiver.";
   public static final String CREATE_GATEWAYRECEIVER__STARTPORT = "start-port";
@@ -2178,8 +2134,6 @@ public class CliStrings {
 
   /* start gateway-receiver */
   public static final String START_GATEWAYRECEIVER = "start gateway-receiver";
-  public static final String START_GATEWAYRECEIVER__MEMBER = "member";
-  public static final String START_GATEWAYRECEIVER__GROUP = "group";
   public static final String START_GATEWAYRECEIVER__HELP =
       "Start the Gateway Receiver on a member or members.";
   public static final String START_GATEWAYRECEIVER__GROUP__HELP =
@@ -2191,10 +2145,8 @@ public class CliStrings {
   public static final String CREATE_GATEWAYSENDER = "create gateway-sender";
   public static final String CREATE_GATEWAYSENDER__HELP =
       "Create the Gateway Sender on a member or members.";
-  public static final String CREATE_GATEWAYSENDER__GROUP = "group";
   public static final String CREATE_GATEWAYSENDER__GROUP__HELP =
       "Group(s) of members on which to create the Gateway Sender.";
-  public static final String CREATE_GATEWAYSENDER__MEMBER = "member";
   public static final String CREATE_GATEWAYSENDER__MEMBER__HELP =
       "Name/Id of the member on which to create the Gateway Sender.";
   public static final String CREATE_GATEWAYSENDER__ID = "id";
@@ -2266,10 +2218,8 @@ public class CliStrings {
       "Start the Gateway Sender on a member or members.";
   public static final String START_GATEWAYSENDER__ID = "id";
   public static final String START_GATEWAYSENDER__ID__HELP = "ID of the Gateway Sender.";
-  public static final String START_GATEWAYSENDER__GROUP = "group";
   public static final String START_GATEWAYSENDER__GROUP__HELP =
       "Group(s) of members on which to start the Gateway Sender.";
-  public static final String START_GATEWAYSENDER__MEMBER = "member";
   public static final String START_GATEWAYSENDER__MEMBER__HELP =
       "Name/Id of the member on which to start the Gateway Sender.";
 
@@ -2278,10 +2228,8 @@ public class CliStrings {
   public static final String DESTROY_GATEWAYSENDER = "destroy gateway-sender";
   public static final String DESTROY_GATEWAYSENDER__HELP =
       "Destroy the Gateway Sender on a member or members.";
-  public static final String DESTROY_GATEWAYSENDER__GROUP = "group";
   public static final String DESTROY_GATEWAYSENDER__GROUP__HELP =
       "Group(s) of members on which to destroy the Gateway Sender.";
-  public static final String DESTROY_GATEWAYSENDER__MEMBER = "member";
   public static final String DESTROY_GATEWAYSENDER__MEMBER__HELP =
       "Name/Id of the member on which to destroy the Gateway Sender.";
   public static final String DESTROY_GATEWAYSENDER__ID = "id";
@@ -2363,7 +2311,6 @@ public class CliStrings {
   public static final String START_LOCATOR__FORCE = "force";
   public static final String START_LOCATOR__FORCE__HELP =
       "Whether to allow the PID file from a previous Locator run to be overwritten.";
-  public static final String START_LOCATOR__GROUP = "group";
   public static final String START_LOCATOR__GROUP__HELP = "Group(s) the Locator will be a part of.";
   public static final String START_LOCATOR__HOSTNAME_FOR_CLIENTS = "hostname-for-clients";
 
@@ -2461,7 +2408,6 @@ public class CliStrings {
   public static final String START_MANAGER__BIND_ADDRESS = "bind-address";
   public static final String START_MANAGER__BIND_ADDRESS__HELP =
       "IP address the Manager listen on for JMX-RMI client connections. The default is to bind to all local addresses.";
-  public static final String START_MANAGER__GROUP = "group";
   public static final String START_MANAGER__GROUP__HELP =
       "Group(s) this Manager will be a part of.";
   public static final String START_MANAGER__MAXHEAP = "max-heap";
@@ -2508,7 +2454,6 @@ public class CliStrings {
   public static final String START_SERVER__FORCE = "force";
   public static final String START_SERVER__FORCE__HELP =
       "Whether to allow the PID file from a previous Cache Server run to be overwritten.";
-  public static final String START_SERVER__GROUP = "group";
   public static final String START_SERVER__GROUP__HELP =
       "Group(s) the Cache Server will be a part of.";
   public static final String START_SERVER__INCLUDE_SYSTEM_CLASSPATH = "include-system-classpath";
@@ -2705,10 +2650,8 @@ public class CliStrings {
   public static final String STATUS_GATEWAYRECEIVER = "status gateway-receiver";
   public static final String STATUS_GATEWAYRECEIVER__HELP =
       "Display the status of a Gateway Receiver.";
-  public static final String STATUS_GATEWAYRECEIVER__GROUP = "group";
   public static final String STATUS_GATEWAYRECEIVER__GROUP__HELP =
       "Group(s) of Gateway Receivers for which to display status.";
-  public static final String STATUS_GATEWAYRECEIVER__MEMBER = "member";
   public static final String STATUS_GATEWAYRECEIVER__MEMBER__HELP =
       "Name/Id of the Gateway Receiver for which to display status.";
 
@@ -2717,10 +2660,8 @@ public class CliStrings {
   public static final String STATUS_GATEWAYSENDER__HELP = "Display the status of a Gateway Sender.";
   public static final String STATUS_GATEWAYSENDER__ID = "id";
   public static final String STATUS_GATEWAYSENDER__ID__HELP = "ID of the Gateway Sender.";
-  public static final String STATUS_GATEWAYSENDER__GROUP = "group";
   public static final String STATUS_GATEWAYSENDER__GROUP__HELP =
       "Group(s) of Gateway Senders for which to display status.";
-  public static final String STATUS_GATEWAYSENDER__MEMBER = "member";
   public static final String STATUS_GATEWAYSENDER__MEMBER__HELP =
       "Name/Id of the Gateway Sender for which to display status.";
 
@@ -2767,8 +2708,6 @@ public class CliStrings {
 
   /* stop gateway-reciver */
   public static final String STOP_GATEWAYRECEIVER = "stop gateway-receiver";
-  public static final String STOP_GATEWAYRECEIVER__MEMBER = "member";
-  public static final String STOP_GATEWAYRECEIVER__GROUP = "group";
   public static final String STOP_GATEWAYRECEIVER__HELP =
       "Stop the Gateway Receiver on a member or members.";
   public static final String STOP_GATEWAYRECEIVER__GROUP__HELP =
@@ -2778,9 +2717,7 @@ public class CliStrings {
 
   /* stop gateway-sender */
   public static final String STOP_GATEWAYSENDER = "stop gateway-sender";
-  public static final String STOP_GATEWAYSENDER__ID = "id";;
-  public static final String STOP_GATEWAYSENDER__MEMBER = "member";
-  public static final String STOP_GATEWAYSENDER__GROUP = "group";
+  public static final String STOP_GATEWAYSENDER__ID = "id";
   public static final String STOP_GATEWAYSENDER__HELP =
       "Stop the Gateway Sender on a member or members.";
   public static final String STOP_GATEWAYSENDER__ID__HELP = "ID of the Gateway Sender.";
@@ -2840,10 +2777,8 @@ public class CliStrings {
   /* undeploy command */
   public static final String UNDEPLOY = "undeploy";
   public static final String UNDEPLOY__HELP = "Undeploy JARs from a member or members.";
-  public static final String UNDEPLOY__GROUP = "group";
   public static final String UNDEPLOY__GROUP__HELP =
       "Group(s) of members from which to undeploy JARs. If not specified, undeploy will occur on all members.";
-  public static final String UNDEPLOY__JAR = "jar";
   public static final String UNDEPLOY__JAR__HELP =
       "JAR(s) to be undeployed.  If not specified, all JARs will be undeployed.";
   public static final String UNDEPLOY__NO_JARS_FOUND_MESSAGE = "No JAR Files Found";
@@ -3006,10 +2941,8 @@ public class CliStrings {
       "The id used to identify the durable client";
   public static final String LIST_DURABLE_CQS__HELP =
       "List durable client cqs associated with the specified durable client id.";
-  public static final String LIST_DURABLE_CQS__MEMBER = "member";
   public static final String LIST_DURABLE_CQS__MEMBER__HELP =
       "Name/Id of the member for which the durable client is registered and durable cqs will be displayed.";
-  public static final String LIST_DURABLE_CQS__GROUP = "group";
   public static final String LIST_DURABLE_CQS__GROUP__HELP =
       "Group of members for which the durable client is registered and durable cqs will be displayed.";
   public static final String LIST_DURABLE_CQS__NO__CQS__FOR__CLIENT =
@@ -3035,10 +2968,8 @@ public class CliStrings {
   public static final String CLOSE_DURABLE_CQS__DURABLE__CLIENT__ID = DURABLE_CLIENT_ID;
   public static final String CLOSE_DURABLE_CQS__DURABLE__CLIENT__ID__HELP =
       "The id of the durable client";
-  public static final String CLOSE_DURABLE_CQS__MEMBER = "member";
   public static final String CLOSE_DURABLE_CQS__MEMBER__HELP =
       "Name/Id of the member for which the durable client is registered and the cq to be closed.";
-  public static final String CLOSE_DURABLE_CQS__GROUP = "group";
   public static final String CLOSE_DURABLE_CQS__GROUP__HELP =
       "Group of members for which the durable client is registered and the cq to be closed.";
   public static final String CLOSE_DURABLE_CQS__FAILURE__HEADER =
@@ -3055,10 +2986,8 @@ public class CliStrings {
   public static final String CLOSE_DURABLE_CLIENTS__CLIENT__ID = DURABLE_CLIENT_ID;
   public static final String CLOSE_DURABLE_CLIENTS__CLIENT__ID__HELP =
       "The id used to identify the durable client.";
-  public static final String CLOSE_DURABLE_CLIENTS__MEMBER = "member";
   public static final String CLOSE_DURABLE_CLIENTS__MEMBER__HELP =
       "Name/Id of the member for which the durable client is to be closed.";
-  public static final String CLOSE_DURABLE_CLIENTS__GROUP = "group";
   public static final String CLOSE_DURABLE_CLIENTS__GROUP__HELP =
       "Group of members for which the durable client is to be closed.";
   public static final String CLOSE_DURABLE_CLIENTS__FAILURE__HEADER =
@@ -3075,10 +3004,8 @@ public class CliStrings {
   public static final String COUNT_DURABLE_CQ_EVENTS__DURABLE__CQ__NAME = "durable-cq-name";
   public static final String COUNT_DURABLE_CQ_EVENTS__DURABLE__CQ__NAME__HELP =
       "The name that identifies the cq.";
-  public static final String COUNT_DURABLE_CQ_EVENTS__MEMBER = "member";
   public static final String COUNT_DURABLE_CQ_EVENTS__MEMBER__HELP =
       "Name/Id of the member for which the subscription events are to be counted.";
-  public static final String COUNT_DURABLE_CQ_EVENTS__GROUP = "group";
   public static final String COUNT_DURABLE_CQ_EVENTS__GROUP__HELP =
       "Group of members for which the subscription queue events are to be counted.";
   public static final String COUNT_DURABLE_CQ_EVENTS__DURABLE_CLIENT_NOT_FOUND =
@@ -3230,6 +3157,8 @@ public class CliStrings {
   public static final String START_SERVER__MSG__PASSWORD_MUST_BE_SPECIFIED =
       "password must be specified.";
 
+
+
   /**
    * Creates a MessageFormat with the given pattern and uses it to format the given argument.
    *

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/ConfigCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/ConfigCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/ConfigCommandsController.java
index 25d0cc3..9f06ea3 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/ConfigCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/ConfigCommandsController.java
@@ -53,10 +53,8 @@ public class ConfigCommandsController extends AbstractMultiPartCommandsControlle
   @RequestMapping(method = RequestMethod.POST, value = "/config")
   @ResponseBody
   public String alterRuntime(
-      @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__GROUP,
-          required = false) final String group,
-      @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__MEMBER,
-          required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String group,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
       @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__DISK__SPACE__LIMIT,
           required = false) final Integer archiveDiskSpaceLimit,
       @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__FILE__SIZE__LIMIT,
@@ -86,11 +84,11 @@ public class ConfigCommandsController extends AbstractMultiPartCommandsControlle
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG);
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     if (hasValue(group)) {
-      command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__GROUP, group);
+      command.addOption(CliStrings.GROUP, group);
     }
 
     if (hasValue(archiveDiskSpaceLimit)) {
@@ -166,7 +164,7 @@ public class ConfigCommandsController extends AbstractMultiPartCommandsControlle
           defaultValue = "true") final Boolean hideDefaults) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.DESCRIBE_CONFIG);
 
-    command.addOption(CliStrings.DESCRIBE_CONFIG__MEMBER, decode(memberNameId));
+    command.addOption(CliStrings.MEMBER, decode(memberNameId));
     command.addOption(CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS, String.valueOf(hideDefaults));
 
     return processCommand(command.toString());
@@ -174,22 +172,18 @@ public class ConfigCommandsController extends AbstractMultiPartCommandsControlle
 
   @RequestMapping(method = RequestMethod.GET, value = "/config")
   public Callable<ResponseEntity<String>> exportConfig(
-      @RequestParam(value = CliStrings.EXPORT_CONFIG__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.EXPORT_CONFIG__MEMBER,
-          required = false) final String[] members,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members,
       @RequestParam(value = CliStrings.EXPORT_CONFIG__DIR,
           required = false) final String directory) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.EXPORT_CONFIG);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.EXPORT_CONFIG__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.EXPORT_CONFIG__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(directory)) {

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DataCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DataCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DataCommandsController.java
index ce2ed54..fb63184 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DataCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DataCommandsController.java
@@ -133,7 +133,7 @@ public class DataCommandsController extends AbstractCommandsController {
       @RequestParam(CliStrings.EXPORT_DATA__FILE) final String file) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.EXPORT_DATA);
 
-    command.addOption(CliStrings.EXPORT_DATA__MEMBER, decode(memberNameId));
+    command.addOption(CliStrings.MEMBER, decode(memberNameId));
     command.addOption(CliStrings.EXPORT_DATA__REGION, decode(regionNamePath));
     command.addOption(CliStrings.EXPORT_DATA__FILE, decode(file));
 
@@ -147,7 +147,7 @@ public class DataCommandsController extends AbstractCommandsController {
       @RequestParam(CliStrings.IMPORT_DATA__FILE) final String file) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.IMPORT_DATA);
 
-    command.addOption(CliStrings.IMPORT_DATA__MEMBER, decode(memberNameId));
+    command.addOption(CliStrings.MEMBER, decode(memberNameId));
     command.addOption(CliStrings.IMPORT_DATA__REGION, decode(regionNamePath));
     command.addOption(CliStrings.IMPORT_DATA__FILE, decode(file));
 

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DeployCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DeployCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DeployCommandsController.java
index 35f57ef..23c5083 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DeployCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DeployCommandsController.java
@@ -48,13 +48,12 @@ public class DeployCommandsController extends AbstractMultiPartCommandsControlle
 
   @RequestMapping(method = RequestMethod.GET, value = "/deployed")
   @ResponseBody
-  public String listDeployed(@RequestParam(value = CliStrings.LIST_DEPLOYED__GROUP,
-      required = false) final String[] groups) {
+  public String listDeployed(
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.LIST_DEPLOYED);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.LIST_DEPLOYED__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -66,19 +65,18 @@ public class DeployCommandsController extends AbstractMultiPartCommandsControlle
   // @RequestPart(RESOURCES_REQUEST_PARAMETER) final Resource[] jarFileResources,
   public String deploy(
       @RequestParam(RESOURCES_REQUEST_PARAMETER) final MultipartFile[] jarFileResources,
-      @RequestParam(value = CliStrings.DEPLOY__GROUP, required = false) final String[] groups,
-      @RequestParam(value = CliStrings.DEPLOY__JAR, required = false) final String jarFileName,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.JAR, required = false) final String jarFileName,
       @RequestParam(value = CliStrings.DEPLOY__DIR, required = false) final String directory)
       throws IOException {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.DEPLOY);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.DEPLOY__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(jarFileName)) {
-      command.addOption(CliStrings.DEPLOY__JAR, jarFileName);
+      command.addOption(CliStrings.JAR, jarFileName);
     }
 
     if (hasValue(directory)) {
@@ -93,18 +91,16 @@ public class DeployCommandsController extends AbstractMultiPartCommandsControlle
   @RequestMapping(method = RequestMethod.DELETE, value = "/deployed")
   @ResponseBody
   public String undeploy(
-      @RequestParam(value = CliStrings.UNDEPLOY__GROUP, required = false) final String[] groups,
-      @RequestParam(value = CliStrings.UNDEPLOY__JAR,
-          required = false) final String[] jarFileNames) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.JAR, required = false) final String[] jarFileNames) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.UNDEPLOY);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.UNDEPLOY__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(jarFileNames)) {
-      command.addOption(CliStrings.UNDEPLOY__JAR,
+      command.addOption(CliStrings.JAR,
           StringUtils.join(jarFileNames, StringUtils.COMMA_DELIMITER));
     }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DiskStoreCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DiskStoreCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DiskStoreCommandsController.java
index fa074c3..c613a8a 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DiskStoreCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DiskStoreCommandsController.java
@@ -72,15 +72,13 @@ public class DiskStoreCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.POST, value = "/diskstores/{name}", params = "op=compact")
   public Callable<ResponseEntity<String>> compactDiskStore(
       @PathVariable("name") final String diskStoreNameId,
-      @RequestParam(value = CliStrings.COMPACT_DISK_STORE__GROUP,
-          required = false) final String[] groups) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.COMPACT_DISK_STORE);
 
     command.addOption(CliStrings.COMPACT_DISK_STORE__NAME, decode(diskStoreNameId));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.COMPACT_DISK_STORE__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     return getProcessCommandCallable(command.toString());
@@ -110,8 +108,7 @@ public class DiskStoreCommandsController extends AbstractCommandsController {
           defaultValue = "90") final Float diskUsageWarningPercentage,
       @RequestParam(value = CliStrings.CREATE_DISK_STORE__DISK_USAGE_CRITICAL_PCT,
           defaultValue = "99") final Integer diskUsageCriticalPercentage,
-      @RequestParam(value = CliStrings.CREATE_DISK_STORE__GROUP,
-          required = false) final String[] groups) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.CREATE_DISK_STORE);
 
     command.addOption(CliStrings.CREATE_DISK_STORE__NAME, diskStoreNameId);
@@ -136,8 +133,7 @@ public class DiskStoreCommandsController extends AbstractCommandsController {
         String.valueOf(diskUsageCriticalPercentage));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.CREATE_DISK_STORE__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -146,9 +142,9 @@ public class DiskStoreCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.GET, value = "/diskstores/{name}")
   @ResponseBody
   public String describeDiskStore(@PathVariable("name") final String diskStoreNameId,
-      @RequestParam(CliStrings.DESCRIBE_DISK_STORE__MEMBER) final String memberNameId) {
+      @RequestParam(CliStrings.MEMBER) final String memberNameId) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.DESCRIBE_DISK_STORE);
-    command.addOption(CliStrings.DESCRIBE_DISK_STORE__MEMBER, memberNameId);
+    command.addOption(CliStrings.MEMBER, memberNameId);
     command.addOption(CliStrings.DESCRIBE_DISK_STORE__NAME, decode(diskStoreNameId));
     return processCommand(command.toString());
   }
@@ -157,15 +153,13 @@ public class DiskStoreCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.DELETE, value = "/diskstores/{name}")
   @ResponseBody
   public String destroyDiskStore(@PathVariable("name") final String diskStoreNameId,
-      @RequestParam(value = CliStrings.DESTROY_DISK_STORE__GROUP,
-          required = false) final String[] groups) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.DESTROY_DISK_STORE);
 
     command.addOption(CliStrings.DESTROY_DISK_STORE__NAME, decode(diskStoreNameId));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.DESTROY_DISK_STORE__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DurableClientCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DurableClientCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DurableClientCommandsController.java
index 8f31f7a..4562cd5 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DurableClientCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DurableClientCommandsController.java
@@ -49,21 +49,18 @@ public class DurableClientCommandsController extends AbstractCommandsController
   @ResponseBody
   public String listDurableClientContinuousQueries(
       @PathVariable(ConfigurationProperties.DURABLE_CLIENT_ID) final String durableClientId,
-      @RequestParam(value = CliStrings.LIST_DURABLE_CQS__MEMBER,
-          required = false) final String memberNameId,
-      @RequestParam(value = CliStrings.LIST_DURABLE_CQS__GROUP,
-          required = false) final String[] groups) {
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.LIST_DURABLE_CQS);
 
     command.addOption(CliStrings.LIST_DURABLE_CQS__DURABLECLIENTID, decode(durableClientId));
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.LIST_DURABLE_CQS__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.LIST_DURABLE_CQS__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -74,10 +71,8 @@ public class DurableClientCommandsController extends AbstractCommandsController
   @ResponseBody
   public String countDurableClientContinuousQueryEvents(
       @PathVariable(ConfigurationProperties.DURABLE_CLIENT_ID) final String durableClientId,
-      @RequestParam(value = CliStrings.COUNT_DURABLE_CQ_EVENTS__MEMBER,
-          required = false) final String memberNameId,
-      @RequestParam(value = CliStrings.COUNT_DURABLE_CQ_EVENTS__GROUP,
-          required = false) final String[] groups) {
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups) {
     return internalCountDurableClientContinuousQueryEvents(decode(durableClientId), null,
         memberNameId, groups);
   }
@@ -88,10 +83,8 @@ public class DurableClientCommandsController extends AbstractCommandsController
   public String countDurableClientContinuousQueryEvents(
       @PathVariable(ConfigurationProperties.DURABLE_CLIENT_ID) final String durableClientId,
       @PathVariable("durable-cq-name") final String durableCqName,
-      @RequestParam(value = CliStrings.COUNT_DURABLE_CQ_EVENTS__MEMBER,
-          required = false) final String memberNameId,
-      @RequestParam(value = CliStrings.COUNT_DURABLE_CQ_EVENTS__GROUP,
-          required = false) final String[] groups) {
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups) {
     return internalCountDurableClientContinuousQueryEvents(decode(durableClientId),
         decode(durableCqName), memberNameId, groups);
   }
@@ -108,12 +101,11 @@ public class DurableClientCommandsController extends AbstractCommandsController
     }
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.COUNT_DURABLE_CQ_EVENTS__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.COUNT_DURABLE_CQ_EVENTS__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -124,21 +116,18 @@ public class DurableClientCommandsController extends AbstractCommandsController
   @ResponseBody
   public String closeDurableClient(
       @PathVariable(ConfigurationProperties.DURABLE_CLIENT_ID) final String durableClientId,
-      @RequestParam(value = CliStrings.CLOSE_DURABLE_CLIENTS__MEMBER,
-          required = false) final String memberNameId,
-      @RequestParam(value = CliStrings.CLOSE_DURABLE_CLIENTS__GROUP,
-          required = false) final String[] groups) {
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.CLOSE_DURABLE_CLIENTS);
 
     command.addOption(CliStrings.CLOSE_DURABLE_CLIENTS__CLIENT__ID, decode(durableClientId));
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.CLOSE_DURABLE_CLIENTS__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.CLOSE_DURABLE_CLIENTS__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -150,22 +139,19 @@ public class DurableClientCommandsController extends AbstractCommandsController
   public String closeDurableContinuousQuery(
       @PathVariable(ConfigurationProperties.DURABLE_CLIENT_ID) final String durableClientId,
       @PathVariable("durable-cq-name") final String durableCqName,
-      @RequestParam(value = CliStrings.CLOSE_DURABLE_CQS__MEMBER,
-          required = false) final String memberNameId,
-      @RequestParam(value = CliStrings.CLOSE_DURABLE_CQS__GROUP,
-          required = false) final String[] groups) {
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.CLOSE_DURABLE_CQS);
 
     command.addOption(CliStrings.CLOSE_DURABLE_CQS__DURABLE__CLIENT__ID, decode(durableClientId));
     command.addOption(CliStrings.CLOSE_DURABLE_CQS__NAME, decode(durableCqName));
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.CLOSE_DURABLE_CQS__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.CLOSE_DURABLE_CQS__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/ExportLogController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/ExportLogController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/ExportLogController.java
index ddfd936..87afc24 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/ExportLogController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/ExportLogController.java
@@ -42,9 +42,8 @@ public class ExportLogController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.GET, value = "/logs")
   public ResponseEntity<InputStreamResource> exportLogs(
       @RequestParam(value = CliStrings.EXPORT_LOGS__DIR, required = false) final String directory,
-      @RequestParam(value = CliStrings.EXPORT_LOGS__GROUP, required = false) final String[] groups,
-      @RequestParam(value = CliStrings.EXPORT_LOGS__MEMBER,
-          required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
       @RequestParam(value = CliStrings.EXPORT_LOGS__LOGLEVEL,
           required = false) final String logLevel,
       @RequestParam(value = CliStrings.EXPORT_LOGS__UPTO_LOGLEVEL,
@@ -65,12 +64,11 @@ public class ExportLogController extends AbstractCommandsController {
     command.addOption(CliStrings.EXPORT_LOGS__DIR, decode(directory));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.EXPORT_LOGS__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.EXPORT_LOGS__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     if (hasValue(logLevel)) {

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/FunctionCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/FunctionCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/FunctionCommandsController.java
index 508c335..855947e 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/FunctionCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/FunctionCommandsController.java
@@ -50,22 +50,18 @@ public class FunctionCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.GET, value = "/functions")
   @ResponseBody
   public String listFunctions(
-      @RequestParam(value = CliStrings.LIST_FUNCTION__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.LIST_FUNCTION__MEMBER,
-          required = false) final String[] members,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members,
       @RequestParam(value = CliStrings.LIST_FUNCTION__MATCHES,
           required = false) final String matches) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.LIST_FUNCTION);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.LIST_FUNCTION__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.LIST_FUNCTION__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(matches)) {
@@ -78,10 +74,8 @@ public class FunctionCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.POST, value = "/functions/{id}")
   public Callable<ResponseEntity<String>> executeFunction(
       @PathVariable("id") final String functionId,
-      @RequestParam(value = CliStrings.EXECUTE_FUNCTION__ONGROUPS,
-          required = false) final String groupName,
-      @RequestParam(value = CliStrings.EXECUTE_FUNCTION__ONMEMBER,
-          required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUPS, required = false) final String groupName,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
       @RequestParam(value = CliStrings.EXECUTE_FUNCTION__ONREGION,
           required = false) final String regionNamePath,
       @RequestParam(value = CliStrings.EXECUTE_FUNCTION__ARGUMENTS,
@@ -95,11 +89,11 @@ public class FunctionCommandsController extends AbstractCommandsController {
     command.addOption(CliStrings.EXECUTE_FUNCTION__ID, decode(functionId));
 
     if (hasValue(groupName)) {
-      command.addOption(CliStrings.EXECUTE_FUNCTION__ONGROUPS, groupName);
+      command.addOption(CliStrings.GROUPS, groupName);
     }
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.EXECUTE_FUNCTION__ONMEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     if (hasValue(regionNamePath)) {
@@ -124,20 +118,18 @@ public class FunctionCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.DELETE, value = "/functions/{id}")
   @ResponseBody
   public String destroyFunction(@PathVariable("id") final String functionId,
-      @RequestParam(value = CliStrings.DESTROY_FUNCTION__ONGROUPS,
-          required = false) final String groupName,
-      @RequestParam(value = CliStrings.DESTROY_FUNCTION__ONMEMBER,
-          required = false) final String memberNameId) {
+      @RequestParam(value = CliStrings.GROUPS, required = false) final String groupName,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.DESTROY_FUNCTION);
 
     command.addOption(CliStrings.DESTROY_FUNCTION__ID, decode(functionId));
 
     if (hasValue(groupName)) {
-      command.addOption(CliStrings.DESTROY_FUNCTION__ONGROUPS, groupName);
+      command.addOption(CliStrings.GROUPS, groupName);
     }
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.DESTROY_FUNCTION__ONMEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     return processCommand(command.toString());

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/IndexCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/IndexCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/IndexCommandsController.java
index fc260eb..296156f 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/IndexCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/IndexCommandsController.java
@@ -60,10 +60,8 @@ public class IndexCommandsController extends AbstractCommandsController {
   public String createIndex(@RequestParam(CliStrings.CREATE_INDEX__NAME) final String name,
       @RequestParam(CliStrings.CREATE_INDEX__EXPRESSION) final String expression,
       @RequestParam(CliStrings.CREATE_INDEX__REGION) final String regionNamePath,
-      @RequestParam(value = CliStrings.CREATE_INDEX__GROUP,
-          required = false) final String groupName,
-      @RequestParam(value = CliStrings.CREATE_INDEX__MEMBER,
-          required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String groupName,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
       @RequestParam(value = CliStrings.CREATE_INDEX__TYPE,
           defaultValue = DEFAULT_INDEX_TYPE) final String type) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.CREATE_INDEX);
@@ -74,11 +72,11 @@ public class IndexCommandsController extends AbstractCommandsController {
     command.addOption(CliStrings.CREATE_INDEX__TYPE, type);
 
     if (hasValue(groupName)) {
-      command.addOption(CliStrings.CREATE_INDEX__GROUP, groupName);
+      command.addOption(CliStrings.GROUP, groupName);
     }
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.CREATE_INDEX__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     return processCommand(command.toString());
@@ -87,18 +85,16 @@ public class IndexCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.POST, value = "/indexes", params = "op=create-defined")
   @ResponseBody
   public String createDefinedIndexes(
-      @RequestParam(value = CliStrings.CREATE_DEFINED_INDEXES__GROUP,
-          required = false) final String groupName,
-      @RequestParam(value = CliStrings.CREATE_DEFINED_INDEXES__MEMBER,
-          required = false) final String memberNameId) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String groupName,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.CREATE_DEFINED_INDEXES);
 
     if (hasValue(groupName)) {
-      command.addOption(CliStrings.CREATE_DEFINED_INDEXES__GROUP, groupName);
+      command.addOption(CliStrings.GROUP, groupName);
     }
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.CREATE_DEFINED_INDEXES__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     return processCommand(command.toString());
@@ -130,10 +126,8 @@ public class IndexCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.DELETE, value = "/indexes")
   @ResponseBody
   public String destroyIndexes(
-      @RequestParam(value = CliStrings.DESTROY_INDEX__GROUP,
-          required = false) final String groupName,
-      @RequestParam(value = CliStrings.DESTROY_INDEX__MEMBER,
-          required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String groupName,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
       @RequestParam(value = CliStrings.DESTROY_INDEX__REGION,
           required = false) final String regionNamePath) {
     return internalDestroyIndex(null, groupName, memberNameId, regionNamePath);
@@ -142,10 +136,8 @@ public class IndexCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.DELETE, value = "/indexes/{name}")
   @ResponseBody
   public String destroyIndex(@PathVariable("name") final String indexName,
-      @RequestParam(value = CliStrings.DESTROY_INDEX__GROUP,
-          required = false) final String groupName,
-      @RequestParam(value = CliStrings.DESTROY_INDEX__MEMBER,
-          required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String groupName,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
       @RequestParam(value = CliStrings.DESTROY_INDEX__REGION,
           required = false) final String regionNamePath) {
     return internalDestroyIndex(decode(indexName), groupName, memberNameId, regionNamePath);
@@ -160,11 +152,11 @@ public class IndexCommandsController extends AbstractCommandsController {
     }
 
     if (hasValue(groupName)) {
-      command.addOption(CliStrings.DESTROY_INDEX__GROUP, groupName);
+      command.addOption(CliStrings.GROUP, groupName);
     }
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.DESTROY_INDEX__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     if (hasValue(regionNamePath)) {

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/MemberCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/MemberCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/MemberCommandsController.java
index 56eea26..66e82ee 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/MemberCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/MemberCommandsController.java
@@ -50,8 +50,8 @@ public class MemberCommandsController extends AbstractCommandsController {
   // public String listMembers(@RequestParam(value = "group", required = false) final String
   // groupName,
   // @RequestParam(value = "group", required = false) final String[] groupNames) {
-  public String listMembers(@RequestParam(value = CliStrings.LIST_MEMBER__GROUP,
-      required = false) final String groupName) {
+  public String listMembers(
+      @RequestParam(value = CliStrings.GROUP, required = false) final String groupName) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.LIST_MEMBER);
 
     // logger.info(String.format("Request Body: %1$s", requestParameters));
@@ -62,7 +62,7 @@ public class MemberCommandsController extends AbstractCommandsController {
     // final String groupName = requestParameters.getFirst("group");
 
     if (hasValue(groupName)) {
-      command.addOption(CliStrings.LIST_MEMBER__GROUP, groupName);
+      command.addOption(CliStrings.GROUP, groupName);
     }
 
     return processCommand(command.toString());

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/MiscellaneousCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/MiscellaneousCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/MiscellaneousCommandsController.java
index 9b13b5f..fd28fed 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/MiscellaneousCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/MiscellaneousCommandsController.java
@@ -48,10 +48,8 @@ public class MiscellaneousCommandsController extends AbstractCommandsController
   @ResponseBody
   public String exportStackTraces(
       @RequestParam(value = CliStrings.EXPORT_STACKTRACE__FILE, required = false) final String file,
-      @RequestParam(value = CliStrings.EXPORT_STACKTRACE__GROUP,
-          required = false) final String groupName,
-      @RequestParam(value = CliStrings.EXPORT_STACKTRACE__MEMBER,
-          required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String groupName,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
       @RequestParam(value = CliStrings.EXPORT_STACKTRACE__FAIL__IF__FILE__PRESENT,
           required = false) final boolean failIfFilePresent) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.EXPORT_STACKTRACE);
@@ -61,11 +59,11 @@ public class MiscellaneousCommandsController extends AbstractCommandsController
     }
 
     if (hasValue(groupName)) {
-      command.addOption(CliStrings.EXPORT_STACKTRACE__GROUP, groupName);
+      command.addOption(CliStrings.GROUP, groupName);
     }
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.EXPORT_STACKTRACE__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     if (hasValue(failIfFilePresent)) {
@@ -80,12 +78,11 @@ public class MiscellaneousCommandsController extends AbstractCommandsController
   @RequestMapping(method = RequestMethod.POST, value = "/gc")
   @ResponseBody
   public String gc(
-      @RequestParam(value = CliStrings.GC__GROUP, required = false) final String[] groups) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.GC);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.GC__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -96,7 +93,7 @@ public class MiscellaneousCommandsController extends AbstractCommandsController
   @ResponseBody
   public String gc(@PathVariable("member") final String memberNameId) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.GC);
-    command.addOption(CliStrings.GC__MEMBER, decode(memberNameId));
+    command.addOption(CliStrings.MEMBER, decode(memberNameId));
     return processCommand(command.toString());
   }
 
@@ -104,15 +101,15 @@ public class MiscellaneousCommandsController extends AbstractCommandsController
   @RequestMapping(method = RequestMethod.GET, value = "/netstat")
   @ResponseBody
   public String netstat(
-      @RequestParam(value = CliStrings.NETSTAT__MEMBER, required = false) final String[] members,
-      @RequestParam(value = CliStrings.NETSTAT__GROUP, required = false) final String group,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String group,
       @RequestParam(value = CliStrings.NETSTAT__FILE, required = false) final String file,
       @RequestParam(value = CliStrings.NETSTAT__WITHLSOF,
           defaultValue = "false") final Boolean withLsof) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.NETSTAT);
 
-    addCommandOption(null, command, CliStrings.NETSTAT__MEMBER, members);
-    addCommandOption(null, command, CliStrings.NETSTAT__GROUP, group);
+    addCommandOption(null, command, CliStrings.MEMBER, members);
+    addCommandOption(null, command, CliStrings.GROUP, group);
     addCommandOption(null, command, CliStrings.NETSTAT__FILE, file);
     addCommandOption(null, command, CliStrings.NETSTAT__WITHLSOF, withLsof);
 
@@ -136,7 +133,7 @@ public class MiscellaneousCommandsController extends AbstractCommandsController
       @RequestParam(value = CliStrings.SHOW_LOG_LINE_NUM, defaultValue = "0") final Integer lines) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.SHOW_LOG);
 
-    command.addOption(CliStrings.SHOW_LOG_MEMBER, decode(memberNameId));
+    command.addOption(CliStrings.MEMBER, decode(memberNameId));
     command.addOption(CliStrings.SHOW_LOG_LINE_NUM, String.valueOf(lines));
 
     return processCommand(command.toString());
@@ -146,8 +143,7 @@ public class MiscellaneousCommandsController extends AbstractCommandsController
   @RequestMapping(method = RequestMethod.GET, value = "/metrics")
   @ResponseBody
   public String showMetrics(
-      @RequestParam(value = CliStrings.SHOW_METRICS__MEMBER,
-          required = false) final String memberNameId,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId,
       @RequestParam(value = CliStrings.SHOW_METRICS__REGION,
           required = false) final String regionNamePath,
       @RequestParam(value = CliStrings.SHOW_METRICS__FILE, required = false) final String file,
@@ -158,7 +154,7 @@ public class MiscellaneousCommandsController extends AbstractCommandsController
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.SHOW_METRICS);
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.SHOW_METRICS__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     if (hasValue(regionNamePath)) {
@@ -234,11 +230,11 @@ public class MiscellaneousCommandsController extends AbstractCommandsController
     command.addOption(CliStrings.CHANGE_LOGLEVEL__LOGLEVEL, decode(logLevel));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.CHANGE_LOGLEVEL__GROUPS, decode(groups));
+      command.addOption(CliStrings.GROUP, decode(groups));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.CHANGE_LOGLEVEL__MEMBER, decode(members));
+      command.addOption(CliStrings.MEMBER, decode(members));
     }
 
     return processCommand(command.toString());

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/QueueCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/QueueCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/QueueCommandsController.java
index df49e49..02d9bcb 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/QueueCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/QueueCommandsController.java
@@ -50,8 +50,7 @@ public class QueueCommandsController extends AbstractCommandsController {
       @RequestParam(CliStrings.CREATE_ASYNC_EVENT_QUEUE__LISTENER) final String listener,
       @RequestParam(value = CliStrings.CREATE_ASYNC_EVENT_QUEUE__LISTENER_PARAM_AND_VALUE,
           required = false) final String[] listenerParametersValues,
-      @RequestParam(value = CliStrings.CREATE_ASYNC_EVENT_QUEUE__GROUP,
-          required = false) final String[] groups,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
       @RequestParam(value = CliStrings.CREATE_ASYNC_EVENT_QUEUE__PARALLEL,
           defaultValue = "false") final Boolean parallel,
       @RequestParam(value = CliStrings.CREATE_ASYNC_EVENT_QUEUE__ENABLEBATCHCONFLATION,
@@ -91,8 +90,7 @@ public class QueueCommandsController extends AbstractCommandsController {
     }
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     command.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__PARALLEL,

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/RegionCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/RegionCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/RegionCommandsController.java
index baf24e5..21f85bf 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/RegionCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/RegionCommandsController.java
@@ -48,17 +48,16 @@ public class RegionCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.GET, value = "/regions")
   @ResponseBody
   public String listRegions(
-      @RequestParam(value = CliStrings.LIST_REGION__GROUP, required = false) final String groupName,
-      @RequestParam(value = CliStrings.LIST_REGION__MEMBER,
-          required = false) final String memberNameId) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String groupName,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String memberNameId) {
     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.LIST_REGION);
 
     if (hasValue(groupName)) {
-      command.addOption(CliStrings.LIST_REGION__GROUP, groupName);
+      command.addOption(CliStrings.GROUP, groupName);
     }
 
     if (hasValue(memberNameId)) {
-      command.addOption(CliStrings.LIST_REGION__MEMBER, memberNameId);
+      command.addOption(CliStrings.MEMBER, memberNameId);
     }
 
     return processCommand(command.toString());
@@ -76,7 +75,7 @@ public class RegionCommandsController extends AbstractCommandsController {
   @ResponseBody
   public String alterRegion(final WebRequest request,
       @PathVariable("name") final String regionNamePath,
-      @RequestParam(value = CliStrings.ALTER_REGION__GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
       @RequestParam(value = CliStrings.ALTER_REGION__ENTRYEXPIRATIONIDLETIME,
           required = false) final Integer entryIdleTimeExpiration,
       @RequestParam(value = CliStrings.ALTER_REGION__ENTRYEXPIRATIONIDLETIMEACTION,
@@ -114,8 +113,7 @@ public class RegionCommandsController extends AbstractCommandsController {
     command.addOption(CliStrings.ALTER_REGION__REGION, decode(regionNamePath));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.ALTER_REGION__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     addCommandOption(request, command, CliStrings.ALTER_REGION__ENTRYEXPIRATIONIDLETIME,
@@ -159,8 +157,7 @@ public class RegionCommandsController extends AbstractCommandsController {
           required = false) final String regionType,
       @RequestParam(value = CliStrings.CREATE_REGION__USEATTRIBUTESFROM,
           required = false) final String regionTemplate,
-      @RequestParam(value = CliStrings.CREATE_REGION__GROUP,
-          required = false) final String[] groups,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
       @RequestParam(value = CliStrings.CREATE_REGION__SKIPIFEXISTS,
           defaultValue = "true") final Boolean skipIfExists,
       @RequestParam(value = CliStrings.CREATE_REGION__KEYCONSTRAINT,
@@ -241,8 +238,7 @@ public class RegionCommandsController extends AbstractCommandsController {
     }
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.CREATE_REGION__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     command.addOption(CliStrings.CREATE_REGION__SKIPIFEXISTS,


[02/24] geode git commit: GEODE-2818: add alias to any command's options that involves "group", "member", "jar" and replace CliString variables with GROUP, MEMBER, JAR, etc.

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
index 63cf594..bdccabe 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
@@ -51,14 +51,14 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
   public void testCreateGatewayReceiverWithDefault() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -104,14 +104,14 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
   public void testCreateGatewayReceiver() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -157,14 +157,14 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
   public void testCreateGatewayReceiverWithGatewayTransportFilter() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -215,14 +215,14 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
   public void testCreateGatewayReceiverWithMultipleGatewayTransportFilters() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -273,14 +273,14 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
   public void testCreateGatewayReceiver_Error() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -319,20 +319,20 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
   public void testCreateGatewayReceiver_onMember() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
     vm5.invoke(() -> createCache(punePort));
 
-    final DistributedMember vm3Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm3Member = vm3.invoke(() -> getMember());
 
     String command =
         CliStrings.CREATE_GATEWAYRECEIVER + " --" + CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART
@@ -341,7 +341,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
             + CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT + "=11000" + " --"
             + CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS + "=100000" + " --"
             + CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE + "=512000" + " --"
-            + CliStrings.CREATE_GATEWAYRECEIVER__MEMBER + "=" + vm3Member.getId();
+            + CliStrings.MEMBER + "=" + vm3Member.getId();
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -372,21 +372,21 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
   public void testCreateGatewayReceiver_onMultipleMembers() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
     vm5.invoke(() -> createCache(punePort));
 
-    final DistributedMember vm3Member = (DistributedMember) vm3.invoke(() -> getMember());
-    final DistributedMember vm4Member = (DistributedMember) vm4.invoke(() -> getMember());
+    final DistributedMember vm3Member = vm3.invoke(() -> getMember());
+    final DistributedMember vm4Member = vm4.invoke(() -> getMember());
 
     String command =
         CliStrings.CREATE_GATEWAYRECEIVER + " --" + CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART
@@ -395,8 +395,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
             + CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT + "=11000" + " --"
             + CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS + "=100000" + " --"
             + CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE + "=512000" + " --"
-            + CliStrings.CREATE_GATEWAYRECEIVER__MEMBER + "=" + vm3Member.getId() + ","
-            + vm4Member.getId();
+            + CliStrings.MEMBER + "=" + vm3Member.getId() + "," + vm4Member.getId();
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -428,14 +427,14 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
   public void testCreateGatewayReceiver_onGroup() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
     vm4.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
@@ -448,7 +447,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
             + CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT + "=11000" + " --"
             + CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS + "=100000" + " --"
             + CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE + "=512000" + " --"
-            + CliStrings.CREATE_GATEWAYRECEIVER__GROUP + "=receiverGroup1";
+            + CliStrings.GROUP + "=receiverGroup1";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -483,14 +482,14 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
   public void testCreateGatewayReceiver_onGroup_Scenario2() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
     vm4.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
@@ -503,7 +502,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
             + CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT + "=11000" + " --"
             + CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS + "=100000" + " --"
             + CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE + "=512000" + " --"
-            + CliStrings.CREATE_GATEWAYRECEIVER__GROUP + "=receiverGroup1";
+            + CliStrings.GROUP + "=receiverGroup1";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -535,14 +534,14 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
   public void testCreateGatewayReceiver_onMultipleGroups() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
     vm4.invoke(() -> createCacheWithGroups(punePort, "receiverGroup1"));
@@ -555,7 +554,7 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
             + CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT + "=11000" + " --"
             + CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS + "=100000" + " --"
             + CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE + "=512000" + " --"
-            + CliStrings.CREATE_GATEWAYRECEIVER__GROUP + "=receiverGroup1,receiverGroup2";
+            + CliStrings.GROUP + "=receiverGroup1,receiverGroup2";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
index 40c0f1b..9f97dd7 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
@@ -48,22 +48,21 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
   public void testStartGatewayReceiver_ErrorConditions() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createReceiver(punePort));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
 
-    String command =
-        CliStrings.START_GATEWAYRECEIVER + " --" + CliStrings.START_GATEWAYRECEIVER__MEMBER + "="
-            + vm1Member.getId() + " --" + CliStrings.START_GATEWAYRECEIVER__GROUP + "=RG1";
+    String command = CliStrings.START_GATEWAYRECEIVER + " --" + CliStrings.MEMBER + "="
+        + vm1Member.getId() + " --" + CliStrings.GROUP + "=RG1";
 
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
@@ -82,14 +81,14 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
   public void testStartGatewayReceiver() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createReceiver(punePort));
     vm4.invoke(() -> createReceiver(punePort));
@@ -126,14 +125,14 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
   public void testStartGatewayReceiver_onMember() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createReceiver(punePort));
     vm4.invoke(() -> createReceiver(punePort));
@@ -143,10 +142,10 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
     vm4.invoke(() -> verifyReceiverState(false));
     vm5.invoke(() -> verifyReceiverState(false));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
     pause(10000);
-    String command = CliStrings.START_GATEWAYRECEIVER + " --"
-        + CliStrings.START_GATEWAYRECEIVER__MEMBER + "=" + vm1Member.getId();
+    String command =
+        CliStrings.START_GATEWAYRECEIVER + " --" + CliStrings.MEMBER + "=" + vm1Member.getId();
 
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
@@ -171,14 +170,14 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
   public void testStartGatewayReceiver_Group() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createReceiverWithGroup(punePort, "RG1"));
     vm4.invoke(() -> createReceiverWithGroup(punePort, "RG1"));
@@ -189,8 +188,7 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
     vm5.invoke(() -> verifyReceiverState(false));
 
     pause(10000);
-    String command =
-        CliStrings.START_GATEWAYRECEIVER + " --" + CliStrings.START_GATEWAYRECEIVER__GROUP + "=RG1";
+    String command = CliStrings.START_GATEWAYRECEIVER + " --" + CliStrings.GROUP + "=RG1";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -220,14 +218,14 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
   public void testStartGatewayReceiver_MultipleGroup() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createReceiverWithGroup(punePort, "RG1"));
     vm4.invoke(() -> createReceiverWithGroup(punePort, "RG1"));
@@ -242,8 +240,7 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
     vm7.invoke(() -> verifyReceiverState(false));
 
     pause(10000);
-    String command = CliStrings.START_GATEWAYRECEIVER + " --"
-        + CliStrings.START_GATEWAYRECEIVER__GROUP + "=RG1,RG2";
+    String command = CliStrings.START_GATEWAYRECEIVER + " --" + CliStrings.GROUP + "=RG1,RG2";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
index 5d211b0..2cfc5db 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
@@ -48,22 +48,21 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
   public void testStopGatewayReceiver_ErrorConditions() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createReceiver(punePort));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
 
-    String command =
-        CliStrings.STOP_GATEWAYRECEIVER + " --" + CliStrings.STOP_GATEWAYRECEIVER__MEMBER + "="
-            + vm1Member.getId() + " --" + CliStrings.STOP_GATEWAYRECEIVER__GROUP + "=RG1";
+    String command = CliStrings.STOP_GATEWAYRECEIVER + " --" + CliStrings.MEMBER + "="
+        + vm1Member.getId() + " --" + CliStrings.GROUP + "=RG1";
 
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
@@ -82,14 +81,14 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
   public void testStopGatewayReceiver() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createAndStartReceiver(punePort));
     vm4.invoke(() -> createAndStartReceiver(punePort));
@@ -127,14 +126,14 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
   public void testStopGatewayReceiver_onMember() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createAndStartReceiver(punePort));
     vm4.invoke(() -> createAndStartReceiver(punePort));
@@ -144,10 +143,10 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
     vm4.invoke(() -> verifyReceiverState(true));
     vm5.invoke(() -> verifyReceiverState(true));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
     pause(10000);
-    String command = CliStrings.STOP_GATEWAYRECEIVER + " --"
-        + CliStrings.STOP_GATEWAYRECEIVER__MEMBER + "=" + vm1Member.getId();
+    String command =
+        CliStrings.STOP_GATEWAYRECEIVER + " --" + CliStrings.MEMBER + "=" + vm1Member.getId();
 
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
@@ -172,14 +171,14 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
   public void testStopGatewayReceiver_Group() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1"));
     vm4.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1"));
@@ -190,8 +189,7 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
     vm5.invoke(() -> verifyReceiverState(true));
 
     pause(10000);
-    String command =
-        CliStrings.STOP_GATEWAYRECEIVER + " --" + CliStrings.STOP_GATEWAYRECEIVER__GROUP + "=RG1";
+    String command = CliStrings.STOP_GATEWAYRECEIVER + " --" + CliStrings.GROUP + "=RG1";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -221,14 +219,14 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
   public void testStopGatewayReceiver_MultipleGroup() {
 
     VM puneLocator = Host.getLocator();
-    int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
+    int punePort = puneLocator.invoke(() -> getLocatorPort());
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1"));
     vm4.invoke(() -> createAndStartReceiverWithGroup(punePort, "RG1"));
@@ -243,8 +241,7 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
     vm7.invoke(() -> verifyReceiverState(true));
 
     pause(10000);
-    String command = CliStrings.STOP_GATEWAYRECEIVER + " --"
-        + CliStrings.STOP_GATEWAYRECEIVER__GROUP + "=RG1,RG2";
+    String command = CliStrings.STOP_GATEWAYRECEIVER + " --" + CliStrings.GROUP + "=RG1,RG2";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
index db1de4b..a77c499 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
@@ -44,7 +44,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewaySender_ErrorConditions() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -52,16 +52,16 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
 
     String command = CliStrings.START_GATEWAYSENDER + " --" + CliStrings.START_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.START_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId() + " --"
-        + CliStrings.START_GATEWAYSENDER__GROUP + "=SenserGroup1";
+        + "=ln --" + CliStrings.MEMBER + "=" + vm1Member.getId() + " --" + CliStrings.GROUP
+        + "=SenserGroup1";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -86,7 +86,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewaySender() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -94,7 +94,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -136,7 +136,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewaySender_onMember() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -144,17 +144,17 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
 
     vm3.invoke(() -> verifySenderState("ln", false, false));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
     pause(10000);
     String command = CliStrings.START_GATEWAYSENDER + " --" + CliStrings.START_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.START_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId();
+        + "=ln --" + CliStrings.MEMBER + "=" + vm1Member.getId();
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -174,7 +174,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewaySender_Group() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -182,7 +182,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -197,7 +197,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     String command = CliStrings.START_GATEWAYSENDER + " --" + CliStrings.START_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.START_GATEWAYSENDER__GROUP + "=SenderGroup1";
+        + "=ln --" + CliStrings.GROUP + "=SenderGroup1";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -225,7 +225,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewaySender_MultipleGroup() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -233,7 +233,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -254,7 +254,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     String command = CliStrings.START_GATEWAYSENDER + " --" + CliStrings.START_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.START_GATEWAYSENDER__GROUP + "=SenderGroup1,SenderGroup2";
+        + "=ln --" + CliStrings.GROUP + "=SenderGroup1,SenderGroup2";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -282,7 +282,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
   @Test
   public void testStartGatewaySender_Group_MissingSenderFromGroup() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -290,7 +290,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -303,7 +303,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     String command = CliStrings.START_GATEWAYSENDER + " --" + CliStrings.START_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.START_GATEWAYSENDER__GROUP + "=SenderGroup1";
+        + "=ln --" + CliStrings.GROUP + "=SenderGroup1";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
index a9d9cb4..1a4fa07 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
@@ -47,7 +47,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewaySender_ErrorConditions() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -55,16 +55,16 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
 
     String command = CliStrings.STOP_GATEWAYSENDER + " --" + CliStrings.STOP_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.STOP_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId() + " --"
-        + CliStrings.STOP_GATEWAYSENDER__GROUP + "=SenderGroup1";
+        + "=ln --" + CliStrings.MEMBER + "=" + vm1Member.getId() + " --" + CliStrings.GROUP
+        + "=SenderGroup1";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -79,7 +79,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewaySender() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -87,7 +87,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -133,7 +133,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewaySender_onMember() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -141,7 +141,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -150,10 +150,10 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
 
     vm3.invoke(() -> verifySenderState("ln", true, false));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
     pause(10000);
     String command = CliStrings.STOP_GATEWAYSENDER + " --" + CliStrings.STOP_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.STOP_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId();
+        + "=ln --" + CliStrings.MEMBER + "=" + vm1Member.getId();
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -173,7 +173,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewaySender_Group() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -181,7 +181,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -200,7 +200,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     String command = CliStrings.STOP_GATEWAYSENDER + " --" + CliStrings.STOP_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.STOP_GATEWAYSENDER__GROUP + "=SenderGroup1";
+        + "=ln --" + CliStrings.GROUP + "=SenderGroup1";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -228,7 +228,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
   @Test
   public void testStopGatewaySender_MultipleGroup() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -236,7 +236,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -263,7 +263,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     String command = CliStrings.STOP_GATEWAYSENDER + " --" + CliStrings.STOP_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.STOP_GATEWAYSENDER__GROUP + "=SenderGroup1,SenderGroup2";
+        + "=ln --" + CliStrings.GROUP + "=SenderGroup1,SenderGroup2";
     CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
index 8294d66..409c457 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
@@ -40,7 +40,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
   @Test
   public void testListGatewayWithNoSenderReceiver() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -48,7 +48,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -69,7 +69,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
   @Test
   public void testListGatewaySender() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -77,7 +77,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm6.invoke(() -> createAndStartReceiver(nyPort));
     vm7.invoke(() -> createAndStartReceiver(nyPort));
@@ -120,7 +120,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
   @Test
   public void testListGatewayReceiver() {
 
-    Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer lnPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -128,7 +128,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
 
     vm3.invoke(() -> createAndStartReceiver(lnPort));
     vm4.invoke(() -> createAndStartReceiver(lnPort));
@@ -167,7 +167,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
   @Test
   public void testListGatewaySenderGatewayReceiver() throws GfJsonException {
 
-    Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer lnPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -175,7 +175,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
 
     vm6.invoke(() -> createAndStartReceiver(nyPort));
 
@@ -227,7 +227,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
   @Test
   public void testListGatewaySenderGatewayReceiver_group() {
 
-    Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer lnPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -235,7 +235,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
 
     vm6.invoke(() -> createAndStartReceiver(nyPort));
 
@@ -256,8 +256,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
     vm7.invoke(() -> createSender("ln_Parallel", 1, true, 100, 400, false, false, null, false));
 
     pause(10000);
-    String command =
-        CliStrings.LIST_GATEWAY + " --" + CliStrings.LIST_GATEWAY__GROUP + "=Serial_Sender";
+    String command = CliStrings.LIST_GATEWAY + " --" + CliStrings.GROUP + "=Serial_Sender";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -277,7 +276,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
       fail("testListGatewaySenderGatewayReceiver_group failed as did not get CommandResult");
     }
 
-    command = CliStrings.LIST_GATEWAY + " --" + CliStrings.LIST_GATEWAY__GROUP + "=Parallel_Sender";
+    command = CliStrings.LIST_GATEWAY + " --" + CliStrings.GROUP + "=Parallel_Sender";
     cmdResult = executeCommand(command);
     if (cmdResult != null) {
       TabularResultData tableSenderResultData = ((CompositeResultData) cmdResult.getResultData())
@@ -300,7 +299,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
       fail("testListGatewaySenderGatewayReceiver_group failed as did not get CommandResult");
     }
 
-    command = CliStrings.LIST_GATEWAY + " --" + CliStrings.LIST_GATEWAY__GROUP + "=Receiver_Group";
+    command = CliStrings.LIST_GATEWAY + " --" + CliStrings.GROUP + "=Receiver_Group";
     cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -324,8 +323,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
       fail("testListGatewaySenderGatewayReceiver_group failed as did not get CommandResult");
     }
 
-    command = CliStrings.LIST_GATEWAY + " --" + CliStrings.LIST_GATEWAY__GROUP
-        + "=Serial_Sender,Parallel_Sender";
+    command = CliStrings.LIST_GATEWAY + " --" + CliStrings.GROUP + "=Serial_Sender,Parallel_Sender";
     cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -348,7 +346,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
       fail("testListGatewaySenderGatewayReceiver_group failed as did not get CommandResult");
     }
 
-    command = CliStrings.LIST_GATEWAY + " --" + CliStrings.LIST_GATEWAY__GROUP
+    command = CliStrings.LIST_GATEWAY + " --" + CliStrings.GROUP
         + "=Serial_Sender,Parallel_Sender,Receiver_Group";
     cmdResult = executeCommand(command);
     if (cmdResult != null) {

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
index 4b29d35..bae0553 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
@@ -39,7 +39,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
   @Test
   public void testPauseGatewaySender_ErrorConditions() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -47,16 +47,16 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
 
     String command = CliStrings.PAUSE_GATEWAYSENDER + " --" + CliStrings.PAUSE_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.PAUSE_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId() + " --"
-        + CliStrings.PAUSE_GATEWAYSENDER__GROUP + "=SenderGroup1";
+        + "=ln --" + CliStrings.MEMBER + "=" + vm1Member.getId() + " --" + CliStrings.GROUP
+        + "=SenderGroup1";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -74,7 +74,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
   @Test
   public void testPauseGatewaySender_onMember() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -82,7 +82,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -91,10 +91,10 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
 
     vm3.invoke(() -> verifySenderState("ln", true, false));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
     pause(10000);
     String command = CliStrings.PAUSE_GATEWAYSENDER + " --" + CliStrings.PAUSE_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.PAUSE_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId();
+        + "=ln --" + CliStrings.MEMBER + "=" + vm1Member.getId();
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -111,7 +111,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
   @Test
   public void testPauseGatewaySender() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -119,7 +119,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -165,7 +165,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
   @Test
   public void testPauseGatewaySender_Group() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -173,7 +173,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -192,7 +192,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     String command = CliStrings.PAUSE_GATEWAYSENDER + " --" + CliStrings.PAUSE_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.PAUSE_GATEWAYSENDER__GROUP + "=SenderGroup1";
+        + "=ln --" + CliStrings.GROUP + "=SenderGroup1";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -220,7 +220,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
   @Test
   public void testPauseGatewaySender_MultipleGroup() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -228,7 +228,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -255,7 +255,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     String command = CliStrings.PAUSE_GATEWAYSENDER + " --" + CliStrings.PAUSE_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.PAUSE_GATEWAYSENDER__GROUP + "=SenderGroup1,SenderGroup2";
+        + "=ln --" + CliStrings.GROUP + "=SenderGroup1,SenderGroup2";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -280,7 +280,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
   @Test
   public void testResumeGatewaySender_ErrorConditions() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -288,16 +288,16 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
 
     String command = CliStrings.RESUME_GATEWAYSENDER + " --" + CliStrings.RESUME_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.RESUME_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId() + " --"
-        + CliStrings.RESUME_GATEWAYSENDER__GROUP + "=SenderGroup1";
+        + "=ln --" + CliStrings.MEMBER + "=" + vm1Member.getId() + " --" + CliStrings.GROUP
+        + "=SenderGroup1";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -313,7 +313,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
   @Test
   public void testResumeGatewaySender() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -321,7 +321,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -375,7 +375,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
   @Test
   public void testResumeGatewaySender_onMember() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -383,7 +383,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -396,10 +396,10 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
 
     vm3.invoke(() -> verifySenderState("ln", true, true));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
     pause(10000);
     String command = CliStrings.RESUME_GATEWAYSENDER + " --" + CliStrings.RESUME_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.RESUME_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId();
+        + "=ln --" + CliStrings.MEMBER + "=" + vm1Member.getId();
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -419,7 +419,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
   @Test
   public void testResumeGatewaySender_Group() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -427,7 +427,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -454,7 +454,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     String command = CliStrings.RESUME_GATEWAYSENDER + " --" + CliStrings.RESUME_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.RESUME_GATEWAYSENDER__GROUP + "=SenderGroup1";
+        + "=ln --" + CliStrings.GROUP + "=SenderGroup1";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
@@ -482,7 +482,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
   @Test
   public void testResumeGatewaySender_MultipleGroup() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -490,7 +490,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm3.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true));
@@ -529,7 +529,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     String command = CliStrings.RESUME_GATEWAYSENDER + " --" + CliStrings.RESUME_GATEWAYSENDER__ID
-        + "=ln --" + CliStrings.RESUME_GATEWAYSENDER__GROUP + "=SenderGroup1,SenderGroup2";
+        + "=ln --" + CliStrings.GROUP + "=SenderGroup1,SenderGroup2";
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
index 5b127d0..d067bad 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
@@ -42,14 +42,14 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
   @Test
   public void testGatewaySenderStatus() {
 
-    Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer lnPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
 
     vm6.invoke(() -> createAndStartReceiver(nyPort));
 
@@ -128,14 +128,14 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
   @Test
   public void testGatewaySenderStatus_OnMember() {
 
-    Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer lnPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
 
     vm6.invoke(() -> createAndStartReceiver(nyPort));
 
@@ -149,11 +149,11 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
 
     vm5.invoke(() -> createCache(lnPort));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
 
     pause(10000);
     String command = CliStrings.STATUS_GATEWAYSENDER + " --" + CliStrings.STATUS_GATEWAYSENDER__ID
-        + "=ln_Serial --" + CliStrings.STATUS_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId();
+        + "=ln_Serial --" + CliStrings.MEMBER + "=" + vm1Member.getId();
 
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
@@ -180,7 +180,7 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     command = CliStrings.STATUS_GATEWAYSENDER + " --" + CliStrings.STATUS_GATEWAYSENDER__ID
-        + "=ln_Serial --" + CliStrings.STATUS_GATEWAYSENDER__MEMBER + "=" + vm1Member.getId();
+        + "=ln_Serial --" + CliStrings.MEMBER + "=" + vm1Member.getId();
 
     cmdResult = executeCommand(command);
     if (cmdResult != null) {
@@ -203,10 +203,10 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
       fail("testListGatewaySender failed as did not get CommandResult");
     }
 
-    final DistributedMember vm5Member = (DistributedMember) vm5.invoke(() -> getMember());
+    final DistributedMember vm5Member = vm5.invoke(() -> getMember());
 
     command = CliStrings.STATUS_GATEWAYSENDER + " --" + CliStrings.STATUS_GATEWAYSENDER__ID
-        + "=ln_Serial --" + CliStrings.STATUS_GATEWAYSENDER__MEMBER + "=" + vm5Member.getId();
+        + "=ln_Serial --" + CliStrings.MEMBER + "=" + vm5Member.getId();
     cmdResult = executeCommand(command);
     if (cmdResult != null) {
       // ErrorResultData errorResultData =
@@ -224,14 +224,14 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
   @Test
   public void testGatewaySenderStatus_OnGroups() {
 
-    Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer lnPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
 
     vm7.invoke(() -> createAndStartReceiver(nyPort));
 
@@ -249,11 +249,11 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
 
     vm6.invoke(() -> createCacheWithGroups(lnPort, "Serial_Sender"));
 
-    final DistributedMember vm1Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm1Member = vm3.invoke(() -> getMember());
 
     pause(10000);
     String command = CliStrings.STATUS_GATEWAYSENDER + " --" + CliStrings.STATUS_GATEWAYSENDER__ID
-        + "=ln_Serial --" + CliStrings.STATUS_GATEWAYSENDER__GROUP + "=Serial_Sender";
+        + "=ln_Serial --" + CliStrings.GROUP + "=Serial_Sender";
 
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
@@ -286,7 +286,7 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
 
     pause(10000);
     command = CliStrings.STATUS_GATEWAYSENDER + " --" + CliStrings.STATUS_GATEWAYSENDER__ID
-        + "=ln_Serial --" + CliStrings.STATUS_GATEWAYSENDER__GROUP + "=Serial_Sender";
+        + "=ln_Serial --" + CliStrings.GROUP + "=Serial_Sender";
 
     cmdResult = executeCommand(command);
     if (cmdResult != null) {
@@ -314,14 +314,14 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
   @Test
   public void testGatewayReceiverStatus() {
 
-    Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer lnPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
 
     vm6.invoke(() -> createAndStartReceiver(nyPort));
 
@@ -394,14 +394,14 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
   @Test
   public void testGatewayReceiverStatus_OnMember() {
 
-    Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer lnPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
 
     vm6.invoke(() -> createAndStartReceiver(nyPort));
 
@@ -409,11 +409,11 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
     vm4.invoke(() -> createAndStartReceiver(lnPort));
     vm5.invoke(() -> createAndStartReceiver(lnPort));
 
-    final DistributedMember vm3Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm3Member = vm3.invoke(() -> getMember());
 
     pause(10000);
-    String command = CliStrings.STATUS_GATEWAYRECEIVER + " --"
-        + CliStrings.STATUS_GATEWAYRECEIVER__MEMBER + "=" + vm3Member.getId();
+    String command =
+        CliStrings.STATUS_GATEWAYRECEIVER + " --" + CliStrings.MEMBER + "=" + vm3Member.getId();
 
     CommandResult cmdResult = executeCommand(command);
 
@@ -441,8 +441,8 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
 
     pause(10000);
 
-    command = CliStrings.STATUS_GATEWAYRECEIVER + " --" + CliStrings.STATUS_GATEWAYRECEIVER__MEMBER
-        + "=" + vm3Member.getId();
+    command =
+        CliStrings.STATUS_GATEWAYRECEIVER + " --" + CliStrings.MEMBER + "=" + vm3Member.getId();
 
     cmdResult = executeCommand(command);
     if (cmdResult != null) {
@@ -469,14 +469,14 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
   @Test
   public void testGatewayReceiverStatus_OnGroups() {
 
-    Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer lnPort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
     props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, lnPort));
 
     vm7.invoke(() -> createAndStartReceiver(nyPort));
 
@@ -486,8 +486,7 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
     vm6.invoke(() -> createAndStartReceiverWithGroup(lnPort, "RG2"));
 
     pause(10000);
-    String command = CliStrings.STATUS_GATEWAYRECEIVER + " --"
-        + CliStrings.STATUS_GATEWAYRECEIVER__GROUP + "=RG1";
+    String command = CliStrings.STATUS_GATEWAYRECEIVER + " --" + CliStrings.GROUP + "=RG1";
 
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
@@ -513,8 +512,7 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase {
     vm5.invoke(() -> stopReceiver());
 
     pause(10000);
-    command = CliStrings.STATUS_GATEWAYRECEIVER + " --" + CliStrings.STATUS_GATEWAYRECEIVER__GROUP
-        + "=RG1";
+    command = CliStrings.STATUS_GATEWAYRECEIVER + " --" + CliStrings.GROUP + "=RG1";
 
     cmdResult = executeCommand(command);
     if (cmdResult != null) {

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationDUnitTest.java
index b6b6712..9eb423f 100644
--- a/geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationDUnitTest.java
@@ -166,8 +166,8 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
       // MockCacheExtension verification
       @SuppressWarnings("unchecked")
       // should only be one cache extension
-      final MockCacheExtension mockCacheExtension = (MockCacheExtension) ((Extensible<Cache>) cache)
-          .getExtensionPoint().getExtensions().iterator().next();
+      final MockCacheExtension mockCacheExtension =
+          (MockCacheExtension) cache.getExtensionPoint().getExtensions().iterator().next();
       assertNotNull(mockCacheExtension);
       assertEquals(1, mockCacheExtension.beforeCreateCounter.get());
       assertEquals(1, mockCacheExtension.onCreateCounter.get());
@@ -231,7 +231,7 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
 
       // MockCacheExtension verification
       @SuppressWarnings("unchecked")
-      final Extensible<Cache> extensibleCache = (Extensible<Cache>) cache;
+      final Extensible<Cache> extensibleCache = cache;
       // Should not be any cache extensions
       assertTrue(!extensibleCache.getExtensionPoint().getExtensions().iterator().hasNext());
 
@@ -344,7 +344,7 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
         + "locator-" + locator1Port + ".log";
 
     VM locatorAndMgr = getHost(0).getVM(3);
-    Object[] result = (Object[]) locatorAndMgr.invoke(() -> {
+    Object[] result = locatorAndMgr.invoke(() -> {
       int httpPort;
       int jmxPort;
       String jmxHost;
@@ -433,7 +433,7 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.CREATE_REGION);
     csb.addOption(CliStrings.CREATE_REGION__REGION, regionName);
     csb.addOption(CliStrings.CREATE_REGION__REGIONSHORTCUT, regionShortCut.name());
-    csb.addOptionWithValueCheck(CliStrings.CREATE_REGION__GROUP, group);
+    csb.addOptionWithValueCheck(CliStrings.GROUP, group);
     executeAndVerifyCommand(csb.toString());
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationIndexWithFromClauseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationIndexWithFromClauseDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationIndexWithFromClauseDUnitTest.java
index 5a15506..7e82d23 100644
--- a/geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationIndexWithFromClauseDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationIndexWithFromClauseDUnitTest.java
@@ -77,7 +77,7 @@ public class ClusterConfigurationIndexWithFromClauseDUnitTest {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.LIST_MEMBER);
     gfshShellConnectionRule.executeAndVerifyCommand(csb.toString());
     lsRule.stopMember(1);
-    lsRule.startServerVM(1, lsRule.getMember(0).getPort());;
+    lsRule.startServerVM(1, lsRule.getMember(0).getPort());
     verifyIndexRecreated(INDEX_NAME);
   }
 
@@ -114,7 +114,7 @@ public class ClusterConfigurationIndexWithFromClauseDUnitTest {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.CREATE_REGION);
     csb.addOption(CliStrings.CREATE_REGION__REGION, regionName);
     csb.addOption(CliStrings.CREATE_REGION__REGIONSHORTCUT, regionShortCut.name());
-    csb.addOptionWithValueCheck(CliStrings.CREATE_REGION__GROUP, group);
+    csb.addOptionWithValueCheck(CliStrings.GROUP, group);
     gfshShellConnectionRule.executeAndVerifyCommand(csb.toString());
   }
 }


[08/24] geode git commit: GEODE-2622: Fix GMSMembershipManagerJUnitTest use of Mockito 2.7.11

Posted by je...@apache.org.
GEODE-2622: Fix GMSMembershipManagerJUnitTest use of Mockito 2.7.11

- Fix 4 test failures in GMSMembershipManagerJUnitTest

This closes #573


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

Branch: refs/heads/feature/GEODE-3071
Commit: 740a4ef991229d6d9c27adf20740c27415b2fedc
Parents: 90900ac
Author: Srikanth Manvi <sr...@gmail.com>
Authored: Sun Jun 11 00:40:57 2017 -0400
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed Jun 14 11:06:32 2017 -0700

----------------------------------------------------------------------
 .../membership/gms/mgr/GMSMembershipManagerJUnitTest.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/740a4ef9/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
index 2692650..29f192f 100644
--- a/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
@@ -303,7 +303,7 @@ public class GMSMembershipManagerJUnitTest {
     Set<InternalDistributedMember> failures = manager.directChannelSend(recipients, m, null);
     assertTrue(failures == null);
     verify(dc).send(isA(GMSMembershipManager.class), isA(mockMembers.getClass()),
-        isA(DistributionMessage.class), anyInt(), anyInt());
+        isA(DistributionMessage.class), anyLong(), anyLong());
   }
 
   @Test
@@ -318,7 +318,7 @@ public class GMSMembershipManagerJUnitTest {
     ConnectExceptions exception = new ConnectExceptions();
     exception.addFailure(recipients[0], new Exception("testing"));
     when(dc.send(any(GMSMembershipManager.class), any(mockMembers.getClass()),
-        any(DistributionMessage.class), anyInt(), anyInt())).thenThrow(exception);
+        any(DistributionMessage.class), anyLong(), anyLong())).thenThrow(exception);
     failures = manager.directChannelSend(recipients, m, null);
     assertTrue(failures != null);
     assertEquals(1, failures.size());
@@ -352,7 +352,7 @@ public class GMSMembershipManagerJUnitTest {
     Set<InternalDistributedMember> failures = manager.directChannelSend(null, m, null);
     assertTrue(failures == null);
     verify(dc).send(isA(GMSMembershipManager.class), isA(mockMembers.getClass()),
-        isA(DistributionMessage.class), anyInt(), anyInt());
+        isA(DistributionMessage.class), anyLong(), anyLong());
   }
 
   @Test
@@ -367,7 +367,7 @@ public class GMSMembershipManagerJUnitTest {
     ConnectExceptions exception = new ConnectExceptions();
     exception.addFailure(recipients[0], new Exception("testing"));
     when(dc.send(any(GMSMembershipManager.class), any(mockMembers.getClass()),
-        any(DistributionMessage.class), anyInt(), anyInt())).thenThrow(exception);
+        any(DistributionMessage.class), anyLong(), anyLong())).thenThrow(exception);
     Assertions.assertThatThrownBy(() -> {
       manager.directChannelSend(recipients, m, null);
     }).isInstanceOf(DistributedSystemDisconnectedException.class);


[05/24] geode git commit: GEODE-2818: add alias to any command's options that involves "group", "member", "jar" and replace CliString variables with GROUP, MEMBER, JAR, etc.

Posted by je...@apache.org.
GEODE-2818: add alias to any command's options that involves "group", "member", "jar" and replace CliString variables with GROUP, MEMBER, JAR, etc.

* this closes #560


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

Branch: refs/heads/feature/GEODE-3071
Commit: db8e1df392bcdbaabb44263e6c699756eda14850
Parents: a4d790c
Author: YehEmily <em...@gmail.com>
Authored: Mon Jun 5 13:03:39 2017 -0700
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Wed Jun 14 08:59:51 2017 -0700

----------------------------------------------------------------------
 ...erConfigurationServiceEndToEndDUnitTest.java |   8 +-
 .../internal/cli/commands/ConfigCommands.java   |  20 ++-
 .../CreateAlterDestroyRegionCommands.java       |  24 ++--
 .../internal/cli/commands/DataCommands.java     |   4 +-
 .../internal/cli/commands/DeployCommands.java   |  11 +-
 .../cli/commands/DiskStoreCommands.java         |  12 +-
 .../cli/commands/DurableClientCommands.java     |  22 +--
 .../cli/commands/ExportLogsCommand.java         |   4 +-
 .../internal/cli/commands/FunctionCommands.java |  20 +--
 .../internal/cli/commands/IndexCommands.java    |  14 +-
 .../cli/commands/LauncherLifecycleCommands.java |   4 +-
 .../internal/cli/commands/MemberCommands.java   |   4 +-
 .../cli/commands/MiscellaneousCommands.java     |  34 +++--
 .../internal/cli/commands/QueueCommands.java    |   2 +-
 .../internal/cli/commands/RegionCommands.java   |   6 +-
 .../internal/cli/commands/WanCommands.java      | 116 +++++++--------
 .../internal/cli/i18n/CliStrings.java           |  99 ++-----------
 .../controllers/ConfigCommandsController.java   |  24 ++--
 .../web/controllers/DataCommandsController.java |   4 +-
 .../controllers/DeployCommandsController.java   |  26 ++--
 .../DiskStoreCommandsController.java            |  22 ++-
 .../DurableClientCommandsController.java        |  50 +++----
 .../web/controllers/ExportLogController.java    |  10 +-
 .../controllers/FunctionCommandsController.java |  32 ++---
 .../controllers/IndexCommandsController.java    |  36 ++---
 .../controllers/MemberCommandsController.java   |   6 +-
 .../MiscellaneousCommandsController.java        |  36 +++--
 .../controllers/QueueCommandsController.java    |   6 +-
 .../controllers/RegionCommandsController.java   |  20 ++-
 .../web/controllers/WanCommandsController.java  | 143 +++++++------------
 .../cli/commands/ConfigCommandsDUnitTest.java   |   4 +-
 ...eateAlterDestroyRegionCommandsDUnitTest.java |  26 ++--
 .../commands/DiskStoreCommandsDUnitTest.java    |  16 +--
 .../commands/GemfireDataCommandsDUnitTest.java  |  60 ++++----
 .../cli/commands/IndexCommandsDUnitTest.java    |  16 +--
 .../ListAndDescribeRegionDUnitTest.java         |   8 +-
 .../cli/commands/MemberCommandsDUnitTest.java   |   2 +-
 .../MiscellaneousCommandsDUnitTest.java         |  17 ++-
 .../cli/commands/QueueCommandsDUnitTest.java    |   6 +-
 .../cli/commands/ShowMetricsDUnitTest.java      |   6 +-
 .../cli/commands/ShowStackTraceDUnitTest.java   |   8 +-
 .../cli/shell/GfshMultilineCommandTest.java     |   7 +-
 .../ClusterConfigDistributionDUnitTest.java     |   2 +-
 .../WanCommandsControllerJUnitTest.java         |  14 +-
 .../LuceneClusterConfigurationDUnitTest.java    |   4 +-
 ...mandCreateDestroyGatewaySenderDUnitTest.java |  56 ++++----
 ...anCommandCreateGatewayReceiverDUnitTest.java |  57 ++++----
 ...WanCommandGatewayReceiverStartDUnitTest.java |  39 +++--
 .../WanCommandGatewayReceiverStopDUnitTest.java |  39 +++--
 .../WanCommandGatewaySenderStartDUnitTest.java  |  40 +++---
 .../WanCommandGatewaySenderStopDUnitTest.java   |  34 ++---
 .../wan/wancommand/WanCommandListDUnitTest.java |  32 ++---
 .../WanCommandPauseResumeDUnitTest.java         |  68 ++++-----
 .../wancommand/WanCommandStatusDUnitTest.java   |  56 ++++----
 .../ClusterConfigurationDUnitTest.java          |  10 +-
 ...nfigurationIndexWithFromClauseDUnitTest.java |   4 +-
 56 files changed, 630 insertions(+), 820 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-assembly/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceEndToEndDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceEndToEndDUnitTest.java b/geode-assembly/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceEndToEndDUnitTest.java
index 791f2ce..415ac3e 100644
--- a/geode-assembly/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceEndToEndDUnitTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationServiceEndToEndDUnitTest.java
@@ -230,7 +230,7 @@ public class ClusterConfigurationServiceEndToEndDUnitTest extends CliCommandTest
 
       FileUtils.writeByteArrayToFile(jarFile, jarBytes);
       CommandStringBuilder csb = new CommandStringBuilder(CliStrings.DEPLOY);
-      csb.addOption(CliStrings.DEPLOY__JAR, queueCommandsJarName);
+      csb.addOption(CliStrings.JAR, queueCommandsJarName);
       executeAndVerifyCommand(csb.getCommandString());
 
       csb = new CommandStringBuilder(CliStrings.CREATE_ASYNC_EVENT_QUEUE);
@@ -279,7 +279,7 @@ public class ClusterConfigurationServiceEndToEndDUnitTest extends CliCommandTest
   private void destroyDiskStore(final String diskStoreName, final String group) {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.DESTROY_DISK_STORE);
     csb.addOption(CliStrings.DESTROY_DISK_STORE__NAME, diskStoreName);
-    csb.addOptionWithValueCheck(CliStrings.DESTROY_DISK_STORE__GROUP, group);
+    csb.addOptionWithValueCheck(CliStrings.GROUP, group);
     executeAndVerifyCommand(csb.toString());
   }
 
@@ -306,7 +306,7 @@ public class ClusterConfigurationServiceEndToEndDUnitTest extends CliCommandTest
     }
 
     if (!isBlank(group)) {
-      csb.addOption(CliStrings.DESTROY_INDEX__GROUP, group);
+      csb.addOption(CliStrings.GROUP, group);
     }
     executeAndVerifyCommand(csb.getCommandString());
   }
@@ -315,7 +315,7 @@ public class ClusterConfigurationServiceEndToEndDUnitTest extends CliCommandTest
     File newDeployableJarFile = new File(jarName);
     this.classBuilder.writeJarFromName("ShareConfigClass", newDeployableJarFile);
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.DEPLOY);
-    csb.addOption(CliStrings.DEPLOY__JAR, jarName);
+    csb.addOption(CliStrings.JAR, jarName);
     executeAndVerifyCommand(csb.getCommandString());
     jarFileNames.add(jarName);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigCommands.java
index 48a8d7a..19c72c3 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ConfigCommands.java
@@ -79,14 +79,11 @@ public class ConfigCommands implements GfshCommand {
   @CliCommand(value = {CliStrings.DESCRIBE_CONFIG}, help = CliStrings.DESCRIBE_CONFIG__HELP)
   @CliMetaData(relatedTopic = {CliStrings.TOPIC_GEODE_CONFIG})
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
-  public Result describeConfig(@CliOption(key = CliStrings.DESCRIBE_CONFIG__MEMBER,
-      optionContext = ConverterHint.ALL_MEMBER_IDNAME,
-      help = CliStrings.DESCRIBE_CONFIG__MEMBER__HELP, mandatory = true)
+  public Result describeConfig(
+      @CliOption(key = CliStrings.MEMBER, optionContext = ConverterHint.ALL_MEMBER_IDNAME,
+          help = CliStrings.DESCRIBE_CONFIG__MEMBER__HELP, mandatory = true)
 
-  String memberNameOrId,
-      @CliOption(key = CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS,
-          help = CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS__HELP, unspecifiedDefaultValue = "true",
-          specifiedDefaultValue = "true") boolean hideDefaults) {
+      String memberNameOrId, @CliOption(key = CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS, help = CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS__HELP, unspecifiedDefaultValue = "true", specifiedDefaultValue = "true") boolean hideDefaults) {
 
     Result result = null;
     try {
@@ -198,10 +195,11 @@ public class ConfigCommands implements GfshCommand {
       relatedTopic = {CliStrings.TOPIC_GEODE_CONFIG})
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
   public Result exportConfig(
-      @CliOption(key = {CliStrings.EXPORT_CONFIG__MEMBER},
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.ALL_MEMBER_IDNAME,
           help = CliStrings.EXPORT_CONFIG__MEMBER__HELP) String[] member,
-      @CliOption(key = {CliStrings.EXPORT_CONFIG__GROUP}, optionContext = ConverterHint.MEMBERGROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
+          optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.EXPORT_CONFIG__GROUP__HELP) String[] group,
       @CliOption(key = {CliStrings.EXPORT_CONFIG__DIR},
           help = CliStrings.EXPORT_CONFIG__DIR__HELP) String dir) {
@@ -251,10 +249,10 @@ public class ConfigCommands implements GfshCommand {
       interceptor = "org.apache.geode.management.internal.cli.commands.ConfigCommands$AlterRuntimeInterceptor")
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.MANAGE)
   public Result alterRuntimeConfig(
-      @CliOption(key = {CliStrings.ALTER_RUNTIME_CONFIG__MEMBER},
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.ALL_MEMBER_IDNAME,
           help = CliStrings.ALTER_RUNTIME_CONFIG__MEMBER__HELP) String[] memberNameOrId,
-      @CliOption(key = {CliStrings.ALTER_RUNTIME_CONFIG__GROUP},
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.ALTER_RUNTIME_CONFIG__MEMBER__HELP) String[] group,
       @CliOption(key = {CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__DISK__SPACE__LIMIT},

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
index b2f1d56..842802b 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
@@ -115,7 +115,8 @@ public class CreateAlterDestroyRegionCommands implements GfshCommand {
       @CliOption(key = CliStrings.CREATE_REGION__USEATTRIBUTESFROM,
           optionContext = ConverterHint.REGION_PATH,
           help = CliStrings.CREATE_REGION__USEATTRIBUTESFROM__HELP) String useAttributesFrom,
-      @CliOption(key = CliStrings.CREATE_REGION__GROUP, optionContext = ConverterHint.MEMBERGROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
+          optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.CREATE_REGION__GROUP__HELP) String[] groups,
       @CliOption(key = CliStrings.CREATE_REGION__SKIPIFEXISTS, unspecifiedDefaultValue = "true",
           specifiedDefaultValue = "true",
@@ -379,7 +380,8 @@ public class CreateAlterDestroyRegionCommands implements GfshCommand {
   public Result alterRegion(
       @CliOption(key = CliStrings.ALTER_REGION__REGION, mandatory = true,
           help = CliStrings.ALTER_REGION__REGION__HELP) String regionPath,
-      @CliOption(key = CliStrings.ALTER_REGION__GROUP, optionContext = ConverterHint.MEMBERGROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
+          optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.ALTER_REGION__GROUP__HELP) String[] groups,
       @CliOption(key = CliStrings.ALTER_REGION__ENTRYEXPIRATIONIDLETIME,
           specifiedDefaultValue = "-1",
@@ -991,7 +993,7 @@ public class CreateAlterDestroyRegionCommands implements GfshCommand {
       if (regionMembersList.size() == 0) {
         return ResultBuilder.createUserErrorResult(
             CliStrings.format(CliStrings.DESTROY_REGION__MSG__COULDNOT_FIND_REGIONPATH_0_IN_GEODE,
-                new Object[] {regionPath, "jmx-manager-update-rate milliseconds"}));
+                regionPath, "jmx-manager-update-rate milliseconds"));
       }
 
       CliFunctionResult destroyRegionResult;
@@ -999,8 +1001,8 @@ public class CreateAlterDestroyRegionCommands implements GfshCommand {
       ResultCollector<?, ?> resultCollector =
           CliUtil.executeFunction(RegionDestroyFunction.INSTANCE, regionPath, regionMembersList);
       List<CliFunctionResult> resultsList = (List<CliFunctionResult>) resultCollector.getResult();
-      String message = CliStrings.format(CliStrings.DESTROY_REGION__MSG__REGION_0_1_DESTROYED,
-          new Object[] {regionPath, ""});
+      String message =
+          CliStrings.format(CliStrings.DESTROY_REGION__MSG__REGION_0_1_DESTROYED, regionPath, "");
 
       // Only if there is an error is this set to false
       boolean isRegionDestroyed = true;
@@ -1013,12 +1015,12 @@ public class CreateAlterDestroyRegionCommands implements GfshCommand {
           LogWrapper.getInstance().info(t.getMessage(), t);
           message = CliStrings.format(
               CliStrings.DESTROY_REGION__MSG__ERROR_OCCURRED_WHILE_DESTROYING_0_REASON_1,
-              new Object[] {regionPath, t.getMessage()});
+              regionPath, t.getMessage());
           isRegionDestroyed = false;
         } else {
           message = CliStrings.format(
               CliStrings.DESTROY_REGION__MSG__UNKNOWN_RESULT_WHILE_DESTROYING_REGION_0_REASON_1,
-              new Object[] {regionPath, destroyRegionResult.getMessage()});
+              regionPath, destroyRegionResult.getMessage());
           isRegionDestroyed = false;
         }
       }
@@ -1029,12 +1031,12 @@ public class CreateAlterDestroyRegionCommands implements GfshCommand {
       }
     } catch (IllegalStateException e) {
       result = ResultBuilder.createUserErrorResult(CliStrings.format(
-          CliStrings.DESTROY_REGION__MSG__ERROR_WHILE_DESTROYING_REGION_0_REASON_1,
-          new Object[] {regionPath, e.getMessage()}));
+          CliStrings.DESTROY_REGION__MSG__ERROR_WHILE_DESTROYING_REGION_0_REASON_1, regionPath,
+          e.getMessage()));
     } catch (Exception e) {
       result = ResultBuilder.createGemFireErrorResult(CliStrings.format(
-          CliStrings.DESTROY_REGION__MSG__ERROR_WHILE_DESTROYING_REGION_0_REASON_1,
-          new Object[] {regionPath, e.getMessage()}));
+          CliStrings.DESTROY_REGION__MSG__ERROR_WHILE_DESTROYING_REGION_0_REASON_1, regionPath,
+          e.getMessage()));
     }
 
     if (xmlEntity.get() != null) {

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DataCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DataCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DataCommands.java
index 9dee89d..b2789e3 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DataCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DataCommands.java
@@ -742,7 +742,7 @@ public class DataCommands implements GfshCommand {
       @CliOption(key = CliStrings.EXPORT_DATA__FILE,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE, mandatory = true,
           help = CliStrings.EXPORT_DATA__FILE__HELP) String filePath,
-      @CliOption(key = CliStrings.EXPORT_DATA__MEMBER,
+      @CliOption(key = CliStrings.MEMBER,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.MEMBERIDNAME, mandatory = true,
           help = CliStrings.EXPORT_DATA__MEMBER__HELP) String memberNameOrId) {
@@ -798,7 +798,7 @@ public class DataCommands implements GfshCommand {
       @CliOption(key = CliStrings.IMPORT_DATA__FILE, mandatory = true,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           help = CliStrings.IMPORT_DATA__FILE__HELP) String filePath,
-      @CliOption(key = CliStrings.IMPORT_DATA__MEMBER, mandatory = true,
+      @CliOption(key = CliStrings.MEMBER, mandatory = true,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.IMPORT_DATA__MEMBER__HELP) String memberNameOrId,

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommands.java
index 99216bf..43a748e 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommands.java
@@ -75,9 +75,9 @@ public class DeployCommands implements GfshCommand {
       interceptor = "org.apache.geode.management.internal.cli.commands.DeployCommands$Interceptor",
       relatedTopic = {CliStrings.TOPIC_GEODE_CONFIG})
   public Result deploy(
-      @CliOption(key = {CliStrings.DEPLOY__GROUP}, help = CliStrings.DEPLOY__GROUP__HELP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, help = CliStrings.DEPLOY__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) String[] groups,
-      @CliOption(key = {CliStrings.DEPLOY__JAR}, help = CliStrings.DEPLOY__JAR__HELP) String jar,
+      @CliOption(key = {CliStrings.JAR}, help = CliStrings.DEPLOY__JAR__HELP) String jar,
       @CliOption(key = {CliStrings.DEPLOY__DIR}, help = CliStrings.DEPLOY__DIR__HELP) String dir) {
     try {
 
@@ -154,9 +154,10 @@ public class DeployCommands implements GfshCommand {
   @CliMetaData(relatedTopic = {CliStrings.TOPIC_GEODE_CONFIG})
   @ResourceOperation(resource = Resource.DATA, operation = Operation.MANAGE)
   public Result undeploy(
-      @CliOption(key = {CliStrings.UNDEPLOY__GROUP}, help = CliStrings.UNDEPLOY__GROUP__HELP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
+          help = CliStrings.UNDEPLOY__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) String[] groups,
-      @CliOption(key = {CliStrings.UNDEPLOY__JAR}, help = CliStrings.UNDEPLOY__JAR__HELP,
+      @CliOption(key = {CliStrings.JAR}, help = CliStrings.UNDEPLOY__JAR__HELP,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE) String jars) {
 
     try {
@@ -222,7 +223,7 @@ public class DeployCommands implements GfshCommand {
   @CliCommand(value = {CliStrings.LIST_DEPLOYED}, help = CliStrings.LIST_DEPLOYED__HELP)
   @CliMetaData(relatedTopic = {CliStrings.TOPIC_GEODE_CONFIG})
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
-  public Result listDeployed(@CliOption(key = {CliStrings.LIST_DEPLOYED__GROUP},
+  public Result listDeployed(@CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
       help = CliStrings.LIST_DEPLOYED__GROUP__HELP) String[] group) {
 
     try {

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommands.java
index ef2c3dd..e14c3a6 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommands.java
@@ -304,7 +304,7 @@ public class DiskStoreCommands implements GfshCommand {
           help = CliStrings.CREATE_DISK_STORE__WRITE_BUFFER_SIZE__HELP) int writeBufferSize,
       @CliOption(key = CliStrings.CREATE_DISK_STORE__DIRECTORY_AND_SIZE, mandatory = true,
           help = CliStrings.CREATE_DISK_STORE__DIRECTORY_AND_SIZE__HELP) String[] directoriesAndSizes,
-      @CliOption(key = CliStrings.CREATE_DISK_STORE__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           help = CliStrings.CREATE_DISK_STORE__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) String[] groups,
       @CliOption(key = CliStrings.CREATE_DISK_STORE__DISK_USAGE_WARNING_PCT,
@@ -405,7 +405,7 @@ public class DiskStoreCommands implements GfshCommand {
       @CliOption(key = CliStrings.COMPACT_DISK_STORE__NAME, mandatory = true,
           optionContext = ConverterHint.DISKSTORE,
           help = CliStrings.COMPACT_DISK_STORE__NAME__HELP) String diskStoreName,
-      @CliOption(key = CliStrings.COMPACT_DISK_STORE__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           help = CliStrings.COMPACT_DISK_STORE__GROUP__HELP) String[] groups) {
     Result result = null;
@@ -645,7 +645,7 @@ public class DiskStoreCommands implements GfshCommand {
       fieldsMessage += CliUtil.arrayToString(diskDirs);
       String errorString = CliStrings.format(
           CliStrings.COMPACT_OFFLINE_DISK_STORE__MSG__ERROR_WHILE_COMPACTING_DISKSTORE_0_WITH_1_REASON_2,
-          new Object[] {diskStoreName, fieldsMessage});
+          diskStoreName, fieldsMessage);
       result = ResultBuilder.createUserErrorResult(errorString);
       if (logWrapper.fineEnabled()) {
         logWrapper.fine(e.getMessage(), e);
@@ -787,7 +787,7 @@ public class DiskStoreCommands implements GfshCommand {
       fieldsMessage += CliUtil.arrayToString(diskDirs);
       String errorString = CliStrings.format(
           CliStrings.UPGRADE_OFFLINE_DISK_STORE__MSG__ERROR_WHILE_COMPACTING_DISKSTORE_0_WITH_1_REASON_2,
-          new Object[] {diskStoreName, fieldsMessage});
+          diskStoreName, fieldsMessage);
       result = ResultBuilder.createUserErrorResult(errorString);
       if (logWrapper.fineEnabled()) {
         logWrapper.fine(e.getMessage(), e);
@@ -846,7 +846,7 @@ public class DiskStoreCommands implements GfshCommand {
   @CliMetaData(shellOnly = false, relatedTopic = {CliStrings.TOPIC_GEODE_DISKSTORE})
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
   public Result describeDiskStore(
-      @CliOption(key = CliStrings.DESCRIBE_DISK_STORE__MEMBER, mandatory = true,
+      @CliOption(key = CliStrings.MEMBER, mandatory = true,
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.DESCRIBE_DISK_STORE__MEMBER__HELP) final String memberName,
       @CliOption(key = CliStrings.DESCRIBE_DISK_STORE__NAME, mandatory = true,
@@ -1395,7 +1395,7 @@ public class DiskStoreCommands implements GfshCommand {
   public Result destroyDiskStore(
       @CliOption(key = CliStrings.DESTROY_DISK_STORE__NAME, mandatory = true,
           help = CliStrings.DESTROY_DISK_STORE__NAME__HELP) String name,
-      @CliOption(key = CliStrings.DESTROY_DISK_STORE__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           help = CliStrings.DESTROY_DISK_STORE__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) String[] groups) {
     try {

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DurableClientCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DurableClientCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DurableClientCommands.java
index ef744d1..87ad1be 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DurableClientCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DurableClientCommands.java
@@ -69,11 +69,11 @@ public class DurableClientCommands implements GfshCommand {
       @CliOption(key = CliStrings.LIST_DURABLE_CQS__DURABLECLIENTID, mandatory = true,
           help = CliStrings.LIST_DURABLE_CQS__DURABLECLIENTID__HELP) final String durableClientId,
 
-      @CliOption(key = CliStrings.LIST_DURABLE_CQS__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           help = CliStrings.LIST_DURABLE_CQS__MEMBER__HELP,
           optionContext = ConverterHint.MEMBERIDNAME) final String[] memberNameOrId,
 
-      @CliOption(key = CliStrings.LIST_DURABLE_CQS__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           help = CliStrings.LIST_DURABLE_CQS__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) final String[] group) {
     Result result = null;
@@ -119,9 +119,9 @@ public class DurableClientCommands implements GfshCommand {
           for (String cqName : cqNames) {
             if (isFirst) {
               isFirst = false;
-              table.accumulate(CliStrings.LIST_DURABLE_CQS__MEMBER, member);
+              table.accumulate(CliStrings.MEMBER, member);
             } else {
-              table.accumulate(CliStrings.LIST_DURABLE_CQS__MEMBER, "");
+              table.accumulate(CliStrings.MEMBER, "");
             }
             table.accumulate(CliStrings.LIST_DURABLE_CQS__NAME, cqName);
           }
@@ -149,10 +149,10 @@ public class DurableClientCommands implements GfshCommand {
           help = CliStrings.COUNT_DURABLE_CQ_EVENTS__DURABLE__CLIENT__ID__HELP) final String durableClientId,
       @CliOption(key = CliStrings.COUNT_DURABLE_CQ_EVENTS__DURABLE__CQ__NAME, mandatory = false,
           help = CliStrings.COUNT_DURABLE_CQ_EVENTS__DURABLE__CQ__NAME__HELP) final String cqName,
-      @CliOption(key = CliStrings.COUNT_DURABLE_CQ_EVENTS__MEMBER, mandatory = false,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS}, mandatory = false,
           help = CliStrings.COUNT_DURABLE_CQ_EVENTS__MEMBER__HELP,
           optionContext = ConverterHint.MEMBERIDNAME) final String[] memberNameOrId,
-      @CliOption(key = CliStrings.COUNT_DURABLE_CQ_EVENTS__GROUP, mandatory = false,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, mandatory = false,
           help = CliStrings.COUNT_DURABLE_CQ_EVENTS__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) final String[] group) {
 
@@ -196,10 +196,10 @@ public class DurableClientCommands implements GfshCommand {
   public Result closeDurableClient(
       @CliOption(key = CliStrings.CLOSE_DURABLE_CLIENTS__CLIENT__ID, mandatory = true,
           help = CliStrings.CLOSE_DURABLE_CLIENTS__CLIENT__ID__HELP) final String durableClientId,
-      @CliOption(key = CliStrings.CLOSE_DURABLE_CLIENTS__MEMBER, mandatory = false,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS}, mandatory = false,
           help = CliStrings.CLOSE_DURABLE_CLIENTS__MEMBER__HELP,
           optionContext = ConverterHint.MEMBERIDNAME) final String[] memberNameOrId,
-      @CliOption(key = CliStrings.CLOSE_DURABLE_CLIENTS__GROUP, mandatory = false,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, mandatory = false,
           help = CliStrings.COUNT_DURABLE_CQ_EVENTS__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) final String[] group) {
 
@@ -237,11 +237,11 @@ public class DurableClientCommands implements GfshCommand {
       @CliOption(key = CliStrings.CLOSE_DURABLE_CQS__NAME, mandatory = true,
           help = CliStrings.CLOSE_DURABLE_CQS__NAME__HELP) final String cqName,
 
-      @CliOption(key = CliStrings.CLOSE_DURABLE_CQS__MEMBER, mandatory = false,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS}, mandatory = false,
           help = CliStrings.CLOSE_DURABLE_CQS__MEMBER__HELP,
           optionContext = ConverterHint.MEMBERIDNAME) final String[] memberNameOrId,
 
-      @CliOption(key = CliStrings.CLOSE_DURABLE_CQS__GROUP, mandatory = false,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, mandatory = false,
           help = CliStrings.CLOSE_DURABLE_CQS__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) final String[] group) {
     Result result = null;
@@ -343,7 +343,7 @@ public class DurableClientCommands implements GfshCommand {
 
       for (String member : members) {
         long queueSize = memberQueueSizeTable.get(member);
-        table.accumulate(CliStrings.COUNT_DURABLE_CQ_EVENTS__MEMBER, member);
+        table.accumulate(CliStrings.MEMBER, member);
         table.accumulate(queueSizeColumnName, queueSize);
       }
       result = ResultBuilder.buildResult(table);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportLogsCommand.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportLogsCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportLogsCommand.java
index 3d68788..2075776 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportLogsCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportLogsCommand.java
@@ -68,11 +68,11 @@ public class ExportLogsCommand implements GfshCommand {
   public Result exportLogs(
       @CliOption(key = CliStrings.EXPORT_LOGS__DIR, help = CliStrings.EXPORT_LOGS__DIR__HELP,
           mandatory = false) String dirName,
-      @CliOption(key = CliStrings.EXPORT_LOGS__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.EXPORT_LOGS__GROUP__HELP) String[] groups,
-      @CliOption(key = CliStrings.EXPORT_LOGS__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.ALL_MEMBER_IDNAME,
           help = CliStrings.EXPORT_LOGS__MEMBER__HELP) String[] memberIds,

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/FunctionCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/FunctionCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/FunctionCommands.java
index b0193af..c04820e 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/FunctionCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/FunctionCommands.java
@@ -76,11 +76,11 @@ public class FunctionCommands implements GfshCommand {
       // TODO: Add optioncontext for functionID
       @CliOption(key = CliStrings.EXECUTE_FUNCTION__ID, mandatory = true,
           help = CliStrings.EXECUTE_FUNCTION__ID__HELP) String functionId,
-      @CliOption(key = CliStrings.EXECUTE_FUNCTION__ONGROUPS,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.EXECUTE_FUNCTION__ONGROUPS__HELP) String[] onGroups,
-      @CliOption(key = CliStrings.EXECUTE_FUNCTION__ONMEMBER,
+      @CliOption(key = CliStrings.MEMBER,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.EXECUTE_FUNCTION__ONMEMBER__HELP) String onMember,
@@ -300,7 +300,7 @@ public class FunctionCommands implements GfshCommand {
         }
       } else if (onMember != null && onMember.length() > 0) {
         DistributedMember member = CliUtil.getDistributedMemberByNameOrId(onMember); // fix for bug
-                                                                                     // 45658
+        // 45658
         if (member != null) {
           executeAndGetResults(functionId, filterString, resultCollector, arguments, cache, member,
               resultTable, onRegion);
@@ -414,11 +414,11 @@ public class FunctionCommands implements GfshCommand {
   public Result destroyFunction(
       @CliOption(key = CliStrings.DESTROY_FUNCTION__ID, mandatory = true,
           help = CliStrings.DESTROY_FUNCTION__HELP) String functionId,
-      @CliOption(key = CliStrings.DESTROY_FUNCTION__ONGROUPS,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.DESTROY_FUNCTION__ONGROUPS__HELP) String[] groups,
-      @CliOption(key = CliStrings.DESTROY_FUNCTION__ONMEMBER,
+      @CliOption(key = CliStrings.MEMBER,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.DESTROY_FUNCTION__ONMEMBER__HELP) String memberId) {
@@ -465,8 +465,8 @@ public class FunctionCommands implements GfshCommand {
     public Result preExecution(GfshParseResult parseResult) {
       Map<String, String> paramValueMap = parseResult.getParamValueStrings();
       Set<Entry<String, String>> setEnvMap = paramValueMap.entrySet();
-      String onGroup = paramValueMap.get(CliStrings.DESTROY_FUNCTION__ONGROUPS);
-      String onMember = paramValueMap.get(CliStrings.DESTROY_FUNCTION__ONMEMBER);
+      String onGroup = paramValueMap.get(CliStrings.GROUP);
+      String onMember = paramValueMap.get(CliStrings.MEMBER);
 
       if ((onGroup == null && onMember == null)) {
         Response response = readYesNo("Do you really want to destroy "
@@ -533,9 +533,11 @@ public class FunctionCommands implements GfshCommand {
   public Result listFunction(
       @CliOption(key = CliStrings.LIST_FUNCTION__MATCHES,
           help = CliStrings.LIST_FUNCTION__MATCHES__HELP) String matches,
-      @CliOption(key = CliStrings.LIST_FUNCTION__GROUP, optionContext = ConverterHint.MEMBERGROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
+          optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.LIST_FUNCTION__GROUP__HELP) String[] groups,
-      @CliOption(key = CliStrings.LIST_FUNCTION__MEMBER, optionContext = ConverterHint.MEMBERIDNAME,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
+          optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.LIST_FUNCTION__MEMBER__HELP) String[] members) {
     TabularResultData tabularData = ResultBuilder.createTabularResultData();
     boolean accumulatedData = false;

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/IndexCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/IndexCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/IndexCommands.java
index c61de37..4d8d5fe 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/IndexCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/IndexCommands.java
@@ -174,7 +174,7 @@ public class IndexCommands implements GfshCommand {
           optionContext = ConverterHint.REGION_PATH,
           help = CliStrings.CREATE_INDEX__REGION__HELP) String regionPath,
 
-      @CliOption(key = CliStrings.CREATE_INDEX__MEMBER, mandatory = false,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS}, mandatory = false,
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.CREATE_INDEX__MEMBER__HELP) final String[] memberNameOrID,
 
@@ -182,7 +182,7 @@ public class IndexCommands implements GfshCommand {
           unspecifiedDefaultValue = "range", optionContext = ConverterHint.INDEX_TYPE,
           help = CliStrings.CREATE_INDEX__TYPE__HELP) final String indexType,
 
-      @CliOption(key = CliStrings.CREATE_INDEX__GROUP, mandatory = false,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, mandatory = false,
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.CREATE_INDEX__GROUP__HELP) final String[] group) {
 
@@ -324,11 +324,11 @@ public class IndexCommands implements GfshCommand {
           optionContext = ConverterHint.REGION_PATH,
           help = CliStrings.DESTROY_INDEX__REGION__HELP) final String regionPath,
 
-      @CliOption(key = CliStrings.DESTROY_INDEX__MEMBER, mandatory = false,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS}, mandatory = false,
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.DESTROY_INDEX__MEMBER__HELP) final String[] memberNameOrID,
 
-      @CliOption(key = CliStrings.DESTROY_INDEX__GROUP, mandatory = false,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, mandatory = false,
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.DESTROY_INDEX__GROUP__HELP) final String[] group) {
 
@@ -412,7 +412,7 @@ public class IndexCommands implements GfshCommand {
       int num = 0;
       for (String memberId : successfulMembers) {
         infoResult.addLine(CliStrings.format(
-            CliStrings.format(CliStrings.DESTROY_INDEX__NUMBER__AND__MEMBER, ++num, memberId)));;
+            CliStrings.format(CliStrings.DESTROY_INDEX__NUMBER__AND__MEMBER, ++num, memberId)));
       }
       result = ResultBuilder.buildResult(infoResult);
 
@@ -524,11 +524,11 @@ public class IndexCommands implements GfshCommand {
   // TODO : Add optionContext for indexName
   public Result createDefinedIndexes(
 
-      @CliOption(key = CliStrings.CREATE_DEFINED_INDEXES__MEMBER, mandatory = false,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS}, mandatory = false,
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.CREATE_DEFINED_INDEXES__MEMBER__HELP) final String[] memberNameOrID,
 
-      @CliOption(key = CliStrings.CREATE_DEFINED_INDEXES__GROUP, mandatory = false,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, mandatory = false,
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.CREATE_DEFINED_INDEXES__GROUP__HELP) final String[] group) {
 

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommands.java
index bc506cf..88832ba 100755
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommands.java
@@ -167,7 +167,7 @@ public class LauncherLifecycleCommands implements GfshCommand {
       @CliOption(key = CliStrings.START_LOCATOR__FORCE, unspecifiedDefaultValue = "false",
           specifiedDefaultValue = "true",
           help = CliStrings.START_LOCATOR__FORCE__HELP) final Boolean force,
-      @CliOption(key = CliStrings.START_LOCATOR__GROUP, optionContext = ConverterHint.MEMBERGROUP,
+      @CliOption(key = CliStrings.GROUP, optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.START_LOCATOR__GROUP__HELP) final String group,
       @CliOption(key = CliStrings.START_LOCATOR__HOSTNAME_FOR_CLIENTS,
           help = CliStrings.START_LOCATOR__HOSTNAME_FOR_CLIENTS__HELP) final String hostnameForClients,
@@ -873,7 +873,7 @@ public class LauncherLifecycleCommands implements GfshCommand {
       @CliOption(key = CliStrings.START_SERVER__FORCE, unspecifiedDefaultValue = "false",
           specifiedDefaultValue = "true",
           help = CliStrings.START_SERVER__FORCE__HELP) final Boolean force,
-      @CliOption(key = CliStrings.START_SERVER__GROUP, optionContext = ConverterHint.MEMBERGROUP,
+      @CliOption(key = CliStrings.GROUP, optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.START_SERVER__GROUP__HELP) final String group,
       @CliOption(key = CliStrings.START_SERVER__HOSTNAME__FOR__CLIENTS,
           help = CliStrings.START_SERVER__HOSTNAME__FOR__CLIENTS__HELP) final String hostNameForClients,

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/MemberCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/MemberCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/MemberCommands.java
index 74264c3..12820f2 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/MemberCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/MemberCommands.java
@@ -58,8 +58,8 @@ public class MemberCommands implements GfshCommand {
   @CliCommand(value = {CliStrings.LIST_MEMBER}, help = CliStrings.LIST_MEMBER__HELP)
   @CliMetaData(shellOnly = false, relatedTopic = CliStrings.TOPIC_GEODE_SERVER)
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
-  public Result listMember(@CliOption(key = {CliStrings.LIST_MEMBER__GROUP},
-      unspecifiedDefaultValue = "", optionContext = ConverterHint.MEMBERGROUP,
+  public Result listMember(@CliOption(key = {CliStrings.GROUP}, unspecifiedDefaultValue = "",
+      optionContext = ConverterHint.MEMBERGROUP,
       help = CliStrings.LIST_MEMBER__GROUP__HELP) String group) {
     Result result = null;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/MiscellaneousCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/MiscellaneousCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/MiscellaneousCommands.java
index 2c3d766..637fa0e 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/MiscellaneousCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/MiscellaneousCommands.java
@@ -289,10 +289,10 @@ public class MiscellaneousCommands implements GfshCommand {
   @CliMetaData(relatedTopic = {CliStrings.TOPIC_GEODE_DEBUG_UTIL})
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.MANAGE)
   public Result gc(
-      @CliOption(key = CliStrings.GC__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           help = CliStrings.GC__GROUP__HELP) String[] groups,
-      @CliOption(key = CliStrings.GC__MEMBER, optionContext = ConverterHint.ALL_MEMBER_IDNAME,
+      @CliOption(key = CliStrings.MEMBER, optionContext = ConverterHint.ALL_MEMBER_IDNAME,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           help = CliStrings.GC__MEMBER__HELP) String memberId) {
     InternalCache cache = getCache();
@@ -351,9 +351,9 @@ public class MiscellaneousCommands implements GfshCommand {
             return ResultBuilder.createUserErrorResult((String) object);
           } else {
             Map<String, String> resultMap = (Map<String, String>) object;
-            toTabularResultData(resultTable, (String) resultMap.get("MemberId"),
-                (String) resultMap.get("HeapSizeBeforeGC"),
-                (String) resultMap.get("HeapSizeAfterGC"), (String) resultMap.get("TimeSpentInGC"));
+            toTabularResultData(resultTable, resultMap.get("MemberId"),
+                resultMap.get("HeapSizeBeforeGC"), resultMap.get("HeapSizeAfterGC"),
+                resultMap.get("TimeSpentInGC"));
           }
         } else {
           LogWrapper.getInstance().fine("ResultMap was null ");
@@ -380,11 +380,11 @@ public class MiscellaneousCommands implements GfshCommand {
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
   // TODO : Verify the auto-completion for multiple values.
   public Result netstat(
-      @CliOption(key = CliStrings.NETSTAT__MEMBER, mandatory = false,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS}, mandatory = false,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.ALL_MEMBER_IDNAME,
           help = CliStrings.NETSTAT__MEMBER__HELP) String[] members,
-      @CliOption(key = CliStrings.NETSTAT__GROUP, mandatory = false,
+      @CliOption(key = CliStrings.GROUP, mandatory = false,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.NETSTAT__GROUP__HELP) String group,
@@ -593,7 +593,7 @@ public class MiscellaneousCommands implements GfshCommand {
   @CliMetaData(shellOnly = false, relatedTopic = {CliStrings.TOPIC_GEODE_DEBUG_UTIL})
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
   public Result showLog(
-      @CliOption(key = CliStrings.SHOW_LOG_MEMBER, optionContext = ConverterHint.ALL_MEMBER_IDNAME,
+      @CliOption(key = CliStrings.MEMBER, optionContext = ConverterHint.ALL_MEMBER_IDNAME,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           help = CliStrings.SHOW_LOG_MEMBER_HELP, mandatory = true) String memberNameOrId,
       @CliOption(key = CliStrings.SHOW_LOG_LINE_NUM, unspecifiedDefaultValue = "0",
@@ -657,13 +657,12 @@ public class MiscellaneousCommands implements GfshCommand {
   @CliCommand(value = CliStrings.EXPORT_STACKTRACE, help = CliStrings.EXPORT_STACKTRACE__HELP)
   @CliMetaData(shellOnly = false, relatedTopic = {CliStrings.TOPIC_GEODE_DEBUG_UTIL})
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
-  public Result exportStackTrace(@CliOption(key = CliStrings.EXPORT_STACKTRACE__MEMBER,
+  public Result exportStackTrace(@CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
       optionContext = ConverterHint.ALL_MEMBER_IDNAME,
       help = CliStrings.EXPORT_STACKTRACE__HELP) String[] memberNameOrId,
 
-      @CliOption(key = CliStrings.EXPORT_STACKTRACE__GROUP,
-          optionContext = ConverterHint.ALL_MEMBER_IDNAME,
-          help = CliStrings.EXPORT_STACKTRACE__GROUP) String[] group,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
+          optionContext = ConverterHint.ALL_MEMBER_IDNAME, help = CliStrings.GROUP) String[] group,
 
       @CliOption(key = CliStrings.EXPORT_STACKTRACE__FILE,
           help = CliStrings.EXPORT_STACKTRACE__FILE__HELP) String fileName,
@@ -786,8 +785,7 @@ public class MiscellaneousCommands implements GfshCommand {
   @CliMetaData(shellOnly = false, relatedTopic = {CliStrings.TOPIC_GEODE_STATISTICS})
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
   public Result showMetrics(
-      @CliOption(key = {CliStrings.SHOW_METRICS__MEMBER},
-          optionContext = ConverterHint.ALL_MEMBER_IDNAME,
+      @CliOption(key = {CliStrings.MEMBER}, optionContext = ConverterHint.ALL_MEMBER_IDNAME,
           help = CliStrings.SHOW_METRICS__MEMBER__HELP) String memberNameOrId,
       @CliOption(key = {CliStrings.SHOW_METRICS__REGION}, optionContext = ConverterHint.REGION_PATH,
           help = CliStrings.SHOW_METRICS__REGION__HELP) String regionName,
@@ -1828,9 +1826,9 @@ public class MiscellaneousCommands implements GfshCommand {
       interceptor = "org.apache.geode.management.internal.cli.commands.MiscellaneousCommands$ChangeLogLevelInterceptor")
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.WRITE)
   public Result changeLogLevel(
-      @CliOption(key = CliStrings.CHANGE_LOGLEVEL__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           help = CliStrings.CHANGE_LOGLEVEL__MEMBER__HELP) String[] memberIds,
-      @CliOption(key = CliStrings.CHANGE_LOGLEVEL__GROUPS, unspecifiedDefaultValue = "",
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, unspecifiedDefaultValue = "",
           help = CliStrings.CHANGE_LOGLEVEL__GROUPS__HELP) String[] grps,
       @CliOption(key = CliStrings.CHANGE_LOGLEVEL__LOGLEVEL,
           optionContext = ConverterHint.LOG_LEVEL, mandatory = true, unspecifiedDefaultValue = "",
@@ -1858,8 +1856,8 @@ public class MiscellaneousCommands implements GfshCommand {
           Iterator<DistributedMember> it = ds.iterator();
           while (it.hasNext()) {
             DistributedMember mem = it.next();
-            if (mem.getName() == null ? false
-                : mem.getName().equals(member) || mem.getId().equals(member)) {
+            if (mem.getName() != null
+                && (mem.getName().equals(member) || mem.getId().equals(member))) {
               dsMembers.add(mem);
               break;
             }

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/QueueCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/QueueCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/QueueCommands.java
index 0f407e7..25b95cd 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/QueueCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/QueueCommands.java
@@ -58,7 +58,7 @@ public class QueueCommands implements GfshCommand {
   public Result createAsyncEventQueue(
       @CliOption(key = CliStrings.CREATE_ASYNC_EVENT_QUEUE__ID, mandatory = true,
           help = CliStrings.CREATE_ASYNC_EVENT_QUEUE__ID__HELP) String id,
-      @CliOption(key = CliStrings.CREATE_ASYNC_EVENT_QUEUE__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.CREATE_ASYNC_EVENT_QUEUE__GROUP__HELP) String[] groups,

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/RegionCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/RegionCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/RegionCommands.java
index 260230b..68dbbf0 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/RegionCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/RegionCommands.java
@@ -70,9 +70,11 @@ public class RegionCommands implements GfshCommand {
   @CliMetaData(shellOnly = false, relatedTopic = CliStrings.TOPIC_GEODE_REGION)
   @ResourceOperation(resource = Resource.DATA, operation = Operation.READ)
   public Result listRegion(
-      @CliOption(key = {CliStrings.LIST_REGION__GROUP}, optionContext = ConverterHint.MEMBERGROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
+          optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.LIST_REGION__GROUP__HELP) String[] group,
-      @CliOption(key = {CliStrings.LIST_REGION__MEMBER}, optionContext = ConverterHint.MEMBERIDNAME,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
+          optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.LIST_REGION__MEMBER__HELP) String[] memberNameOrId) {
     Result result = null;
     try {

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/WanCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/WanCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/WanCommands.java
index ad3d22c..a6745fd 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/WanCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/WanCommands.java
@@ -68,11 +68,11 @@ public class WanCommands implements GfshCommand {
   @CliCommand(value = CliStrings.CREATE_GATEWAYSENDER, help = CliStrings.CREATE_GATEWAYSENDER__HELP)
   @CliMetaData(relatedTopic = CliStrings.TOPIC_GEODE_WAN)
   @ResourceOperation(resource = Resource.DATA, operation = Operation.MANAGE)
-  public Result createGatewaySender(@CliOption(key = CliStrings.CREATE_GATEWAYSENDER__GROUP,
+  public Result createGatewaySender(@CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
       optionContext = ConverterHint.MEMBERGROUP,
       help = CliStrings.CREATE_GATEWAYSENDER__GROUP__HELP) String[] onGroups,
 
-      @CliOption(key = CliStrings.CREATE_GATEWAYSENDER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           help = CliStrings.CREATE_GATEWAYSENDER__MEMBER__HELP) String[] onMember,
@@ -187,11 +187,11 @@ public class WanCommands implements GfshCommand {
       mandatory = true, optionContext = ConverterHint.GATEWAY_SENDER_ID,
       help = CliStrings.START_GATEWAYSENDER__ID__HELP) String senderId,
 
-      @CliOption(key = CliStrings.START_GATEWAYSENDER__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.START_GATEWAYSENDER__GROUP__HELP) String[] onGroup,
 
-      @CliOption(key = CliStrings.START_GATEWAYSENDER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.START_GATEWAYSENDER__MEMBER__HELP) String[] onMember) {
 
@@ -245,20 +245,19 @@ public class WanCommands implements GfshCommand {
                 statusList.add(CliStrings.GATEWAY_ERROR);
                 statusList.add(
                     CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_ALREADY_STARTED_ON_MEMBER_1,
-                        new Object[] {id, member.getId()}));
+                        id, member.getId()));
               } else {
                 bean.start();
                 statusList.add(member.getId());
                 statusList.add(CliStrings.GATEWAY_OK);
                 statusList.add(CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_STARTED_ON_MEMBER_1,
-                    new Object[] {id, member.getId()}));
+                    id, member.getId()));
               }
             } else {
               statusList.add(member.getId());
               statusList.add(CliStrings.GATEWAY_ERROR);
-              statusList
-                  .add(CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_AVAILABLE_ON_MEMBER_1,
-                      new Object[] {id, member.getId()}));
+              statusList.add(CliStrings.format(
+                  CliStrings.GATEWAY_SENDER_0_IS_NOT_AVAILABLE_ON_MEMBER_1, id, member.getId()));
             }
             return statusList;
           }
@@ -271,9 +270,8 @@ public class WanCommands implements GfshCommand {
       try {
         futures = execService.invokeAll(callables);
       } catch (InterruptedException ite) {
-        accumulateStartResult(resultData, null, CliStrings.GATEWAY_ERROR,
-            CliStrings.format(CliStrings.GATEWAY_SENDER_0_COULD_NOT_BE_INVOKED_DUE_TO_1,
-                new Object[] {id, ite.getMessage()}));
+        accumulateStartResult(resultData, null, CliStrings.GATEWAY_ERROR, CliStrings.format(
+            CliStrings.GATEWAY_SENDER_0_COULD_NOT_BE_INVOKED_DUE_TO_1, id, ite.getMessage()));
       }
 
       for (Future<List> future : futures) {
@@ -286,12 +284,12 @@ public class WanCommands implements GfshCommand {
         } catch (InterruptedException ite) {
           accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
               CliStrings.format(CliStrings.GATEWAY_SENDER_0_COULD_NOT_BE_STARTED_ON_MEMBER_DUE_TO_1,
-                  new Object[] {id, ite.getMessage()}));
+                  id, ite.getMessage()));
           continue;
         } catch (ExecutionException ee) {
           accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
               CliStrings.format(CliStrings.GATEWAY_SENDER_0_COULD_NOT_BE_STARTED_ON_MEMBER_DUE_TO_1,
-                  new Object[] {id, ee.getMessage()}));
+                  id, ee.getMessage()));
           continue;
         }
       }
@@ -312,11 +310,11 @@ public class WanCommands implements GfshCommand {
       mandatory = true, optionContext = ConverterHint.GATEWAY_SENDER_ID,
       help = CliStrings.PAUSE_GATEWAYSENDER__ID__HELP) String senderId,
 
-      @CliOption(key = CliStrings.PAUSE_GATEWAYSENDER__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.PAUSE_GATEWAYSENDER__GROUP__HELP) String[] onGroup,
 
-      @CliOption(key = CliStrings.PAUSE_GATEWAYSENDER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.PAUSE_GATEWAYSENDER__MEMBER__HELP) String[] onMember) {
 
@@ -352,22 +350,22 @@ public class WanCommands implements GfshCommand {
             if (bean.isPaused()) {
               accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
                   CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_ALREADY_PAUSED_ON_MEMBER_1,
-                      new Object[] {senderId, member.getId()}));
+                      senderId, member.getId()));
             } else {
               bean.pause();
               accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_OK,
-                  CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_PAUSED_ON_MEMBER_1,
-                      new Object[] {senderId, member.getId()}));
+                  CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_PAUSED_ON_MEMBER_1, senderId,
+                      member.getId()));
             }
           } else {
             accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
-                CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_RUNNING_ON_MEMBER_1,
-                    new Object[] {senderId, member.getId()}));
+                CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_RUNNING_ON_MEMBER_1, senderId,
+                    member.getId()));
           }
         } else {
           accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
-              CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_AVAILABLE_ON_MEMBER_1,
-                  new Object[] {senderId, member.getId()}));
+              CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_AVAILABLE_ON_MEMBER_1, senderId,
+                  member.getId()));
         }
       }
       result = ResultBuilder.buildResult(resultData);
@@ -385,10 +383,10 @@ public class WanCommands implements GfshCommand {
       mandatory = true, optionContext = ConverterHint.GATEWAY_SENDER_ID,
       help = CliStrings.RESUME_GATEWAYSENDER__ID__HELP) String senderId,
 
-      @CliOption(key = CliStrings.RESUME_GATEWAYSENDER__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.RESUME_GATEWAYSENDER__GROUP__HELP) String[] onGroup,
-      @CliOption(key = CliStrings.RESUME_GATEWAYSENDER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.RESUME_GATEWAYSENDER__MEMBER__HELP) String[] onMember) {
 
@@ -424,22 +422,22 @@ public class WanCommands implements GfshCommand {
             if (bean.isPaused()) {
               bean.resume();
               accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_OK,
-                  CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_RESUMED_ON_MEMBER_1,
-                      new Object[] {senderId, member.getId()}));
+                  CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_RESUMED_ON_MEMBER_1, senderId,
+                      member.getId()));
             } else {
               accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
-                  CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_PAUSED_ON_MEMBER_1,
-                      new Object[] {senderId, member.getId()}));
+                  CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_PAUSED_ON_MEMBER_1, senderId,
+                      member.getId()));
             }
           } else {
             accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
-                CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_RUNNING_ON_MEMBER_1,
-                    new Object[] {senderId, member.getId()}));
+                CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_RUNNING_ON_MEMBER_1, senderId,
+                    member.getId()));
           }
         } else {
           accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
-              CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_AVAILABLE_ON_MEMBER_1,
-                  new Object[] {senderId, member.getId()}));
+              CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_AVAILABLE_ON_MEMBER_1, senderId,
+                  member.getId()));
         }
       }
       result = ResultBuilder.buildResult(resultData);
@@ -457,11 +455,11 @@ public class WanCommands implements GfshCommand {
       mandatory = true, optionContext = ConverterHint.GATEWAY_SENDER_ID,
       help = CliStrings.STOP_GATEWAYSENDER__ID__HELP) String senderId,
 
-      @CliOption(key = CliStrings.STOP_GATEWAYSENDER__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.STOP_GATEWAYSENDER__GROUP__HELP) String[] onGroup,
 
-      @CliOption(key = CliStrings.STOP_GATEWAYSENDER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.STOP_GATEWAYSENDER__MEMBER__HELP) String[] onMember) {
 
@@ -495,18 +493,18 @@ public class WanCommands implements GfshCommand {
           if (bean.isRunning()) {
             bean.stop();
             accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_OK,
-                CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_STOPPED_ON_MEMBER_1,
-                    new Object[] {senderId, member.getId()}));
+                CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_STOPPED_ON_MEMBER_1, senderId,
+                    member.getId()));
 
           } else {
             accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
-                CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_RUNNING_ON_MEMBER_1,
-                    new Object[] {senderId, member.getId()}));
+                CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_RUNNING_ON_MEMBER_1, senderId,
+                    member.getId()));
           }
         } else {
           accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
-              CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_AVAILABLE_ON_MEMBER_1,
-                  new Object[] {senderId, member.getId()}));
+              CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_AVAILABLE_ON_MEMBER_1, senderId,
+                  member.getId()));
         }
       }
       result = ResultBuilder.buildResult(resultData);
@@ -521,11 +519,11 @@ public class WanCommands implements GfshCommand {
       help = CliStrings.CREATE_GATEWAYRECEIVER__HELP)
   @CliMetaData(relatedTopic = CliStrings.TOPIC_GEODE_WAN)
   @ResourceOperation(resource = Resource.DATA, operation = Operation.MANAGE)
-  public Result createGatewayReceiver(@CliOption(key = CliStrings.CREATE_GATEWAYRECEIVER__GROUP,
+  public Result createGatewayReceiver(@CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
       optionContext = ConverterHint.MEMBERGROUP,
       help = CliStrings.CREATE_GATEWAYRECEIVER__GROUP__HELP) String[] onGroups,
 
-      @CliOption(key = CliStrings.CREATE_GATEWAYRECEIVER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           help = CliStrings.CREATE_GATEWAYRECEIVER__MEMBER__HELP) String[] onMember,
@@ -636,12 +634,12 @@ public class WanCommands implements GfshCommand {
             gatewaySenderExists = true;
             bean.rebalance();
             accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_OK,
-                CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_REBALANCED_ON_MEMBER_1,
-                    new Object[] {senderId, member.getId()}));
+                CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_REBALANCED_ON_MEMBER_1, senderId,
+                    member.getId()));
           } else {
             accumulateStartResult(resultData, member.getId(), CliStrings.GATEWAY_ERROR,
                 CliStrings.format(CliStrings.GATEWAY_SENDER_0_IS_NOT_AVAILABLE_ON_MEMBER_1,
-                    new Object[] {senderId, member.getId()}));
+                    senderId, member.getId()));
           }
         }
         if (gatewaySenderExists) {
@@ -663,11 +661,11 @@ public class WanCommands implements GfshCommand {
       help = CliStrings.START_GATEWAYRECEIVER__HELP)
   @CliMetaData(relatedTopic = CliStrings.TOPIC_GEODE_WAN)
   @ResourceOperation(resource = Resource.DATA, operation = Operation.MANAGE)
-  public Result startGatewayReceiver(@CliOption(key = CliStrings.START_GATEWAYRECEIVER__GROUP,
+  public Result startGatewayReceiver(@CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
       optionContext = ConverterHint.MEMBERGROUP,
       help = CliStrings.START_GATEWAYRECEIVER__GROUP__HELP) String[] onGroup,
 
-      @CliOption(key = CliStrings.START_GATEWAYRECEIVER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.START_GATEWAYRECEIVER__MEMBER__HELP) String[] onMember) {
     Result result = null;
@@ -730,11 +728,11 @@ public class WanCommands implements GfshCommand {
   @ResourceOperation(resource = Resource.DATA, operation = Operation.MANAGE)
   public Result stopGatewayReceiver(
 
-      @CliOption(key = CliStrings.STOP_GATEWAYRECEIVER__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.STOP_GATEWAYRECEIVER__GROUP__HELP) String[] onGroup,
 
-      @CliOption(key = CliStrings.STOP_GATEWAYRECEIVER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.STOP_GATEWAYRECEIVER__MEMBER__HELP) String[] onMember) {
 
@@ -797,9 +795,11 @@ public class WanCommands implements GfshCommand {
   @CliMetaData(relatedTopic = CliStrings.TOPIC_GEODE_WAN)
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
   public Result listGateway(
-      @CliOption(key = CliStrings.LIST_GATEWAY__MEMBER, optionContext = ConverterHint.MEMBERIDNAME,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
+          optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.LIST_GATEWAY__MEMBER__HELP) String[] onMember,
-      @CliOption(key = CliStrings.LIST_GATEWAY__GROUP, optionContext = ConverterHint.MEMBERGROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
+          optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.LIST_GATEWAY__GROUP__HELP) String[] onGroup) {
 
     Result result = null;
@@ -878,11 +878,11 @@ public class WanCommands implements GfshCommand {
       mandatory = true, optionContext = ConverterHint.GATEWAY_SENDER_ID,
       help = CliStrings.STATUS_GATEWAYSENDER__ID__HELP) String senderId,
 
-      @CliOption(key = CliStrings.STATUS_GATEWAYSENDER__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.STATUS_GATEWAYSENDER__GROUP__HELP) String[] onGroup,
 
-      @CliOption(key = CliStrings.STATUS_GATEWAYSENDER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.STATUS_GATEWAYSENDER__MEMBER__HELP) String[] onMember) {
 
@@ -936,11 +936,11 @@ public class WanCommands implements GfshCommand {
       help = CliStrings.STATUS_GATEWAYRECEIVER__HELP)
   @CliMetaData(relatedTopic = CliStrings.TOPIC_GEODE_WAN)
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
-  public Result statusGatewayReceiver(@CliOption(key = CliStrings.STATUS_GATEWAYRECEIVER__GROUP,
+  public Result statusGatewayReceiver(@CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
       optionContext = ConverterHint.MEMBERGROUP,
       help = CliStrings.STATUS_GATEWAYRECEIVER__GROUP__HELP) String[] onGroup,
 
-      @CliOption(key = CliStrings.STATUS_GATEWAYRECEIVER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           help = CliStrings.STATUS_GATEWAYRECEIVER__MEMBER__HELP) String[] onMember) {
 
@@ -991,10 +991,10 @@ public class WanCommands implements GfshCommand {
   @CliMetaData(relatedTopic = CliStrings.TOPIC_GEODE_WAN)
   @ResourceOperation(resource = Resource.DATA, operation = Operation.MANAGE)
   public Result destroyGatewaySender(
-      @CliOption(key = CliStrings.DESTROY_GATEWAYSENDER__GROUP,
+      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           optionContext = ConverterHint.MEMBERGROUP,
           help = CliStrings.DESTROY_GATEWAYSENDER__GROUP__HELP) String[] onGroups,
-      @CliOption(key = CliStrings.DESTROY_GATEWAYSENDER__MEMBER,
+      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
           optionContext = ConverterHint.MEMBERIDNAME,
           unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
           help = CliStrings.DESTROY_GATEWAYSENDER__MEMBER__HELP) String[] onMember,


[07/24] geode git commit: GEODE-2628: fix StatisticsImplTest use of Mockito 2.7.11

Posted by je...@apache.org.
GEODE-2628: fix StatisticsImplTest use of Mockito 2.7.11


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

Branch: refs/heads/feature/GEODE-3071
Commit: c41d788b0a27993cb609c27b42bfd33303a1e7e3
Parents: 740a4ef
Author: Kirk Lund <kl...@apache.org>
Authored: Tue Jun 13 10:57:54 2017 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed Jun 14 11:06:32 2017 -0700

----------------------------------------------------------------------
 .../internal/statistics/StatisticsImplTest.java | 63 ++++++++++++--------
 1 file changed, 37 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/c41d788b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
index ea8d285..2747252 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
@@ -22,6 +22,7 @@ import java.util.function.IntSupplier;
 import java.util.function.LongSupplier;
 
 import org.apache.logging.log4j.Logger;
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -35,27 +36,38 @@ import org.apache.geode.test.junit.categories.UnitTest;
  */
 @Category(UnitTest.class)
 public class StatisticsImplTest {
-  @Rule
-  public ExpectedException thrown = ExpectedException.none();
 
+  private Logger originalLogger;
   private StatisticsImpl stats;
 
+  @Rule
+  public ExpectedException thrown = ExpectedException.none();
+
   @Before
   public void createStats() {
-    final StatisticsTypeImpl type = mock(StatisticsTypeImpl.class);
+    originalLogger = StatisticsImpl.logger;
+
+    StatisticsTypeImpl type = mock(StatisticsTypeImpl.class);
     when(type.getIntStatCount()).thenReturn(5);
     when(type.getDoubleStatCount()).thenReturn(5);
     when(type.getLongStatCount()).thenReturn(5);
-    final String textId = "";
-    final long numbericId = 0;
-    final long uniqueId = 0;
-    final int osStatFlags = 0;
-    final boolean atomicIncrements = false;
-    final StatisticsManager system = mock(StatisticsManager.class);
+
+    String textId = "";
+    long numbericId = 0;
+    long uniqueId = 0;
+    int osStatFlags = 0;
+    boolean atomicIncrements = false;
+    StatisticsManager system = mock(StatisticsManager.class);
+
     stats = new LocalStatisticsImpl(type, textId, numbericId, uniqueId, atomicIncrements,
         osStatFlags, system);
   }
 
+  @After
+  public void tearDown() {
+    StatisticsImpl.logger = originalLogger;
+  }
+
   @Test
   public void invokeIntSuppliersShouldUpdateStats() {
     IntSupplier supplier1 = mock(IntSupplier.class);
@@ -108,23 +120,22 @@ public class StatisticsImplTest {
 
   @Test
   public void invokeSuppliersShouldLogErrorOnlyOnce() {
-    final Logger originalLogger = StatisticsImpl.logger;
-    try {
-      final Logger logger = mock(Logger.class);
-      StatisticsImpl.logger = logger;
-      IntSupplier supplier1 = mock(IntSupplier.class);
-      when(supplier1.getAsInt()).thenThrow(NullPointerException.class);
-      stats.setIntSupplier(4, supplier1);
-      assertEquals(1, stats.invokeSuppliers());
-      verify(logger, times(1)).warn(anyString(), anyString(), anyInt(),
-          isA(NullPointerException.class));
-      assertEquals(1, stats.invokeSuppliers());
-      // Make sure the logger isn't invoked again
-      verify(logger, times(1)).warn(anyString(), anyString(), anyInt(),
-          isA(NullPointerException.class));
-    } finally {
-      StatisticsImpl.logger = originalLogger;
-    }
+    Logger logger = mock(Logger.class);
+    StatisticsImpl.logger = logger;
+    IntSupplier supplier1 = mock(IntSupplier.class);
+    when(supplier1.getAsInt()).thenThrow(NullPointerException.class);
+    stats.setIntSupplier(4, supplier1);
+    assertEquals(1, stats.invokeSuppliers());
+
+    // String message, Object p0, Object p1, Object p2
+    verify(logger, times(1)).warn(anyString(), isNull(), anyInt(),
+        isA(NullPointerException.class));
+
+    assertEquals(1, stats.invokeSuppliers());
+
+    // Make sure the logger isn't invoked again
+    verify(logger, times(1)).warn(anyString(), isNull(), anyInt(),
+        isA(NullPointerException.class));
   }
 
   @Test


[03/24] geode git commit: GEODE-2818: add alias to any command's options that involves "group", "member", "jar" and replace CliString variables with GROUP, MEMBER, JAR, etc.

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/WanCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/WanCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/WanCommandsController.java
index 4fd4b96..6a01c3e 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/WanCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/WanCommandsController.java
@@ -46,19 +46,16 @@ public class WanCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.GET, value = "/gateways")
   @ResponseBody
   public String listGateways(
-      @RequestParam(value = CliStrings.LIST_GATEWAY__GROUP, required = false) final String[] groups,
-      @RequestParam(value = CliStrings.LIST_GATEWAY__MEMBER,
-          required = false) final String[] members) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.LIST_GATEWAY);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.LIST_GATEWAY__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.LIST_GATEWAY__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -67,12 +64,10 @@ public class WanCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.POST, value = "/gateways/receivers")
   @ResponseBody
   public String createGatewayReceiver(
-      @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__GROUP,
-          required = false) final String[] groups,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART,
           required = false) final Boolean manualStart,
-      @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__MEMBER,
-          required = false) final String[] members,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members,
       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__STARTPORT,
           required = false) final Integer startPort,
       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT,
@@ -88,8 +83,7 @@ public class WanCommandsController extends AbstractCommandsController {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.CREATE_GATEWAYRECEIVER);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(manualStart)) {
@@ -98,8 +92,7 @@ public class WanCommandsController extends AbstractCommandsController {
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(startPort)) {
@@ -137,10 +130,8 @@ public class WanCommandsController extends AbstractCommandsController {
   public String createGatewaySender(
       @RequestParam(CliStrings.CREATE_GATEWAYSENDER__ID) final String gatewaySenderId,
       @RequestParam(CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID) final Integer remoteDistributedSystemId,
-      @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__MEMBER,
-          required = false) final String[] members,
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members,
       @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__PARALLEL,
           required = false) final Boolean parallel,
       @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__MANUALSTART,
@@ -180,13 +171,11 @@ public class WanCommandsController extends AbstractCommandsController {
         String.valueOf(remoteDistributedSystemId));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.CREATE_GATEWAYSENDER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.CREATE_GATEWAYSENDER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(parallel)) {
@@ -271,21 +260,17 @@ public class WanCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.DELETE, value = "/gateways/senders/{id}")
   @ResponseBody
   public String destroyGatewaySender(@PathVariable("id") final String gatewaySenderId,
-      @RequestParam(value = CliStrings.DESTROY_GATEWAYSENDER__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.DESTROY_GATEWAYSENDER__MEMBER,
-          required = false) final String[] members) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.DESTROY_GATEWAYSENDER);
     command.addOption(CliStrings.CREATE_GATEWAYSENDER__ID, gatewaySenderId);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.CREATE_GATEWAYSENDER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.CREATE_GATEWAYSENDER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
     return processCommand(command.toString());
   }
@@ -307,22 +292,18 @@ public class WanCommandsController extends AbstractCommandsController {
       params = "op=pause")
   @ResponseBody
   public String pauseGatewaySender(@PathVariable("id") final String gatewaySenderId,
-      @RequestParam(value = CliStrings.PAUSE_GATEWAYSENDER__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.PAUSE_GATEWAYSENDER__MEMBER,
-          required = false) final String[] members) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.PAUSE_GATEWAYSENDER);
 
     command.addOption(CliStrings.PAUSE_GATEWAYSENDER__ID, decode(gatewaySenderId));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.PAUSE_GATEWAYSENDER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.PAUSE_GATEWAYSENDER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -333,22 +314,18 @@ public class WanCommandsController extends AbstractCommandsController {
       params = "op=resume")
   @ResponseBody
   public String resumeGatewaySender(@PathVariable("id") final String gatewaySenderId,
-      @RequestParam(value = CliStrings.RESUME_GATEWAYSENDER__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.RESUME_GATEWAYSENDER__MEMBER,
-          required = false) final String[] members) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.RESUME_GATEWAYSENDER);
 
     command.addOption(CliStrings.RESUME_GATEWAYSENDER__ID, decode(gatewaySenderId));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.RESUME_GATEWAYSENDER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.RESUME_GATEWAYSENDER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -358,20 +335,16 @@ public class WanCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.POST, value = "/gateways/receivers", params = "op=start")
   @ResponseBody
   public String startGatewayReceiver(
-      @RequestParam(value = CliStrings.START_GATEWAYRECEIVER__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.START_GATEWAYRECEIVER__MEMBER,
-          required = false) final String[] members) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_GATEWAYRECEIVER);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.START_GATEWAYRECEIVER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.START_GATEWAYRECEIVER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -382,22 +355,18 @@ public class WanCommandsController extends AbstractCommandsController {
   @ResponseBody
   public String startGatewaySender(
       @RequestParam(CliStrings.START_GATEWAYSENDER__ID) final String gatewaySenderId,
-      @RequestParam(value = CliStrings.START_GATEWAYSENDER__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.START_GATEWAYSENDER__MEMBER,
-          required = false) final String[] members) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_GATEWAYSENDER);
 
     command.addOption(CliStrings.START_GATEWAYSENDER__ID, gatewaySenderId);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.START_GATEWAYSENDER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.START_GATEWAYSENDER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -406,20 +375,16 @@ public class WanCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.GET, value = "/gateways/receivers")
   @ResponseBody
   public String statusGatewayReceivers(
-      @RequestParam(value = CliStrings.STATUS_GATEWAYRECEIVER__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.STATUS_GATEWAYRECEIVER__MEMBER,
-          required = false) final String[] members) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.STATUS_GATEWAYRECEIVER);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.STATUS_GATEWAYRECEIVER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.STATUS_GATEWAYRECEIVER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -428,22 +393,18 @@ public class WanCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.GET, value = "/gateways/senders/{id}")
   @ResponseBody
   public String statusGatewaySenders(@PathVariable("id") final String gatewaySenderId,
-      @RequestParam(value = CliStrings.STATUS_GATEWAYSENDER__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.STATUS_GATEWAYSENDER__MEMBER,
-          required = false) final String[] members) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.STATUS_GATEWAYSENDER);
 
     command.addOption(CliStrings.STATUS_GATEWAYSENDER__ID, decode(gatewaySenderId));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.STATUS_GATEWAYSENDER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.STATUS_GATEWAYSENDER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -452,20 +413,16 @@ public class WanCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.POST, value = "/gateways/receivers", params = "op=stop")
   @ResponseBody
   public String stopGatewayReceiver(
-      @RequestParam(value = CliStrings.STOP_GATEWAYRECEIVER__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.STOP_GATEWAYRECEIVER__MEMBER,
-          required = false) final String[] members) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.STOP_GATEWAYRECEIVER);
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.STOP_GATEWAYRECEIVER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.STOP_GATEWAYRECEIVER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());
@@ -474,22 +431,18 @@ public class WanCommandsController extends AbstractCommandsController {
   @RequestMapping(method = RequestMethod.POST, value = "/gateways/senders/{id}", params = "op=stop")
   @ResponseBody
   public String stopGatewaySender(@PathVariable("id") final String gatewaySenderId,
-      @RequestParam(value = CliStrings.STOP_GATEWAYRECEIVER__GROUP,
-          required = false) final String[] groups,
-      @RequestParam(value = CliStrings.STOP_GATEWAYRECEIVER__MEMBER,
-          required = false) final String[] members) {
+      @RequestParam(value = CliStrings.GROUP, required = false) final String[] groups,
+      @RequestParam(value = CliStrings.MEMBER, required = false) final String[] members) {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.STOP_GATEWAYSENDER);
 
     command.addOption(CliStrings.STOP_GATEWAYSENDER__ID, decode(gatewaySenderId));
 
     if (hasValue(groups)) {
-      command.addOption(CliStrings.STOP_GATEWAYSENDER__GROUP,
-          StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.GROUP, StringUtils.join(groups, StringUtils.COMMA_DELIMITER));
     }
 
     if (hasValue(members)) {
-      command.addOption(CliStrings.STOP_GATEWAYSENDER__MEMBER,
-          StringUtils.join(members, StringUtils.COMMA_DELIMITER));
+      command.addOption(CliStrings.MEMBER, StringUtils.join(members, StringUtils.COMMA_DELIMITER));
     }
 
     return processCommand(command.toString());

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigCommandsDUnitTest.java
index a110025..eeec317 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ConfigCommandsDUnitTest.java
@@ -302,7 +302,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     final DistributionConfig config = cache.getSystem().getConfig();
 
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG);
-    csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__MEMBER, controller);
+    csb.addOption(CliStrings.MEMBER, controller);
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__LEVEL, "info");
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__FILE__SIZE__LIMIT, "50");
     csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__DISK__SPACE__LIMIT, "32");
@@ -527,7 +527,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
     // Test altering the runtime config
     CommandStringBuilder commandStringBuilder =
         new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG);
-    commandStringBuilder.addOption(CliStrings.ALTER_RUNTIME_CONFIG__GROUP, groupName);
+    commandStringBuilder.addOption(CliStrings.GROUP, groupName);
     commandStringBuilder.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__LEVEL, "fine");
     CommandResult cmdResult = executeCommand(commandStringBuilder.toString());
 

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index d024022..e913746 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -390,8 +390,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     return () -> {
       try {
         MBeanServer mbeanServer = MBeanJMXAdapter.mbeanServer;
-        String queryExp = MessageFormat.format(ManagementConstants.OBJECTNAME__REGION_MXBEAN,
-            new Object[] {regionPath, "*"});
+        String queryExp =
+            MessageFormat.format(ManagementConstants.OBJECTNAME__REGION_MXBEAN, regionPath, "*");
         ObjectName queryExpON = new ObjectName(queryExp);
         return mbeanServer.queryNames(null, queryExpON).size() == mbeanCount;
       } catch (MalformedObjectNameException mone) {
@@ -517,7 +517,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
   private void regionAlterGroupTest() {
     CommandStringBuilder commandStringBuilder = new CommandStringBuilder(CliStrings.ALTER_REGION);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__REGION, this.alterRegionName);
-    commandStringBuilder.addOption(CliStrings.ALTER_REGION__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__EVICTIONMAX, "5764");
     CommandResult cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -541,7 +541,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
 
     commandStringBuilder = new CommandStringBuilder(CliStrings.ALTER_REGION);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__REGION, "/" + this.alterRegionName);
-    commandStringBuilder.addOption(CliStrings.ALTER_REGION__GROUP, "Group2");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group2");
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__EVICTIONMAX, "6963");
     cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -630,7 +630,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
   private void regionAlterNoChangeTest() {
     CommandStringBuilder commandStringBuilder = new CommandStringBuilder(CliStrings.ALTER_REGION);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__REGION, "/" + this.alterRegionName);
-    commandStringBuilder.addOption(CliStrings.ALTER_REGION__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__CLONINGENABLED, "true");
 
     CommandResult cmdResult = executeCommand(commandStringBuilder.toString());
@@ -671,7 +671,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
   private void regionAlterSetDefaultsTest() {
     CommandStringBuilder commandStringBuilder = new CommandStringBuilder(CliStrings.ALTER_REGION);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__REGION, "/" + this.alterRegionName);
-    commandStringBuilder.addOption(CliStrings.ALTER_REGION__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__EVICTIONMAX);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__CLONINGENABLED);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__ASYNCEVENTQUEUEID);
@@ -716,7 +716,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     // Start out by putting 3 entries into each of the plug-in sets
     CommandStringBuilder commandStringBuilder = new CommandStringBuilder(CliStrings.ALTER_REGION);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__REGION, "/" + this.alterRegionName);
-    commandStringBuilder.addOption(CliStrings.ALTER_REGION__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__ASYNCEVENTQUEUEID,
         this.alterAsyncEventQueueId1);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__ASYNCEVENTQUEUEID,
@@ -768,7 +768,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     // Now take 1 entry out of each of the sets
     commandStringBuilder = new CommandStringBuilder(CliStrings.ALTER_REGION);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__REGION, "/" + this.alterRegionName);
-    commandStringBuilder.addOption(CliStrings.ALTER_REGION__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__ASYNCEVENTQUEUEID,
         this.alterAsyncEventQueueId1);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__ASYNCEVENTQUEUEID,
@@ -811,7 +811,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     // Add 1 back to each of the sets
     commandStringBuilder = new CommandStringBuilder(CliStrings.ALTER_REGION);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__REGION, "/" + this.alterRegionName);
-    commandStringBuilder.addOption(CliStrings.ALTER_REGION__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__ASYNCEVENTQUEUEID,
         this.alterAsyncEventQueueId1);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__ASYNCEVENTQUEUEID,
@@ -934,7 +934,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     // Add 1 back to each of the sets
     commandStringBuilder = new CommandStringBuilder(CliStrings.ALTER_REGION);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__REGION, "/" + this.alterRegionName);
-    commandStringBuilder.addOption(CliStrings.ALTER_REGION__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__CACHELISTENER, "''");
     cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -1025,7 +1025,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     commandStringBuilder.addOption(CliStrings.CREATE_REGION__REGION, regionName);
     commandStringBuilder.addOption(CliStrings.CREATE_REGION__REGIONSHORTCUT, "REPLICATE");
     commandStringBuilder.addOption(CliStrings.CREATE_REGION__STATISTICSENABLED, "true");
-    commandStringBuilder.addOption(CliStrings.CREATE_REGION__GROUP, groupName);
+    commandStringBuilder.addOption(CliStrings.GROUP, groupName);
     CommandResult cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -1068,7 +1068,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     // Test altering the region
     commandStringBuilder = new CommandStringBuilder(CliStrings.ALTER_REGION);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__REGION, regionName);
-    commandStringBuilder.addOption(CliStrings.ALTER_REGION__GROUP, groupName);
+    commandStringBuilder.addOption(CliStrings.GROUP, groupName);
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__ENTRYEXPIRATIONTIMETOLIVE, "45635");
     commandStringBuilder.addOption(CliStrings.ALTER_REGION__ENTRYEXPIRATIONTTLACTION, "DESTROY");
     cmdResult = executeCommand(commandStringBuilder.toString());
@@ -1174,7 +1174,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     commandStringBuilder.addOption(CliStrings.CREATE_REGION__REGION, regionName);
     commandStringBuilder.addOption(CliStrings.CREATE_REGION__REGIONSHORTCUT, "REPLICATE");
     commandStringBuilder.addOption(CliStrings.CREATE_REGION__STATISTICSENABLED, "true");
-    commandStringBuilder.addOption(CliStrings.CREATE_REGION__GROUP, groupName);
+    commandStringBuilder.addOption(CliStrings.GROUP, groupName);
     CommandResult cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
index 1aad49c..07cdb11 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
@@ -803,7 +803,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
     CommandStringBuilder commandStringBuilder =
         new CommandStringBuilder(CliStrings.CREATE_DISK_STORE);
     commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__NAME, diskStoreName);
-    commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__GROUP, groupName);
+    commandStringBuilder.addOption(CliStrings.GROUP, groupName);
     commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__DIRECTORY_AND_SIZE,
         diskStoreDir.getAbsolutePath());
     CommandResult cmdResult = executeCommand(commandStringBuilder.toString());
@@ -857,7 +857,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
     // Test destroying the disk store
     commandStringBuilder = new CommandStringBuilder(CliStrings.DESTROY_DISK_STORE);
     commandStringBuilder.addOption(CliStrings.DESTROY_DISK_STORE__NAME, diskStoreName);
-    commandStringBuilder.addOption(CliStrings.DESTROY_DISK_STORE__GROUP, groupName);
+    commandStringBuilder.addOption(CliStrings.GROUP, groupName);
     cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
@@ -1181,7 +1181,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
     CommandStringBuilder commandStringBuilder =
         new CommandStringBuilder(CliStrings.CREATE_DISK_STORE);
     commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__NAME, diskStore1Name);
-    commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__ALLOW_FORCE_COMPACTION, "true");
     commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__AUTO_COMPACT, "false");
     commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__COMPACTION_THRESHOLD, "67");
@@ -1211,7 +1211,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     // Verify that all of the attributes of the disk store were set correctly.
     commandStringBuilder = new CommandStringBuilder(CliStrings.DESCRIBE_DISK_STORE);
-    commandStringBuilder.addOption(CliStrings.DESCRIBE_DISK_STORE__MEMBER, vm1Name);
+    commandStringBuilder.addOption(CliStrings.MEMBER, vm1Name);
     commandStringBuilder.addOption(CliStrings.DESCRIBE_DISK_STORE__NAME, diskStore1Name);
     cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -1229,7 +1229,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     commandStringBuilder = new CommandStringBuilder(CliStrings.CREATE_DISK_STORE);
     commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__NAME, diskStore2Name);
-    commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__GROUP, "Group2");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group2");
     commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__DIRECTORY_AND_SIZE,
         diskStore2Dir.getAbsolutePath());
     cmdResult = executeCommand(commandStringBuilder.toString());
@@ -1327,7 +1327,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
     CommandStringBuilder commandStringBuilder =
         new CommandStringBuilder(CliStrings.DESTROY_DISK_STORE);
     commandStringBuilder.addOption(CliStrings.DESTROY_DISK_STORE__NAME, diskStore1Name);
-    commandStringBuilder.addOption(CliStrings.DESTROY_DISK_STORE__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
     String stringResult = commandResultToString(cmdResult);
@@ -1351,7 +1351,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     commandStringBuilder = new CommandStringBuilder(CliStrings.DESTROY_DISK_STORE);
     commandStringBuilder.addOption(CliStrings.DESTROY_DISK_STORE__NAME, diskStore2Name);
-    commandStringBuilder.addOption(CliStrings.DESTROY_DISK_STORE__GROUP, "Group2");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group2");
     cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
     stringResult = commandResultToString(cmdResult);
@@ -1376,7 +1376,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
     commandStringBuilder = new CommandStringBuilder(CliStrings.DESTROY_DISK_STORE);
     commandStringBuilder.addOption(CliStrings.DESTROY_DISK_STORE__NAME, diskStore1Name);
-    commandStringBuilder.addOption(CliStrings.DESTROY_DISK_STORE__GROUP, "Group2");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group2");
     cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
     stringResult = commandResultToString(cmdResult);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
index 14d4d3f..96aa526 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
@@ -434,34 +434,32 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     manager.invoke(new SerializableRunnable() {
       @Override
       public void run() {
-        doQueryRegionsAssociatedMembers(queryTemplate1, 0, true,
-            new String[] {DATA_REGION_NAME_VM1_PATH, DATA_REGION_NAME_VM2_PATH});
-        doQueryRegionsAssociatedMembers(queryTemplate1, 2, true,
-            new String[] {DATA_REGION_NAME_PATH, DATA_REGION_NAME_CHILD_1_PATH});
-        doQueryRegionsAssociatedMembers(queryTemplate1, 1, false,
-            new String[] {DATA_REGION_NAME_PATH, DATA_REGION_NAME_CHILD_1_PATH});
-        doQueryRegionsAssociatedMembers(queryTemplate1, 1, true,
-            new String[] {DATA_REGION_NAME_VM1_PATH, DATA_REGION_NAME_PATH});
-        doQueryRegionsAssociatedMembers(queryTemplate1, 1, false,
-            new String[] {DATA_REGION_NAME_VM1_PATH, DATA_REGION_NAME_PATH});
-        doQueryRegionsAssociatedMembers(queryTemplate1, 1, true,
-            new String[] {DATA_REGION_NAME_VM2_PATH, DATA_REGION_NAME_PATH});
-        doQueryRegionsAssociatedMembers(queryTemplate1, 1, false,
-            new String[] {DATA_REGION_NAME_VM2_PATH, DATA_REGION_NAME_PATH});
-        doQueryRegionsAssociatedMembers(queryTemplate1, 0, true,
-            new String[] {DATA_PAR_REGION_NAME_VM2_PATH, DATA_PAR_REGION_NAME_VM1_PATH});
-        doQueryRegionsAssociatedMembers(queryTemplate1, 0, false,
-            new String[] {DATA_PAR_REGION_NAME_VM2_PATH, DATA_PAR_REGION_NAME_VM1_PATH});
-        doQueryRegionsAssociatedMembers(queryTemplate1, -1, true,
-            new String[] {DATA_PAR_REGION_NAME_VM2_PATH, "/jfgkdfjgkd"}); // one wrong region
-        doQueryRegionsAssociatedMembers(queryTemplate1, -1, false,
-            new String[] {DATA_PAR_REGION_NAME_VM2_PATH, "/jfgkdfjgkd"}); // one wrong region
-        doQueryRegionsAssociatedMembers(queryTemplate1, -1, true,
-            new String[] {"/dhgfdhgf", "/dhgddhd"}); // both
+        doQueryRegionsAssociatedMembers(queryTemplate1, 0, true, DATA_REGION_NAME_VM1_PATH,
+            DATA_REGION_NAME_VM2_PATH);
+        doQueryRegionsAssociatedMembers(queryTemplate1, 2, true, DATA_REGION_NAME_PATH,
+            DATA_REGION_NAME_CHILD_1_PATH);
+        doQueryRegionsAssociatedMembers(queryTemplate1, 1, false, DATA_REGION_NAME_PATH,
+            DATA_REGION_NAME_CHILD_1_PATH);
+        doQueryRegionsAssociatedMembers(queryTemplate1, 1, true, DATA_REGION_NAME_VM1_PATH,
+            DATA_REGION_NAME_PATH);
+        doQueryRegionsAssociatedMembers(queryTemplate1, 1, false, DATA_REGION_NAME_VM1_PATH,
+            DATA_REGION_NAME_PATH);
+        doQueryRegionsAssociatedMembers(queryTemplate1, 1, true, DATA_REGION_NAME_VM2_PATH,
+            DATA_REGION_NAME_PATH);
+        doQueryRegionsAssociatedMembers(queryTemplate1, 1, false, DATA_REGION_NAME_VM2_PATH,
+            DATA_REGION_NAME_PATH);
+        doQueryRegionsAssociatedMembers(queryTemplate1, 0, true, DATA_PAR_REGION_NAME_VM2_PATH,
+            DATA_PAR_REGION_NAME_VM1_PATH);
+        doQueryRegionsAssociatedMembers(queryTemplate1, 0, false, DATA_PAR_REGION_NAME_VM2_PATH,
+            DATA_PAR_REGION_NAME_VM1_PATH);
+        doQueryRegionsAssociatedMembers(queryTemplate1, -1, true, DATA_PAR_REGION_NAME_VM2_PATH,
+            "/jfgkdfjgkd"); // one wrong region
+        doQueryRegionsAssociatedMembers(queryTemplate1, -1, false, DATA_PAR_REGION_NAME_VM2_PATH,
+            "/jfgkdfjgkd"); // one wrong region
+        doQueryRegionsAssociatedMembers(queryTemplate1, -1, true, "/dhgfdhgf", "/dhgddhd"); // both
         // regions
         // wrong
-        doQueryRegionsAssociatedMembers(queryTemplate1, -1, false,
-            new String[] {"/dhgfdhgf", "/dhgddhd"}); // both
+        doQueryRegionsAssociatedMembers(queryTemplate1, -1, false, "/dhgfdhgf", "/dhgddhd"); // both
         // regions
         // wrong
       }
@@ -1755,7 +1753,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
 
       CommandStringBuilder csb = new CommandStringBuilder(CliStrings.EXPORT_DATA);
       csb.addOption(CliStrings.EXPORT_DATA__REGION, regionName);
-      csb.addOption(CliStrings.EXPORT_DATA__MEMBER, "Manager");
+      csb.addOption(CliStrings.MEMBER, "Manager");
       csb.addOption(CliStrings.EXPORT_DATA__FILE, filePath);
       String commandString = csb.toString();
 
@@ -1788,7 +1786,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       csb = new CommandStringBuilder(CliStrings.IMPORT_DATA);
       csb.addOption(CliStrings.IMPORT_DATA__REGION, regionName);
       csb.addOption(CliStrings.IMPORT_DATA__FILE, filePath);
-      csb.addOption(CliStrings.IMPORT_DATA__MEMBER, "Manager");
+      csb.addOption(CliStrings.MEMBER, "Manager");
 
       commandString = csb.toString();
       cmdResult = executeCommand(commandString);
@@ -1834,7 +1832,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       csb = new CommandStringBuilder(CliStrings.IMPORT_DATA);
       csb.addOption(CliStrings.IMPORT_DATA__REGION, regionName);
       csb.addOption(CliStrings.IMPORT_DATA__FILE, filePath);
-      csb.addOption(CliStrings.IMPORT_DATA__MEMBER, "Manager");
+      csb.addOption(CliStrings.MEMBER, "Manager");
       csb.addOption(CliStrings.IMPORT_DATA__INVOKE_CALLBACKS, "true");
       commandString = csb.toString();
       cmdResult = executeCommand(commandString);
@@ -1852,7 +1850,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       csb = new CommandStringBuilder(CliStrings.EXPORT_DATA);
       csb.addOption(CliStrings.EXPORT_DATA__REGION, "FDSERW");
       csb.addOption(CliStrings.EXPORT_DATA__FILE, filePath);
-      csb.addOption(CliStrings.EXPORT_DATA__MEMBER, "Manager");
+      csb.addOption(CliStrings.MEMBER, "Manager");
       commandString = csb.getCommandString();
 
       cmdResult = executeCommand(commandString);
@@ -1864,7 +1862,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       csb = new CommandStringBuilder(CliStrings.IMPORT_DATA);
       csb.addOption(CliStrings.IMPORT_DATA__REGION, regionName);
       csb.addOption(CliStrings.IMPORT_DATA__FILE, "#WEQW");
-      csb.addOption(CliStrings.IMPORT_DATA__MEMBER, "Manager");
+      csb.addOption(CliStrings.MEMBER, "Manager");
       commandString = csb.getCommandString();
 
       cmdResult = executeCommand(commandString);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/IndexCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/IndexCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/IndexCommandsDUnitTest.java
index a0a599f..16f708d 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/IndexCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/IndexCommandsDUnitTest.java
@@ -328,7 +328,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.CREATE_INDEX__NAME, indexName);
     csb.addOption(CliStrings.CREATE_INDEX__EXPRESSION, "key");
     csb.addOption(CliStrings.CREATE_INDEX__REGION, "/StocksParReg");
-    csb.addOption(CliStrings.CREATE_INDEX__MEMBER, VM1Name);
+    csb.addOption(CliStrings.MEMBER, VM1Name);
     csb.addOption(CliStrings.CREATE_INDEX__TYPE, "key");
 
     String commandString = csb.toString();
@@ -352,7 +352,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
     csb = new CommandStringBuilder(CliStrings.DESTROY_INDEX);
     csb.addOption(CliStrings.DESTROY_INDEX__NAME, indexName);
     csb.addOption(CliStrings.DESTROY_INDEX__REGION, "/StocksParReg");
-    csb.addOption(CliStrings.DESTROY_INDEX__MEMBER, VM1Name);
+    csb.addOption(CliStrings.MEMBER, VM1Name);
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     resultAsString = commandResultToString(commandResult);
@@ -380,7 +380,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
     csb.addOption(CliStrings.CREATE_INDEX__EXPRESSION, "key");
     csb.addOption(CliStrings.CREATE_INDEX__REGION, "/StocksParReg");
     csb.addOption(CliStrings.CREATE_INDEX__TYPE, "hash");
-    csb.addOption(CliStrings.CREATE_INDEX__GROUP, group1);
+    csb.addOption(CliStrings.GROUP, group1);
 
     String commandString = csb.toString();
     CommandResult commandResult = executeCommand(commandString);
@@ -400,7 +400,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
     csb = new CommandStringBuilder(CliStrings.DESTROY_INDEX);
     csb.addOption(CliStrings.DESTROY_INDEX__NAME, indexName);
     csb.addOption(CliStrings.DESTROY_INDEX__REGION, "/StocksParReg");
-    csb.addOption(CliStrings.DESTROY_INDEX__GROUP, group1);
+    csb.addOption(CliStrings.GROUP, group1);
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     resultAsString = commandResultToString(commandResult);
@@ -542,7 +542,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
     csb = new CommandStringBuilder(CliStrings.DESTROY_INDEX);
     csb.addOption(CliStrings.DESTROY_INDEX__NAME, indexName);
     csb.addOption(CliStrings.DESTROY_INDEX__REGION, "Region");
-    csb.addOption(CliStrings.DESTROY_INDEX__MEMBER, "wrongOne");
+    csb.addOption(CliStrings.MEMBER, "wrongOne");
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     resultAsString = commandResultToString(commandResult);
@@ -583,7 +583,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
     assertEquals(true, resultAsString.contains(VM1Name));
 
     csb = new CommandStringBuilder(CliStrings.DESTROY_INDEX);
-    csb.addOption(CliStrings.DESTROY_INDEX__GROUP, group1);
+    csb.addOption(CliStrings.GROUP, group1);
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     resultAsString = commandResultToString(commandResult);
@@ -702,7 +702,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
     CommandStringBuilder commandStringBuilder = new CommandStringBuilder(CliStrings.CREATE_INDEX);
     commandStringBuilder.addOption(CliStrings.CREATE_INDEX__EXPRESSION, "key");
     commandStringBuilder.addOption(CliStrings.CREATE_INDEX__NAME, indexName);
-    commandStringBuilder.addOption(CliStrings.CREATE_INDEX__GROUP, groupName);
+    commandStringBuilder.addOption(CliStrings.GROUP, groupName);
     commandStringBuilder.addOption(CliStrings.CREATE_INDEX__REGION, "\"/" + regionName + " p\"");
     CommandResult cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());
@@ -748,7 +748,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
     // Test destroying the index
     commandStringBuilder = new CommandStringBuilder(CliStrings.DESTROY_INDEX);
     commandStringBuilder.addOption(CliStrings.DESTROY_INDEX__NAME, indexName);
-    commandStringBuilder.addOption(CliStrings.DESTROY_INDEX__GROUP, groupName);
+    commandStringBuilder.addOption(CliStrings.GROUP, groupName);
     commandStringBuilder.addOption(CliStrings.DESTROY_INDEX__REGION, "/" + regionName);
     cmdResult = executeCommand(commandStringBuilder.toString());
     assertEquals(Result.Status.OK, cmdResult.getStatus());

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
index fb83f55..ab8c69b 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
@@ -211,7 +211,7 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
 
 
     csb = new CommandStringBuilder(CliStrings.LIST_REGION);
-    csb.addOption(CliStrings.LIST_REGION__MEMBER, "Manager");
+    csb.addOption(CliStrings.MEMBER, "Manager");
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     commandResultAsString = commandResultToString(commandResult);
@@ -222,7 +222,7 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
     assertTrue(commandResultAsString.contains(LOCALREGIONONMANAGER));
 
     csb = new CommandStringBuilder(CliStrings.LIST_REGION);
-    csb.addOption(CliStrings.LIST_REGION__MEMBER, "Server1");
+    csb.addOption(CliStrings.MEMBER, "Server1");
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     commandResultAsString = commandResultToString(commandResult);
@@ -236,7 +236,7 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
     assertTrue(commandResultAsString.contains(SUBREGION1A));
 
     csb = new CommandStringBuilder(CliStrings.LIST_REGION);
-    csb.addOption(CliStrings.LIST_REGION__GROUP, "G1");
+    csb.addOption(CliStrings.GROUP, "G1");
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     commandResultAsString = commandResultToString(commandResult);
@@ -247,7 +247,7 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
     assertTrue(commandResultAsString.contains(LOCALREGIONONMANAGER));
 
     csb = new CommandStringBuilder(CliStrings.LIST_REGION);
-    csb.addOption(CliStrings.LIST_REGION__GROUP, "G2");
+    csb.addOption(CliStrings.GROUP, "G2");
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     commandResultAsString = commandResultToString(commandResult);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/MemberCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/MemberCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/MemberCommandsDUnitTest.java
index fb8341a..fe6bc40 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/MemberCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/MemberCommandsDUnitTest.java
@@ -267,7 +267,7 @@ public class MemberCommandsDUnitTest extends JUnit4CacheTestCase {
     setupSystem();
     CommandProcessor commandProcessor = new CommandProcessor();
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.LIST_MEMBER);
-    csb.addOption(CliStrings.LIST_MEMBER__GROUP, "G1");
+    csb.addOption(CliStrings.GROUP, "G1");
     Result result = commandProcessor.createCommandStatement(csb.toString(), EMPTY_ENV).process();
     getLogWriter().info("#SB" + getResultAsString(result));
     assertEquals(true, result.getStatus().equals(Status.OK));

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
index 9c3aa34..f0c2c2f 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
@@ -83,7 +83,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
       if (cmdResult.getType().equals(ResultData.TYPE_TABULAR)) {
         TabularResultData table = (TabularResultData) cmdResult.getResultData();
         List<String> memberNames = table.retrieveAllValues(CliStrings.GC__MSG__MEMBER_NAME);
-        assertEquals(true, memberNames.size() == 1 ? true : false);
+        assertEquals(true, memberNames.size() == 1);
       } else {
         fail("testGCForGroup failed as CommandResult should be table type");
       }
@@ -101,7 +101,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
   public void testGCForMemberID() {
     setUpJmxManagerOnVm0ThenConnect(null);
     final VM vm1 = Host.getHost(0).getVM(1);
-    final String vm1MemberId = (String) vm1.invoke(() -> getMemberId());
+    final String vm1MemberId = vm1.invoke(() -> getMemberId());
     String command = "gc --member=" + vm1MemberId;
     CommandResult cmdResult = executeCommand(command);
     cmdResult.resetToFirstLine();
@@ -112,7 +112,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
       if (cmdResult.getType().equals(ResultData.TYPE_TABULAR)) {
         TabularResultData table = (TabularResultData) cmdResult.getResultData();
         List<String> memberNames = table.retrieveAllValues(CliStrings.GC__MSG__MEMBER_NAME);
-        assertEquals(true, memberNames.size() == 1 ? true : false);
+        assertEquals(true, memberNames.size() == 1);
       } else {
         fail("testGCForGroup failed as CommandResult should be table type");
       }
@@ -128,7 +128,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
       props.setProperty(LOG_FILE, "testShowLogDefault.log");
       setUpJmxManagerOnVm0ThenConnect(props);
       final VM vm1 = Host.getHost(0).getVM(0);
-      final String vm1MemberId = (String) vm1.invoke(() -> getMemberId());
+      final String vm1MemberId = vm1.invoke(() -> getMemberId());
       String command = "show log --member=" + vm1MemberId;
       CommandResult cmdResult = executeCommand(command);
       if (cmdResult != null) {
@@ -152,7 +152,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     try {
       setUpJmxManagerOnVm0ThenConnect(props);
       final VM vm1 = Host.getHost(0).getVM(0);
-      final String vm1MemberId = (String) vm1.invoke(() -> getMemberId());
+      final String vm1MemberId = vm1.invoke(() -> getMemberId());
       String command = "show log --member=" + vm1MemberId + " --lines=50";
       CommandResult cmdResult = executeCommand(command);
       if (cmdResult != null) {
@@ -428,9 +428,8 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
       }
     });
 
-    String commandString =
-        CliStrings.CHANGE_LOGLEVEL + " --" + CliStrings.CHANGE_LOGLEVEL__LOGLEVEL + "=finer" + " --"
-            + CliStrings.CHANGE_LOGLEVEL__MEMBER + "=" + serverName1 + "," + serverName2;
+    String commandString = CliStrings.CHANGE_LOGLEVEL + " --" + CliStrings.CHANGE_LOGLEVEL__LOGLEVEL
+        + "=finer" + " --" + CliStrings.MEMBER + "=" + serverName1 + "," + serverName2;
 
     CommandResult commandResult = executeCommand(commandString);
     getLogWriter().info("testChangeLogLevel commandResult=" + commandResult);
@@ -490,7 +489,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     });
 
     String commandString = CliStrings.CHANGE_LOGLEVEL + " --" + CliStrings.CHANGE_LOGLEVEL__LOGLEVEL
-        + "=finer" + " --" + CliStrings.CHANGE_LOGLEVEL__GROUPS + "=" + grp1 + "," + grp2;
+        + "=finer" + " --" + CliStrings.GROUPS + "=" + grp1 + "," + grp2;
 
     CommandResult commandResult = executeCommand(commandString);
     getLogWriter().info("testChangeLogLevelForGrps commandResult=" + commandResult);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/QueueCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/QueueCommandsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/QueueCommandsDUnitTest.java
index a56febe..163e0b0 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/QueueCommandsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/QueueCommandsDUnitTest.java
@@ -159,7 +159,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
     CommandStringBuilder commandStringBuilder =
         new CommandStringBuilder(CliStrings.CREATE_DISK_STORE);
     commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__NAME, diskStoreName);
-    commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     commandStringBuilder.addOption(CliStrings.CREATE_DISK_STORE__DIRECTORY_AND_SIZE,
         diskStoreDir.getAbsolutePath());
     cmdResult = executeCommand(commandStringBuilder.toString());
@@ -171,7 +171,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
 
     commandStringBuilder = new CommandStringBuilder(CliStrings.CREATE_ASYNC_EVENT_QUEUE);
     commandStringBuilder.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__ID, queue1Name);
-    commandStringBuilder.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__GROUP, "Group1");
+    commandStringBuilder.addOption(CliStrings.GROUP, "Group1");
     commandStringBuilder.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__BATCH_SIZE, "514");
     commandStringBuilder.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__PERSISTENT, "true");
     commandStringBuilder.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__DISK_STORE, diskStoreName);
@@ -364,7 +364,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
     CommandStringBuilder commandStringBuilder =
         new CommandStringBuilder(CliStrings.CREATE_ASYNC_EVENT_QUEUE);
     commandStringBuilder.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__ID, queueName);
-    commandStringBuilder.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__GROUP, groupName);
+    commandStringBuilder.addOption(CliStrings.GROUP, groupName);
     commandStringBuilder.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__LISTENER,
         "com.qcdunit.QueueCommandsDUnitTestListener");
     cmdResult = executeCommand(commandStringBuilder.toString());

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowMetricsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowMetricsDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowMetricsDUnitTest.java
index 9349396..5c94c3a 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowMetricsDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowMetricsDUnitTest.java
@@ -244,9 +244,9 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
         wc = createMBeanWaitCriterion(5, "", distributedMember, cacheServerPort);
         waitForCriterion(wc, 10000, 500, true);
 
-        final String command = CliStrings.SHOW_METRICS + " --" + CliStrings.SHOW_METRICS__MEMBER
-            + "=" + distributedMember.getId() + " --" + CliStrings.SHOW_METRICS__CACHESERVER__PORT
-            + "=" + cacheServerPort + " --" + CliStrings.SHOW_METRICS__FILE + "=" + exportFileName;
+        final String command = CliStrings.SHOW_METRICS + " --" + CliStrings.MEMBER + "="
+            + distributedMember.getId() + " --" + CliStrings.SHOW_METRICS__CACHESERVER__PORT + "="
+            + cacheServerPort + " --" + CliStrings.SHOW_METRICS__FILE + "=" + exportFileName;
 
         CommandProcessor commandProcessor = new CommandProcessor();
         Result result =

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowStackTraceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowStackTraceDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowStackTraceDUnitTest.java
index dda50f6..51653a4 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowStackTraceDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowStackTraceDUnitTest.java
@@ -106,7 +106,7 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
     File mgrStacktraceFile = workDirectory.newFile("managerStacktrace.txt");
     csb = new CommandStringBuilder(CliStrings.EXPORT_STACKTRACE);
     csb.addOption(CliStrings.EXPORT_STACKTRACE__FILE, mgrStacktraceFile.getCanonicalPath());
-    csb.addOption(CliStrings.EXPORT_STACKTRACE__MEMBER, "Manager");
+    csb.addOption(CliStrings.MEMBER, "Manager");
     commandString = csb.toString();
     getLogWriter().info("CommandString : " + commandString);
     commandResult = executeCommand(commandString);
@@ -116,7 +116,7 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
     File serverStacktraceFile = workDirectory.newFile("serverStacktrace.txt");
     csb = new CommandStringBuilder(CliStrings.EXPORT_STACKTRACE);
     csb.addOption(CliStrings.EXPORT_STACKTRACE__FILE, serverStacktraceFile.getCanonicalPath());
-    csb.addOption(CliStrings.EXPORT_STACKTRACE__MEMBER, "Server");
+    csb.addOption(CliStrings.MEMBER, "Server");
     commandString = csb.toString();
     getLogWriter().info("CommandString : " + commandString);
     commandResult = executeCommand(commandString);
@@ -126,7 +126,7 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
     File groupStacktraceFile = workDirectory.newFile("groupstacktrace.txt");
     csb = new CommandStringBuilder(CliStrings.EXPORT_STACKTRACE);
     csb.addOption(CliStrings.EXPORT_STACKTRACE__FILE, groupStacktraceFile.getCanonicalPath());
-    csb.addOption(CliStrings.EXPORT_STACKTRACE__GROUP, "G2");
+    csb.addOption(CliStrings.GROUP, "G2");
     commandString = csb.toString();
     getLogWriter().info("CommandString : " + commandString);
     commandResult = executeCommand(commandString);
@@ -136,7 +136,7 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
     File wrongStackTraceFile = workDirectory.newFile("wrongStackTrace.txt");
     csb = new CommandStringBuilder(CliStrings.EXPORT_STACKTRACE);
     csb.addOption(CliStrings.EXPORT_STACKTRACE__FILE, wrongStackTraceFile.getCanonicalPath());
-    csb.addOption(CliStrings.EXPORT_STACKTRACE__MEMBER, "WrongMember");
+    csb.addOption(CliStrings.MEMBER, "WrongMember");
     commandString = csb.toString();
     getLogWriter().info("CommandString : " + commandString);
     commandResult = executeCommand(commandString);

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/cli/shell/GfshMultilineCommandTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/shell/GfshMultilineCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/shell/GfshMultilineCommandTest.java
index 7b11444..a2a5be4 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/shell/GfshMultilineCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/shell/GfshMultilineCommandTest.java
@@ -15,7 +15,7 @@
 package org.apache.geode.management.internal.cli.shell;
 
 import static org.apache.geode.management.internal.cli.i18n.CliStrings.LIST_MEMBER;
-import static org.apache.geode.management.internal.cli.i18n.CliStrings.LIST_MEMBER__GROUP;
+import static org.apache.geode.management.internal.cli.i18n.CliStrings.GROUP;
 import static org.apache.geode.management.internal.cli.i18n.CliStrings.NO_MEMBERS_FOUND_MESSAGE;
 import static org.assertj.core.api.Assertions.assertThat;
 
@@ -43,13 +43,12 @@ public class GfshMultilineCommandTest {
     gfsh.connectAndVerify(server.getJmxPort(), GfshShellConnectionRule.PortType.jmxManger);
     // Execute a command
     CommandStringBuilder csb = new CommandStringBuilder(LIST_MEMBER);
-    csb.addOption(LIST_MEMBER__GROUP, "nogroup");
+    csb.addOption(GROUP, "nogroup");
     gfsh.executeAndVerifyCommand(csb.getCommandString());
     assertThat(gfsh.getGfshOutput().trim()).isEqualTo(NO_MEMBERS_FOUND_MESSAGE);
 
     // Now execute same command with a new Continuation on new line
-    csb =
-        new CommandStringBuilder(LIST_MEMBER).addNewLine().addOption(LIST_MEMBER__GROUP, "nogroup");
+    csb = new CommandStringBuilder(LIST_MEMBER).addNewLine().addOption(GROUP, "nogroup");
     gfsh.executeAndVerifyCommand(csb.getCommandString());
     assertThat(gfsh.getGfshOutput().trim()).isEqualTo(NO_MEMBERS_FOUND_MESSAGE);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigDistributionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigDistributionDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigDistributionDUnitTest.java
index 5dc77aa..52a1f9b 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigDistributionDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigDistributionDUnitTest.java
@@ -95,7 +95,7 @@ public class ClusterConfigDistributionDUnitTest {
         "com.qcdunit.QueueCommandsDUnitTestListener");
     csb.addOptionWithValueCheck(CliStrings.CREATE_ASYNC_EVENT_QUEUE__DISK_STORE, null);
     csb.addOptionWithValueCheck(CliStrings.CREATE_ASYNC_EVENT_QUEUE__BATCH_SIZE, "1000");
-    csb.addOptionWithValueCheck(CliStrings.CREATE_ASYNC_EVENT_QUEUE__GROUP, null);
+    csb.addOptionWithValueCheck(CliStrings.GROUP, null);
     csb.addOptionWithValueCheck(CliStrings.CREATE_ASYNC_EVENT_QUEUE__PERSISTENT, "false");
     csb.addOptionWithValueCheck(CliStrings.CREATE_ASYNC_EVENT_QUEUE__MAXIMUM_QUEUE_MEMORY, "1000");
     gfshConnector.executeAndVerifyCommand(csb.getCommandString());

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-core/src/test/java/org/apache/geode/management/internal/web/controllers/WanCommandsControllerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/web/controllers/WanCommandsControllerJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/web/controllers/WanCommandsControllerJUnitTest.java
index 8ee3e0f..59d6ff4 100755
--- a/geode-core/src/test/java/org/apache/geode/management/internal/web/controllers/WanCommandsControllerJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/web/controllers/WanCommandsControllerJUnitTest.java
@@ -53,10 +53,8 @@ public class WanCommandsControllerJUnitTest {
     assertThat(this.wanCommandsController.testableCommand)
         .contains("--" + START_GATEWAYSENDER__ID + "=" + null);
     assertThat(this.wanCommandsController.testableCommand).contains(START_GATEWAYSENDER);
-    assertThat(this.wanCommandsController.testableCommand)
-        .doesNotContain(START_GATEWAYRECEIVER__GROUP);
-    assertThat(this.wanCommandsController.testableCommand)
-        .doesNotContain(START_GATEWAYRECEIVER__MEMBER);
+    assertThat(this.wanCommandsController.testableCommand).doesNotContain(GROUP);
+    assertThat(this.wanCommandsController.testableCommand).doesNotContain(MEMBER);
   }
 
   @Test
@@ -69,17 +67,17 @@ public class WanCommandsControllerJUnitTest {
     assertThat(this.wanCommandsController.testableCommand).contains(START_GATEWAYSENDER);
     assertThat(this.wanCommandsController.testableCommand)
         .contains("--" + START_GATEWAYSENDER__ID + "=" + gatewaySenderId);
-    assertThat(this.wanCommandsController.testableCommand.contains(START_GATEWAYRECEIVER__GROUP))
+    assertThat(this.wanCommandsController.testableCommand.contains(GROUP))
         .isEqualTo(containsGroups);
-    assertThat(this.wanCommandsController.testableCommand.contains(START_GATEWAYRECEIVER__MEMBER))
+    assertThat(this.wanCommandsController.testableCommand.contains(MEMBER))
         .isEqualTo(containsMembers);
     if (containsGroups) {
       assertThat(this.wanCommandsController.testableCommand)
-          .contains("--" + START_GATEWAYRECEIVER__GROUP + "=" + groups[0]);
+          .contains("--" + GROUP + "=" + groups[0]);
     }
     if (containsMembers) {
       assertThat(this.wanCommandsController.testableCommand)
-          .contains("--" + START_GATEWAYRECEIVER__MEMBER + "=" + members[0]);
+          .contains("--" + MEMBER + "=" + members[0]);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/configuration/LuceneClusterConfigurationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/configuration/LuceneClusterConfigurationDUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/configuration/LuceneClusterConfigurationDUnitTest.java
index 867dc2e..cac45eb 100755
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/configuration/LuceneClusterConfigurationDUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/configuration/LuceneClusterConfigurationDUnitTest.java
@@ -293,14 +293,14 @@ public class LuceneClusterConfigurationDUnitTest {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.CREATE_REGION);
     csb.addOption(CliStrings.CREATE_REGION__REGION, regionName);
     csb.addOption(CliStrings.CREATE_REGION__REGIONSHORTCUT, regionShortCut.name());
-    csb.addOptionWithValueCheck(CliStrings.CREATE_REGION__GROUP, group);
+    csb.addOptionWithValueCheck(CliStrings.GROUP, group);
     gfshConnector.executeAndVerifyCommand(csb.toString());
   }
 
   private CommandResult alterRegionUsingGfsh(String group) throws Exception {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.ALTER_REGION);
     csb.addOption(CliStrings.ALTER_REGION__REGION, REGION_NAME);
-    csb.addOption(CliStrings.ALTER_REGION__GROUP, group);
+    csb.addOption(CliStrings.GROUP, group);
     csb.addOption(CliStrings.ALTER_REGION__EVICTIONMAX, "5764");
     return gfshConnector.executeAndVerifyCommand(csb.toString());
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/db8e1df3/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandCreateDestroyGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandCreateDestroyGatewaySenderDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandCreateDestroyGatewaySenderDUnitTest.java
index 8d1f5d8..cffc4c1 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandCreateDestroyGatewaySenderDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/WanCommandCreateDestroyGatewaySenderDUnitTest.java
@@ -59,7 +59,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testCreateDestroyGatewaySenderWithDefault() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -67,7 +67,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -109,7 +109,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testCreateDestroyGatewaySender() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -117,7 +117,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -178,7 +178,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testCreateGatewaySender_Error() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -186,7 +186,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -231,7 +231,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testCreateDestroyGatewaySenderWithGatewayEventFilters() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -239,7 +239,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -308,7 +308,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testCreateDestroyGatewaySenderWithGatewayTransportFilters() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -316,7 +316,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -384,7 +384,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testCreateDestroyGatewaySender_OnMember() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -392,17 +392,17 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
     vm5.invoke(() -> createCache(punePort));
 
-    final DistributedMember vm3Member = (DistributedMember) vm3.invoke(() -> getMember());
+    final DistributedMember vm3Member = vm3.invoke(() -> getMember());
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
-        + "=ln" + " --" + CliStrings.CREATE_GATEWAYSENDER__MEMBER + "=" + vm3Member.getId() + " --"
+        + "=ln" + " --" + CliStrings.MEMBER + "=" + vm3Member.getId() + " --"
         + CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID + "=2" + " --"
         + CliStrings.CREATE_GATEWAYSENDER__PARALLEL + "=false" + " --"
         + CliStrings.CREATE_GATEWAYSENDER__MANUALSTART + "=true" + " --"
@@ -450,7 +450,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testCreateDestroyGatewaySender_Group() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -458,7 +458,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
@@ -466,7 +466,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
-        + "=ln" + " --" + CliStrings.CREATE_GATEWAYSENDER__GROUP + "=SenderGroup1" + " --"
+        + "=ln" + " --" + CliStrings.GROUP + "=SenderGroup1" + " --"
         + CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID + "=2" + " --"
         + CliStrings.CREATE_GATEWAYSENDER__PARALLEL + "=false" + " --"
         + CliStrings.CREATE_GATEWAYSENDER__MANUALSTART + "=false" + " --"
@@ -515,7 +515,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testCreateDestroyGatewaySender_Group_Scenario2() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -523,7 +523,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
     vm4.invoke(() -> createCacheWithGroups(punePort, "SenderGroup1"));
@@ -531,7 +531,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
 
     int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
     String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
-        + "=ln" + " --" + CliStrings.CREATE_GATEWAYSENDER__GROUP + "=SenderGroup1" + " --"
+        + "=ln" + " --" + CliStrings.GROUP + "=SenderGroup1" + " --"
         + CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID + "=2" + " --"
         + CliStrings.CREATE_GATEWAYSENDER__PARALLEL + "=false" + " --"
         + CliStrings.CREATE_GATEWAYSENDER__MANUALSTART + "=false" + " --"
@@ -578,7 +578,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testCreateDestroyParallelGatewaySender() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -586,7 +586,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -649,7 +649,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testCreateParallelGatewaySender_Error() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -657,7 +657,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -708,7 +708,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
   @Test
   public void testDestroyGatewaySender_NotCreatedSender() {
 
-    Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId(1));
+    Integer punePort = vm1.invoke(() -> createFirstLocatorWithDSId(1));
 
     Properties props = getDistributedSystemProperties();
     props.setProperty(MCAST_PORT, "0");
@@ -716,7 +716,7 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
     props.setProperty(LOCATORS, "localhost[" + punePort + "]");
     setUpJmxManagerOnVm0ThenConnect(props);
 
-    Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
+    Integer nyPort = vm2.invoke(() -> createFirstRemoteLocator(2, punePort));
 
     vm3.invoke(() -> createCache(punePort));
     vm4.invoke(() -> createCache(punePort));
@@ -763,11 +763,11 @@ public class WanCommandCreateDestroyGatewaySenderDUnitTest extends WANCommandTes
         CliStrings.DESTROY_GATEWAYSENDER + " --" + CliStrings.DESTROY_GATEWAYSENDER__ID + "=" + id;
 
     if (group != null) {
-      command += " --" + CliStrings.DESTROY_GATEWAYSENDER__GROUP + "=" + group;
+      command += " --" + CliStrings.GROUP + "=" + group;
     }
 
     if (member != null) {
-      command += " --" + CliStrings.CREATE_GATEWAYSENDER__MEMBER + "=" + member.getId();
+      command += " --" + CliStrings.MEMBER + "=" + member.getId();
     }
 
     final CommandResult cmdResult = executeCommandWithIgnoredExceptions(command);


[09/24] geode git commit: GEODE-2558: Upgrade mockito to 2.7.11 and powermock to 1.7.0RC2

Posted by je...@apache.org.
GEODE-2558: Upgrade mockito to 2.7.11 and powermock to 1.7.0RC2

* mockito-core.version = 2.7.11
* powermock.version = 1.7.0RC2
* fix compilation errors
* there are several test failures in geode-core and geode-lucene

geode-core test failures:

* GMSMembershipManagerJUnitTest.testDirectChannelSend
* GMSMembershipManagerJUnitTest.testDirectChannelSendAllRecipients
* GMSMembershipManagerJUnitTest.testDirectChannelSendFailureDueToForcedDisconnect
* GMSMembershipManagerJUnitTest.testDirectChannelSendFailureToOneRecipient
* Put61Test.integratedSecurityShouldSucceedIfAuthorized
* Put61Test.noSecurityShouldSucceed
* Put61Test.oldSecurityShouldSucceedIfAuthorized
* Put65Test.integratedSecurityShouldSucceedIfAuthorized
* Put65Test.noSecurityShouldSucceed
* Put65Test.oldSecurityShouldSucceedIfAuthorized
* PutTest.integratedSecurityShouldSucceedIfAuthorized
* PutTest.noSecurityShouldSucceed
* PutTest.oldSecurityShouldSucceedIfAuthorized
* FastLoggerJUnitTest.delegateIsDebugEnabledWhenIsDelegating
* FastLoggerJUnitTest.delegateIsDebugEnabledWhenIsDelegating
* FastLoggerJUnitTest.delegateIsDebugEnabledWhenIsDelegating
* OffHeapRegionEntryHelperJUnitTest.releaseEntryShouldSetValueToRemovePhase2
* OffHeapRegionEntryHelperJUnitTest.releaseEntryShouldSetValueToRemovePhase2AndSetsAsyncToFalseForDiskEntry
* OffHeapRegionEntryHelperJUnitTest.setValueShouldChangeTheRegionEntryAddressToNewAddressAndDoesNothingIfOldAddressIsATokenAddress
* OffHeapRegionEntryHelperJUnitTest.setValueShouldChangeTheRegionEntryAddressToNewAddressAndDoesNothingIfOldAddressIsAnEncodedAddress
* OffHeapRegionEntryHelperJUnitTest.setValueShouldChangeTheRegionEntryAddressToNewAddressAndReleaseOldValueIfItsOnOffHeap
* StatisticsImplTest.invokeSuppliersShouldLogErrorOnlyOnce
* ConnectionJUnitTest.testSuspicionRaised

geode-lucene test failures:

* StringQueryProviderJUnitTest.usesCustomAnalyzer
* RegionDirectoryJUnitTest.testFsyncDoesntCreateNewFiles
* RegionDirectoryJUnitTest.testPendingDeletions


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

Branch: refs/heads/feature/GEODE-3071
Commit: 90900ac5292fea85cec513653e489dfdadafd311
Parents: cecad6c
Author: Kirk Lund <kl...@apache.org>
Authored: Fri Feb 24 21:10:50 2017 -0800
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed Jun 14 11:06:32 2017 -0700

----------------------------------------------------------------------
 geode-core/build.gradle                                 |  4 ----
 .../query/internal/index/HashIndexSetJUnitTest.java     |  2 +-
 .../gms/messenger/JGroupsMessengerJUnitTest.java        |  6 +++---
 .../partitioned/DeposePrimaryBucketMessageTest.java     |  1 -
 .../cache/partitioned/FetchEntryMessageTest.java        |  1 -
 .../partitioned/FetchPartitionDetailsMessageTest.java   |  1 -
 .../cache/partitioned/MoveBucketMessageTest.java        |  1 -
 .../cache/partitioned/RemoveBucketMessageTest.java      |  1 -
 .../cache/tier/sockets/command/ContainsKey66Test.java   |  2 +-
 .../cache/tier/sockets/command/CreateRegionTest.java    |  2 +-
 .../cache/tier/sockets/command/Destroy65Test.java       |  2 +-
 .../cache/tier/sockets/command/DestroyRegionTest.java   |  2 +-
 .../cache/tier/sockets/command/DestroyTest.java         |  2 +-
 .../tier/sockets/command/ExecuteFunction65Test.java     |  2 +-
 .../tier/sockets/command/ExecuteFunction66Test.java     |  2 +-
 .../cache/tier/sockets/command/ExecuteFunctionTest.java |  2 +-
 .../internal/cache/tier/sockets/command/Get70Test.java  |  2 +-
 .../cache/tier/sockets/command/GetAll651Test.java       |  2 +-
 .../cache/tier/sockets/command/GetAll70Test.java        |  2 +-
 .../internal/cache/tier/sockets/command/GetAllTest.java |  2 +-
 .../tier/sockets/command/GetAllWithCallbackTest.java    |  2 +-
 .../cache/tier/sockets/command/InvalidateTest.java      |  2 +-
 .../internal/cache/tier/sockets/command/KeySetTest.java |  2 +-
 .../internal/cache/tier/sockets/command/Put61Test.java  |  2 +-
 .../internal/cache/tier/sockets/command/Put65Test.java  |  2 +-
 .../internal/cache/tier/sockets/command/PutTest.java    |  2 +-
 .../tier/sockets/command/RegisterInterest61Test.java    |  2 +-
 .../sockets/command/RegisterInterestList61Test.java     |  2 +-
 .../sockets/command/RegisterInterestList66Test.java     |  2 +-
 .../tier/sockets/command/RegisterInterestListTest.java  |  2 +-
 .../tier/sockets/command/RegisterInterestTest.java      |  2 +-
 .../cache/tier/sockets/command/RemoveAllTest.java       |  2 +-
 .../cache/tier/sockets/command/RequestTest.java         |  2 +-
 .../tier/sockets/command/UnregisterInterestTest.java    |  2 +-
 .../internal/cache/wan/serial/DestroyMessageTest.java   |  1 -
 .../cache/xmlcache/DefaultEntityResolver2Test.java      |  1 -
 .../internal/CompositeBuilderViaFromTest.java           |  1 -
 .../internal/CompositeBuilderViaProxyTest.java          |  1 -
 .../beans/DistributedSystemBridgeJUnitTest.java         |  2 +-
 .../internal/executor/AbstractScanExecutorTest.java     |  1 -
 .../cache/lucene/internal/LuceneIndexFactorySpy.java    |  3 ++-
 .../internal/PartitionedRepositoryManagerJUnitTest.java |  2 +-
 .../distributed/LuceneQueryFunctionJUnitTest.java       | 12 ++++++------
 .../TopEntriesFunctionCollectorJUnitTest.java           |  4 ++--
 .../geode/cache/lucene/test/IndexRepositorySpy.java     |  2 +-
 geode-pulse/build.gradle                                |  3 ---
 gradle/dependency-versions.properties                   |  4 ++--
 gradle/test.gradle                                      |  7 ++++++-
 48 files changed, 51 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/build.gradle
----------------------------------------------------------------------
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index 0297146..7f34b4a 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -136,10 +136,6 @@ dependencies {
   testCompile 'net.spy:spymemcached:' + project.'spymemcached.version'
   testCompile 'redis.clients:jedis:' + project.'jedis.version'
 
-  testCompile 'org.powermock:powermock-core:' + project.'powermock.version'
-  testCompile 'org.powermock:powermock-module-junit4:' + project.'powermock.version'
-  testCompile 'org.powermock:powermock-api-mockito:' + project.'powermock.version'
-
   testCompile 'com.pholser:junit-quickcheck-core:' + project.'junit-quickcheck.version'
   testCompile 'com.pholser:junit-quickcheck-generators:' + project.'junit-quickcheck.version'
   testCompile 'com.pholser:junit-quickcheck-guava:' + project.'junit-quickcheck.version'

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexSetJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexSetJUnitTest.java
index e08baf1..78830d2 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexSetJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexSetJUnitTest.java
@@ -493,7 +493,7 @@ public class HashIndexSetJUnitTest {
 
     @Override
     public Object answer(InvocationOnMock invocation) throws Throwable {
-      Object evalOn = invocation.getArgumentAt(0, Object.class);
+      Object evalOn = invocation.getArgument(0);
       if (evalOn instanceof Portfolio) {
         Portfolio p = (Portfolio) evalOn;
         return p.indexKey;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
index 92982e8..e82f1dd 100755
--- a/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
@@ -44,7 +44,7 @@ import org.apache.geode.test.junit.categories.IntegrationTest;
 
 import static org.apache.geode.distributed.ConfigurationProperties.*;
 import static org.junit.Assert.*;
-import static org.mockito.Matchers.*;
+import static org.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 
 import java.io.ByteArrayInputStream;
@@ -261,7 +261,7 @@ public class JGroupsMessengerJUnitTest {
       } else {
         // for mcast we send a direct-ack message and expect the messenger
         // to register it
-        stub(msg.isDirectAck()).toReturn(true);
+        when(msg.isDirectAck()).thenReturn(true);
       }
       when(msg.getDSFID()).thenReturn((int) DataSerializableFixedID.PUT_ALL_MESSAGE);
 
@@ -414,7 +414,7 @@ public class JGroupsMessengerJUnitTest {
       } else {
         // for mcast we send a direct-ack message and expect the messenger
         // to register it
-        stub(msg.isDirectAck()).toReturn(true);
+        when(msg.isDirectAck()).thenReturn(true);
       }
       when(msg.getDSFID()).thenReturn((int) DataSerializableFixedID.PUT_ALL_MESSAGE);
       interceptor.collectMessages = true;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/DeposePrimaryBucketMessageTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/DeposePrimaryBucketMessageTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/DeposePrimaryBucketMessageTest.java
index f1847f4..0b3e784 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/DeposePrimaryBucketMessageTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/DeposePrimaryBucketMessageTest.java
@@ -15,7 +15,6 @@
 package org.apache.geode.internal.cache.partitioned;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.geode.distributed.internal.DistributionManager;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/FetchEntryMessageTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/FetchEntryMessageTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/FetchEntryMessageTest.java
index 4cf44e4..3a9b58d 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/FetchEntryMessageTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/FetchEntryMessageTest.java
@@ -15,7 +15,6 @@
 package org.apache.geode.internal.cache.partitioned;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.geode.distributed.internal.DistributionManager;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/FetchPartitionDetailsMessageTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/FetchPartitionDetailsMessageTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/FetchPartitionDetailsMessageTest.java
index 921017a..b3e4310 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/FetchPartitionDetailsMessageTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/FetchPartitionDetailsMessageTest.java
@@ -15,7 +15,6 @@
 package org.apache.geode.internal.cache.partitioned;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.geode.distributed.internal.DistributionManager;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/MoveBucketMessageTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/MoveBucketMessageTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/MoveBucketMessageTest.java
index 2c37cc8..f6071a9 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/MoveBucketMessageTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/MoveBucketMessageTest.java
@@ -15,7 +15,6 @@
 package org.apache.geode.internal.cache.partitioned;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.geode.distributed.internal.DistributionManager;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/RemoveBucketMessageTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/RemoveBucketMessageTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/RemoveBucketMessageTest.java
index 3b18079..a49db16 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/RemoveBucketMessageTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/RemoveBucketMessageTest.java
@@ -15,7 +15,6 @@
 package org.apache.geode.internal.cache.partitioned;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.geode.distributed.internal.DistributionManager;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 591aba9..1d02852 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
@@ -15,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.mockito.Matchers.eq;
-import static org.mockito.Matchers.isA;
+import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 6d346f7..00420cc 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.eq;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 a482a8c..729c68b 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
@@ -15,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.mockito.Matchers.eq;
-import static org.mockito.Matchers.isA;
+import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 6b367c1..bf699be 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,7 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 a4a6820..5995890 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
@@ -15,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.mockito.Matchers.eq;
-import static org.mockito.Matchers.isA;
+import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 c64bbb9..c53b038 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
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.mockito.Matchers.*;
+import static org.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 74104a4..b2e30f2 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
@@ -15,7 +15,7 @@
 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.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 a9d9498..cfb4960 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
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.mockito.Matchers.*;
+import static org.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 
 import org.junit.Rule;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 734eb51..78097d2 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
@@ -15,7 +15,7 @@
 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.ArgumentMatchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 4bf4a5c..40bfe45 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
@@ -16,7 +16,7 @@ package org.apache.geode.internal.cache.tier.sockets.command;
 
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 95e95f5..a3ee2c8 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
@@ -15,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 0aa1aaf..ceb8882 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
@@ -15,7 +15,7 @@
 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.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 5e84448..4497c7f 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
@@ -15,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 0a9fdae..08e1a29 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,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 976a8c8..a4da48f 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,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 d30a137..fb3a9dd 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,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 728c3f6..81f17cb 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,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 a339f4d..2578e00 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,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 a1e77d4..5437f71 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
@@ -15,7 +15,7 @@
 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.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 96085fb..0ed27a0 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
@@ -15,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 2f06b64..bae07b4 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
@@ -15,7 +15,7 @@
 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.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 57610d2..1074de5 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
@@ -15,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 e7c7efc..cd07e71 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,7 +15,7 @@
 package org.apache.geode.internal.cache.tier.sockets.command;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 7d4a5a4..de5a459 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
@@ -15,7 +15,7 @@
 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.ArgumentMatchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 271c078..bf7badb 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
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.mockito.Matchers.*;
+import static org.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/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 6c4d242..50fb9cd 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
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/internal/cache/wan/serial/DestroyMessageTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/serial/DestroyMessageTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/serial/DestroyMessageTest.java
index 2d52783..54038a4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/serial/DestroyMessageTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/serial/DestroyMessageTest.java
@@ -15,7 +15,6 @@
 package org.apache.geode.internal.cache.wan.serial;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.geode.internal.cache.DistributedRegion;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/DefaultEntityResolver2Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/DefaultEntityResolver2Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/DefaultEntityResolver2Test.java
index 8142949..9a00420 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/DefaultEntityResolver2Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/DefaultEntityResolver2Test.java
@@ -15,7 +15,6 @@
 package org.apache.geode.internal.cache.xmlcache;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.geode.test.junit.categories.UnitTest;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/management/internal/CompositeBuilderViaFromTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/CompositeBuilderViaFromTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/CompositeBuilderViaFromTest.java
index 2c23ddc..dce8528 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/CompositeBuilderViaFromTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/CompositeBuilderViaFromTest.java
@@ -15,7 +15,6 @@
 package org.apache.geode.management.internal;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.geode.management.internal.OpenTypeConverter.CompositeBuilderViaFrom;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/management/internal/CompositeBuilderViaProxyTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/CompositeBuilderViaProxyTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/CompositeBuilderViaProxyTest.java
index 8fea2b6..828f56f 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/CompositeBuilderViaProxyTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/CompositeBuilderViaProxyTest.java
@@ -15,7 +15,6 @@
 package org.apache.geode.management.internal;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.geode.management.internal.OpenTypeConverter.CompositeBuilderViaProxy;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/management/internal/beans/DistributedSystemBridgeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/beans/DistributedSystemBridgeJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/beans/DistributedSystemBridgeJUnitTest.java
index a886ff7..bdf097e 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/beans/DistributedSystemBridgeJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/beans/DistributedSystemBridgeJUnitTest.java
@@ -15,7 +15,7 @@
 package org.apache.geode.management.internal.beans;
 
 import static org.junit.Assert.*;
-import static org.mockito.Matchers.*;
+import static org.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-core/src/test/java/org/apache/geode/redis/internal/executor/AbstractScanExecutorTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/redis/internal/executor/AbstractScanExecutorTest.java b/geode-core/src/test/java/org/apache/geode/redis/internal/executor/AbstractScanExecutorTest.java
index 2644741..74761bb 100644
--- a/geode-core/src/test/java/org/apache/geode/redis/internal/executor/AbstractScanExecutorTest.java
+++ b/geode-core/src/test/java/org/apache/geode/redis/internal/executor/AbstractScanExecutorTest.java
@@ -15,7 +15,6 @@
 package org.apache.geode.redis.internal.executor;
 
 import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 import org.apache.geode.test.junit.categories.UnitTest;

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexFactorySpy.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexFactorySpy.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexFactorySpy.java
index 1a092d7..69dfbf6 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexFactorySpy.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexFactorySpy.java
@@ -49,7 +49,8 @@ public class LuceneIndexFactorySpy extends LuceneIndexImplFactory {
     this.getRepositoryConsumer = getRepositoryConsumer;
   }
 
-  private class ExtendedLuceneIndexForPartitionedRegion extends LuceneIndexForPartitionedRegion {
+  private static class ExtendedLuceneIndexForPartitionedRegion
+      extends LuceneIndexForPartitionedRegion {
     public ExtendedLuceneIndexForPartitionedRegion(final String indexName, final String regionPath,
         final InternalCache cache) {
       super(indexName, regionPath, cache);

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
index 30e64f2..b0fde3f 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
@@ -15,7 +15,7 @@
 package org.apache.geode.cache.lucene.internal;
 
 import static org.junit.Assert.*;
-import static org.mockito.Matchers.*;
+import static org.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/distributed/LuceneQueryFunctionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/distributed/LuceneQueryFunctionJUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/distributed/LuceneQueryFunctionJUnitTest.java
index 737805b..4e5d495 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/distributed/LuceneQueryFunctionJUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/distributed/LuceneQueryFunctionJUnitTest.java
@@ -95,7 +95,7 @@ public class LuceneQueryFunctionJUnitTest {
     when(mockContext.<TopEntriesCollector>getResultSender()).thenReturn(mockResultSender);
     when(mockRepoManager.getRepositories(eq(mockContext))).thenReturn(repos);
     doAnswer(invocation -> {
-      IndexResultCollector collector = invocation.getArgumentAt(2, IndexResultCollector.class);
+      IndexResultCollector collector = invocation.getArgument(2);
       collector.collect(r1_1.getKey(), r1_1.getScore());
       collector.collect(r1_2.getKey(), r1_2.getScore());
       collector.collect(r1_3.getKey(), r1_3.getScore());
@@ -104,7 +104,7 @@ public class LuceneQueryFunctionJUnitTest {
         any(IndexResultCollector.class));
 
     doAnswer(invocation -> {
-      IndexResultCollector collector = invocation.getArgumentAt(2, IndexResultCollector.class);
+      IndexResultCollector collector = invocation.getArgument(2);
       collector.collect(r2_1.getKey(), r2_1.getScore());
       collector.collect(r2_2.getKey(), r2_2.getScore());
       return null;
@@ -138,7 +138,7 @@ public class LuceneQueryFunctionJUnitTest {
     when(mockRepoManager.getRepositories(eq(mockContext))).thenReturn(repos);
 
     doAnswer(invocation -> {
-      IndexResultCollector collector = invocation.getArgumentAt(2, IndexResultCollector.class);
+      IndexResultCollector collector = invocation.getArgument(2);
       collector.collect(r1_1.getKey(), r1_1.getScore());
       collector.collect(r1_2.getKey(), r1_2.getScore());
       collector.collect(r1_3.getKey(), r1_3.getScore());
@@ -146,7 +146,7 @@ public class LuceneQueryFunctionJUnitTest {
     }).when(mockRepository1).query(eq(query), eq(3), any(IndexResultCollector.class));
 
     doAnswer(invocation -> {
-      IndexResultCollector collector = invocation.getArgumentAt(2, IndexResultCollector.class);
+      IndexResultCollector collector = invocation.getArgument(2);
       collector.collect(r2_1.getKey(), r2_1.getScore());
       collector.collect(r2_2.getKey(), r2_2.getScore());
       return null;
@@ -179,7 +179,7 @@ public class LuceneQueryFunctionJUnitTest {
     when(mockRepoManager.getRepositories(eq(mockContext))).thenReturn(repos);
     when(mockManager.newCollector(eq("repo2"))).thenReturn(mockCollector);
     when(mockManager.reduce(any(Collection.class))).thenAnswer(invocation -> {
-      Collection<IndexResultCollector> collectors = invocation.getArgumentAt(0, Collection.class);
+      Collection<IndexResultCollector> collectors = invocation.getArgument(0);
       assertEquals(1, collectors.size());
       assertEquals(mockCollector, collectors.iterator().next());
       return new TopEntriesCollector(null);
@@ -187,7 +187,7 @@ public class LuceneQueryFunctionJUnitTest {
     });
 
     doAnswer(invocation -> {
-      IndexResultCollector collector = invocation.getArgumentAt(2, IndexResultCollector.class);
+      IndexResultCollector collector = invocation.getArgument(2);
       collector.collect(r2_1.getKey(), r2_1.getScore());
       return null;
     }).when(mockRepository2).query(eq(query), eq(LuceneQueryFactory.DEFAULT_LIMIT),

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/distributed/TopEntriesFunctionCollectorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/distributed/TopEntriesFunctionCollectorJUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/distributed/TopEntriesFunctionCollectorJUnitTest.java
index 5fd9e2d..7b12449 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/distributed/TopEntriesFunctionCollectorJUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/distributed/TopEntriesFunctionCollectorJUnitTest.java
@@ -133,8 +133,8 @@ public class TopEntriesFunctionCollectorJUnitTest {
     Mockito.doReturn(mockCollector).when(mockManager)
         .reduce(Mockito.argThat(new ArgumentMatcher<Collection<TopEntriesCollector>>() {
           @Override
-          public boolean matches(Object argument) {
-            Collection<TopEntriesCollector> collectors = (Collection<TopEntriesCollector>) argument;
+          public boolean matches(Collection<TopEntriesCollector> argument) {
+            Collection<TopEntriesCollector> collectors = argument;
             return collectors.contains(result1) && collectors.contains(result2);
           }
         }));

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-lucene/src/test/java/org/apache/geode/cache/lucene/test/IndexRepositorySpy.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/test/IndexRepositorySpy.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/test/IndexRepositorySpy.java
index 5fd2abe..e23c857 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/test/IndexRepositorySpy.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/test/IndexRepositorySpy.java
@@ -65,7 +65,7 @@ public class IndexRepositorySpy extends IndexRepositoryFactory {
     final IndexRepository spy = Mockito.spy(indexRepo);
 
     Answer invokeBeforeWrite = invocation -> {
-      beforeWrite.accept(invocation.getArgumentAt(0, Object.class));
+      beforeWrite.accept(invocation.getArgument(0));
       return invocation.callRealMethod();
     };
 

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/geode-pulse/build.gradle
----------------------------------------------------------------------
diff --git a/geode-pulse/build.gradle b/geode-pulse/build.gradle
index fdc9fbc..213cd85 100755
--- a/geode-pulse/build.gradle
+++ b/geode-pulse/build.gradle
@@ -82,9 +82,6 @@ dependencies {
   testCompile 'org.seleniumhq.selenium:selenium-remote-driver:' + project.'selenium.version'
   testCompile 'org.seleniumhq.selenium:selenium-support:' + project.'selenium.version'
   testCompile 'org.springframework:spring-test:' + project.'springframework.version'
-  testCompile 'org.powermock:powermock-core:' + project.'powermock.version'
-  testCompile 'org.powermock:powermock-module-junit4:' + project.'powermock.version'
-  testCompile 'org.powermock:powermock-api-mockito:' + project.'powermock.version'
   testCompile 'com.tdunning:json:' + project.'open-json.version'
 
   testRuntime 'com.google.code.gson:gson:' + project.'google-gson.version'

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index 132ea86..f304aac 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -66,7 +66,7 @@ junit-quickcheck.version = 0.7
 JUnitParams.version = 1.0.6
 log4j.version = 2.7
 lucene.version = 6.4.1
-mockito-core.version = 1.10.19
+mockito-core.version = 2.7.11
 mockrunner.version = 1.1.2
 mortbay-jetty-servlet-api.version=3.0.20100224
 multithreadedtc.version = 1.01
@@ -76,7 +76,7 @@ mx4j-tools.version = 3.0.1
 netty-all.version = 4.1.8.Final
 open-json.version = 1.8
 phantomjsdriver.version=1.3.0
-powermock.version = 1.6.6
+powermock.version = 1.7.0RC2
 selenium.version=3.0.1
 shiro.version=1.3.2
 slf4j-api.version = 1.7.23

http://git-wip-us.apache.org/repos/asf/geode/blob/90900ac5/gradle/test.gradle
----------------------------------------------------------------------
diff --git a/gradle/test.gradle b/gradle/test.gradle
index fd44df8..3015ec0 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -43,10 +43,15 @@ subprojects {
     testCompile 'eu.codearte.catch-exception:catch-throwable:' + project.'catch-throwable.version'
     testCompile 'junit:junit:' + project.'junit.version'
     testCompile 'org.assertj:assertj-core:' + project.'assertj-core.version'
-    testCompile 'org.mockito:mockito-core:' + project.'mockito-core.version'
     testCompile 'org.hamcrest:hamcrest-all:' + project.'hamcrest-all.version'
     testCompile 'org.jmock:jmock-junit4:' + project.'jmock.version'
     testCompile 'org.jmock:jmock-legacy:' + project.'jmock.version'
+
+    testCompile 'org.mockito:mockito-core:' + project.'mockito-core.version'
+    testCompile 'org.powermock:powermock-core:' + project.'powermock.version'
+    testCompile 'org.powermock:powermock-module-junit4:' + project.'powermock.version'
+    testCompile 'org.powermock:powermock-api-mockito2:' + project.'powermock.version'
+
     testCompile 'pl.pragmatists:JUnitParams:' + project.'JUnitParams.version'
 
     testRuntime 'cglib:cglib:' + project.'cglib.version'


[18/24] geode git commit: GEODE-2632: consolidate different types of SecurityService

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/main/java/org/apache/geode/internal/security/shiro/SecurityManagerProvider.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/SecurityManagerProvider.java b/geode-core/src/main/java/org/apache/geode/internal/security/shiro/SecurityManagerProvider.java
new file mode 100644
index 0000000..ad8e66e
--- /dev/null
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/shiro/SecurityManagerProvider.java
@@ -0,0 +1,83 @@
+/*
+ * 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.shiro;
+
+import org.apache.logging.log4j.Logger;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.config.Ini;
+import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.mgt.DefaultSecurityManager;
+import org.apache.shiro.realm.Realm;
+import org.apache.shiro.session.mgt.DefaultSessionManager;
+import org.apache.shiro.session.mgt.SessionManager;
+
+import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.security.SecurityManager;
+
+public class SecurityManagerProvider {
+  private static Logger logger = LogService.getLogger(LogService.SECURITY_LOGGER_NAME);
+
+  private org.apache.shiro.mgt.SecurityManager shiroManager;
+  private SecurityManager securityManager;
+
+  public SecurityManagerProvider() {
+    shiroManager = SecurityUtils.getSecurityManager();
+  }
+
+  public SecurityManagerProvider(String shiroConfig) {
+    this.securityManager = null;
+
+    IniSecurityManagerFactory factory = new IniSecurityManagerFactory("classpath:" + shiroConfig);
+    // we will need to make sure that shiro uses a case sensitive permission resolver
+    Ini.Section main = factory.getIni().addSection("main");
+    main.put("geodePermissionResolver", GeodePermissionResolver.class.getName());
+    if (!main.containsKey("iniRealm.permissionResolver")) {
+      main.put("iniRealm.permissionResolver", "$geodePermissionResolver");
+    }
+    shiroManager = factory.getInstance();
+  }
+
+
+  public SecurityManagerProvider(SecurityManager securityManager) {
+    this.securityManager = securityManager;
+
+    Realm realm = new CustomAuthRealm(securityManager);
+    shiroManager = new DefaultSecurityManager(realm);
+    increaseShiroGlobalSessionTimeout((DefaultSecurityManager) shiroManager);
+  }
+
+  private void increaseShiroGlobalSessionTimeout(final DefaultSecurityManager shiroManager) {
+    SessionManager sessionManager = shiroManager.getSessionManager();
+    if (DefaultSessionManager.class.isInstance(sessionManager)) {
+      DefaultSessionManager defaultSessionManager = (DefaultSessionManager) sessionManager;
+      defaultSessionManager.setGlobalSessionTimeout(Long.MAX_VALUE);
+      long value = defaultSessionManager.getGlobalSessionTimeout();
+      if (value != Long.MAX_VALUE) {
+        logger.error("Unable to set Shiro Global Session Timeout. Current value is '{}'.", value);
+      }
+    } else {
+      logger.error("Unable to set Shiro Global Session Timeout. Current SessionManager is '{}'.",
+          sessionManager == null ? "null" : sessionManager.getClass());
+    }
+  }
+
+  public org.apache.shiro.mgt.SecurityManager getShiroSecurityManager() {
+    return shiroManager;
+  }
+
+  public SecurityManager getSecurityManager() {
+    return securityManager;
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/MembershipJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/MembershipJUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/MembershipJUnitTest.java
index a0c3cf3..b0e20d9 100755
--- a/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/MembershipJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/membership/MembershipJUnitTest.java
@@ -58,9 +58,6 @@ import org.apache.geode.internal.admin.remote.RemoteTransportConfig;
 import org.apache.geode.internal.net.SocketCreator;
 import org.apache.geode.internal.security.SecurityServiceFactory;
 import org.apache.geode.test.junit.categories.IntegrationTest;
-import org.apache.logging.log4j.Level;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/DisabledSecurityServiceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/DisabledSecurityServiceTest.java b/geode-core/src/test/java/org/apache/geode/internal/security/DisabledSecurityServiceTest.java
deleted file mode 100644
index cacbeed..0000000
--- a/geode-core/src/test/java/org/apache/geode/internal/security/DisabledSecurityServiceTest.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security;
-
-import static org.assertj.core.api.Assertions.*;
-import static org.mockito.Mockito.*;
-
-import org.apache.geode.security.PostProcessor;
-import org.apache.geode.test.junit.categories.UnitTest;
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.subject.support.SubjectThreadState;
-import org.apache.shiro.util.ThreadState;
-import org.apache.geode.security.SecurityManager;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.util.Properties;
-import java.util.concurrent.Callable;
-
-@Category(UnitTest.class)
-public class DisabledSecurityServiceTest {
-
-  private DisabledSecurityService disabledSecurityService;
-  private Subject mockSubject;
-
-  @Before
-  public void before() throws Exception {
-    this.disabledSecurityService = new DisabledSecurityService();
-    this.mockSubject = mock(Subject.class);
-  }
-
-  @Test
-  public void bindSubject_null() throws Exception {
-    ThreadState threadState = this.disabledSecurityService.bindSubject(null);
-    assertThat(threadState).isNull();
-  }
-
-  @Test
-  public void bindSubject_subject_shouldReturnThreadState() throws Exception {
-    ThreadState threadState = this.disabledSecurityService.bindSubject(this.mockSubject);
-    assertThat(threadState).isNotNull().isInstanceOf(SubjectThreadState.class);
-  }
-
-  @Test
-  public void getSubject_beforeLogin_shouldReturnNull() throws Exception {
-    Subject subject = this.disabledSecurityService.getSubject();
-    assertThat(subject).isNull();
-  }
-
-  @Test
-  public void login_null_shouldReturnNull() throws Exception {
-    Subject subject = this.disabledSecurityService.login(null);
-    assertThat(subject).isNull();
-  }
-
-  @Test
-  public void login_properties_shouldReturnNull() throws Exception {
-    Subject subject = this.disabledSecurityService.login(new Properties());
-    assertThat(subject).isNull();
-  }
-
-  @Test
-  public void getSubject_afterLogin_shouldReturnNull() throws Exception {
-    this.disabledSecurityService.login(new Properties());
-    Subject subject = this.disabledSecurityService.getSubject();
-    assertThat(subject).isNull();
-  }
-
-  @Test
-  public void getSubject_afterLogout_shouldReturnNull() throws Exception {
-    this.disabledSecurityService.login(new Properties());
-    this.disabledSecurityService.logout();
-    Subject subject = this.disabledSecurityService.getSubject();
-    assertThat(subject).isNull();
-  }
-
-  @Test
-  public void associateWith_callable_shouldReturnSameCallable() throws Exception {
-    Callable mockCallable = mock(Callable.class);
-    Callable callable = this.disabledSecurityService.associateWith(mockCallable);
-    assertThat(callable).isNotNull().isSameAs(mockCallable);
-  }
-
-  @Test
-  public void associateWith_null_should() throws Exception {
-    Callable callable = this.disabledSecurityService.associateWith(null);
-    assertThat(callable).isNull();
-  }
-
-  @Test
-  public void needPostProcess_returnsFalse() throws Exception {
-    boolean needPostProcess = this.disabledSecurityService.needPostProcess();
-    assertThat(needPostProcess).isFalse();
-  }
-
-  @Test
-  public void postProcess1_value_shouldReturnSameValue() throws Exception {
-    Object value = new Object();
-    Object result = this.disabledSecurityService.postProcess(null, null, value, false);
-    assertThat(result).isNotNull().isSameAs(value);
-  }
-
-  @Test
-  public void postProcess1_null_returnsNull() throws Exception {
-    Object result = this.disabledSecurityService.postProcess(null, null, null, false);
-    assertThat(result).isNull();
-  }
-
-  @Test
-  public void postProcess2_value_shouldReturnSameValue() throws Exception {
-    Object value = new Object();
-    Object result = this.disabledSecurityService.postProcess(null, null, null, value, false);
-    assertThat(result).isNotNull().isSameAs(value);
-  }
-
-  @Test
-  public void postProcess2_null_returnsNull() throws Exception {
-    Object result = this.disabledSecurityService.postProcess(null, null, null, null, false);
-    assertThat(result).isNull();
-  }
-
-  @Test
-  public void isClientSecurityRequired_returnsFalse() throws Exception {
-    boolean result = this.disabledSecurityService.isClientSecurityRequired();
-    assertThat(result).isFalse();
-  }
-
-  @Test
-  public void isIntegratedSecurity_returnsFalse() throws Exception {
-    boolean result = this.disabledSecurityService.isIntegratedSecurity();
-    assertThat(result).isFalse();
-  }
-
-  @Test
-  public void isPeerSecurityRequired_returnsFalse() throws Exception {
-    boolean result = this.disabledSecurityService.isPeerSecurityRequired();
-    assertThat(result).isFalse();
-  }
-
-  @Test
-  public void getSecurityManager_returnsNull() throws Exception {
-    SecurityManager securityManager = this.disabledSecurityService.getSecurityManager();
-    assertThat(securityManager).isNull();
-  }
-
-  @Test
-  public void getPostProcessor_returnsNull() throws Exception {
-    PostProcessor postProcessor = this.disabledSecurityService.getPostProcessor();
-    assertThat(postProcessor).isNull();
-  }
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/EnabledSecurityServiceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/EnabledSecurityServiceTest.java b/geode-core/src/test/java/org/apache/geode/internal/security/EnabledSecurityServiceTest.java
deleted file mode 100644
index fca7eae..0000000
--- a/geode-core/src/test/java/org/apache/geode/internal/security/EnabledSecurityServiceTest.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.mockito.Mockito.*;
-
-import org.apache.geode.internal.security.shiro.RealmInitializer;
-import org.apache.geode.security.AuthenticationFailedException;
-import org.apache.geode.security.GemFireSecurityException;
-import org.apache.geode.security.PostProcessor;
-import org.apache.geode.security.SecurityManager;
-import org.apache.geode.test.junit.categories.UnitTest;
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.subject.support.SubjectThreadState;
-import org.apache.shiro.util.ThreadState;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.util.Properties;
-import java.util.concurrent.Callable;
-
-@Category(UnitTest.class)
-public class EnabledSecurityServiceTest {
-
-  private SecurityManager mockSecurityManager;
-  private PostProcessor mockPostProcessor;
-  private RealmInitializer spyRealmInitializer;
-  private Subject mockSubject;
-
-  private EnabledSecurityService securityService;
-  private EnabledSecurityService securityServiceWithPostProcessor;
-
-  @Before
-  public void before() throws Exception {
-    this.mockSecurityManager = mock(SecurityManager.class);
-    this.mockPostProcessor = mock(PostProcessor.class);
-    this.spyRealmInitializer = spy(RealmInitializer.class);
-    this.mockSubject = mock(Subject.class);
-
-    this.securityService =
-        new EnabledSecurityService(this.mockSecurityManager, null, this.spyRealmInitializer);
-    this.securityServiceWithPostProcessor = new EnabledSecurityService(this.mockSecurityManager,
-        this.mockPostProcessor, this.spyRealmInitializer);
-  }
-
-  @Test
-  public void bindSubject_nullSubject_shouldReturn_null() throws Exception {
-    ThreadState threadState = this.securityService.bindSubject(null);
-    assertThat(threadState).isNull();
-  }
-
-  @Test
-  public void bindSubject_subject_shouldReturn_ThreadState() throws Exception {
-    ThreadState threadState = this.securityService.bindSubject(this.mockSubject);
-    assertThat(threadState).isNotNull().isInstanceOf(SubjectThreadState.class);
-  }
-
-  @Test
-  public void getSubject_beforeLogin_shouldThrow_GemFireSecurityException() throws Exception {
-    assertThatThrownBy(() -> this.securityService.getSubject())
-        .isInstanceOf(GemFireSecurityException.class).hasMessageContaining("Anonymous User");
-  }
-
-  @Test
-  public void login_nullProperties_shouldReturn_null() throws Exception {
-    Subject subject = this.securityService.login(null);
-    assertThat(subject).isNull();
-  }
-
-  @Test
-  public void login_emptyProperties_shouldThrow_AuthenticationFailedException() throws Exception {
-    assertThatThrownBy(() -> this.securityService.login(new Properties()))
-        .isInstanceOf(AuthenticationFailedException.class)
-        .hasMessageContaining("Please check your credentials");
-  }
-
-  @Ignore("Extract all shiro integration code out of EnabledSecurityService for mocking")
-  @Test
-  public void getSubject_afterLogin_shouldReturnNull() throws Exception {
-    this.securityService.login(new Properties());
-    Subject subject = this.securityService.getSubject();
-    assertThat(subject).isNull();
-  }
-
-  @Ignore("Extract all shiro integration code out of EnabledSecurityService for mocking")
-  @Test
-  public void getSubject_afterLogout_shouldReturnNull() throws Exception {
-    this.securityService.login(new Properties());
-    this.securityService.logout();
-    Subject subject = this.securityService.getSubject();
-    assertThat(subject).isNull();
-  }
-
-  @Test
-  public void associateWith_callable_beforeLogin_shouldThrow_GemFireSecurityException()
-      throws Exception {
-    assertThatThrownBy(() -> this.securityService.associateWith(mock(Callable.class)))
-        .isInstanceOf(GemFireSecurityException.class).hasMessageContaining("Anonymous User");
-  }
-
-  @Test
-  public void associateWith_null_should() throws Exception {
-    assertThatThrownBy(() -> this.securityService.associateWith(null))
-        .isInstanceOf(GemFireSecurityException.class).hasMessageContaining("Anonymous User");
-  }
-
-  @Test
-  public void needPostProcess_returnsFalse() throws Exception {
-    boolean needPostProcess = this.securityService.needPostProcess();
-    assertThat(needPostProcess).isFalse();
-  }
-
-  @Test
-  public void postProcess1_value_shouldReturnSameValue() throws Exception {
-    Object value = new Object();
-    Object result = this.securityService.postProcess(null, null, value, false);
-    assertThat(result).isNotNull().isSameAs(value);
-  }
-
-  @Test
-  public void postProcess1_null_returnsNull() throws Exception {
-    Object result = this.securityService.postProcess(null, null, null, false);
-    assertThat(result).isNull();
-  }
-
-  @Test
-  public void postProcess2_value_shouldReturnSameValue() throws Exception {
-    Object value = new Object();
-    Object result = this.securityService.postProcess(null, null, null, value, false);
-    assertThat(result).isNotNull().isSameAs(value);
-  }
-
-  @Test
-  public void postProcess2_null_returnsNull() throws Exception {
-    Object result = this.securityService.postProcess(null, null, null, null, false);
-    assertThat(result).isNull();
-  }
-
-  @Test
-  public void isClientSecurityRequired_returnsTrue() throws Exception {
-    boolean result = this.securityService.isClientSecurityRequired();
-    assertThat(result).isTrue();
-  }
-
-  @Test
-  public void isIntegratedSecurity_returnsTrue() throws Exception {
-    boolean result = this.securityService.isIntegratedSecurity();
-    assertThat(result).isTrue();
-  }
-
-  @Test
-  public void isPeerSecurityRequired_returnsTrue() throws Exception {
-    boolean result = this.securityService.isPeerSecurityRequired();
-    assertThat(result).isTrue();
-  }
-
-  @Test
-  public void getSecurityManager_returnsSecurityManager() throws Exception {
-    SecurityManager securityManager = this.securityService.getSecurityManager();
-    assertThat(securityManager).isNotNull().isSameAs(this.mockSecurityManager);
-  }
-
-  @Test
-  public void getPostProcessor_returnsNull() throws Exception {
-    PostProcessor postProcessor = this.securityService.getPostProcessor();
-    assertThat(postProcessor).isNull();
-  }
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/FakePostProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/FakePostProcessor.java b/geode-core/src/test/java/org/apache/geode/internal/security/FakePostProcessor.java
deleted file mode 100644
index 7082344..0000000
--- a/geode-core/src/test/java/org/apache/geode/internal/security/FakePostProcessor.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security;
-
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.geode.security.PostProcessor;
-
-public class FakePostProcessor implements PostProcessor {
-
-  private final AtomicInteger initInvocations = new AtomicInteger(0);
-  private final AtomicInteger processRegionValueInvocations = new AtomicInteger(0);
-  private final AtomicInteger closeInvocations = new AtomicInteger(0);
-
-  private final AtomicReference<Properties> securityPropsRef = new AtomicReference<>();
-  private final AtomicReference<ProcessRegionValueArguments> processRegionValueArgumentsRef =
-      new AtomicReference<>();
-
-  @Override
-  public void init(Properties securityProps) {
-    this.initInvocations.incrementAndGet();
-    this.securityPropsRef.set(securityProps);
-  }
-
-  @Override
-  public Object processRegionValue(final Object principal, final String regionName,
-      final Object key, final Object value) {
-    this.processRegionValueInvocations.incrementAndGet();
-    this.processRegionValueArgumentsRef
-        .set(new ProcessRegionValueArguments(principal, regionName, key, value));
-    return this.processRegionValueArgumentsRef.get();
-  }
-
-  @Override
-  public void close() {
-    this.closeInvocations.incrementAndGet();
-  }
-
-  public int getInitInvocations() {
-    return this.initInvocations.get();
-  }
-
-  public int getProcessRegionValueInvocations() {
-    return this.processRegionValueInvocations.get();
-  }
-
-  public int getCloseInvocations() {
-    return this.closeInvocations.get();
-  }
-
-  public Properties getSecurityProps() {
-    return this.securityPropsRef.get();
-  }
-
-  public ProcessRegionValueArguments getProcessRegionValueArguments() {
-    return this.processRegionValueArgumentsRef.get();
-  }
-
-  public static class ProcessRegionValueArguments {
-    private final Object principal;
-    private final String regionName;
-    private final Object key;
-    private final Object value;
-
-    public ProcessRegionValueArguments(final Object principal, final String regionName,
-        final Object key, final Object value) {
-      this.principal = principal;
-      this.regionName = regionName;
-      this.key = key;
-      this.value = value;
-    }
-
-    public Object getPrincipal() {
-      return this.principal;
-    }
-
-    public String getRegionName() {
-      return this.regionName;
-    }
-
-    public Object getKey() {
-      return this.key;
-    }
-
-    public Object getValue() {
-      return this.value;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/FakeSecurityManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/FakeSecurityManager.java b/geode-core/src/test/java/org/apache/geode/internal/security/FakeSecurityManager.java
deleted file mode 100644
index ca4e6b7..0000000
--- a/geode-core/src/test/java/org/apache/geode/internal/security/FakeSecurityManager.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security;
-
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.geode.security.AuthenticationFailedException;
-import org.apache.geode.security.ResourcePermission;
-import org.apache.geode.security.SecurityManager;
-
-public class FakeSecurityManager implements SecurityManager {
-
-  private final AtomicInteger initInvocations = new AtomicInteger(0);
-  private final AtomicInteger authenticateInvocations = new AtomicInteger(0);
-  private final AtomicInteger authorizeInvocations = new AtomicInteger(0);
-  private final AtomicInteger closeInvocations = new AtomicInteger(0);
-
-  private final AtomicReference<Properties> securityPropsRef = new AtomicReference<>();
-  private final AtomicReference<Properties> credentialsRef = new AtomicReference<>();
-  private final AtomicReference<AuthorizeArguments> processAuthorizeArgumentsRef =
-      new AtomicReference<>();
-
-  @Override
-  public void init(final Properties securityProps) {
-    this.initInvocations.incrementAndGet();
-    this.securityPropsRef.set(securityProps);
-  }
-
-  @Override
-  public Object authenticate(final Properties credentials) throws AuthenticationFailedException {
-    this.authenticateInvocations.incrementAndGet();
-    this.credentialsRef.set(credentials);
-    return credentials;
-  }
-
-  @Override
-  public boolean authorize(final Object principal, final ResourcePermission permission) {
-    this.authorizeInvocations.incrementAndGet();
-    this.processAuthorizeArgumentsRef.set(new AuthorizeArguments(principal, permission));
-    return true;
-  }
-
-  @Override
-  public void close() {
-    this.closeInvocations.incrementAndGet();
-  }
-
-  public int getInitInvocations() {
-    return this.initInvocations.get();
-  }
-
-  public int getAuthenticateInvocations() {
-    return this.authenticateInvocations.get();
-  }
-
-  public int getAuthorizeInvocations() {
-    return this.authorizeInvocations.get();
-  }
-
-  public int getCloseInvocations() {
-    return this.closeInvocations.get();
-  }
-
-  public Properties getSecurityProps() {
-    return this.securityPropsRef.get();
-  }
-
-  public AuthorizeArguments getAuthorizeArguments() {
-    return this.processAuthorizeArgumentsRef.get();
-  }
-
-  public static class AuthorizeArguments {
-    private final Object principal;
-    private final ResourcePermission permission;
-
-    public AuthorizeArguments(final Object principal, final ResourcePermission permission) {
-      this.principal = principal;
-      this.permission = permission;
-    }
-
-    public Object getPrincipal() {
-      return this.principal;
-    }
-
-    public ResourcePermission getPermission() {
-      return this.permission;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceConstructorTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceConstructorTest.java b/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceConstructorTest.java
new file mode 100644
index 0000000..afa007f
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceConstructorTest.java
@@ -0,0 +1,93 @@
+/*
+ * 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.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.apache.shiro.SecurityUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.internal.security.shiro.SecurityManagerProvider;
+import org.apache.geode.security.PostProcessor;
+import org.apache.geode.security.SecurityManager;
+import org.apache.geode.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class IntegratedSecurityServiceConstructorTest {
+
+  private IntegratedSecurityService securityService;
+  private SecurityManager securityManager;
+  private PostProcessor postProcessor;
+  private SecurityManagerProvider provider;
+  private org.apache.shiro.mgt.SecurityManager shiroManager;
+
+  @Before
+  public void before() throws Exception {
+    securityManager = mock(SecurityManager.class);
+    postProcessor = mock(PostProcessor.class);
+    provider = mock(SecurityManagerProvider.class);
+    shiroManager = mock(org.apache.shiro.mgt.SecurityManager.class);
+    when(provider.getShiroSecurityManager()).thenReturn(shiroManager);
+  }
+
+  @After
+  public void after() throws Exception {
+    if (securityService != null) {
+      securityService.close();
+    }
+
+    // some test manually set the shiro security manager
+    SecurityUtils.setSecurityManager(null);
+  }
+
+  @Test
+  public void constructorWithOutsideShrio() throws Exception {
+    when(provider.getSecurityManager()).thenReturn(null);
+    securityService = new IntegratedSecurityService(provider, postProcessor);
+    assertThat(securityService.getPostProcessor()).isEqualTo(postProcessor);
+    assertThat(securityService.getSecurityManager()).isNull();
+    assertIntegratedSecurityService();
+  }
+
+  @Test
+  public void constructorWithSecurityManager() throws Exception {
+    when(provider.getSecurityManager()).thenReturn(securityManager);
+    securityService = new IntegratedSecurityService(provider, null);
+    assertThat(securityService.getPostProcessor()).isNull();
+    assertThat(securityService.getSecurityManager()).isEqualTo(securityManager);
+    assertIntegratedSecurityService();
+  }
+
+  @Test
+  public void constructorWithSecurityManagerAndPostProcessor() throws Exception {
+    when(provider.getSecurityManager()).thenReturn(securityManager);
+    securityService = new IntegratedSecurityService(provider, postProcessor);
+    assertThat(securityService.getPostProcessor()).isEqualTo(postProcessor);
+    assertThat(securityService.getSecurityManager()).isEqualTo(securityManager);
+    assertIntegratedSecurityService();
+  }
+
+  private void assertIntegratedSecurityService() throws Exception {
+    assertThat(securityService.isIntegratedSecurity()).isTrue();
+    assertThat(securityService.isClientSecurityRequired()).isTrue();
+    assertThat(securityService.isPeerSecurityRequired()).isTrue();
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceTest.java b/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceTest.java
new file mode 100644
index 0000000..daaf18d
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/security/IntegratedSecurityServiceTest.java
@@ -0,0 +1,166 @@
+/*
+ * 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 static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.Properties;
+
+import org.apache.shiro.subject.Subject;
+import org.apache.shiro.subject.SubjectContext;
+import org.apache.shiro.subject.support.SubjectThreadState;
+import org.apache.shiro.util.ThreadContext;
+import org.apache.shiro.util.ThreadState;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.internal.security.shiro.SecurityManagerProvider;
+import org.apache.geode.security.AuthenticationRequiredException;
+import org.apache.geode.security.GemFireSecurityException;
+import org.apache.geode.security.PostProcessor;
+import org.apache.geode.security.SecurityManager;
+import org.apache.geode.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class IntegratedSecurityServiceTest {
+
+  private SecurityManager mockSecurityManager;
+  private SecurityManagerProvider provider;
+  private Subject mockSubject;
+  private org.apache.shiro.mgt.SecurityManager shiroManager;
+
+  private IntegratedSecurityService securityService;
+
+  @Before
+  public void before() throws Exception {
+    this.mockSecurityManager = mock(SecurityManager.class);
+    this.shiroManager = mock(org.apache.shiro.mgt.SecurityManager.class);
+    this.provider = mock(SecurityManagerProvider.class);
+    this.mockSubject = mock(Subject.class);
+    when(provider.getShiroSecurityManager()).thenReturn(shiroManager);
+    when(provider.getSecurityManager()).thenReturn(mockSecurityManager);
+    when(shiroManager.createSubject(any(SubjectContext.class))).thenReturn(mockSubject);
+    when(mockSubject.getPrincipal()).thenReturn("principal");
+
+    this.securityService = new IntegratedSecurityService(provider, null);
+  }
+
+  @After
+  public void after() throws Exception {
+    securityService.close();
+  }
+
+  @Test
+  public void bindSubject_nullSubject_shouldReturn_null() throws Exception {
+    assertThatThrownBy(() -> this.securityService.bindSubject(null))
+        .isInstanceOf(GemFireSecurityException.class).hasMessageContaining("Anonymous User");
+  }
+
+  @Test
+  public void bindSubject_subject_shouldReturn_ThreadState() throws Exception {
+    ThreadState threadState = this.securityService.bindSubject(this.mockSubject);
+    assertThat(threadState).isNotNull().isInstanceOf(SubjectThreadState.class);
+  }
+
+  @Test
+  public void login_nullProperties_shouldReturn_null() throws Exception {
+    assertThatThrownBy(() -> this.securityService.login(null))
+        .isInstanceOf(AuthenticationRequiredException.class)
+        .hasMessageContaining("credentials are null");
+  }
+
+  @Test
+  public void getSubject_login_logout() throws Exception {
+    this.securityService.login(new Properties());
+    Subject subject = this.securityService.getSubject();
+    assertThat(subject).isNotNull();
+    assertThat(ThreadContext.getSubject()).isNotNull();
+    this.securityService.logout();
+    assertThat(ThreadContext.getSubject()).isNull();
+  }
+
+  @Test
+  public void associateWith_null_should_return_null() throws Exception {
+    assertThat(this.securityService.associateWith(null)).isNull();
+  }
+
+  @Test
+  public void needPostProcess_returnsFalse() throws Exception {
+    boolean needPostProcess = this.securityService.needPostProcess();
+    assertThat(needPostProcess).isFalse();
+  }
+
+  @Test
+  public void postProcess1_value_shouldReturnSameValue() throws Exception {
+    Object value = new Object();
+    Object result = this.securityService.postProcess(null, null, value, false);
+    assertThat(result).isNotNull().isSameAs(value);
+  }
+
+  @Test
+  public void postProcess1_null_returnsNull() throws Exception {
+    Object result = this.securityService.postProcess(null, null, null, false);
+    assertThat(result).isNull();
+  }
+
+  @Test
+  public void postProcess2_value_shouldReturnSameValue() throws Exception {
+    Object value = new Object();
+    Object result = this.securityService.postProcess(null, null, null, value, false);
+    assertThat(result).isNotNull().isSameAs(value);
+  }
+
+  @Test
+  public void postProcess2_null_returnsNull() throws Exception {
+    Object result = this.securityService.postProcess(null, null, null, null, false);
+    assertThat(result).isNull();
+  }
+
+  @Test
+  public void isClientSecurityRequired_returnsTrue() throws Exception {
+    boolean result = this.securityService.isClientSecurityRequired();
+    assertThat(result).isTrue();
+  }
+
+  @Test
+  public void isIntegratedSecurity_returnsTrue() throws Exception {
+    boolean result = this.securityService.isIntegratedSecurity();
+    assertThat(result).isTrue();
+  }
+
+  @Test
+  public void isPeerSecurityRequired_returnsTrue() throws Exception {
+    boolean result = this.securityService.isPeerSecurityRequired();
+    assertThat(result).isTrue();
+  }
+
+  @Test
+  public void getSecurityManager_returnsSecurityManager() throws Exception {
+    SecurityManager securityManager = this.securityService.getSecurityManager();
+    assertThat(securityManager).isNotNull().isSameAs(this.mockSecurityManager);
+  }
+
+  @Test
+  public void getPostProcessor_returnsNull() throws Exception {
+    PostProcessor postProcessor = this.securityService.getPostProcessor();
+    assertThat(postProcessor).isNull();
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/LegacySecurityServiceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/LegacySecurityServiceTest.java b/geode-core/src/test/java/org/apache/geode/internal/security/LegacySecurityServiceTest.java
new file mode 100644
index 0000000..bac79ec
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/security/LegacySecurityServiceTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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 org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(UnitTest.class)
+public class LegacySecurityServiceTest {
+  private LegacySecurityService service;
+
+  @Test
+  public void emptyConstructor() throws Exception {
+    service = new LegacySecurityService();
+    assertThat(service.isIntegratedSecurity()).isFalse();
+    assertThat(service.isClientSecurityRequired()).isFalse();
+    assertThat(service.isPeerSecurityRequired()).isFalse();
+    assertThat(service.getPostProcessor()).isNull();
+    assertThat(service.getSecurityManager()).isNull();
+  }
+
+  @Test
+  public void clientAuthenticator() throws Exception {
+    service = new LegacySecurityService("abc.create", null);
+    assertThat(service.isIntegratedSecurity()).isFalse();
+    assertThat(service.isClientSecurityRequired()).isTrue();
+    assertThat(service.isPeerSecurityRequired()).isFalse();
+    assertThat(service.getPostProcessor()).isNull();
+    assertThat(service.getSecurityManager()).isNull();
+  }
+
+  @Test
+  public void peerAuthenticator() throws Exception {
+    service = new LegacySecurityService(null, "abc.create");
+    assertThat(service.isIntegratedSecurity()).isFalse();
+    assertThat(service.isClientSecurityRequired()).isFalse();
+    assertThat(service.isPeerSecurityRequired()).isTrue();
+    assertThat(service.getPostProcessor()).isNull();
+    assertThat(service.getSecurityManager()).isNull();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceFactoryShiroIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceFactoryShiroIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceFactoryShiroIntegrationTest.java
index 8907012..e8548ed8 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceFactoryShiroIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceFactoryShiroIntegrationTest.java
@@ -14,24 +14,15 @@
  */
 package org.apache.geode.internal.security;
 
-import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR;
-import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_PEER_AUTHENTICATOR;
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_SHIRO_INIT;
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
 
-import org.apache.geode.security.PostProcessor;
-import org.apache.geode.security.SecurityManager;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.util.ThreadContext;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
-import org.junit.rules.TemporaryFolder;
 
 import java.util.Properties;
 
@@ -42,8 +33,8 @@ public class SecurityServiceFactoryShiroIntegrationTest {
 
   private String shiroIniInClasspath;
 
-  @Rule
-  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+  private SecurityService service;
+
 
   @Before
   public void before() throws Exception {
@@ -53,8 +44,9 @@ public class SecurityServiceFactoryShiroIntegrationTest {
 
   @After
   public void after() throws Exception {
-    ThreadContext.remove();
-    SecurityUtils.setSecurityManager(null);
+    if (service != null) {
+      service.close();
+    }
   }
 
   @Test
@@ -67,24 +59,8 @@ public class SecurityServiceFactoryShiroIntegrationTest {
   public void create_shiro_createsCustomSecurityService() throws Exception {
     Properties securityConfig = new Properties();
     securityConfig.setProperty(SECURITY_SHIRO_INIT, this.shiroIniInClasspath);
-
-    assertThat(SecurityServiceFactory.create(securityConfig, null, null))
-        .isInstanceOf(CustomSecurityService.class);
-  }
-
-  @Test
-  public void create_all_createsCustomSecurityService() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_SHIRO_INIT, this.shiroIniInClasspath);
-    securityConfig.setProperty(SECURITY_CLIENT_AUTHENTICATOR, "value");
-    securityConfig.setProperty(SECURITY_PEER_AUTHENTICATOR, "value");
-
-    SecurityManager mockSecurityManager = mock(SecurityManager.class);
-    PostProcessor mockPostProcessor = mock(PostProcessor.class);
-
-    assertThat(
-        SecurityServiceFactory.create(securityConfig, mockSecurityManager, mockPostProcessor))
-            .isInstanceOf(CustomSecurityService.class);
+    service = SecurityServiceFactory.create(securityConfig);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
   }
 
   private String getResourcePackage(Class classInPackage) {

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceFactoryTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceFactoryTest.java b/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceFactoryTest.java
index f027a43..fc4447b 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceFactoryTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceFactoryTest.java
@@ -21,14 +21,18 @@ import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_POST
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_SHIRO_INIT;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
+import org.apache.geode.internal.cache.CacheConfig;
 import org.apache.geode.security.PostProcessor;
-import org.apache.geode.security.SecurityManager;
+import org.apache.geode.security.SimpleTestSecurityManager;
+import org.apache.geode.security.TestPostProcessor;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.apache.geode.test.junit.categories.UnitTest;
 import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.util.ThreadContext;
+import org.apache.shiro.mgt.SecurityManager;
 import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -37,244 +41,152 @@ import java.util.Properties;
 @Category({UnitTest.class, SecurityTest.class})
 public class SecurityServiceFactoryTest {
 
-  @After
-  public void after() throws Exception {
-    ThreadContext.remove();
-    SecurityUtils.setSecurityManager(null);
-  }
-
-  @Test
-  public void getPostProcessor_null_returnsNull() throws Exception {
-    assertThat(SecurityServiceFactory.getPostProcessor(null, null)).isNull();
-  }
-
-  @Test
-  public void getPostProcessor_returnsPostProcessor() throws Exception {
-    PostProcessor mockPostProcessor = mock(PostProcessor.class);
-
-    assertThat(SecurityServiceFactory.getPostProcessor(mockPostProcessor, null))
-        .isSameAs(mockPostProcessor);
-  }
-
-  @Test
-  public void getPostProcessor_SecurityConfig_createsPostProcessor() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_POST_PROCESSOR, FakePostProcessor.class.getName());
-
-    PostProcessor postProcessor = SecurityServiceFactory.getPostProcessor(null, securityConfig);
-
-    assertThat(postProcessor).isInstanceOf(FakePostProcessor.class);
-
-    FakePostProcessor fakePostProcessor = (FakePostProcessor) postProcessor;
-
-    assertThat(fakePostProcessor.getInitInvocations()).isEqualTo(0);
-    assertThat(fakePostProcessor.getSecurityProps()).isNull();
-  }
-
-  @Test
-  public void getPostProcessor_prefersPostProcessorOverSecurityConfig() throws Exception {
-    PostProcessor mockPostProcessor = mock(PostProcessor.class);
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_POST_PROCESSOR, FakePostProcessor.class.getName());
-
-    assertThat(SecurityServiceFactory.getPostProcessor(mockPostProcessor, securityConfig))
-        .isSameAs(mockPostProcessor);
-  }
-
-  @Test
-  public void getSecurityManager_null_returnsNull() throws Exception {
-    assertThat(SecurityServiceFactory.getSecurityManager(null, null)).isNull();
-  }
-
-  @Test
-  public void getSecurityManager_returnsSecurityManager() throws Exception {
-    SecurityManager mockSecurityManager = mock(SecurityManager.class);
-
-    assertThat(SecurityServiceFactory.getSecurityManager(mockSecurityManager, null))
-        .isSameAs(mockSecurityManager);
-  }
-
-  @Test
-  public void getSecurityManager_SecurityConfig_createsSecurityManager() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_MANAGER, FakeSecurityManager.class.getName());
-
-    SecurityManager securityManager =
-        SecurityServiceFactory.getSecurityManager(null, securityConfig);
-
-    assertThat(securityManager).isInstanceOf(FakeSecurityManager.class);
-
-    FakeSecurityManager fakeSecurityManager = (FakeSecurityManager) securityManager;
-
-    assertThat(fakeSecurityManager.getInitInvocations()).isEqualTo(0);
-    assertThat(fakeSecurityManager.getSecurityProps()).isNull();
-  }
-
-  @Test
-  public void getSecurityManager_prefersSecurityManagerOverSecurityConfig() throws Exception {
-    SecurityManager mockSecurityManager = mock(SecurityManager.class);
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_MANAGER, FakePostProcessor.class.getName());
-
-    assertThat(SecurityServiceFactory.getSecurityManager(mockSecurityManager, securityConfig))
-        .isSameAs(mockSecurityManager);
-  }
-
-  @Test
-  public void determineType_null_returnsDISABLED() throws Exception {
-    assertThat(SecurityServiceFactory.determineType(null, null, null))
-        .isSameAs(SecurityServiceType.DISABLED);
-  }
-
-  @Test
-  public void determineType_shiro_returnsCUSTOM() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_SHIRO_INIT, "value");
-
-    assertThat(SecurityServiceFactory.determineType(securityConfig, null, null))
-        .isSameAs(SecurityServiceType.CUSTOM);
-  }
-
-  @Test
-  public void determineType_securityManager_returnsENABLED() throws Exception {
-    Properties securityConfig = new Properties();
-    SecurityManager mockSecurityManager = mock(SecurityManager.class);
-
-    assertThat(SecurityServiceFactory.determineType(securityConfig, mockSecurityManager, null))
-        .isSameAs(SecurityServiceType.ENABLED);
-  }
-
-  @Test
-  public void determineType_postProcessor_returnsDISABLED() throws Exception {
-    Properties securityConfig = new Properties();
-    PostProcessor mockPostProcessor = mock(PostProcessor.class);
+  private SecurityService service;
+  private Properties properties;
+  private org.apache.geode.security.SecurityManager securityManager;
+  private PostProcessor postProcessor;
+  private CacheConfig cacheConfig;
 
-    assertThat(SecurityServiceFactory.determineType(securityConfig, null, mockPostProcessor))
-        .isSameAs(SecurityServiceType.DISABLED);
+  @Before
+  public void before() throws Exception {
+    securityManager = mock(org.apache.geode.security.SecurityManager.class);
+    postProcessor = mock(PostProcessor.class);
+    cacheConfig = mock(CacheConfig.class);
+    properties = new Properties();
   }
 
-  @Test
-  public void determineType_both_returnsENABLED() throws Exception {
-    Properties securityConfig = new Properties();
-    SecurityManager mockSecurityManager = mock(SecurityManager.class);
-    PostProcessor mockPostProcessor = mock(PostProcessor.class);
+  @After
+  public void after() throws Exception {
+    if (service != null) {
+      service.close();
+    }
 
-    assertThat(SecurityServiceFactory.determineType(securityConfig, mockSecurityManager,
-        mockPostProcessor)).isSameAs(SecurityServiceType.ENABLED);
+    // some test manually set the shiro security manager
+    SecurityUtils.setSecurityManager(null);
   }
 
   @Test
-  public void determineType_prefersCUSTOM() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_SHIRO_INIT, "value");
-    securityConfig.setProperty(SECURITY_CLIENT_AUTHENTICATOR, "value");
-    securityConfig.setProperty(SECURITY_PEER_AUTHENTICATOR, "value");
-    SecurityManager mockSecurityManager = mock(SecurityManager.class);
-
-    assertThat(SecurityServiceFactory.determineType(securityConfig, mockSecurityManager, null))
-        .isSameAs(SecurityServiceType.CUSTOM);
+  public void createWithNoArgument() throws Exception {
+    service = SecurityServiceFactory.create();
+    assertThat(service).isInstanceOf(LegacySecurityService.class);
   }
 
   @Test
-  public void determineType_clientAuthenticator_returnsLEGACY() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_CLIENT_AUTHENTICATOR, "value");
+  public void createWithPropsWithNothingOrAuthenticators() throws Exception {
+    service = SecurityServiceFactory.create(properties);
+    assertThat(service).isInstanceOf(LegacySecurityService.class);
+    assertThat(service.isClientSecurityRequired()).isFalse();
+    assertThat(service.isPeerSecurityRequired()).isFalse();
 
-    assertThat(SecurityServiceFactory.determineType(securityConfig, null, null))
-        .isSameAs(SecurityServiceType.LEGACY);
-  }
-
-  @Test
-  public void determineType_peerAuthenticator_returnsLEGACY() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_PEER_AUTHENTICATOR, "value");
+    // add client auth
+    properties.setProperty(SECURITY_CLIENT_AUTHENTICATOR, "com.abc.Auth");
+    service = SecurityServiceFactory.create(properties);
+    assertThat(service).isInstanceOf(LegacySecurityService.class);
+    assertThat(service.isClientSecurityRequired()).isTrue();
+    assertThat(service.isPeerSecurityRequired()).isFalse();
 
-    assertThat(SecurityServiceFactory.determineType(securityConfig, null, null))
-        .isSameAs(SecurityServiceType.LEGACY);
+    // add peer auth
+    properties.setProperty(SECURITY_PEER_AUTHENTICATOR, "com.abc.PeerAuth");
+    service = SecurityServiceFactory.create(properties);
+    assertThat(service).isInstanceOf(LegacySecurityService.class);
+    assertThat(service.isClientSecurityRequired()).isTrue();
+    assertThat(service.isPeerSecurityRequired()).isTrue();
   }
 
   @Test
-  public void determineType_authenticators_returnsLEGACY() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_CLIENT_AUTHENTICATOR, "value");
-    securityConfig.setProperty(SECURITY_PEER_AUTHENTICATOR, "value");
+  public void createWithPropsWithSecurityManager() throws Exception {
+    properties.setProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName());
+    service = SecurityServiceFactory.create(properties);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
+    assertThat(service.getSecurityManager()).isNotNull();
+    assertThat(service.getPostProcessor()).isNull();
 
-    assertThat(SecurityServiceFactory.determineType(securityConfig, null, null))
-        .isSameAs(SecurityServiceType.LEGACY);
+    // add the post processor
+    properties.setProperty(SECURITY_POST_PROCESSOR, TestPostProcessor.class.getName());
+    service = SecurityServiceFactory.create(properties);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
+    assertThat(service.getSecurityManager()).isNotNull();
+    assertThat(service.getPostProcessor()).isNotNull();
   }
 
   @Test
-  public void determineType_empty_returnsDISABLED() throws Exception {
-    Properties securityConfig = new Properties();
-
-    assertThat(SecurityServiceFactory.determineType(securityConfig, null, null))
-        .isSameAs(SecurityServiceType.DISABLED);
+  public void createWithPropsWithShiro() throws Exception {
+    properties.setProperty(SECURITY_SHIRO_INIT, "shiro.ini");
+    service = SecurityServiceFactory.create(properties);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
+    assertThat(service.getSecurityManager()).isNull();
+    assertThat(service.getPostProcessor()).isNull();
   }
 
   @Test
-  public void create_clientAuthenticator_createsLegacySecurityService() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_CLIENT_AUTHENTICATOR, "value");
-
-    assertThat(SecurityServiceFactory.create(securityConfig, null, null))
-        .isInstanceOf(LegacySecurityService.class);
+  public void shiroOverwritesSecurityManager() throws Exception {
+    properties.setProperty(SECURITY_SHIRO_INIT, "shiro.ini");
+    properties.setProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName());
+    service = SecurityServiceFactory.create(properties);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
+    assertThat(service.getSecurityManager()).isNull();
+    assertThat(service.getPostProcessor()).isNull();
   }
 
   @Test
-  public void create_peerAuthenticator_createsLegacySecurityService() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_PEER_AUTHENTICATOR, "value");
-
-    assertThat(SecurityServiceFactory.create(securityConfig, null, null))
-        .isInstanceOf(LegacySecurityService.class);
+  public void createWithOutsideShiro() throws Exception {
+    SecurityUtils.setSecurityManager(mock(SecurityManager.class));
+    // create the service with empty properties, but we would still end up with
+    // an IntegratedSecurityService
+    service = SecurityServiceFactory.create(properties);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
+    assertThat(service.getSecurityManager()).isNull();
+    assertThat(service.getPostProcessor()).isNull();
   }
 
   @Test
-  public void create_authenticators_createsLegacySecurityService() throws Exception {
-    Properties securityConfig = new Properties();
-    securityConfig.setProperty(SECURITY_CLIENT_AUTHENTICATOR, "value");
-    securityConfig.setProperty(SECURITY_PEER_AUTHENTICATOR, "value");
-
-    assertThat(SecurityServiceFactory.create(securityConfig, null, null))
-        .isInstanceOf(LegacySecurityService.class);
+  public void cacheConfigSecurityManagerOverideShiro() throws Exception {
+    properties.setProperty(SECURITY_SHIRO_INIT, "shiro.ini");
+    when(cacheConfig.getSecurityManager()).thenReturn(securityManager);
+    service = SecurityServiceFactory.create(properties, cacheConfig);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
+    assertThat(service.getSecurityManager()).isNotNull();
+    assertThat(service.getPostProcessor()).isNull();
   }
 
   @Test
-  public void create_none_createsDisabledSecurityService() throws Exception {
-    Properties securityConfig = new Properties();
-
-    assertThat(SecurityServiceFactory.create(securityConfig, null, null))
-        .isInstanceOf(DisabledSecurityService.class);
+  public void cacheConfigOverideProperties_securityManager() throws Exception {
+    properties.setProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName());
+    when(cacheConfig.getSecurityManager()).thenReturn(securityManager);
+    service = SecurityServiceFactory.create(properties, cacheConfig);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
+    assertThat(service.getSecurityManager()).isEqualTo(securityManager);
+    assertThat(service.getPostProcessor()).isNull();
   }
 
   @Test
-  public void create_postProcessor_createsDisabledSecurityService() throws Exception {
-    Properties securityConfig = new Properties();
-    PostProcessor mockPostProcessor = mock(PostProcessor.class);
-
-    assertThat(SecurityServiceFactory.create(securityConfig, null, mockPostProcessor))
-        .isInstanceOf(DisabledSecurityService.class);
+  public void cacheConfigOverideProperties_postProcessor() throws Exception {
+    properties.setProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName());
+    properties.setProperty(SECURITY_POST_PROCESSOR, TestPostProcessor.class.getName());
+    when(cacheConfig.getPostProcessor()).thenReturn(postProcessor);
+    service = SecurityServiceFactory.create(properties, cacheConfig);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
+    assertThat(service.getSecurityManager()).isInstanceOf(SimpleTestSecurityManager.class);
+    assertThat(service.getPostProcessor()).isEqualTo(postProcessor);
   }
 
   @Test
-  public void create_securityManager_createsEnabledSecurityService() throws Exception {
-    Properties securityConfig = new Properties();
-    SecurityManager mockSecurityManager = mock(SecurityManager.class);
-
-    assertThat(SecurityServiceFactory.create(securityConfig, mockSecurityManager, null))
-        .isInstanceOf(EnabledSecurityService.class);
+  public void cacheConfigSecurityManagerWithPropertyPostProcessor() throws Exception {
+    properties.setProperty(SECURITY_POST_PROCESSOR, TestPostProcessor.class.getName());
+    when(cacheConfig.getSecurityManager()).thenReturn(securityManager);
+    service = SecurityServiceFactory.create(properties, cacheConfig);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
+    assertThat(service.getSecurityManager()).isEqualTo(securityManager);
+    assertThat(service.getPostProcessor()).isInstanceOf(TestPostProcessor.class);
   }
 
   @Test
-  public void create_securityManagerAndPostProcessor_createsEnabledSecurityService()
-      throws Exception {
-    Properties securityConfig = new Properties();
-    SecurityManager mockSecurityManager = mock(SecurityManager.class);
-    PostProcessor mockPostProcessor = mock(PostProcessor.class);
-
-    assertThat(
-        SecurityServiceFactory.create(securityConfig, mockSecurityManager, mockPostProcessor))
-            .isInstanceOf(EnabledSecurityService.class);
+  public void cacheConfigPostProcessorWithPropertySecurityManager() throws Exception {
+    properties.setProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName());
+    when(cacheConfig.getPostProcessor()).thenReturn(postProcessor);
+    service = SecurityServiceFactory.create(properties, cacheConfig);
+    assertThat(service).isInstanceOf(IntegratedSecurityService.class);
+    assertThat(service.getSecurityManager()).isInstanceOf(SimpleTestSecurityManager.class);
+    assertThat(service.getPostProcessor()).isEqualTo(postProcessor);
   }
-
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceTest.java b/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceTest.java
index 4489352..4b7bbfc 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/security/SecurityServiceTest.java
@@ -19,10 +19,7 @@ import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANA
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_PEER_AUTHENTICATOR;
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_SHIRO_INIT;
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
 
-import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.apache.geode.test.junit.categories.UnitTest;
@@ -39,21 +36,17 @@ import java.util.Properties;
 public class SecurityServiceTest {
 
   private Properties properties;
-  private DistributionConfig distributionConfig;
   private SecurityService securityService;
 
   @Before
   public void before() {
     this.properties = new Properties();
-    this.distributionConfig = mock(DistributionConfig.class);
-    when(this.distributionConfig.getSecurityProps()).thenReturn(this.properties);
-    this.securityService = SecurityServiceFactory.create(null, this.distributionConfig);
+    this.securityService = SecurityServiceFactory.create();
   }
 
   @After
   public void after() throws Exception {
     this.securityService.close();
-    SecurityUtils.setSecurityManager(null);
   }
 
   @Test
@@ -70,7 +63,7 @@ public class SecurityServiceTest {
     this.properties.setProperty(TestSecurityManager.SECURITY_JSON,
         "org/apache/geode/security/templates/security.json");
 
-    this.securityService = SecurityServiceFactory.create(null, this.distributionConfig);
+    this.securityService = SecurityServiceFactory.create(properties);
 
     assertThat(this.securityService.isIntegratedSecurity()).isTrue();
     assertThat(this.securityService.isClientSecurityRequired()).isTrue();
@@ -80,7 +73,7 @@ public class SecurityServiceTest {
   @Test
   public void testInitWithClientAuthenticator() {
     this.properties.setProperty(SECURITY_CLIENT_AUTHENTICATOR, "org.abc.test");
-    this.securityService = SecurityServiceFactory.create(null, this.distributionConfig);
+    this.securityService = SecurityServiceFactory.create(properties);
 
     assertThat(this.securityService.isIntegratedSecurity()).isFalse();
     assertThat(this.securityService.isClientSecurityRequired()).isTrue();
@@ -90,7 +83,7 @@ public class SecurityServiceTest {
   @Test
   public void testInitWithPeerAuthenticator() {
     this.properties.setProperty(SECURITY_PEER_AUTHENTICATOR, "org.abc.test");
-    this.securityService = SecurityServiceFactory.create(null, this.distributionConfig);
+    this.securityService = SecurityServiceFactory.create(properties);
 
     assertThat(this.securityService.isIntegratedSecurity()).isFalse();
     assertThat(this.securityService.isClientSecurityRequired()).isFalse();
@@ -102,7 +95,7 @@ public class SecurityServiceTest {
     this.properties.setProperty(SECURITY_CLIENT_AUTHENTICATOR, "org.abc.test");
     this.properties.setProperty(SECURITY_PEER_AUTHENTICATOR, "org.abc.test");
 
-    this.securityService = SecurityServiceFactory.create(null, this.distributionConfig);
+    this.securityService = SecurityServiceFactory.create(properties);
 
     assertThat(this.securityService.isIntegratedSecurity()).isFalse();
     assertThat(this.securityService.isClientSecurityRequired()).isTrue();
@@ -113,7 +106,7 @@ public class SecurityServiceTest {
   public void testInitWithShiroAuthenticator() {
     this.properties.setProperty(SECURITY_SHIRO_INIT, "shiro.ini");
 
-    this.securityService = SecurityServiceFactory.create(null, this.distributionConfig);
+    this.securityService = SecurityServiceFactory.create(properties);
 
     assertThat(this.securityService.isIntegratedSecurity()).isTrue();
     assertThat(this.securityService.isClientSecurityRequired()).isTrue();
@@ -128,7 +121,7 @@ public class SecurityServiceTest {
   @Test
   public void testInitWithOutsideShiroSecurityManager() {
     SecurityUtils.setSecurityManager(new DefaultSecurityManager());
-    this.securityService = SecurityServiceFactory.create(null, this.distributionConfig);
+    this.securityService = SecurityServiceFactory.create(properties);
 
     assertThat(this.securityService.isIntegratedSecurity()).isTrue();
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/internal/security/shiro/ConfigInitializerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/shiro/ConfigInitializerIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/security/shiro/ConfigInitializerIntegrationTest.java
deleted file mode 100644
index 857c0be..0000000
--- a/geode-core/src/test/java/org/apache/geode/internal/security/shiro/ConfigInitializerIntegrationTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.security.shiro;
-
-import static org.assertj.core.api.Assertions.*;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.geode.test.junit.categories.UnitTest;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.UnavailableSecurityManagerException;
-import org.apache.shiro.util.ThreadContext;
-import org.apache.shiro.config.ConfigurationException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TemporaryFolder;
-
-import java.io.File;
-
-@Category(UnitTest.class)
-public class ConfigInitializerIntegrationTest {
-
-  private static final String SHIRO_INI_FILE = "ConfigInitializerIntegrationTest.ini";
-
-  private String shiroIniInClasspath;
-  private ConfigInitializer configInitializer;
-  private String shiroIniInFilesystem;
-
-  @Rule
-  public TemporaryFolder temporaryFolder = new TemporaryFolder();
-
-  @Before
-  public void before() throws Exception {
-    assertThat(getClass().getResource(SHIRO_INI_FILE)).isNotNull();
-
-    this.configInitializer = new ConfigInitializer();
-
-    this.shiroIniInClasspath = getResourcePackage(getClass()) + SHIRO_INI_FILE;
-
-    File shiroIniFile = this.temporaryFolder.newFile(SHIRO_INI_FILE);
-    FileUtils.copyURLToFile(getClass().getResource(SHIRO_INI_FILE), shiroIniFile);
-    this.shiroIniInFilesystem = shiroIniFile.getAbsolutePath();
-
-    assertThatThrownBy(() -> SecurityUtils.getSecurityManager())
-        .isInstanceOf(UnavailableSecurityManagerException.class);
-  }
-
-  @After
-  public void after() throws Exception {
-    ThreadContext.remove();
-    SecurityUtils.setSecurityManager(null);
-  }
-
-  @Test
-  public void initialize_fileInClasspath() throws Exception {
-    this.configInitializer.initialize(this.shiroIniInClasspath);
-    assertThat(SecurityUtils.getSecurityManager()).isNotNull();
-  }
-
-  @Test
-  public void initialize_null_throws_ConfigurationException() throws Exception {
-    assertThatThrownBy(() -> this.configInitializer.initialize(null))
-        .isInstanceOf(ConfigurationException.class)
-        .hasMessageContaining("Resource [classpath:null] could not be found");
-  }
-
-  @Test
-  public void initialize_fileInFilesystem() throws Exception {
-    assertThatThrownBy(() -> this.configInitializer.initialize(this.shiroIniInFilesystem))
-        .isInstanceOf(ConfigurationException.class).hasMessageContaining("Resource [classpath:")
-        .hasMessageContaining("ConfigInitializerIntegrationTest.ini] could not be found");
-  }
-
-  private String getResourcePackage(Class classInPackage) {
-    return classInPackage.getName().replace(classInPackage.getSimpleName(), "").replace(".", "/");
-  }
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/management/internal/security/SecurityServiceWithCustomRealmIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/SecurityServiceWithCustomRealmIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/SecurityServiceWithCustomRealmIntegrationTest.java
index 01d6bb6..c47432b 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/SecurityServiceWithCustomRealmIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/SecurityServiceWithCustomRealmIntegrationTest.java
@@ -39,6 +39,6 @@ public class SecurityServiceWithCustomRealmIntegrationTest
         "org/apache/geode/management/internal/security/shiro-ini.json");
     this.props.setProperty(SECURITY_MANAGER, TestSecurityManager.class.getName());
     this.props.setProperty(SECURITY_SHIRO_INIT, "shiro.ini");
-    this.securityService = SecurityServiceFactory.create(this.props, null, null);
+    this.securityService = SecurityServiceFactory.create(this.props);
   }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/management/internal/security/SecurityServiceWithShiroIniIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/SecurityServiceWithShiroIniIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/SecurityServiceWithShiroIniIntegrationTest.java
index 1caedbc..86a0ff0 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/SecurityServiceWithShiroIniIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/SecurityServiceWithShiroIniIntegrationTest.java
@@ -43,7 +43,7 @@ public class SecurityServiceWithShiroIniIntegrationTest {
   @Before
   public void before() throws Exception {
     this.props.setProperty(SECURITY_SHIRO_INIT, "shiro.ini");
-    this.securityService = SecurityServiceFactory.create(this.props, null, null);
+    this.securityService = SecurityServiceFactory.create(this.props);
   }
 
   @After

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/security/CacheFactoryWithSecurityObjectTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/security/CacheFactoryWithSecurityObjectTest.java b/geode-core/src/test/java/org/apache/geode/security/CacheFactoryWithSecurityObjectTest.java
index cdb90f1..94e0be5 100644
--- a/geode-core/src/test/java/org/apache/geode/security/CacheFactoryWithSecurityObjectTest.java
+++ b/geode-core/src/test/java/org/apache/geode/security/CacheFactoryWithSecurityObjectTest.java
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertTrue;
 import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.distributed.ConfigurationProperties;
 import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.internal.security.LegacySecurityService;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.templates.DummyAuthenticator;
 import org.apache.geode.test.junit.categories.IntegrationTest;
@@ -37,17 +38,18 @@ import java.util.Properties;
 public class CacheFactoryWithSecurityObjectTest {
 
   private SecurityManager simpleSecurityManager;
-  private Properties properties = new Properties();
+  private Properties properties;
   private InternalCache cache;
 
   @Before
   public void before() throws Exception {
     this.simpleSecurityManager = new SimpleTestSecurityManager();
+    properties = new Properties();
     this.properties.setProperty("mcast-port", "0");
   }
 
   @Test
-  public void testCreateCacheWithSecurityManager() throws Exception {
+  public void testCreateCacheWithSecurityManagerOnly() throws Exception {
     this.cache = (InternalCache) new CacheFactory(this.properties)
         .setSecurityManager(this.simpleSecurityManager).setPostProcessor(null).create();
     SecurityService securityService = this.cache.getSecurityService();
@@ -56,17 +58,20 @@ public class CacheFactoryWithSecurityObjectTest {
     assertTrue(securityService.isPeerSecurityRequired());
     assertFalse(securityService.needPostProcess());
     assertNotNull(securityService.getSecurityManager());
+    assertNull(securityService.getPostProcessor());
   }
 
   @Test
-  public void testCreateCacheWithPostProcessor() throws Exception {
+  public void testCreateCacheWithPostProcessorOnly() throws Exception {
     this.cache = (InternalCache) new CacheFactory(this.properties)
         .setPostProcessor(new TestPostProcessor()).setSecurityManager(null).create();
     SecurityService securityService = this.cache.getSecurityService();
+    assertTrue(securityService instanceof LegacySecurityService);
     assertFalse(securityService.isIntegratedSecurity());
     assertFalse(securityService.isClientSecurityRequired());
     assertFalse(securityService.isPeerSecurityRequired());
     assertFalse(securityService.needPostProcess());
+    assertNull(securityService.getSecurityManager());
     assertNull(securityService.getPostProcessor());
   }
 
@@ -89,7 +94,7 @@ public class CacheFactoryWithSecurityObjectTest {
    * SECURITY_CLIENT_AUTHENTICATOR.
    */
   @Test
-  public void testOverride() throws Exception {
+  public void testSecurityManagerOverAuthenticator() throws Exception {
     this.properties.setProperty(ConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR,
         DummyAuthenticator.class.getName());
 
@@ -107,6 +112,61 @@ public class CacheFactoryWithSecurityObjectTest {
     assertNotNull(securityService.getPostProcessor());
   }
 
+
+  @Test
+  public void testCacheConfigOverProperties1() throws Exception {
+    this.properties.setProperty(ConfigurationProperties.SECURITY_SHIRO_INIT, "shiro.ini");
+
+    this.cache = (InternalCache) new CacheFactory(this.properties).setSecurityManager(null)
+        .setPostProcessor(null).create();
+
+    SecurityService securityService = this.cache.getSecurityService();
+
+    assertTrue(securityService.isIntegratedSecurity());
+    assertTrue(securityService.isClientSecurityRequired());
+    assertTrue(securityService.isPeerSecurityRequired());
+    assertFalse(securityService.needPostProcess());
+    assertNull(securityService.getSecurityManager());
+    assertNull(securityService.getPostProcessor());
+  }
+
+  @Test
+  public void testCacheConfigOverProperties() throws Exception {
+    this.properties.setProperty(ConfigurationProperties.SECURITY_SHIRO_INIT, "shiro.ini");
+
+    this.cache = (InternalCache) new CacheFactory(this.properties)
+        .setSecurityManager(this.simpleSecurityManager).setPostProcessor(new TestPostProcessor())
+        .create();
+
+    SecurityService securityService = this.cache.getSecurityService();
+
+    assertTrue(securityService.isIntegratedSecurity());
+    assertTrue(securityService.isClientSecurityRequired());
+    assertTrue(securityService.isPeerSecurityRequired());
+    assertTrue(securityService.needPostProcess());
+    assertNotNull(securityService.getSecurityManager());
+    assertNotNull(securityService.getPostProcessor());
+  }
+
+  @Test
+  public void testCacheConfigKeepsOldPostProcessor() throws Exception {
+    this.properties.setProperty(ConfigurationProperties.SECURITY_POST_PROCESSOR,
+        TestPostProcessor.class.getName());
+
+    this.cache = (InternalCache) new CacheFactory(this.properties)
+        .setSecurityManager(this.simpleSecurityManager).setPostProcessor(null).create();
+
+    SecurityService securityService = this.cache.getSecurityService();
+
+    assertTrue(securityService.isIntegratedSecurity());
+    assertTrue(securityService.isClientSecurityRequired());
+    assertTrue(securityService.isPeerSecurityRequired());
+    assertTrue(securityService.needPostProcess());
+    assertNotNull(securityService.getSecurityManager());
+    assertNotNull(securityService.getPostProcessor());
+  }
+
+
   @After
   public void after() {
     this.cache.close();

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-core/src/test/java/org/apache/geode/security/SecurityManagerLifecycleDistributedTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/security/SecurityManagerLifecycleDistributedTest.java b/geode-core/src/test/java/org/apache/geode/security/SecurityManagerLifecycleDistributedTest.java
index a9048b9..8727406 100644
--- a/geode-core/src/test/java/org/apache/geode/security/SecurityManagerLifecycleDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/security/SecurityManagerLifecycleDistributedTest.java
@@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.geode.cache.server.CacheServer;
 import org.apache.geode.cache30.CacheTestCase;
-import org.apache.geode.internal.security.EnabledSecurityService;
+import org.apache.geode.internal.security.IntegratedSecurityService;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.management.ManagementService;
 import org.apache.geode.test.dunit.Host;
@@ -127,7 +127,7 @@ public class SecurityManagerLifecycleDistributedTest extends CacheTestCase {
 
   private void verifyInitAndCloseInvoked() {
     SecurityService securityService = getCache().getSecurityService();
-    assertThat(securityService).isNotNull().isInstanceOf(EnabledSecurityService.class);
+    assertThat(securityService).isNotNull().isInstanceOf(IntegratedSecurityService.class);
 
     SpySecurityManager ssm =
         (SpySecurityManager) getCache().getSecurityService().getSecurityManager();

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/Server.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/Server.java b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/Server.java
index 63f907c..ad5c080 100644
--- a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/Server.java
+++ b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/Server.java
@@ -14,19 +14,16 @@
  */
 package org.apache.geode.tools.pulse.tests;
 
+import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANAGER;
+
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.internal.security.SecurityServiceFactory;
-import org.apache.geode.internal.security.shiro.CustomAuthRealm;
 import org.apache.geode.internal.security.shiro.JMXShiroAuthenticator;
 import org.apache.geode.management.internal.security.AccessControlMBean;
 import org.apache.geode.management.internal.security.MBeanServerWrapper;
 import org.apache.geode.management.internal.security.ResourceConstants;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.tools.pulse.internal.data.PulseConstants;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.mgt.DefaultSecurityManager;
-import org.apache.shiro.mgt.SecurityManager;
-import org.apache.shiro.realm.Realm;
 
 import java.io.IOException;
 import java.lang.management.ManagementFactory;
@@ -73,20 +70,16 @@ public class Server {
       // set up Shiro Security Manager
       Properties securityProperties = new Properties();
       securityProperties.setProperty(TestSecurityManager.SECURITY_JSON, jsonAuthFile);
-      Realm realm = new CustomAuthRealm(TestSecurityManager.class.getName(), securityProperties);
-      SecurityManager securityManager = new DefaultSecurityManager(realm);
-      SecurityUtils.setSecurityManager(securityManager);
+      securityProperties.setProperty(SECURITY_MANAGER, TestSecurityManager.class.getName());
+
+      SecurityService securityService = SecurityServiceFactory.create(securityProperties);
 
       // register the AccessControll bean
-      AccessControlMBean acc = new AccessControlMBean(SecurityServiceFactory.create());
+      AccessControlMBean acc = new AccessControlMBean(securityService);
       ObjectName accessControlMBeanON = new ObjectName(ResourceConstants.OBJECT_NAME_ACCESSCONTROL);
       MBeanServer platformMBeanServer = ManagementFactory.getPlatformMBeanServer();
       platformMBeanServer.registerMBean(acc, accessControlMBeanON);
 
-      SecurityService securityService =
-          SecurityServiceFactory.create(securityProperties, new TestSecurityManager(), null);
-      securityService.initSecurity(securityProperties);
-
       // wire in the authenticator and authorizaton
       JMXShiroAuthenticator interceptor = new JMXShiroAuthenticator(securityService);
       env.put(JMXConnectorServer.AUTHENTICATOR, interceptor);

http://git-wip-us.apache.org/repos/asf/geode/blob/5546a873/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/rules/ServerRule.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/rules/ServerRule.java b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/rules/ServerRule.java
index 767588d..f62bb74 100644
--- a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/rules/ServerRule.java
+++ b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/rules/ServerRule.java
@@ -14,14 +14,12 @@
  */
 package org.apache.geode.tools.pulse.tests.rules;
 
-import org.apache.geode.internal.security.DisabledSecurityService;
-import org.apache.geode.tools.pulse.internal.data.PulseConstants;
-import org.awaitility.Awaitility;
 import org.apache.geode.internal.AvailablePort;
 import org.apache.geode.internal.admin.SSLConfig;
 import org.apache.geode.management.internal.JettyHelper;
+import org.apache.geode.tools.pulse.internal.data.PulseConstants;
 import org.apache.geode.tools.pulse.tests.Server;
-
+import org.awaitility.Awaitility;
 import org.junit.rules.ExternalResource;
 
 import java.io.IOException;


[14/24] geode git commit: GEODE-3070: Fix gemfire.jar to be geode-dependencies.jar

Posted by je...@apache.org.
GEODE-3070: Fix gemfire.jar to be geode-dependencies.jar

Updated a few other errors found along the way, including
the name of the RAR file for JTA transactions, and outdated
output of sample gfsh commands in the gfsh tutorial.  Also
added a final step that shuts down the cluster in the tutorial.

This closes #579


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

Branch: refs/heads/feature/GEODE-3071
Commit: 7bc31116bdefcab96f68bdb37699b32d8c2dc10c
Parents: d9869ff
Author: Karen Miller <km...@pivotal.io>
Authored: Tue Jun 13 15:55:56 2017 -0700
Committer: Karen Miller <km...@pivotal.io>
Committed: Wed Jun 14 13:38:27 2017 -0700

----------------------------------------------------------------------
 .../transactions/JTA_transactions.html.md.erb   | 21 +++--
 .../tools_modules/gfsh/tour_of_gfsh.html.md.erb | 86 +++++++++++++-------
 2 files changed, 68 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/7bc31116/geode-docs/developing/transactions/JTA_transactions.html.md.erb
----------------------------------------------------------------------
diff --git a/geode-docs/developing/transactions/JTA_transactions.html.md.erb b/geode-docs/developing/transactions/JTA_transactions.html.md.erb
index e218684..3164dce 100644
--- a/geode-docs/developing/transactions/JTA_transactions.html.md.erb
+++ b/geode-docs/developing/transactions/JTA_transactions.html.md.erb
@@ -122,8 +122,9 @@ To accomplish this, the application server container must use a JCA Resource Ada
 
 # How to Run JTA Transactions with Geode as a "Last Resource"
 
-1.  Locate the `$GEMFIRE/lib/gemfire-jca.rar` file in your Geode installation. 
-2.  Add your container-specific XML file to the `gemfire-jca.rar` file. 
+1.  Locate the version-specific `geode-jca` RAR file within 
+the `lib` directory of your Geode installation. 
+2.  Add your container-specific XML file to the `geode-jca` RAR file. 
 <ol>
 <li>Create a container-specific resource adapter XML file named &lt;container&gt;-ra.xml. For example, an XML file for a WebLogic resource adapter XML file might look something like this:
 
@@ -144,17 +145,21 @@ To accomplish this, the application server container must use a JCA Resource Ada
     META-INF/weblogic-ra.xml
     ```
 </li>
-<li>Navigate to the directory above the `META-INF` folder and execute the following command:
+<li>Navigate to the directory above the `META-INF` folder and execute the following command, with appropriate substitutions for 
+path and file names:
 
     ``` pre
-    $ jar -uf <GEMFIRE_INSTALL_DIR>/lib/gemfire-jca.rar META-INF/weblogic-ra.xml
+    $ jar -uf /path/to/lib/geode-jca-X-X-X.rar META-INF/weblogic-ra.xml
     ```
 </li>
 </ol>
-3.  Make sure that `$GEMFIRE/lib/gemfire.jar` is accessible in the CLASSPATH of the JTA transaction coordinator container.
-4.  Deploy `gemfire-jca.rar` file on the JTA transaction coordinator container . When deploying the file, you specify the JNDI name and so on. 
+3.  Make sure that the `geode-dependencies.jar` is accessible in 
+the CLASSPATH of the JTA transaction coordinator container.
+4.  Deploy the version-specific `geode-jca` RAR file on 
+the JTA transaction coordinator container.
+When deploying the file, you specify the JNDI name and so on. 
 5.  Configure Geode for any necessary transactional behavior. Enable `copy-on-read` and specify a transaction listener, if you need one. See [Setting Global Copy on Read](working_with_transactions.html#concept_vx2_gs4_5k) and [Configuring Transaction Plug-In Event Handlers](working_with_transactions.html#concept_ocw_vf1_wk) for details.
-6.  Get an initial context through `com.gemstone.cache.Cache.getJNDIContext`. For example:
+6.  Get an initial context through `org.apache.geode.cache.GemFireCache.getJNDIContext`. For example:
 
     ``` pre
     Context ctx = cache.getJNDIContext();
@@ -215,7 +220,7 @@ To run a global transaction, perform the following steps:
 3.  Configure Geode for any necessary transactional behavior. Enable `copy-on-read` for your cache and specify a transaction listener, if you need one. See [Setting Global Copy on Read](working_with_transactions.html#concept_vx2_gs4_5k) and [Configuring Transaction Plug-In Event Handlers](working_with_transactions.html#concept_ocw_vf1_wk) for details. 
 4.  Make sure that JTA transactions are not disabled in the `cache.xml` file or the application code. 
 5.  Initialize the Geode cache. 
-6.  Get an initial context through `org.apache.geode.cache.Cache.getJNDIContext`. For example: 
+6.  Get an initial context through `org.apache.geode.cache.GemFireCache.getJNDIContext`. For example: 
 
     ``` pre
     Context ctx = cache.getJNDIContext();

http://git-wip-us.apache.org/repos/asf/geode/blob/7bc31116/geode-docs/tools_modules/gfsh/tour_of_gfsh.html.md.erb
----------------------------------------------------------------------
diff --git a/geode-docs/tools_modules/gfsh/tour_of_gfsh.html.md.erb b/geode-docs/tools_modules/gfsh/tour_of_gfsh.html.md.erb
index 4120641..759fa99 100644
--- a/geode-docs/tools_modules/gfsh/tour_of_gfsh.html.md.erb
+++ b/geode-docs/tools_modules/gfsh/tour_of_gfsh.html.md.erb
@@ -55,18 +55,23 @@ The following output appears:
 
 ``` pre
 gfsh>start locator --name=locator1
-Starting a GemFire Locator in /home/username/gfsh_tutorial/locator1...
-.................................
-Locator in /home/username/gfsh_tutorial/locator1 on ubuntu.local[10334] as locator1 is currently online.
-Process ID: 5610
-Uptime: 18 seconds
-GemFire Version: 8.1.0
-Java Version: 1.7.0_72
-Log File: /home/username/gfsh_tutorial/locator1/locator1.log
-JVM Arguments: -Dgemfire.enable-cluster-configuration=true -Dgemfire.load-cluster-configuration-from-dir=false -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
-Class-Path: /home/username/Pivotal_GemFire_810_b50582_Linux/lib/gemfire.jar:/home/username/Pivotal_GemFire_810_b50582_Linux/lib/locator-dependencies.jar
-
-Successfully connected to: [host=ubuntu.local, port=1099]
+.....
+Locator in /home/username/gfsh_tutorial/locator1 on 192.0.2.0[10334]
+as locator1 is currently online.
+Process ID: 67666
+Uptime: 6 seconds
+Geode Version: 1.2.0
+Java Version: 1.8.0_92
+Log File: /home/username/gfsh_tutorial/locator1.log
+JVM Arguments: -Dgemfire.enable-cluster-configuration=true
+ -Dgemfire.load-cluster-configuration-from-dir=false
+ -Dgemfire.launcher.registerSignalHandlers=true
+ -Djava.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
+Class-Path: /home/username/geode/geode-assembly/build/install/apache-geode/lib
+/geode-core-1.2.0.jar:/home/username/geode/geode-assembly/build/install/apache-geode
+/lib/geode-dependencies.jar
+
+Successfully connected to: JMX Manager [host=192.0.2.0, port=1099]
 
 Cluster configuration service is up and running.
 ```
@@ -171,16 +176,23 @@ If the server starts successfully, the following output appears:
 
 ``` pre
 gfsh>start server --name=server1 --locators=localhost[10334]
-Starting a GemFire Server in /home/username/gfsh_tutorial/server1...
-.............
-Server in /home/username/gfsh_tutorial/server1 on ubuntu.local[40404] as server1 is currently online.
-Process ID: 5931
-Uptime: 7 seconds
-GemFire Version: 8.1.0
-Java Version: 1.7.0_72
-Log File: /home/username/gfsh_tutorial/server1/server1.log
-JVM Arguments: -Dgemfire.locators=localhost[10334] -Dgemfire.use-cluster-configuration=true -XX:OnOutOfMemoryError=kill -KILL %p -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
-Class-Path: /home/username/Pivotal_GemFire_810_b50582_Linux/lib/gemfire.jar:/home/username/Pivotal_GemFire_810_b50582_Linux/lib/server-dependencies.jar
+Starting a Geode Server in /home/username/gfsh_tutorial/server1/server1.log...
+...
+Server in /home/username/gfsh_tutorial/server1 on 192.0.2.0[40404] as server1
+is currently online.
+Process ID: 68375
+Uptime: 4 seconds
+Geode Version: 1.2.0
+Java Version: 1.8.0_92
+Log File: /home/username//gfsh_tutorial/server1/server1.log
+JVM Arguments: -Dgemfire.locators=localhost[10334]
+ -Dgemfire.use-cluster-configuration=true -Dgemfire.start-dev-rest-api=false
+ -XX:OnOutOfMemoryError=kill -KILL %p
+ -Dgemfire.launcher.registerSignalHandlers=true
+ -Djava.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
+Class-Path: /home/username/geode/geode-assembly/build/install/apache-geode/lib
+/geode-core-1.2.0.jar:/home/username/geode/geode-assembly/build/install
+/apache-geode/lib/geode-dependencies.jar
 ```
 
 If you run `start server` from gfsh without specifying the member name, gfsh will automatically pick a random member name. This is useful for automation.
@@ -279,16 +291,22 @@ Because only one server is in the distributed system at the moment, the command
 
 ``` pre
 gfsh>start server --name=server2 --server-port=40405
-Starting a GemFire Server in /home/username/gfsh_tutorial/server2...
-................
-Server in /home/username/gfsh_tutorial/server2 on ubuntu.local[40405] as server2 is currently online.
-Process ID: 6092
-Uptime: 8 seconds
-GemFire Version: 8.1.0
-Java Version: 1.7.0_72
+Starting a Geode Server in /home/username/gfsh_tutorial/server2...
+...
+Server in /home/username/gfsh_tutorial/server2 on 192.0.2.0[40405] as
+server2 is currently online.
+Process ID: 68423
+Uptime: 4 seconds
+Geode Version: 1.2.0
+Java Version: 1.8.0_92
 Log File: /home/username/gfsh_tutorial/server2/server2.log
-JVM Arguments: -Dgemfire.default.locators=192.0.2.0[10334] -Dgemfire.use-cluster-configuration=true -XX:OnOutOfMemoryError=kill -KILL %p -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
-Class-Path: /home/username/Pivotal_GemFire_810_b50582_Linux/lib/gemfire.jar:/home/username/Pivotal_GemFire_810_b50582_Linux/lib/server-dependencies.jar
+JVM Arguments: -Dgemfire.default.locators=192.0.2.0[10334]
+ -Dgemfire.use-cluster-configuration=true -Dgemfire.start-dev-rest-api=false
+ -XX:OnOutOfMemoryError=kill -KILL %p -Dgemfire.launcher.registerSignalHandlers=true
+ -Djava.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
+Class-Path: /home/username/geode/geode-assembly/build/install/apache-geode
+/lib/geode-core-1.2.0.jar:/home/username/geode/geode-assembly/build/install
+/apache-geode/lib/geode-dependencies.jar
 ```
 
 **Step 11: Create a replicated region.**
@@ -466,3 +484,9 @@ gfsh>export data --region=region1 --file=region1.gfd --member=server1
 ```
 
 You can later use the `import data` command to import that data into the same region on another member.
+
+**Step 20: Shutdown the cluster.**
+
+``` pre
+gfsh>shutdown --include-locators=true
+```


[23/24] geode git commit: GEODE-2854: GEODE REST API Docs Missing Authentication This closes #583

Posted by je...@apache.org.
GEODE-2854: GEODE REST API Docs Missing Authentication
This closes #583


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

Branch: refs/heads/feature/GEODE-3071
Commit: 78f08e8a224cf99ff9981acacbf88452911f9069
Parents: dbc3197
Author: Dave Barnes <db...@pivotal.io>
Authored: Thu Jun 15 13:43:41 2017 -0700
Committer: Dave Barnes <db...@pivotal.io>
Committed: Fri Jun 16 15:47:05 2017 -0700

----------------------------------------------------------------------
 .../source/subnavs/geode-subnav.erb             |   8 +-
 geode-docs/rest_apps/setup_config.html.md.erb   | 269 ++++++++++++-------
 2 files changed, 176 insertions(+), 101 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/78f08e8a/geode-book/master_middleman/source/subnavs/geode-subnav.erb
----------------------------------------------------------------------
diff --git a/geode-book/master_middleman/source/subnavs/geode-subnav.erb b/geode-book/master_middleman/source/subnavs/geode-subnav.erb
index aa0faf4..37c0b83 100644
--- a/geode-book/master_middleman/source/subnavs/geode-subnav.erb
+++ b/geode-book/master_middleman/source/subnavs/geode-subnav.erb
@@ -1576,8 +1576,14 @@ limitations under the License.
                     <li>
                         <a href="/docs/guide/12/rest_apps/rest_prereqs.html">Prerequisites and Limitations for Writing REST Applications</a>
                     </li>
-                    <li>
+                    <li class="has_submenu">
                         <a href="/docs/guide/12/rest_apps/setup_config.html">Setup and Configuration</a>
+                        <ul>
+                        <li><a href="/docs/guide/12/rest_apps/setup_config.html#setup_config_enabling_rest">Enabling the REST API</a></li>
+                        <li><a href="/docs/guide/12/rest_apps/setup_config.html#setup_config_starting_rest">Starting the REST API Service</a></li>
+                        <li><a href="/docs/guide/12/rest_apps/setup_config.html#setup_config_implementing_auth">Implementing Authentication</a></li>
+                        <li><a href="/docs/guide/12/rest_apps/setup_config.html#setup_config_implementing_auth">Programmatic Startup</a></li>
+                        </ul>
                     </li>
                     <li>
                         <a href="/docs/guide/12/rest_apps/using_swagger.html">Using the Swagger UI to Browse REST APIs</a>

http://git-wip-us.apache.org/repos/asf/geode/blob/78f08e8a/geode-docs/rest_apps/setup_config.html.md.erb
----------------------------------------------------------------------
diff --git a/geode-docs/rest_apps/setup_config.html.md.erb b/geode-docs/rest_apps/setup_config.html.md.erb
index 566b1a2..c557f4f 100644
--- a/geode-docs/rest_apps/setup_config.html.md.erb
+++ b/geode-docs/rest_apps/setup_config.html.md.erb
@@ -19,7 +19,10 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-The Apache Geode developer REST interface runs as an embedded HTTP or HTTPS service (Jetty server) within a Geode data node.
+The Apache Geode Developer REST interface runs as an embedded HTTP or HTTPS service (Jetty server) within one
+or more Geode servers.
+
+# REST API Libraries
 
 All Geode REST interface classes and required JAR files are distributed as a WAR file with the Geode product distribution. You can find the file in the following location:
 
@@ -29,162 +32,228 @@ All Geode REST interface classes and required JAR files are distributed as a WAR
 
 where _install-dir_ is the server installation directory and _n.n.n_ is a version number.
 
-To enable the developer REST API service in Apache Geode, set the `start-dev-rest-api` Geode property to `true` when starting a data node using either `gfsh` or the ServerLauncher API. Setting this property to true on a data node will start up an embedded Jetty server and deploy the REST developer API WAR file.
+# <a id="setup_config_enabling_rest" class="no-quick-link"></a>Enabling the REST API
+
+The REST API service for application development runs only on servers; you cannot run the service on a locator.
 
-**Note:**
-The REST API service for application development runs only on servers; you cannot use locators to host the developer Geode REST API services.
+To enable the Developer REST API service on a given server, set the `start-dev-rest-api` property
+to `true` for the server, using either the `gfsh start server` command or the ServerLauncher API.
+This starts an embedded Jetty server and deploys the Developer REST API WAR file on that server.
 
-You can have multiple REST enabled data nodes in a single distributed system. Each data node should
-have a separate host name and unique end point. To ensure that the data node is reachable on a
-machine with multiple NIC addresses, you can use `http-service-bind-address` to bind an address to
-the REST API service (as well as the other embedded web services such as Pulse).
+## Enabling the REST API on Multiple Servers
 
-You can also configure the Developer REST API service to run over
-HTTPS by enabling ssl for the `http` component in `gemfire.properties`
-or `gfsecurity.properties` or on server startup:
-See [SSL](../managing/security/ssl_overview.html) for details on configuring SSL parameters.
-These SSL parameters apply to all HTTP services hosted on the configured server, which can include the following:
+You can configure multiple REST-enabled servers in a single distributed system. Each server should
+have a separate host name and unique end point. To ensure that the server is reachable on a
+machine with multiple NIC addresses, use `http-service-bind-address` to bind an address to
+the REST API service (as well as the other embedded web services, such as Pulse).
+
+You can configure the Developer REST API service to run over HTTPS by enabling SSL for the `http`
+component in `gemfire.properties` or `gfsecurity.properties`, or on server startup.  See
+[SSL](../managing/security/ssl_overview.html) for details on configuring SSL parameters.  These SSL
+parameters apply to all HTTP services hosted on the configured server, which can include the
+following:
 
 -   Developer REST API service
 -   Management REST API service (for remote cluster management)
 -   Pulse monitoring tool
 
-The following procedure starts up a REST API service-enabled Geode deployment:
+# <a id="setup_config_starting_rest" class="no-quick-link"></a> Starting the REST API Service
 
-1.  Configure PDX for your cluster. You must configure PDX if either or both of the following conditions apply: 
-    -   Application peer member caches will access REST-accessible Regions (resources) with the `Region.get(key)`.
-    -   Your deployment has persistent regions that must be available as resources to the REST API.  To configure PDX in your cluster, perform the following steps:
-        1.  Start up a locator running the [cluster configuration service](../configuring/cluster_config/gfsh_persist.html) (enabled by default). For example: 
+To start a REST API service-enabled Geode deployment, configure PDX serialization for your
+cluster, then start the service on one or more server nodes.
 
-            ``` pre
-            gfsh>start locator --name=locator1
-            ```
-        2.  If your deployment has application peer member caches (for example, Java clients) that must also access REST-accessible Regions (resources), use the following gfsh command:
+## Configure PDX for your cluster
 
-            ``` pre
-            gfsh>configure pdx --read-serialized=true
-            ```
-        **Note:**
-        You do not need to configure `--read-serialized=true` if no application peer member caches are accessing the REST-accessible regions (resources) in your deployment.
-        3.  If your deployment contains **persistent regions** that must be REST-accessible, use the following gfsh command:
+You must configure PDX if either or both of the following conditions apply: 
 
-            ``` pre
-            gfsh>configure pdx --disk-store
-            ```
-        This command sets `pdx` `persistent` equal to true and sets the disk-store-name to DEFAULT. If desired, specify an existing disk store name as the value for `--disk-store`.
-        4.  If both of the above cases apply to your deployment, then configure PDX with the following single command:
+-   Application peer member caches will access REST-accessible regions (resources) with `Region.get(key)`.
+-   Your deployment has persistent regions that must be available as resources to the REST API.  
 
-            ``` pre
-            gfsh>configure pdx --read-serialized=true --disk-store
-            ```
+To configure PDX in your cluster, perform the following steps:
 
-    After you have configured PDX for your caches, then proceed with starting up your REST-enabled servers and other data nodes.
+1.  Start a locator running the [cluster configuration service](../configuring/cluster_config/gfsh_persist.html) (enabled by default). For example: 
 
-2.  Start a server node with the Geode property `start-dev-rest-api` set to `true`. 
-    Optionally, you can also configure a `http-service-bind-address` and `http-service-port` to
-    identify the cache server and specific port that will host REST services. If you do not specify
-    the `http-service-port`, the default port is 7070. If you do not specify
-    `http-service-bind-address`, the HTTP service will bind to all local addresses by default.
-    **Note:** If your application will be running in a VM (as when running in the cloud, for example), it's good practice to specify `http-service-bind-address` and `http-service-port`
-    so they will be publicly visible. The default values may not be visible outside the VM in which the application is running.
+    ``` pre
+    gfsh>start locator --name=locator1
+    ```
 
-    For example:
+2.  If your deployment has application peer member caches (for example, Java clients) that must also access REST-accessible Regions (resources), use the following gfsh command:
 
     ``` pre
-    gfsh>start server --name=server1 --start-rest-api=true \
-    --http-service-port=8080 --http-service-bind-address=localhost
+    gfsh>configure pdx --read-serialized=true
     ```
 
-    Any server that hosts data, even a server acting as a JMX manager, can start the developer REST API service. For example, to start the service on a server that is also a JMX manager, you would run:
+    **Note:**
+    You do not need to configure `--read-serialized=true` if no application peer member caches are accessing the REST-accessible regions (resources) in your deployment.
+
+3.  If your deployment contains **persistent regions** that must be REST-accessible, use the following gfsh command:
 
     ``` pre
-    gfsh>start server --name=server1  --start-rest-api=true \
-    --http-service-port=8080 --http-service-bind-address=localhost \
-    --J=-Dgemfire.jmx-manager=true --J=-Dgemfire.jmx-manager-start=true
+    gfsh>configure pdx --disk-store
     ```
+    This command sets `pdx` `persistent` equal to true and sets the disk-store-name to DEFAULT. If desired, specify an existing disk store name as the value for `--disk-store`.
+
+4.  If both of the above cases apply to your deployment, then configure PDX with the following single command:
+
+    ``` pre
+    gfsh>configure pdx --read-serialized=true --disk-store
+    ```
+
+    After you have configured PDX for your caches, then proceed with starting your REST-enabled servers and other servers.
+
+## Start the REST API Service on One or More Servers
+
+As described above, you can start the REST API service on a server by setting the Geode property `start-dev-rest-api` set to `true`. 
+If you wish to start the service on multiple servers, use a `http-service-bind-address` and `http-service-port` to
+identify the cache server and specific port that will host REST services. If you do not specify
+the `http-service-port`, the default port is 7070, which may collide with other locators and servers.
+If you do not specify `http-service-bind-address`, the HTTP service will bind to all local addresses by default.
 
-    Note that when started as a JMX Manager, the server will also host the Pulse web application in the same HTTP service.
+**Note:** If your application will be running in a VM (as when running in the cloud, for example),
+it is good practice to specify `http-service-bind-address` and `http-service-port` so they will be
+publicly visible. The default values may not be visible outside the VM in which the application is
+running.
 
-3.  You may also need to specify a CLASSPATH to load any functions that need to be made available to your REST services. For example:
+For example:
+
+```
+gfsh>start server --name=server1 --start-rest-api=true \
+--http-service-port=8080 --http-service-bind-address=localhost
+```
+
+Any server that hosts data, even a server acting as a JMX manager, can start the Developer REST API service. For example, to start the service on a server that is also a JMX manager, you would run:
+
+```
+gfsh>start server --name=server1  --start-rest-api=true \
+--http-service-port=8080 --http-service-bind-address=localhost \
+--J=-Dgemfire.jmx-manager=true --J=-Dgemfire.jmx-manager-start=true
+```
+
+Note that when started as a JMX Manager, the server will also host the Pulse web application in the same HTTP service.
+
+You may need to specify a CLASSPATH to load any functions that need to be made available to your REST services. For example:
+
+```
+gfsh>start server --name=server1 --start-rest-api=true \
+--http-service-port=8080 --http-service-bind-address=localhost \
+--classpath=/myapps/testfunctions.jar
+```
+
+You can specify these properties either upon server startup or in the server’s gemfire.properties configuration file. For example:
+
+```
+gfsh>start server --name=serverX --server-port=40405 --cache-xml-file=cache-config.xml \
+--properties-file=gemfire.properties --classpath=/myapps/testfunctions.jar
+```
+
+where gemfire.properties contains:
+
+```
+http-service-port=8080
+http-service-bind-address=localhost
+start-dev-rest-api=true
+```
+
+## Verify That The Service is Running
+
+Verify that the Geode REST API service is up and running. To validate this, you can perform the following checks:
+
+1.  Test the list resources endpoint (this step assumes that you have regions defined on your cluster):
+
+    ``` pre
+    curl -i http://localhost:8080/geode/v1
+    ```
+
+2.  Examine the server logs for the following messages:
 
     ``` pre
-    gfsh>start server --name=server1 --start-rest-api=true \
-    --http-service-port=8080 --http-service-bind-address=localhost \
-    --classpath=/myapps/testfunctions.jar
+    [info 2017/06/13 13:48:14.090 PDT gfsec-server1 <main> tid=0x1] Initializing Spring FrameworkServlet 'geode-mgmt'
+    [info 2017/06/13 13:48:14.091 PDT gfsec-server1 <main> tid=0x1] FrameworkServlet 'geode-mgmt': initialization started
     ```
 
-4.  You can also specify these properties either upon server startup or in the server’s gemfire.properties configuration file.
+3.  Open a browser and enter the following URL to browse the Swagger-enabled REST APIs:
 
     ``` pre
-    gfsh>start server --name=serverX --server-port=40405 --cache-xml-file=cache-config.xml \
-    --properties-file=gemfire.properties --classpath=/myapps/testfunctions.jar
+    http://<http-service-bind-address>:<http-service-port>/geode/docs/index.html
     ```
 
-    where gemfire.properties contains:
+    where *http-service-bind-address* is the address and *http-service-port* is the port number that you specified when starting the Development REST API service on the server. For example, based on the server started in an earlier example, you would enter:
 
     ``` pre
-    http-service-port=8080
-    http-service-bind-address=localhost
-    start-dev-rest-api=true
+    http://localhost:8080/geode/docs/index.html
     ```
 
-5.  Verify that the Geode REST API service is up and running. To validate this, you can perform the following checks:
-    1.  Test the list resources endpoint (this step assumes that you have regions defined on your cluster):
+If you did not specify these properties upon server startup or in `gemfire.properties`, then use the
+default of localhost and port 7070. See [Using the Swagger UI to Browse REST
+APIs](using_swagger.html#concept_rlr_y3c_54) for more information.
+
+# <a id="setup_config_implementing_auth" class="no-quick-link"></a>Implementing Authentication
+
+To turn on integrated security, start your servers and locators with the security-manager property
+set in your gemfire.properties file or on the gfsh command-line.
+The following example uses the sample implementation that is included in the Geode source,
+`org.apache.geode.examples.security.ExampleSecurityManager`.
+
+This implementation requires a JSON security configuration file which defines the allowed users and their corresponding
+permissions. (See the javadocs for `ExampleSecurityManager` for details on how to compose the JSON file.)
+Place a copy of the JSON security configuration file in the execution directory of each security-enabled member, then
+specify `--classpath=.` in the start command for each of those members.
 
-        ``` pre
-        curl -i http://localhost:8080/gemfire-api/v1
-        ```
+To start a server using a username and password that are defined in that server's security configuration, include the
+`--user=username` and `--password=password` options in the server's start command:
 
-    2.  Examine the server logs for the following messages:
+For example, suppose the JSON config file defines user "super-user" with password "1234567":
 
-        ``` pre
-        [info 2014/06/12 14:56:52.431 PDT rest-test <localhost-startStop-1> tid=0x4d] 
-        (tid=11 msgId=8) Initializing Spring FrameworkServlet 'gemfire-api'[info 2014/06/12 
-        14:56:52.432 PDT rest-test <localhost-startStop-1> tid=0x4d] (tid=11 msgId=9) 
-        FrameworkServlet 'gemfire-api': initialization started
-        ```
+```
+gfsh>start server --name=server1 --start-rest-api=true \
+--http-service-port=8080 --http-service-bind-address=localhost \
+--J=-Dgemfire.security-manager=org.apache.geode.examples.security.ExampleSecurityManager \
+--classpath=. --user=super-user --password=1234567
+```
 
-    3.  Open a browser and enter the following URL to browse the Swagger-enabled REST APIs:
+To contact the server through the REST interface, you must provide the username and password. Various REST GUI interfaces
+provide different ways of accomplishing this. The `curl` command offers the `--user` (or `-u`) option for this purpose,
+where username and password are specified as a colon-separated pair:
 
-        ``` pre
-        http://<http-service-bind-address>:<http-service-port>/gemfire-api/docs/index.html
-        ```
+```
+curl -i --user super-user:1234567 http://localhost:8080/geode/v1
+```
 
-        where *http-service-bind-address* is the address and *http-service-port* is the port number that you specified when starting the Development REST API service on the server. For example, based on the server started in step 2, you would enter:
+In a simple URL, such as in a browser address bar, the credentials can be given as a prefix to the host name
+in the form `username:password@`:
 
-        ``` pre
-        http://localhost:8080/gemfire-api/docs/index.html
-        ```
+```
+http://super-user:1234567@localhost:8080/geode/v1
+```
 
-        If you did not specify these properties upon server startup or in `gemfire.properties`, then use the default of localhost and port 7070. See [Using the Swagger UI to Browse REST APIs](using_swagger.html#concept_rlr_y3c_54) for more information.
 
-## Programmatic Startup
+# <a id="setup_config_implementing_auth" class="no-quick-link"></a>Programmatic Startup
 
-You can also start up and configure Geode REST services programmatically. For example:
+You can also start and configure Geode REST services programmatically. For example:
 
 ``` pre
-    import org.apache.geode.distributed.ServerLauncher;
+import org.apache.geode.distributed.ServerLauncher;
 
-     public class MyEmbeddedRestServer {
+public class MyEmbeddedRestServer {
 
-     public static void main(String[] args){
-         ServerLauncher serverLauncher  = new ServerLauncher.Builder()
-           .set("start-dev-rest-api", "true")
-           .set("http-service-port", "8080")
-           .set("http-service-bind-address", "localhost")
-           .setPdxReadSerialized(true)
-           .build();
+public static void main(String[] args){
+     ServerLauncher serverLauncher  = new ServerLauncher.Builder()
+       .set("start-dev-rest-api", "true")
+       .set("http-service-port", "8080")
+       .set("http-service-bind-address", "localhost")
+       .setPdxReadSerialized(true)
+       .build();
 
-          serverLauncher.start();  
+      serverLauncher.start();  
 
-          System.out.println("REST server successfully started");
-        }
+      System.out.println("REST server successfully started");
     }
+}
 ```
-You can then verify that the developer REST API service has been started programmatically by visiting the following URL:
+You can then verify that the Developer REST API service has been started programmatically by visiting the following URL:
 
 ``` pre
-http://localhost:8080/gemfire-api/docs/index.html
+http://localhost:8080/geode/docs/index.html
 ```
 
 


[10/24] geode git commit: GEODE-2558: Upgrade Powermock version to fix failing tests

Posted by je...@apache.org.
GEODE-2558: Upgrade Powermock version to fix failing tests


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

Branch: refs/heads/feature/GEODE-3071
Commit: b616e80d1f9583eead82917f95ba5d9da4eb4f05
Parents: 0d43e3d
Author: Jared Stewart <js...@pivotal.io>
Authored: Wed Jun 14 10:14:55 2017 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed Jun 14 11:06:33 2017 -0700

----------------------------------------------------------------------
 .../cache/tier/sockets/command/Put61Test.java   | 28 ++++++++---------
 .../cache/tier/sockets/command/Put65Test.java   | 26 ++++++++--------
 .../cache/tier/sockets/command/PutTest.java     | 32 +++++++++-----------
 .../internal/statistics/StatisticsImplTest.java |  6 ++--
 gradle/dependency-versions.properties           |  4 +--
 5 files changed, 46 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/b616e80d/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 fb3a9dd..bd99e6c 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
@@ -14,29 +14,22 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.*;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.*;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import org.apache.geode.CancelCriterion;
 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;
-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.Part;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
@@ -44,6 +37,13 @@ import org.apache.geode.internal.security.AuthorizeRequest;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.NotAuthorizedException;
 import org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
 
 @Category(UnitTest.class)
 public class Put61Test {
@@ -107,7 +107,7 @@ public class Put61Test {
 
     when(this.deltaPart.getObject()).thenReturn(true);
 
-    when(this.eventPart.getSerializedForm()).thenReturn(this.EVENT);
+    when(this.eventPart.getSerializedForm()).thenReturn(EVENT);
 
     when(this.valuePart.getSerializedForm()).thenReturn(VALUE);
     when(this.valuePart.isObject()).thenReturn(true);
@@ -132,7 +132,7 @@ public class Put61Test {
     when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
     when(this.localRegion.basicBridgePut(eq(KEY), eq(VALUE), eq(VALUE), eq(true), eq(CALLBACK_ARG),
-        any(ClientProxyMembershipID.class), eq(true), any(EntryEventImpl.class))).thenReturn(true);
+        any(), eq(true), any())).thenReturn(true);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/geode/blob/b616e80d/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 81f17cb..8d52b88 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
@@ -14,30 +14,23 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.*;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.*;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import org.apache.geode.CancelCriterion;
 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;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
-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.Part;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
@@ -45,6 +38,13 @@ import org.apache.geode.internal.security.AuthorizeRequest;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.NotAuthorizedException;
 import org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
 
 @Category(UnitTest.class)
 public class Put65Test {
@@ -122,7 +122,7 @@ public class Put65Test {
     when(this.keyPart.getStringOrObject()).thenReturn(KEY);
 
     when(this.localRegion.basicBridgePut(eq(KEY), eq(VALUE), eq(null), eq(true), eq(CALLBACK_ARG),
-        any(ClientProxyMembershipID.class), eq(true), any(EntryEventImpl.class))).thenReturn(true);
+        any(), eq(true), any())).thenReturn(true);
 
     when(this.message.getNumberOfParts()).thenReturn(8);
     when(this.message.getPart(eq(0))).thenReturn(this.regionNamePart);

http://git-wip-us.apache.org/repos/asf/geode/blob/b616e80d/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 2b22f13..6f894cf 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
@@ -14,30 +14,24 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.*;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.*;
-
-import org.apache.geode.internal.cache.EventIDHolder;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.anyBoolean;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.isNull;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import org.apache.geode.CancelCriterion;
 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;
-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.Part;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
@@ -45,6 +39,13 @@ import org.apache.geode.internal.security.AuthorizeRequest;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.NotAuthorizedException;
 import org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
 
 @Category(UnitTest.class)
 public class PutTest {
@@ -129,10 +130,7 @@ public class PutTest {
     when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
     when(this.localRegion.basicBridgePut(eq(KEY), eq(VALUE), isNull(), eq(true), eq(CALLBACK_ARG),
-        isA(ClientProxyMembershipID.class), eq(true), isA(EntryEventImpl.class))).thenReturn(true);
-
-    // here's the actual call made by tests of basicBridgePut...
-    // region.basicBridgePut(key, value, null, isObject, callbackArg, serverConnection.getProxyID(), true, new EventIDHolder(eventId));
+        any(), anyBoolean(), any())).thenReturn(true);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/geode/blob/b616e80d/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
index 2747252..8b2a9b4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
@@ -128,14 +128,12 @@ public class StatisticsImplTest {
     assertEquals(1, stats.invokeSuppliers());
 
     // String message, Object p0, Object p1, Object p2
-    verify(logger, times(1)).warn(anyString(), isNull(), anyInt(),
-        isA(NullPointerException.class));
+    verify(logger, times(1)).warn(anyString(), isNull(), anyInt(), isA(NullPointerException.class));
 
     assertEquals(1, stats.invokeSuppliers());
 
     // Make sure the logger isn't invoked again
-    verify(logger, times(1)).warn(anyString(), isNull(), anyInt(),
-        isA(NullPointerException.class));
+    verify(logger, times(1)).warn(anyString(), isNull(), anyInt(), isA(NullPointerException.class));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/geode/blob/b616e80d/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index f304aac..183dafc 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -66,7 +66,7 @@ junit-quickcheck.version = 0.7
 JUnitParams.version = 1.0.6
 log4j.version = 2.7
 lucene.version = 6.4.1
-mockito-core.version = 2.7.11
+mockito-core.version = 2.8.9
 mockrunner.version = 1.1.2
 mortbay-jetty-servlet-api.version=3.0.20100224
 multithreadedtc.version = 1.01
@@ -76,7 +76,7 @@ mx4j-tools.version = 3.0.1
 netty-all.version = 4.1.8.Final
 open-json.version = 1.8
 phantomjsdriver.version=1.3.0
-powermock.version = 1.7.0RC2
+powermock.version = 1.7.0RC4
 selenium.version=3.0.1
 shiro.version=1.3.2
 slf4j-api.version = 1.7.23


[11/24] geode git commit: GEODE-2629: fix ConnectionJUnitTest use of Mockito 2.7.11

Posted by je...@apache.org.
GEODE-2629: fix ConnectionJUnitTest use of Mockito 2.7.11


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

Branch: refs/heads/feature/GEODE-3071
Commit: 0d43e3d86acbe0ee136046be8ef00f90ff0c0242
Parents: e3a1ae0
Author: Kirk Lund <kl...@apache.org>
Authored: Tue Jun 13 11:05:54 2017 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed Jun 14 11:06:33 2017 -0700

----------------------------------------------------------------------
 .../internal/cache/tier/sockets/command/PutTest.java      | 10 +++++++---
 .../apache/geode/internal/tcp/ConnectionJUnitTest.java    |  2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/0d43e3d8/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 2578e00..2b22f13 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
@@ -20,6 +20,7 @@ import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
+import org.apache.geode.internal.cache.EventIDHolder;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -104,7 +105,7 @@ public class PutTest {
 
     when(this.callbackArgsPart.getObject()).thenReturn(CALLBACK_ARG);
 
-    when(this.eventPart.getSerializedForm()).thenReturn(this.EVENT);
+    when(this.eventPart.getSerializedForm()).thenReturn(EVENT);
 
     when(this.valuePart.getSerializedForm()).thenReturn(VALUE);
     when(this.valuePart.isObject()).thenReturn(true);
@@ -127,8 +128,11 @@ public class PutTest {
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
     when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
-    when(this.localRegion.basicBridgePut(eq(KEY), eq(VALUE), eq(null), eq(true), eq(CALLBACK_ARG),
-        any(ClientProxyMembershipID.class), eq(true), any(EntryEventImpl.class))).thenReturn(true);
+    when(this.localRegion.basicBridgePut(eq(KEY), eq(VALUE), isNull(), eq(true), eq(CALLBACK_ARG),
+        isA(ClientProxyMembershipID.class), eq(true), isA(EntryEventImpl.class))).thenReturn(true);
+
+    // here's the actual call made by tests of basicBridgePut...
+    // region.basicBridgePut(key, value, null, isObject, callbackArg, serverConnection.getProxyID(), true, new EventIDHolder(eventId));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/geode/blob/0d43e3d8/geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionJUnitTest.java
index 193240d..aeeb60f 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionJUnitTest.java
@@ -80,6 +80,6 @@ public class ConnectionJUnitTest {
     Connection conn = new Connection(table, socket);
     conn.setSharedUnorderedForTest();
     conn.run();
-    verify(membership).suspectMember(any(InternalDistributedMember.class), any(String.class));
+    verify(membership).suspectMember(isNull(InternalDistributedMember.class), any(String.class));
   }
 }


[06/24] geode git commit: GEODE-3062: create new SecurityService after receiving cluster config

Posted by je...@apache.org.
GEODE-3062: create new SecurityService after receiving cluster config


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

Branch: refs/heads/feature/GEODE-3071
Commit: cecad6c37d59369a29237f7d940f297804633aa1
Parents: a643327
Author: Kirk Lund <kl...@apache.org>
Authored: Fri Jun 9 15:23:53 2017 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed Jun 14 10:34:28 2017 -0700

----------------------------------------------------------------------
 .../internal/InternalDistributedSystem.java     |  4 +++
 .../cache/ClusterConfigurationLoader.java       |  7 ++--
 .../geode/internal/cache/GemFireCacheImpl.java  | 35 +++++++++++++-------
 .../ClusterConfigWithSecurityDUnitTest.java     | 31 +++++++++++++----
 4 files changed, 55 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/cecad6c3/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
index 22edb6f..f406393 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
@@ -516,6 +516,10 @@ public class InternalDistributedSystem extends DistributedSystem
     return this.securityService;
   }
 
+  public void setSecurityService(SecurityService securityService) {
+    this.securityService = securityService;
+  }
+
   /**
    * Registers a listener to the system
    * 

http://git-wip-us.apache.org/repos/asf/geode/blob/cecad6c3/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
index 4f4881f..92cfd96 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
@@ -152,13 +152,12 @@ public class ClusterConfigurationLoader {
 
   /***
    * Apply the gemfire properties cluster configuration on this member
-   *
-   * @param cache Cache created for this member
+   * 
    * @param response {@link ConfigurationResponse} containing the requested {@link Configuration}
    * @param config this member's config
    */
-  public static void applyClusterPropertiesConfiguration(Cache cache,
-      ConfigurationResponse response, DistributionConfig config) {
+  public static void applyClusterPropertiesConfiguration(ConfigurationResponse response,
+      DistributionConfig config) {
     if (response == null || response.getRequestedConfiguration().isEmpty()) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/cecad6c3/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index 40df0c7..c503c40 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -77,6 +77,7 @@ import javax.transaction.TransactionManager;
 import com.sun.jna.Native;
 import com.sun.jna.Platform;
 import org.apache.commons.lang.StringUtils;
+import org.apache.geode.internal.security.SecurityServiceFactory;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelCriterion;
@@ -126,7 +127,6 @@ import org.apache.geode.cache.client.PoolFactory;
 import org.apache.geode.cache.client.PoolManager;
 import org.apache.geode.cache.client.internal.ClientMetadataService;
 import org.apache.geode.cache.client.internal.ClientRegionFactoryImpl;
-import org.apache.geode.cache.client.internal.ConnectionImpl;
 import org.apache.geode.cache.client.internal.InternalClientCache;
 import org.apache.geode.cache.client.internal.PoolImpl;
 import org.apache.geode.cache.control.ResourceManager;
@@ -213,7 +213,6 @@ import org.apache.geode.internal.net.SocketCreator;
 import org.apache.geode.internal.offheap.MemoryAllocator;
 import org.apache.geode.internal.process.ClusterConfigurationNotAvailableException;
 import org.apache.geode.internal.security.SecurityService;
-import org.apache.geode.internal.security.SecurityServiceFactory;
 import org.apache.geode.internal.sequencelog.SequenceLoggerImpl;
 import org.apache.geode.internal.tcp.ConnectionTable;
 import org.apache.geode.internal.util.concurrent.FutureResult;
@@ -325,6 +324,8 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
 
   private static final Pattern DOUBLE_BACKSLASH = Pattern.compile("\\\\");
 
+  private volatile ConfigurationResponse configurationResponse;
+
   /** To test MAX_QUERY_EXECUTION_TIME option. */
   public int testMaxQueryExecutionTime = -1;
 
@@ -811,7 +812,10 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
       this.system = system;
       this.dm = this.system.getDistributionManager();
 
-      this.securityService = this.system.getSecurityService();
+      this.configurationResponse = loadClusterConfig();
+
+      this.securityService = SecurityServiceFactory.create(cacheConfig, this.system.getConfig());
+      this.system.setSecurityService(this.securityService);
 
       if (!this.isClient && PoolManager.getAll().isEmpty()) {
         // We only support management on members of a distributed system
@@ -931,6 +935,18 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
     } // synchronized
   }
 
+  private ConfigurationResponse loadClusterConfig() {
+    // request and check cluster configuration
+    ConfigurationResponse configurationResponse = requestSharedConfiguration();
+    deployJarsReceivedFromClusterConfiguration(configurationResponse);
+
+    // apply the cluster's properties configuration and initialize security using that configuration
+    ClusterConfigurationLoader.applyClusterPropertiesConfiguration(configurationResponse,
+        this.system.getConfig());
+
+    return configurationResponse;
+  }
+
   @Override
   public SecurityService getSecurityService() {
     return this.securityService;
@@ -1154,13 +1170,7 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
 
     ClassPathLoader.setLatestToDefault(this.system.getConfig().getDeployWorkingDir());
 
-    // request and check cluster configuration
-    ConfigurationResponse configurationResponse = requestSharedConfiguration();
-    deployJarsReceivedFromClusterConfiguration(configurationResponse);
-
-    // apply the cluster's properties configuration and initialize security using that configuration
-    ClusterConfigurationLoader.applyClusterPropertiesConfiguration(this, configurationResponse,
-        this.system.getConfig());
+    // Cluster Config request moved from here
 
     SystemMemberCacheEventProcessor.send(this, Operation.CACHE_CREATE);
     this.resourceAdvisor.initializationGate();
@@ -1184,11 +1194,11 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
 
     boolean completedCacheXml = false;
     try {
-      if (configurationResponse == null) {
+      if (this.configurationResponse == null) {
         // Deploy all the jars from the deploy working dir.
         ClassPathLoader.getLatest().getJarDeployer().loadPreviouslyDeployedJarsFromDisk();
       }
-      ClusterConfigurationLoader.applyClusterXmlConfiguration(this, configurationResponse,
+      ClusterConfigurationLoader.applyClusterXmlConfiguration(this, this.configurationResponse,
           this.system.getConfig());
       initializeDeclarativeCache();
       completedCacheXml = true;
@@ -1201,6 +1211,7 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
           // I don't want init to throw an exception that came from the close.
           // I want it to throw the original exception that came from initializeDeclarativeCache.
         }
+        this.configurationResponse = null;
       }
     }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/cecad6c3/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
index c551ca9..41e9525 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
@@ -24,6 +24,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import org.apache.commons.io.FileUtils;
 import org.apache.geode.distributed.internal.ClusterConfigurationService;
 import org.apache.geode.distributed.internal.InternalLocator;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 import org.apache.geode.management.internal.configuration.utils.ZipUtils;
 import org.apache.geode.security.SimpleTestSecurityManager;
@@ -43,7 +44,10 @@ import java.util.Properties;
 
 @Category({DistributedTest.class, SecurityTest.class})
 public class ClusterConfigWithSecurityDUnitTest {
-  public String clusterConfigZipPath;
+
+  private String clusterConfigZipPath;
+  private MemberVM locator0;
+  private Properties locatorProps;
 
   @Rule
   public LocatorServerStartupRule lsRule = new LocatorServerStartupRule();
@@ -51,9 +55,6 @@ public class ClusterConfigWithSecurityDUnitTest {
   @Rule
   public GfshShellConnectionRule connector = new GfshShellConnectionRule();
 
-  MemberVM locator0;
-  Properties locatorProps;
-
   @Before
   public void before() throws Exception {
     clusterConfigZipPath = buildSecureClusterConfigZip();
@@ -64,8 +65,8 @@ public class ClusterConfigWithSecurityDUnitTest {
   }
 
   @Test
-  @Ignore("GEODE-2315")
-  public void testSecurityPropsInheritance() throws Exception {
+  @Ignore("Fails until GEODE-2315 is implemented")
+  public void testSecurityPropsInheritanceOnLocator() throws Exception {
     locatorProps.clear();
     locatorProps.setProperty(LOCATORS, "localhost[" + locator0.getPort() + "]");
     locatorProps.setProperty("security-username", "cluster");
@@ -104,6 +105,24 @@ public class ClusterConfigWithSecurityDUnitTest {
     });
   }
 
+  @Test // fails due to GEODE-3062
+  public void testSecurityPropsInheritanceOnServer() throws Exception {
+    Properties serverProps = new Properties();
+    serverProps.setProperty(LOCATORS, "localhost[" + locator0.getPort() + "]");
+    serverProps.setProperty("security-username", "cluster");
+    serverProps.setProperty("security-password", "cluster");
+    MemberVM server = lsRule.startServerVM(1, serverProps);
+
+    // cluster config specifies a security-manager so integrated security should be enabled
+    server.invoke(() -> {
+      InternalCache cache = LocatorServerStartupRule.serverStarter.getCache();
+      Properties properties = cache.getDistributedSystem().getSecurityProperties();
+      assertThat(properties.getProperty(SECURITY_MANAGER))
+          .isEqualTo(SimpleTestSecurityManager.class.getName());
+      assertThat(cache.getSecurityService().isIntegratedSecurity()).isTrue();
+    });
+  }
+
   private String buildSecureClusterConfigZip() throws Exception {
     File clusterDir = lsRule.getTempFolder().newFolder("cluster");
     File clusterSubDir = new File(clusterDir, "cluster");


[15/24] geode git commit: Revert "GEODE-3062: create new SecurityService after receiving cluster config"

Posted by je...@apache.org.
Revert "GEODE-3062: create new SecurityService after receiving cluster config"

This reverts commit cecad6c37d59369a29237f7d940f297804633aa1.


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

Branch: refs/heads/feature/GEODE-3071
Commit: a79d2cc1621bd8c36531519df5e1edbb0faabf96
Parents: 7bc3111
Author: Kirk Lund <kl...@apache.org>
Authored: Wed Jun 14 15:41:49 2017 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Wed Jun 14 15:41:49 2017 -0700

----------------------------------------------------------------------
 .../internal/InternalDistributedSystem.java     |  4 ---
 .../cache/ClusterConfigurationLoader.java       |  7 ++--
 .../geode/internal/cache/GemFireCacheImpl.java  | 35 +++++++-------------
 .../ClusterConfigWithSecurityDUnitTest.java     | 31 ++++-------------
 4 files changed, 22 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/a79d2cc1/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
index f406393..22edb6f 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
@@ -516,10 +516,6 @@ public class InternalDistributedSystem extends DistributedSystem
     return this.securityService;
   }
 
-  public void setSecurityService(SecurityService securityService) {
-    this.securityService = securityService;
-  }
-
   /**
    * Registers a listener to the system
    * 

http://git-wip-us.apache.org/repos/asf/geode/blob/a79d2cc1/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
index 92cfd96..4f4881f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
@@ -152,12 +152,13 @@ public class ClusterConfigurationLoader {
 
   /***
    * Apply the gemfire properties cluster configuration on this member
-   * 
+   *
+   * @param cache Cache created for this member
    * @param response {@link ConfigurationResponse} containing the requested {@link Configuration}
    * @param config this member's config
    */
-  public static void applyClusterPropertiesConfiguration(ConfigurationResponse response,
-      DistributionConfig config) {
+  public static void applyClusterPropertiesConfiguration(Cache cache,
+      ConfigurationResponse response, DistributionConfig config) {
     if (response == null || response.getRequestedConfiguration().isEmpty()) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/a79d2cc1/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index c503c40..40df0c7 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -77,7 +77,6 @@ import javax.transaction.TransactionManager;
 import com.sun.jna.Native;
 import com.sun.jna.Platform;
 import org.apache.commons.lang.StringUtils;
-import org.apache.geode.internal.security.SecurityServiceFactory;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelCriterion;
@@ -127,6 +126,7 @@ import org.apache.geode.cache.client.PoolFactory;
 import org.apache.geode.cache.client.PoolManager;
 import org.apache.geode.cache.client.internal.ClientMetadataService;
 import org.apache.geode.cache.client.internal.ClientRegionFactoryImpl;
+import org.apache.geode.cache.client.internal.ConnectionImpl;
 import org.apache.geode.cache.client.internal.InternalClientCache;
 import org.apache.geode.cache.client.internal.PoolImpl;
 import org.apache.geode.cache.control.ResourceManager;
@@ -213,6 +213,7 @@ import org.apache.geode.internal.net.SocketCreator;
 import org.apache.geode.internal.offheap.MemoryAllocator;
 import org.apache.geode.internal.process.ClusterConfigurationNotAvailableException;
 import org.apache.geode.internal.security.SecurityService;
+import org.apache.geode.internal.security.SecurityServiceFactory;
 import org.apache.geode.internal.sequencelog.SequenceLoggerImpl;
 import org.apache.geode.internal.tcp.ConnectionTable;
 import org.apache.geode.internal.util.concurrent.FutureResult;
@@ -324,8 +325,6 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
 
   private static final Pattern DOUBLE_BACKSLASH = Pattern.compile("\\\\");
 
-  private volatile ConfigurationResponse configurationResponse;
-
   /** To test MAX_QUERY_EXECUTION_TIME option. */
   public int testMaxQueryExecutionTime = -1;
 
@@ -812,10 +811,7 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
       this.system = system;
       this.dm = this.system.getDistributionManager();
 
-      this.configurationResponse = loadClusterConfig();
-
-      this.securityService = SecurityServiceFactory.create(cacheConfig, this.system.getConfig());
-      this.system.setSecurityService(this.securityService);
+      this.securityService = this.system.getSecurityService();
 
       if (!this.isClient && PoolManager.getAll().isEmpty()) {
         // We only support management on members of a distributed system
@@ -935,18 +931,6 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
     } // synchronized
   }
 
-  private ConfigurationResponse loadClusterConfig() {
-    // request and check cluster configuration
-    ConfigurationResponse configurationResponse = requestSharedConfiguration();
-    deployJarsReceivedFromClusterConfiguration(configurationResponse);
-
-    // apply the cluster's properties configuration and initialize security using that configuration
-    ClusterConfigurationLoader.applyClusterPropertiesConfiguration(configurationResponse,
-        this.system.getConfig());
-
-    return configurationResponse;
-  }
-
   @Override
   public SecurityService getSecurityService() {
     return this.securityService;
@@ -1170,7 +1154,13 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
 
     ClassPathLoader.setLatestToDefault(this.system.getConfig().getDeployWorkingDir());
 
-    // Cluster Config request moved from here
+    // request and check cluster configuration
+    ConfigurationResponse configurationResponse = requestSharedConfiguration();
+    deployJarsReceivedFromClusterConfiguration(configurationResponse);
+
+    // apply the cluster's properties configuration and initialize security using that configuration
+    ClusterConfigurationLoader.applyClusterPropertiesConfiguration(this, configurationResponse,
+        this.system.getConfig());
 
     SystemMemberCacheEventProcessor.send(this, Operation.CACHE_CREATE);
     this.resourceAdvisor.initializationGate();
@@ -1194,11 +1184,11 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
 
     boolean completedCacheXml = false;
     try {
-      if (this.configurationResponse == null) {
+      if (configurationResponse == null) {
         // Deploy all the jars from the deploy working dir.
         ClassPathLoader.getLatest().getJarDeployer().loadPreviouslyDeployedJarsFromDisk();
       }
-      ClusterConfigurationLoader.applyClusterXmlConfiguration(this, this.configurationResponse,
+      ClusterConfigurationLoader.applyClusterXmlConfiguration(this, configurationResponse,
           this.system.getConfig());
       initializeDeclarativeCache();
       completedCacheXml = true;
@@ -1211,7 +1201,6 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
           // I don't want init to throw an exception that came from the close.
           // I want it to throw the original exception that came from initializeDeclarativeCache.
         }
-        this.configurationResponse = null;
       }
     }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/a79d2cc1/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
index 41e9525..c551ca9 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigWithSecurityDUnitTest.java
@@ -24,7 +24,6 @@ import static org.assertj.core.api.Assertions.assertThat;
 import org.apache.commons.io.FileUtils;
 import org.apache.geode.distributed.internal.ClusterConfigurationService;
 import org.apache.geode.distributed.internal.InternalLocator;
-import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 import org.apache.geode.management.internal.configuration.utils.ZipUtils;
 import org.apache.geode.security.SimpleTestSecurityManager;
@@ -44,10 +43,7 @@ import java.util.Properties;
 
 @Category({DistributedTest.class, SecurityTest.class})
 public class ClusterConfigWithSecurityDUnitTest {
-
-  private String clusterConfigZipPath;
-  private MemberVM locator0;
-  private Properties locatorProps;
+  public String clusterConfigZipPath;
 
   @Rule
   public LocatorServerStartupRule lsRule = new LocatorServerStartupRule();
@@ -55,6 +51,9 @@ public class ClusterConfigWithSecurityDUnitTest {
   @Rule
   public GfshShellConnectionRule connector = new GfshShellConnectionRule();
 
+  MemberVM locator0;
+  Properties locatorProps;
+
   @Before
   public void before() throws Exception {
     clusterConfigZipPath = buildSecureClusterConfigZip();
@@ -65,8 +64,8 @@ public class ClusterConfigWithSecurityDUnitTest {
   }
 
   @Test
-  @Ignore("Fails until GEODE-2315 is implemented")
-  public void testSecurityPropsInheritanceOnLocator() throws Exception {
+  @Ignore("GEODE-2315")
+  public void testSecurityPropsInheritance() throws Exception {
     locatorProps.clear();
     locatorProps.setProperty(LOCATORS, "localhost[" + locator0.getPort() + "]");
     locatorProps.setProperty("security-username", "cluster");
@@ -105,24 +104,6 @@ public class ClusterConfigWithSecurityDUnitTest {
     });
   }
 
-  @Test // fails due to GEODE-3062
-  public void testSecurityPropsInheritanceOnServer() throws Exception {
-    Properties serverProps = new Properties();
-    serverProps.setProperty(LOCATORS, "localhost[" + locator0.getPort() + "]");
-    serverProps.setProperty("security-username", "cluster");
-    serverProps.setProperty("security-password", "cluster");
-    MemberVM server = lsRule.startServerVM(1, serverProps);
-
-    // cluster config specifies a security-manager so integrated security should be enabled
-    server.invoke(() -> {
-      InternalCache cache = LocatorServerStartupRule.serverStarter.getCache();
-      Properties properties = cache.getDistributedSystem().getSecurityProperties();
-      assertThat(properties.getProperty(SECURITY_MANAGER))
-          .isEqualTo(SimpleTestSecurityManager.class.getName());
-      assertThat(cache.getSecurityService().isIntegratedSecurity()).isTrue();
-    });
-  }
-
   private String buildSecureClusterConfigZip() throws Exception {
     File clusterDir = lsRule.getTempFolder().newFolder("cluster");
     File clusterSubDir = new File(clusterDir, "cluster");


[21/24] geode git commit: GEODE-3072: Ignore dunit test

Posted by je...@apache.org.
GEODE-3072: Ignore dunit test


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

Branch: refs/heads/feature/GEODE-3071
Commit: 4bf80a6a9236f98070ce63a1d77dce3732c35b4f
Parents: 42350f1
Author: Barry Oglesby <bo...@pivotal.io>
Authored: Fri Jun 16 14:10:27 2017 -0700
Committer: Barry Oglesby <bo...@pivotal.io>
Committed: Fri Jun 16 14:10:27 2017 -0700

----------------------------------------------------------------------
 .../internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/4bf80a6a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
index c732662..fa68781 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
@@ -31,6 +31,7 @@ import org.apache.geode.test.junit.categories.ClientServerTest;
 import org.apache.geode.test.junit.categories.DistributedTest;
 import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 import org.awaitility.Awaitility;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
@@ -95,7 +96,8 @@ public class ClientServerMiscBCDUnitTest extends ClientServerMiscDUnitTest {
     });
   }
 
-  @Test
+  //@Test
+  @Ignore
   public void testDistributedMemberBytesWithCurrentServerAndOldClient() throws Exception {
     // Start current version server
     int serverPort = initServerCache(true);


[16/24] geode git commit: GEODE-2301: Deprecate JTA transaction manager from Geode

Posted by je...@apache.org.
GEODE-2301: Deprecate JTA transaction manager from Geode

Geode JTA transaction manager is deprecated and a warning message is logged if it is being used.


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

Branch: refs/heads/feature/GEODE-3071
Commit: a21c97111a288ac0a0986bb30545f1aacbec5880
Parents: a79d2cc
Author: eshu <es...@pivotal.io>
Authored: Thu Jun 15 08:42:49 2017 -0700
Committer: eshu <es...@pivotal.io>
Committed: Thu Jun 15 08:44:36 2017 -0700

----------------------------------------------------------------------
 .../apache/geode/internal/jta/GlobalTransaction.java |  4 ++++
 .../apache/geode/internal/jta/TransactionImpl.java   |  3 +++
 .../geode/internal/jta/TransactionManagerImpl.java   | 15 +++++++++++++++
 .../geode/internal/jta/UserTransactionImpl.java      |  4 ++++
 .../java/org/apache/geode/internal/jta/XidImpl.java  |  4 ++++
 5 files changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/a21c9711/geode-core/src/main/java/org/apache/geode/internal/jta/GlobalTransaction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/jta/GlobalTransaction.java b/geode-core/src/main/java/org/apache/geode/internal/jta/GlobalTransaction.java
index 03eeb20..4444d6f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/jta/GlobalTransaction.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/jta/GlobalTransaction.java
@@ -21,6 +21,9 @@ package org.apache.geode.internal.jta;
  * 
  * 
  * @since GemFire 4.0
+ * 
+ * @deprecated as of Geode 1.2.0 user should use a third party JTA transaction manager to manage JTA
+ *             transactions.
  */
 import org.apache.geode.i18n.LogWriterI18n;
 import org.apache.geode.internal.i18n.LocalizedStrings;
@@ -32,6 +35,7 @@ import org.apache.geode.distributed.DistributedSystemDisconnectedException;
 import org.apache.geode.distributed.internal.DM;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 
+@Deprecated
 public class GlobalTransaction {
 
   public static boolean DISABLE_TRANSACTION_TIMEOUT_SETTING = false;

http://git-wip-us.apache.org/repos/asf/geode/blob/a21c9711/geode-core/src/main/java/org/apache/geode/internal/jta/TransactionImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/jta/TransactionImpl.java b/geode-core/src/main/java/org/apache/geode/internal/jta/TransactionImpl.java
index a5e80b6..3279abe 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/jta/TransactionImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/jta/TransactionImpl.java
@@ -17,6 +17,8 @@ package org.apache.geode.internal.jta;
 /**
  * TransactionImpl implements the JTA Transaction interface.
  * 
+ * @deprecated as of Geode 1.2.0 user should use a third party JTA transaction manager to manage JTA
+ *             transactions.
  */
 import javax.transaction.xa.*;
 import javax.transaction.*;
@@ -26,6 +28,7 @@ import org.apache.geode.internal.i18n.LocalizedStrings;
 
 import java.util.*;
 
+@Deprecated
 public class TransactionImpl implements Transaction {
 
   /**

http://git-wip-us.apache.org/repos/asf/geode/blob/a21c9711/geode-core/src/main/java/org/apache/geode/internal/jta/TransactionManagerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/jta/TransactionManagerImpl.java b/geode-core/src/main/java/org/apache/geode/internal/jta/TransactionManagerImpl.java
index 15ab1f8..b7a60b8 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/jta/TransactionManagerImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/jta/TransactionManagerImpl.java
@@ -20,6 +20,8 @@ package org.apache.geode.internal.jta;
  * </p>
  * 
  * @since GemFire 4.1.1
+ * 
+ * @deprecated as of Geode 1.2.0 user should use a third party JTA transaction manager instead.
  */
 import java.io.Serializable;
 import java.util.Collections;
@@ -31,6 +33,7 @@ import java.util.Map;
 import java.util.SortedSet;
 import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import javax.transaction.HeuristicMixedException;
 import javax.transaction.HeuristicRollbackException;
@@ -42,14 +45,19 @@ import javax.transaction.SystemException;
 import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 
+import org.apache.logging.log4j.Logger;
+
 import org.apache.geode.CancelException;
 import org.apache.geode.i18n.LogWriterI18n;
 import org.apache.geode.internal.i18n.LocalizedStrings;
+import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.logging.LoggingThreadGroup;
 
+@Deprecated
 public class TransactionManagerImpl implements TransactionManager, Serializable {
   private static final long serialVersionUID = 5033392316185449821L;
 
+  private static final Logger logger = LogService.getLogger();
   /**
    * A mapping of Thread - Transaction Objects
    */
@@ -99,6 +107,9 @@ public class TransactionManagerImpl implements TransactionManager, Serializable
    */
   private boolean isActive = true;
 
+  transient private final AtomicBoolean loggedJTATransactionManagerDeprecatedWarning =
+      new AtomicBoolean(false);
+
   /**
    * Constructs a new TransactionManagerImpl
    */
@@ -143,6 +154,10 @@ public class TransactionManagerImpl implements TransactionManager, Serializable
    * @see javax.transaction.TransactionManager#begin()
    */
   public void begin() throws NotSupportedException, SystemException {
+    if (loggedJTATransactionManagerDeprecatedWarning.compareAndSet(false, true)) {
+      logger.warn(
+          "Geode JTA transaction manager is deprecated since 1.2.0, please use a third party JTA transaction manager instead");
+    }
     if (!isActive) {
       throw new SystemException(
           LocalizedStrings.TransactionManagerImpl_TRANSACTIONMANAGER_INVALID.toLocalizedString());

http://git-wip-us.apache.org/repos/asf/geode/blob/a21c9711/geode-core/src/main/java/org/apache/geode/internal/jta/UserTransactionImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/jta/UserTransactionImpl.java b/geode-core/src/main/java/org/apache/geode/internal/jta/UserTransactionImpl.java
index 2471e02..2f287d4 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/jta/UserTransactionImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/jta/UserTransactionImpl.java
@@ -23,6 +23,9 @@ package org.apache.geode.internal.jta;
  * 
  * 
  * @since GemFire 4.0
+ * 
+ * @deprecated as of Geode 1.2.0 user should use a third party JTA transaction manager to manage JTA
+ *             transactions.
  */
 import java.io.Serializable;
 import javax.transaction.*;
@@ -31,6 +34,7 @@ import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.i18n.LogWriterI18n;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 
+@Deprecated
 public class UserTransactionImpl implements UserTransaction, Serializable {
   private static final long serialVersionUID = 2994652455204901910L;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/a21c9711/geode-core/src/main/java/org/apache/geode/internal/jta/XidImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/jta/XidImpl.java b/geode-core/src/main/java/org/apache/geode/internal/jta/XidImpl.java
index 865f0aa..7f093fb 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/jta/XidImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/jta/XidImpl.java
@@ -20,9 +20,13 @@ package org.apache.geode.internal.jta;
  * </p>
  * 
  * @since GemFire 4.0
+ * 
+ * @deprecated as of Geode 1.2.0 user should use a third party JTA transaction manager to manage JTA
+ *             transactions.
  */
 import javax.transaction.xa.*;
 
+@Deprecated
 public class XidImpl implements Xid {
 
   /**