public void testCoGroupWithGroupOrder() {
// construct the plan
FileDataSource source1 = new FileDataSource(new DummyInputFormat(), IN_FILE, "Source1");
FileDataSource source2 = new FileDataSource(new DummyInputFormat(), IN_FILE, "Source2");
CoGroupOperator coGroup = CoGroupOperator.builder(new DummyCoGroupStub(), IntValue.class, 3, 6)
.keyField(LongValue.class, 0, 0)
.name("CoGroup").input1(source1).input2(source2).build();
Ordering groupOrder1 = new Ordering(5, StringValue.class, Order.DESCENDING);
Ordering groupOrder2 = new Ordering(1, StringValue.class, Order.DESCENDING);
groupOrder2.appendOrdering(4, DoubleValue.class, Order.ASCENDING);
coGroup.setGroupOrderForInputOne(groupOrder1);
coGroup.setGroupOrderForInputTwo(groupOrder2);
FileDataSink sink = new FileDataSink(new DummyOutputFormat(), OUT_FILE, coGroup, "Sink");
Plan plan = new Plan(sink, "Reduce Group Order Test");
plan.setDefaultParallelism(DEFAULT_PARALLELISM);