DefaultCouchDBDocumentCollectionManager implements CouchDBDocumentCollectionManager { @Override public Stream<DocumentEntity> select(DocumentQuery query) { Objects.requireNonNull(query, "query is required"); return connector.select(query); } DefaultCouchDBDocumentCollectionManager(CouchDBHttpClient connector); @Override DocumentEntity insert(DocumentEntity entity); @Override DocumentEntity insert(DocumentEntity entity, Duration ttl); @Override Iterable<DocumentEntity> insert(Iterable<DocumentEntity> entities); @Override Iterable<DocumentEntity> insert(Iterable<DocumentEntity> entities, Duration ttl); @Override DocumentEntity update(DocumentEntity entity); @Override Iterable<DocumentEntity> update(Iterable<DocumentEntity> entities); @Override void delete(DocumentDeleteQuery query); @Override Stream<DocumentEntity> select(DocumentQuery query); @Override long count(); @Override long count(String documentCollection); @Override void close();  }
@Test public void shouldSelectEmptyResult() { DocumentQuery query = select().from(COLLECTION_NAME).where("no_field").eq("not_found").build(); List<DocumentEntity> entities = entityManager.select(query).collect(Collectors.toList()); assertTrue(entities.isEmpty()); }