try using doReturn from mockito

This test seems to be testing Mockito. I can't get it to fail locally, but it fails on travis. Maybe switching how we are stubbing the method will fix it.

The docs suggest it should be used this way