simpleMapReduce(MapReduce.OutputType.REPLACE, resultColl.getName());
}
private void simpleMapReduce(MapReduce.OutputType outputType,
String collection) {
coll.insert(new MockObject("foo", 10));
coll.insert(new MockObject("foo", 15));
coll.insert(new MockObject("bar", 5));
MapReduceOutput<Simple, String> output = coll
.mapReduce(MapReduce
.build("function() {emit(this.string, this.integer);}",
"function(k, vals) {var sum=0;for(var i in vals) sum += vals[i];return sum;}",