Fix a flake with mocking.

The hypothesis here is that some other thread is using
the mock between the call to when() and the call to
.thenReturn() a few lines above the failure. It's not
clear this is really the reason, but using this syntax
is safer anyway, so whether it fixes the issue or not
this is a good change.

Test: m FrameworksNetTests
Change-Id: I501d2ec8e794c67a53d7c84e290e4cc63481472d
1 file changed