class ProjectServiceImpl implements ProjectService {

    @Override
    public boolean userIsPartnerInOrganisationForProject(long projectId, long organisationId, long userId) {
        List<ProjectUserResource> thisProjectUsers = getProjectUsersForProject(projectId);
        List<ProjectUserResource> projectUsersForOrganisation = simpleFilter(thisProjectUsers, user -> user.getOrganisation().equals(organisationId));
        List<ProjectUserResource> projectUsersForUserAndOrganisation = simpleFilter(projectUsersForOrganisation, user -> user.getUser().equals(userId));

        return !projectUsersForUserAndOrganisation.isEmpty();

    }

}