public void retrieveDocuments() throws DocumentRetrieverException {
        boolean first = true;
        String route = params.cluster.isEmpty() ? params.route : resolveClusterRoute(params.cluster);

        MessageBusParams messageBusParams = createMessageBusParams(params.configId, params.timeout, route);
        documentAccess = documentAccessFactory.createDocumentAccess(messageBusParams);
        session = documentAccess.createSyncSession(new SyncParameters.Builder().build());
        int trace = params.traceLevel;
        if (trace > 0) {
            session.setTraceLevel(trace);
        }

        Iterator<String> iter = params.documentIds;
        if (params.jsonOutput && !params.printIdsOnly) {
            System.out.println('[');
        }
        while (iter.hasNext()) {
            if (params.jsonOutput && !params.printIdsOnly) {
                if (!first) {
                    System.out.println(',');
                } else {
                    first = false;
                }
            }
            String docid = iter.next();
            Message msg = createDocumentRequest(docid);
            Reply reply = session.syncSend(msg);
            printReply(reply);
        }
        if (params.jsonOutput && !params.printIdsOnly) {
            System.out.println(']');
        }
    }
@Test
    void testEmptyClusterList() throws DocumentRetrieverException {
        Throwable exception = assertThrows(DocumentRetrieverException.class, () -> {

            ClientParameters params = createParameters()
                    .setCluster("invalidclustername")
                    .build();

            DocumentRetriever documentRetriever = createDocumentRetriever(params);
            documentRetriever.retrieveDocuments();
        });
        assertTrue(exception.getMessage().contains("The Vespa cluster does not have any content clusters declared."));
    }