garydgregory commented on PR #509:
URL: 
https://github.com/apache/commons-collections/pull/509#issuecomment-2260732088

   > > You are missing a unit test for Iterator.forEachRemaining()
   > 
   > What is the rationale to add that given that `forEachRemaining` is a 
`hasNext()`/`next()` wrapper and those are explicitly tested?
   > 
   
   The new class implements an interface. The tests should show what are the 
expectations for all interface methods, the ones that are actually implemented 
by the new class _and_ the behavior that is inherited from the default method.
   
   There is no guarantee that implementing the methods that a default interface 
calls is actually correctly implementing the contract for the default method. 
Testing the default methods shows that it works as expected, regardless of 
whether the default method is implemented or inherited. You are also showing as 
a PR author that you've considered the big picture and are thorough, all the 
pieces work individually and together, as expected.
   


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