lpt.buildPlan( "C = FILTER B BY $1 == 'French';" );
lpt.buildPlan( "D = FILTER C BY $2 == 'Europe';" );
org.apache.pig.impl.logicalLayer.LogicalPlan plan = lpt.buildPlan( "E = STORE D INTO 'empty';" );
LogicalPlan newLogicalPlan = migrateAndOptimizePlan( plan );
Operator load = newLogicalPlan.getSources().get( 0 );
Assert.assertTrue( load instanceof LOLoad );
Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );
Assert.assertTrue( fe1 instanceof LOForEach );
Operator fe2 = newLogicalPlan.getSuccessors( fe1 ).get( 0 );
Assert.assertTrue( fe2 instanceof LOForEach );
Operator filter = newLogicalPlan.getSuccessors( fe2 ).get( 0 );
Assert.assertTrue( filter instanceof LOFilter );
Operator filter2 = newLogicalPlan.getSuccessors( filter ).get( 0 );
Assert.assertTrue( filter2 instanceof LOFilter );
}