pivotal-eshu commented on a change in pull request #6051:
URL: https://github.com/apache/geode/pull/6051#discussion_r582346253



##########
File path: 
geode-core/src/test/java/org/apache/geode/internal/cache/DistributedCacheOperationTest.java
##########
@@ -72,11 +114,112 @@ public void endOperationIsInvokedOnDistributionError() {
     assertTrue(operation.endOperationInvoked);
   }
 
+  @Test
+  public void processReplacesVersionTagNullIDs() {
+    message.process(dm);
+
+    verify(versionTag).replaceNullIDs(sender);
+  }
+
+  @Test
+  public void processSendsReplyIfAdminDM() {
+    
when(dm.getDMType()).thenReturn(ClusterDistributionManager.ADMIN_ONLY_DM_TYPE);
+
+    message.process(dm);
+
+    verify(message, never()).basicProcess(dm, region);
+    verify(message).sendReply(
+        eq(sender),
+        eq(processorId),
+        eq(null),
+        eq(dm));
+  }
+
+  @Test
+  public void processSendsReplyIfLocalRegionIsNull() {
+    doReturn(null).when(message).getLocalRegionForProcessing(dm);
+
+    message.process(dm);
+
+    assertThat(message.closed).isTrue();
+    verify(message, never()).basicProcess(dm, region);
+    verify(message).sendReply(
+        eq(sender),
+        eq(processorId),
+        eq(null),
+        eq(dm));
+  }
+
+  @Test
+  public void processSendsReplyIfGotCacheClosedException() {
+    CacheClosedException cacheClosedException = new CacheClosedException();
+    
doThrow(cacheClosedException).when(message).getLocalRegionForProcessing(dm);
+
+    message.process(dm);
+
+    assertThat(message.closed).isTrue();

Review comment:
       I believe there was a requirement that all new tests should use assertj 
methods.
   




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