Merge "Refactor code incompatible with Mockito 2.7.13"