@Test
public void testAggregation() {

	final ArrayNode<IJsonNode> input = new ArrayNode<IJsonNode>();
	input.add(createObjectNode("key", 1, "value", 11));
	input.add(createObjectNode("key", 2, "value", 24));
	input.add(createObjectNode("key", 3, "value", 33));
	input.add(createObjectNode("key", 2, "value", 25));
	input.add(createObjectNode("key", 1, "value", 12));
	final GroupingExpression aggExpression =
		new GroupingExpression(new ObjectAccess("key"), createFunctionCall(CoreFunctions.SUM,
			new ArrayProjection(new ObjectAccess("value"))));
	final IJsonNode result = aggExpression.evaluate(input);
	final IArrayNode<?> expected = JsonUtil.createArrayNode(23, 49, 33);
	Assert.assertEquals(expected, result);
}