@Test
    void testMultipleMessages() throws DocumentRetrieverException {
        ClientParameters params = createParameters()
                .setDocumentIds(asIterator(DOC_ID_1, DOC_ID_2, DOC_ID_3))
                .build();

        when(mockedSession.syncSend(any())).thenReturn(
                createDocumentReply(DOC_ID_1),
                createDocumentReply(DOC_ID_2),
                createDocumentReply(DOC_ID_3));

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

        verify(mockedSession, times(3)).syncSend(any());
        assertContainsDocument(DOC_ID_1);
        assertContainsDocument(DOC_ID_2);
        assertContainsDocument(DOC_ID_3);
    }
Test class for {@link DocumentRetriever}

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