kirklund commented on a change in pull request #5979:
URL: https://github.com/apache/geode/pull/5979#discussion_r567129577



##########
File path: 
geode-core/src/test/java/org/apache/geode/cache/client/internal/AbstractOpTest.java
##########
@@ -37,4 +43,39 @@ public void shouldBeMockable() throws Exception {
     assertThat(mockAbstractOp.processObjResponse(mock(Message.class), 
"string"))
         .isEqualTo(mockObject);
   }
+
+  @Test(expected = IOException.class)
+  public void processChunkedResponseShouldThrowIOExceptionWhenSocketBroken() 
throws Exception {
+    ChunkedMessage msg = mock(ChunkedMessage.class);
+    AbstractOp abstractOp = new AbstractOp(MessageType.PING, 0) {

Review comment:
       I think you can lean more on Mockito here instead of constructing an 
anonymous class. Something like:
   ```
   AbstractOp abstractOp = spy(AbstractOp.class);
   ```
   That should produce the same effect as your anonymous class.




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

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


Reply via email to