cameronlee314 commented on a change in pull request #1079: SAMZA-2250: Support 
large job models in standalone.
URL: https://github.com/apache/samza/pull/1079#discussion_r296897288
 
 

 ##########
 File path: 
samza-core/src/test/java/org/apache/samza/zk/TestZkJobCoordinator.java
 ##########
 @@ -62,12 +68,15 @@
 import static org.mockito.Mockito.verifyZeroInteractions;
 import static org.mockito.Mockito.when;
 
+@RunWith(PowerMockRunner.class)
 
 Review comment:
   Sorry, I think I might have been a little unclear previously. By "validate", 
I was referring to when someone was checking correctness while reading the 
code, or having the compiler help to enforce certain usage. The "private 
static" methods aren't going to help with unit testing.
   That said, it should be unnecessary to test "private static" methods 
directly since tests should theoretically only test against the public APIs of 
a class (although there are lots of exceptions to this, such as package-private 
VisibleForTesting methods). In this case, it is a static method being mocked, 
so we aren't directly testing a static method here. As @prateekm mentioned, 
verifications can be done against the objects that the static method works on. 
Or maybe if the static method is very complicated, it shouldn't be a static 
method, and it should be an object which can then be passed as a dependency to 
the object-under-test.

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


With regards,
Apache Git Services

Reply via email to