Add tests for map-reduce using query and limit