### Question:
InMemoryMockDocumentSearchEngine extends InMemoryDocumentSearchEngine implements Resettable { public boolean containsExactly(final Collection<Document> documents) { return allDocuments.containsAll(documents) && allDocuments.size() == documents.size(); } InMemoryMockDocumentSearchEngine(); boolean contains(final Document document); boolean containsExactly(final Collection<Document> documents); @SuppressWarnings("unchecked") @Override DocumentSearchResponse<T> search(final Query query, final Integer start,
            final Integer size, final Class<T> documentClass, final SearchOptions searchOptions); SearchExpectation when(final Query query, final Integer start, final Integer size,
            final Class<? extends Document> documentClass, final SearchOptions searchOptions); @Override void reset();  }### Answer:
@Test public void shouldVerifyContainsExactly_withMultipleDocuments() throws Exception { final Document document1 = mock(Document.class); final Document document2 = mock(Document.class); final Document document3 = mock(Document.class); final InMemoryMockDocumentSearchEngine documentSearchEngine = new InMemoryMockDocumentSearchEngine(); documentSearchEngine.update(document1); documentSearchEngine.update(document2); documentSearchEngine.update(document3); final boolean containsDocuments = documentSearchEngine .containsExactly(Arrays.asList(document1, document2, document3)); assertTrue(containsDocuments); }