Add tests for Stats.maxBy and Stats.minBy