@Test
public void evaluateAggregateArithmetic(){

	FieldName name = FieldName.create("x");
	List<Integer> values = Arrays.asList(1, 2, 3);
	Aggregate aggregate = new Aggregate(name, Aggregate.Function.COUNT);
	assertEquals(3, evaluate(aggregate, name, values));
	aggregate.setFunction(Aggregate.Function.SUM);
	assertEquals(6, evaluate(aggregate, name, values));
	aggregate.setFunction(Aggregate.Function.AVERAGE);
	assertEquals(2d, evaluate(aggregate, name, values));
}