I hava a TaskService who extends an AbstractService.

In the abstractService, I have a method getCurrentUserRoleEntity used by differents methods accross the services. This method uses a repository to find the current role.

In my task service, I have a method to find the tasks for the current user role and the the category,
this method has 2 parameters, the caegoryId and the method getCurrentUserRoleEntity.

```
public List<Task> findTaskByCategoryIdForCurrentUserRole(Long categoryId) {
    return vTacheAffaireRepository.findTaskByCategoryIdForCurrentUserRoleOrderByEcheanceAscTacheIdAsc(categoryId, getCurrentUserRoleEntity().getId())
        .stream().map(vTaskMapper::toDto).collect(Collectors.toList());
}

```

When I test the rest ressource who call the service, I would like to mock the getCurrentUserRoleEntity to use my test entity instead of use the real method.

I tried differents approachs but none answer my need.
Have you an idea of how mock this method during the rest test?

Thanks,