use of com.baeldung.couchbase.async.person.Person in project tutorials by eugenp.
the class PersonCrudServiceIntegrationTest method givenIds_whenReadBulk_thenReturnsOnlyPersonsWithMatchingIds.
@Test
public final void givenIds_whenReadBulk_thenReturnsOnlyPersonsWithMatchingIds() {
List<String> ids = new ArrayList<>();
// add some person documents
for (int i = 0; i < 5; i++) {
ids.add(insertRandomPersonDocument().id());
}
// perform bulk read
List<Person> persons = personService.readBulk(ids);
// check results
for (Person person : persons) {
assertTrue(ids.contains(person.getId()));
}
// cleanup
for (String id : ids) {
bucket.remove(id);
}
}
Aggregations