generic method: ToDo: how to mock this method with mockito?