class ProjectServiceImpl extends AbstractProjectServiceImpl implements ProjectService {

    @Override
    @Transactional
    public ServiceResult<ProjectUser> addPartner(long projectId, long userId, long organisationId) {
        return find(getProject(projectId), getOrganisation(organisationId), getUser(userId)).
                andOnSuccess((project, organisation, user) -> {
                    if (project.getOrganisations(o -> o.getId() == organisationId).isEmpty()) {
                        return serviceFailure(badRequestError("project does not contain organisation"));
                    }
                    return addProjectPartner(project, user, organisation);
                });
    }

}