Add reduceTest util