assertEquals("John", list.get(0).getName());
assertEquals("Spider", list.get(1).getName());
}
public void testSampleDomainQuery2() throws Exception {
QueryFactory qf = Search.getQueryFactory(remoteCache);
// all male users, but this time retrieved in a twisted manner
Query q = qf.from(User.class)
.not(qf.having("gender").eq(User.Gender.FEMALE))
.and(qf.not().not(qf.having("gender").eq(User.Gender.MALE)))
.toBuilder().build();
List<User> list = q.list();
assertEquals(2, list.size());
assertEquals("John", list.get(0).getName());