plan.connect(l3, f5);
plan.connect(f5, join);
OperatorPlan pattern = new SillyPlan();
Operator op1 = new OP_Load("mmm1", pattern);
Operator op2 = new OP_Filter("mmm2", pattern);
Operator op3 = new OP_Join("mmm3", pattern);
pattern.add(op1);
pattern.add(op2);
pattern.add(op3);
pattern.connect(op1, op3);
pattern.connect(op2, op3);
Rule r = new SillyRule("basic", pattern);
List<OperatorPlan> l = r.match(plan);
assertEquals(1, l.size());
OperatorPlan match = l.get(0);
assertEquals(match.size(), 3);
assertEquals(match.getSinks().size(), 1);
assertEquals(match.getSinks().get(0), join);
assertEquals(match.getSources().size(), 2);
assertTrue(match.getSources().get(0).getClass().equals(OP_Load.class) || match.getSources().get(0).equals(f5) );
assertTrue(match.getSources().get(1).getClass().equals(OP_Load.class) || match.getSources().get(1).equals(f5) );
assertNotSame(match.getSources().get(0), match.getSources().get(1));
}