garydgregory commented on pull request #94: URL: https://github.com/apache/commons-codec/pull/94#issuecomment-925450260
Using Mockito here I feel falls under the old adage "Once you have a hammer, everything starts to look like a nail." The class in question is an abstract class and therefore cannot be instantiated, the proper use case is subclassing, both for an app and therefore for a test. Using Mockito to avoid using a concrete subclass only obfuscates what the test is trying to do, makes the code harder to maintain and to learn as you are now requiring new users and maintainers to learn Mockito on top of learning the code base. In other code bases, a noop concrete type might be part of the main tree instead of in the test tree and this whole thread would likely not even come up. IOW, the shortcut Mockito affords is not worth the complexity it requires to learn and maintain. -- 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]
