class OrganisationServiceImpl implements OrganisationService {

    @Override
    public Optional<OrganisationResource> getApplicationLeadOrganisation(List<ProcessRoleResource> userApplicationRoles) {
        return userApplicationRoles.stream()
                .filter(uar -> uar.getRoleName().equals(Role.LEADAPPLICANT.getName()))
                .map(uar -> organisationRestService.getOrganisationById(uar.getOrganisationId()).getSuccess())
                .findFirst();
    }

    public  OrganisationServiceImpl(OrganisationRestService organisationRestService,
                                   UserRestService userRestService, UserService userService);

}