Refactor code incompatible with Mockito 2.7.13 am: a1ba743962
am: 430c2be3b9

Change-Id: I71d20032249676d002791ea4bf663041c1b5a8e8