@Test
 public void testAvgFunction() {
   Entity from = from(Entity.class);
   Query<Integer> select = select(avg(from.getIntegerField()));
   assertEquals("select avg(entity_0.integerField) from Entity entity_0", select.getQuery());
 }
 @Test
 public void testCustomFunctionWithFunction() {
   Entity from = from(Entity.class);
   Query<String> select = select(function("toto", String.class, max(from.getIntegerField())));
   assertEquals("select toto(max(entity_0.integerField)) from Entity entity_0", select.getQuery());
 }