I'm not sure what the comment means here - if the intention is that the mock always throws, perhaps it should always throw and forget about the if/else logic, especially if it never matches based on what you're doing in the test.