@Test
    void testShowDocSize() throws DocumentRetrieverException {
        ClientParameters params = createParameters()
                .setDocumentIds(asIterator(DOC_ID_1))
                .setShowDocSize(true)
                .build();

        Document document = new Document(DataType.DOCUMENT, new DocumentId(DOC_ID_1));
        when(mockedSession.syncSend(any())).thenReturn(new GetDocumentReply(document));

        DocumentRetriever documentRetriever = createDocumentRetriever(params);
        documentRetriever.retrieveDocuments();

        assertTrue(outContent.toString().contains(String.format("Document size: %d bytes", document.getSerializedSize())));
    }
Test class for {@link DocumentRetriever}

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