.buildQueryBuilderForClass(Person.class)
.get();
Query allQuery = queryBuilder.all().createQuery();
assert searchManager.getQuery(allQuery, Person.class).list().size() == 3;
person4 = new Person();
person4.setName("New Goat");
person4.setBlurb("Also eats grass");
cache2.putForExternalRead("newGoat", person4);
eventually(new Condition() {
@Override
public boolean isSatisfied() throws Exception {
return cache2.get("newGoat") != null;
}
});
List found = searchManager.getQuery(allQuery, Person.class).list();
AssertJUnit.assertEquals(4, found.size());
assert found.contains(person4);
Person person5 = new Person();
person5.setName("Abnormal Goat");
person5.setBlurb("Plays with grass.");
cache2.putForExternalRead("newGoat", person5);
found = searchManager.getQuery(allQuery, Person.class).list();
AssertJUnit.assertEquals(4, found.size());