private static void addRoutingTable(RoutingSpec routing, RoutingTableSpec from) {
        RoutingTableSpec to = getRoutingTable(routing, from.getProtocol());
        if (to != null) {
            Set<String> names = new HashSet<>();
            for (int i = 0, len = to.getNumHops(); i < len; ++i) {
                names.add(to.getHop(i).getName());
            }
            for (int i = 0, len = from.getNumHops(); i < len; ++i) {
                HopSpec hop = from.getHop(i);
                if (!names.contains(hop.getName())) {
                    to.addHop(hop);
                }
            }

            names.clear();
            for (int i = 0, len = to.getNumRoutes(); i < len; ++i) {
                names.add(to.getRoute(i).getName());
            }
            for (int i = 0, len = from.getNumRoutes(); i < len; ++i) {
                RouteSpec route = from.getRoute(i);
                if (!names.contains(route.getName())) {
                    to.addRoute(route);
                }
            }
        } else {
            routing.addTable(from);
        }
    }
Adds the given routing table to the given routing spec. This method will not copy hops or routes that are already
defined in the target table.

@param routing the routing spec to add to
@param from    the table to copy content from
config-model/src/main/java/com/yahoo/vespa/model/routing/Routing.java