how to use mockito in spring boot for a void method code example Example: java doreturn void doNothing().when(yourMock).yourMockedMethod();