public void testBetween2() throws Exception {
QueryFactory qf = Search.getQueryFactory(remoteCache);
// all the transactions that happened in January 2013
Query q = qf.from(Transaction.class)
.having("date").between(DATE_FORMAT.parse("2013-01-01").getTime(), DATE_FORMAT.parse("2013-01-31").getTime()).includeUpper(false)
.toBuilder().build();
List<Transaction> list = q.list();
assertEquals(3, list.size());
for (Transaction t : list) {
assertTrue(t.getDate() < DATE_FORMAT.parse("2013-01-31").getTime());
assertTrue(t.getDate() >= DATE_FORMAT.parse("2013-01-01").getTime());
}