I have a class something like this:
If I want to stub out foo() using
Mockito, I do this:
This won't compile because mockService.authenticateUser() throws an exception that isn't handled. Incidentally, I don't have the ability to refactor MyService. authenticateUser() throws an AuthenticationException when it can't find the user, so I want to be able to stub out that case too.
Thanks,
Rob