public void testSum() {
DomainObject o = qb.createQueryDefinition(Order.class);
DomainObject l = o.join("lineItems");
DomainObject c = o.join("customer");
c.where(c.get("lastName").equal("Smith").and(c.get("firstName").
equal("John"))).select(l.get("price").sum());
String jpql = "select SUM(l.price)" +
" from Order o join o.lineItems l JOIN o.customer c" +
" where c.lastName = 'Smith' and c.firstName = 'John'";