public class TestMinimumAggregator {
@Test
public void testMinimumAggregatorTopTenCombine() {
final List<EmitValue> values = new ArrayList<EmitValue>();
values.add(new EmitValue("two", 200));
values.add(new EmitValue("thirteen", 1300));
values.add(new EmitValue("six", 600));
values.add(new EmitValue("four", 400));
values.add(new EmitValue("seven", 700));
values.add(new EmitValue("fourteen", 1400));
values.add(new EmitValue("three", 300));
values.add(new EmitValue("nine", 900));
values.add(new EmitValue("one", 100));
values.add(new EmitValue("twelve", 1200));
values.add(new EmitValue("ten", 1000));
values.add(new EmitValue("eleven", 1100));
values.add(new EmitValue("five", 500));
values.add(new EmitValue("eight", 800));
final ReduceDriver<EmitKey, EmitValue, EmitKey, EmitValue> reduceDriver = new ReduceDriver<EmitKey, EmitValue, EmitKey, EmitValue>(
new MinimumSizzleCombiner());
reduceDriver.setInput(new EmitKey("test"), values);
reduceDriver.addOutput(new EmitKey("test"), new EmitValue("one", 100.0));
reduceDriver.addOutput(new EmitKey("test"), new EmitValue("two", 200.0));
reduceDriver.addOutput(new EmitKey("test"), new EmitValue("three", 300.0));
reduceDriver.addOutput(new EmitKey("test"), new EmitValue("four", 400.0));
reduceDriver.addOutput(new EmitKey("test"), new EmitValue("five", 500.0));
reduceDriver.addOutput(new EmitKey("test"), new EmitValue("six", 600.0));
reduceDriver.addOutput(new EmitKey("test"), new EmitValue("seven", 700.0));
reduceDriver.addOutput(new EmitKey("test"), new EmitValue("eight", 800.0));
reduceDriver.addOutput(new EmitKey("test"), new EmitValue("nine", 900.0));
reduceDriver.addOutput(new EmitKey("test"), new EmitValue("ten", 1000.0));
reduceDriver.runTest();
}