What is a Mockito rule?

What is a Mockito JUnit rule?

Mockito JUnit Rule aids in the maintenance of clean tests. It sets up mocks, checks their usage, and identifies inappropriate stubbing. Make sure to configure your rule with strictness, which identifies stubbing argument mismatches automatically and is intended to be the default in Mockito v3.