class RepositoryUserService implements UserService {

    @Override
    public Map<User, Boolean> usersAreManagers(@NonNull Set<User> users) {
        var userManagerMap = hierarchyTreeNodeRepo.findByUserIn(users).stream()
                .collect(Collectors.toMap(
                        HierarchyTreeNode::getUser,
                        HierarchyTreeNode::isManagingUser
                ));

        if(userManagerMap.keySet().size() != users.size()) {
            throw new IllegalStateException("Hierarchy for some users not present!");
        }

        return userManagerMap;
    }

    public  RepositoryUserService(UserRepository userRepo,
                                 UserDataRepository dataRepo,
                                 LdapAdapter ldapAdapter,
                                 HierarchyTreeNodeRepository hierarchyTreeNodeRepo,
                                 HibernateSearchService hibernateSearchService);

}