@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."));
    }
Test class for {@link DocumentRetriever}

@author bjorncs
vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java