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



##########
File path: 
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/StopGatewaySenderCommand.java
##########
@@ -36,7 +44,30 @@
 import org.apache.geode.security.ResourcePermission;
 
 public class StopGatewaySenderCommand extends GfshCommand {
+  private final ExecutorService executorService;
+  private SystemManagementService managementService;
+  private BiFunction<String[], String[], Set<DistributedMember>> findMembers;
+  private final Supplier<StopGatewaySenderOnMember> stopperOnMemberFactory;
+
+  @SuppressWarnings("unused") // invoked by spring shell
+  public StopGatewaySenderCommand() {
+    this(newCachedThreadPool("Stop Sender Command Thread ", true),
+        StopGatewaySenderOnMemberWithBeanImpl::new, null, null);

Review comment:
       "Spying an object you are testing has been communicated to me as bad 
practice, but these warnings come with little to no explanation backing it up. 
I'm sure, like anything else, it can definitely be abused.". 
   To me, in this case, spying on these methods to pass in a mock object is 
definitely better than passing null objects in the product calling code.




-- 
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