divijvaidya commented on code in PR #14204:
URL: https://github.com/apache/kafka/pull/14204#discussion_r1293407332


##########
streams/src/test/java/org/apache/kafka/streams/kstream/internals/KTableTransformValuesTest.java:
##########
@@ -163,104 +159,74 @@ public void shouldNotSendOldValuesByDefault() {
         final Processor<String, Change<String>, String, Change<String>> 
processor = transformValues.get();
         processor.init(context);
 
-        context.forward(new Record<>("Key", new Change<>("Key->newValue!", 
null), 0));
-        expectLastCall();
-        replay(context);
+        doNothing().when(context).forward(new Record<>("Key", new 
Change<>("Key->newValue!", null), 0));
 
         processor.process(new Record<>("Key", new Change<>("newValue", 
"oldValue"), 0));
-
-        verify(context);
     }
 
     @Test
     public void shouldSendOldValuesIfConfigured() {
         final KTableTransformValues<String, String, String> transformValues =
             new KTableTransformValues<>(parent, new 
ExclamationValueTransformerSupplier(), null);
 
-        expect(parent.enableSendingOldValues(true)).andReturn(true);
-        replay(parent);
+        when(parent.enableSendingOldValues(true)).thenReturn(true);
 
         transformValues.enableSendingOldValues(true);
         final Processor<String, Change<String>, String, Change<String>> 
processor = transformValues.get();
         processor.init(context);
 
-        context.forward(new Record<>("Key", new Change<>("Key->newValue!", 
"Key->oldValue!"), 0));
-        expectLastCall();
-        replay(context);
+        doNothing().when(context).forward(new Record<>("Key", new 
Change<>("Key->newValue!", "Key->oldValue!"), 0));
 
         processor.process(new Record<>("Key", new Change<>("newValue", 
"oldValue"), 0));
-
-        verify(context);
-    }
-
-    @Test
-    public void shouldNotSetSendOldValuesOnParentIfMaterialized() {

Review Comment:
   I don't want to make calls on removing tests while reviewing this PR because 
now as a reviewer I have to look at the code & understand what is going, why 
test can be removed etc. instead of simply focusing on ensuring that easymock 
-> mockito transformations are correct. 
   
   In the spirit of keeping PR reviewer friendly, could we add this test back?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to