Mockito sample refactoring