[Misc] Remove deprecations and migrate to Mockito