Added tests for mapreduce