### Question:
IntegerMaxKudaf extends KsqlAggregateFunction<Integer, Integer> { @Override public Merger<String, Integer> getMerger() { return (aggKey, aggOne, aggTwo) -> { return Math.max(aggOne, aggTwo); }; } IntegerMaxKudaf(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 shouldFindCorrectMaxForMerge() { IntegerMaxKudaf integerMaxKudaf = getIntegerMaxKudaf(); Merger<String, Integer> merger = integerMaxKudaf.getMerger(); Integer mergeResult1 = merger.apply("Key", 10, 12); assertThat(mergeResult1, equalTo(12)); Integer mergeResult2 = merger.apply("Key", 10, -12); assertThat(mergeResult2, equalTo(10)); Integer mergeResult3 = merger.apply("Key", -10, 0); assertThat(mergeResult3, equalTo(0)); }