class UserServiceImpl implements UserService {

    @Override
    public List<ProcessRoleResource> getLeadPartnerOrganisationProcessRoles(ApplicationResource application) {
        ProcessRoleResource leadProcessRole = getLeadApplicantProcessRole(application.getId());
        if (leadProcessRole == null) {
            return new ArrayList<>();
        }
        return userRestService.findProcessRole(application.getId()).getSuccess().stream()
                .filter(pr -> leadProcessRole.getOrganisationId().equals(pr.getOrganisationId()))
                .collect(Collectors.toList());
    }

}