Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added reified mock overload methods to match the methods that consume an explicit Class object.
This enables the reified overloads to provide the same functionalities as the older
explicit mock overloads.
A few examples of places where this would be overly useful:
The following methods have been added:
I have also added a case where passing null varargs in would result in a NullPointerException previously. Now, it will tell the user that they should not be providing these varargs at all.
These overloads should not conflict with any existing usages of this API in the intended way (that I can think of), as the assumption is that a user probably isn't going to want to be mocking Mockito internals, Strings, or WithSettings objects anyway. If they do need to achieve this, then this is still accessible via the existing Mockito.mock(Class) methods anyway.
Checklist
including project members to get a better picture of the change
commit is meaningful and help the people that will explore a change in 2 years