sinks.add(sinkB);
// return the PACT plan
Plan plan = new Plan(sinks, "Plans With Multiple Data Sinks");
OptimizedPlan oPlan = compileNoStats(plan);
// ---------- check the optimizer plan ----------
// number of sinks
Assert.assertEquals("Wrong number of data sinks.", 2, oPlan.getDataSinks().size());
// sinks contain all sink paths
Set<String> allSinks = new HashSet<String>();
allSinks.add(out1Path);
allSinks.add(out2Path);
for (SinkPlanNode n : oPlan.getDataSinks()) {
String path = ((FileDataSink) n.getSinkNode().getPactContract()).getFilePath();
Assert.assertTrue("Invalid data sink.", allSinks.remove(path));
}
// ---------- compile plan to nephele job graph to verify that no error is thrown ----------