This method is empty in all my JUnit test cases. What is the use of this method?
Sonarqube is complaining
"Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation."
I can bypass this by adding some comment but I just want to know why it is necessary.
Use different runner,
if you are using SpringRunner.class
, use an alternative one such as MockitoJUnitRunner.class
or MockitoJunitRunner.class
rather then SpringRunner.class
@Runwith(SpringRunner.class)
@Runwith(JUnit4ClassRunner.class)
@Runwith(MockitoJUnit4Runner.class)
@Runwith(MockitoJUnitRunner.class)