opened
anuraaga
username_0
It is possible to register an extension for automatic use using Java's `ServiceLoader` mechanism.

https://junit.org/junit5/docs/current/user-guide/#extensions-registration-automatic

Some projects may want to provide their own `META-INF` file to avoid tediously adding `MockitoExtension` to tests since it is very common. However, `ServiceLoader` requires the class to have a no-args *public* constructor, so the current extension cannot be used with the `ServiceLoader` mechanism.

Fixes #1390

check list

 - [X] Read the [contributing guide](https://github.com/mockito/mockito/blob/release/2.x/.github/CONTRIBUTING.md)
 - [X] PR should be motivated, i.e. what does it fix, why, and if relevant how
 - [X] If possible / relevant include an example in the description, that could help all readers
       including project members to get a better picture of the change
 - [X] Avoid other runtime dependencies
 - [X] Meaningful commit history ; intention is important please rebase your commit history so that each
       commit is meaningful and help the people that will explore a change in 2 years
 - [X] The pull request follows coding style
 - [X] Mention `Fixes #<issue number>` in the description _if relevant_
 - [X] At least one commit should mention `Fixes #<issue number>` _if relevant_
Make MockitoExtension constructor public
issue
created
TimvdLippe
username_1
Would be great if you could add a test for this. Not sure if that is possible? It is not a blocking issue for me though.
comment
created
anuraaga
username_0
Added a test (a bit heavyweight since it needs to be a separate project to avoid influencing others)
comment