public ReadQuery getQueryForTest() { ReportQuery testQuery = new ReportQuery(); testQuery.setReferenceClass(Employee.class); ExpressionBuilder employees = new ExpressionBuilder(); Expression exp = employees.get("firstName").like("B%"); testQuery.setSelectionCriteria(exp); testQuery.cacheQueryResults(); testQuery.addAttribute("firstName"); return testQuery; }