Refactor code incompatible with Mockito 2.7.13

Bug: 32912773
Test: make checkbuild
Change-Id: Ia60c2ed766721b6613f499a9b8cc9879f25a9b07
5 files changed