### Question:
IntegerSumKudaf extends KsqlAggregateFunction<Integer, Integer> { @Override public Integer aggregate(Integer currentVal, Integer currentAggVal) { if (currentVal == null) { return currentAggVal; } return currentVal + currentAggVal; } IntegerSumKudaf(int argIndexInValue); @Override Integer aggregate(Integer currentVal, Integer currentAggVal); @Override Merger<String, Integer> getMerger(); @Override KsqlAggregateFunction<Integer, Integer> getInstance(Map<String, Integer> expressionNames,
                                                           List<Expression> functionArguments);  }### Answer:
@Test public void shouldComputeCorrectSum() { IntegerSumKudaf integerSumKudaf = getIntegerSumKudaf(); int[] values = new int[]{3, 5, 8, 2, 3, 4, 5}; int currentMin = 0; for (int i: values) { currentMin = integerSumKudaf.aggregate(i, currentMin); } assertThat(30, equalTo(currentMin)); }