albertogpz commented on a change in pull request #7108:
URL: https://github.com/apache/geode/pull/7108#discussion_r773332443



##########
File path: 
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/StopGatewaySenderCommand.java
##########
@@ -16,27 +16,40 @@
 package org.apache.geode.management.internal.cli.commands;
 
 import java.util.Set;
-
-import javax.management.ObjectName;
+import java.util.function.BiFunction;
+import java.util.function.Supplier;
 
 import org.springframework.shell.core.annotation.CliCommand;
 import org.springframework.shell.core.annotation.CliOption;
 
+import org.apache.geode.cache.Cache;
 import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.internal.cache.InternalCache;
-import org.apache.geode.management.GatewaySenderMXBean;
 import org.apache.geode.management.cli.CliMetaData;
 import org.apache.geode.management.cli.ConverterHint;
 import org.apache.geode.management.cli.GfshCommand;
-import org.apache.geode.management.internal.SystemManagementService;
 import org.apache.geode.management.internal.cli.result.model.ResultModel;
-import 
org.apache.geode.management.internal.cli.result.model.TabularResultModel;
 import org.apache.geode.management.internal.i18n.CliStrings;
 import org.apache.geode.management.internal.security.ResourceOperation;
 import org.apache.geode.security.ResourcePermission;
 
 public class StopGatewaySenderCommand extends GfshCommand {
+  private Supplier<StopGatewaySenderCommandDelegate> commandDelegateSupplier;
+  private BiFunction<String[], String[], Set<DistributedMember>> findMembers;
+
+  @SuppressWarnings("unused") // invoked by spring shell
+  public StopGatewaySenderCommand() {
+    this(null, null);
+    findMembers = this::findMembers;
+    commandDelegateSupplier = this::getCommandDelegate;
+  }
+
+  StopGatewaySenderCommand(Supplier<StopGatewaySenderCommandDelegate> 
commandDelegateSupplier,

Review comment:
       I removed the delegate class. Now all unit tests are in 
`StopGatewaySenderCommandTest.java`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to