This is a hint that would have saved me a lot of head-scratching. I had a test that fired up a service, then configured a mock. It usually worked, but if I got unlucky, I'd get UnfinishedStubbingException, even though the code looked fine.
I fixed it by moving all the stubbing code up before starting the service. I'm not 100% certain that fixed the problem, but so far it seems to have done so.