Updated Mockito dependency
Refactor for testability