withTx(tm(), new Callable<Void>() {
@Override
public Void call() throws Exception {
cache.remove("1"); // cache will now be out of sync with the index
Query query = createQueryBuilder().keyword().onField("bar").matching("1").createQuery();
ResultIterator iterator = searchManager.getQuery(query).iterator(new FetchOptions().fetchMode(EAGER));
assertFalse(iterator.hasNext());
try {
iterator.next();
fail("Expected NoSuchElementException");
} catch (NoSuchElementException e) {