class MonitoringOfficerServiceImpl extends RootTransactionalService implements MonitoringOfficerService {

    @Override
    public ServiceResult<List<SimpleUserResource>> findAll() {
        return serviceSuccess(userRepository.findByRolesAndStatusIn(MONITORING_OFFICER, EnumSet.of(PENDING, ACTIVE))
                .stream()
                .map(user -> new SimpleUserResource(user.getId(), user.getFirstName(), user.getLastName(), user.getEmail()))
                .collect(Collectors.toList()));
    }

}