PhysicalOperator poGen = new POForEach(new OperatorKey("", r.nextLong()), 1, inputs, toBeFlattened);
//DataBag obtained = bf.newDefaultBag();
for (Tuple t : cogroup) {
/*plan1.attachInput(t);
plan2.attachInput(t);*/
poGen.attachInput(t);
Result output = poGen.getNextTuple();
while(output.result != null && output.returnStatus != POStatus.STATUS_EOP) {
//System.out.println(output.result);
Tuple tObtained = (Tuple) output.result;
assertTrue(tObtained.get(0).toString().equals(tObtained.get(2).toString()));