protected static String resolveClusterRoute(ClusterList clusters, String wantedCluster) {
        if (clusters.getStorageClusters().size() == 0) {
            throw new IllegalArgumentException("Your Vespa cluster does not have any content clusters " +
                                               "declared. Visiting feature is not available.");
        }

        ClusterDef found = null;

        String names = clusters.getStorageClusters()
                               .stream().map(c -> "'" + c.getName() + "'")
                               .collect(Collectors.joining(", "));
        if (wantedCluster != null) {
            for (ClusterDef c : clusters.getStorageClusters()) {
                if (c.getName().equals(wantedCluster)) {
                    found = c;
                }
            }
            if (found == null) {
                throw new IllegalArgumentException("Your vespa cluster contains the content clusters " +
                                                   names + ", not '" + wantedCluster +
                                                   "'. Please select a valid vespa cluster.");
            }
        } else if (clusters.getStorageClusters().size() == 1) {
            found = clusters.getStorageClusters().get(0);
        } else {
            throw new IllegalArgumentException("Your vespa cluster contains the content clusters " +
                                               names + ". Please use the -c option to select one of them as a target for visiting.");
        }

        return found.getRoute();
    }
If not specified in options, will get form cluster list
vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java