docs: public void registerCommand(String node, final String name, LocalCommandFactory factory) {
          AdHocCommandInfo commandInfo = new AdHocCommandInfo(node, name, connection().getUser(), factory);
  
          commands.put(node, commandInfo);
          // Set the NodeInformationProvider that will provide information about
          // the added command
          serviceDiscoveryManager.setNodeInformationProvider(node,
                  new AbstractNodeInformationProvider() {
                      @Override
                      public List<String> getNodeFeatures() {
                          List<String> answer = new ArrayList<>();
                          answer.add(NAMESPACE);
                          // TODO: check if this service is provided by the
                          // TODO: current connection.
                          answer.add("jabber:x:data");
                          return answer;
                      }
                      @Override
                      public List<DiscoverInfo.Identity> getNodeIdentities() {
                          List<DiscoverInfo.Identity> answer = new ArrayList<>();
                          DiscoverInfo.Identity identity = new DiscoverInfo.Identity(
                                  "automation", name, "command-node");
                          answer.add(identity);
                          return answer;
                      }
                  });
      }