CacheQuery implements Query { private CacheQuery() { } private  CacheQuery(); static Query newQuery(); Query setCriteria(Criteria criteria); Criteria getCriteria(); Query setFilter(Filter filter); Filter getFilter();  }
@Test public void cacheQuery() { Criteria etCriteria = new ETCriteria("id", 3); Filter ltFilter = new LTFilter("age", 18); Query query = CacheQuery.newQuery().setCriteria(etCriteria).setFilter(ltFilter); assertEquals(etCriteria, query.getCriteria()); assertEquals(ltFilter, query.getFilter()); }