You should add a test where you `aggregate` an empty RDD, because that final `reduce` will fail in this case. You need to use `fold(zeroValue, combOp)` instead.