class UserUpdater {

    List<LdapUserNode> getChildNodesInLevelOrder(@NonNull LdapUserNode node, @NonNull Map<String, LdapUserNode> dnNodeMap) {
        var childNodesInLevelOrder = new ArrayList<LdapUserNode>();
        var childDnDeque = new LinkedList<>(node.getDirectReportsDn());

        while(!childDnDeque.isEmpty()) {
            var childDn = childDnDeque.removeFirst();

            if(!dnNodeMap.containsKey(childDn)) {
                var message = String.format("Child node with DN '%s' not found!", childDn);

                throw new IllegalArgumentException(message);
            }

            var childNode = dnNodeMap.get(childDn);
            childDnDeque.addAll(childNode.getDirectReportsDn());
            childNodesInLevelOrder.add(childNode);
        }

        return childNodesInLevelOrder;
    }

    public  UserUpdater(HierarchyTreeNodeRepository hierarchyTreeNodeRepo,
                       RepositoryUserService repoUserService,
                       UserDataRepository userDataRepo,
                       LdapAdapter ldapAdapter,
                       List<Normalizer<UserData>> normalizers);

}