//check that the load's required fields is null
LOLoad loada = (LOLoad) lp.getRoots().get(0);
List<RequiredFields> loadaRequiredFields = loada.getRequiredFields();
assertTrue(loadaRequiredFields.size() == 1);
RequiredFields requiredField = loadaRequiredFields.get(0);
assertTrue(requiredField.needNoFields() == true);
assertTrue(requiredField.needAllFields() == false);
assertTrue(requiredField.getFields() == null);
//check cogroup required fields
LOCogroup cogroup = (LOCogroup)lp.getSuccessors(loada).get(0);
List<RequiredFields> cogroupRequiredFields = cogroup.getRequiredFields();
assertTrue(cogroupRequiredFields.size() == 1);
requiredField = cogroupRequiredFields.get(0);
assertTrue(requiredField.needNoFields() == false);
assertTrue(requiredField.needAllFields() == true);
assertTrue(requiredField.getFields() == null);
//check that the foreach required fields contain [<0, 1>]
LOForEach foreach = (LOForEach)lp.getLeaves().get(0);
List<RequiredFields> foreachRequiredFields = foreach.getRequiredFields();
assertTrue(foreachRequiredFields.size() == 1);
requiredField = foreachRequiredFields.get(0);
assertTrue(requiredField.needNoFields() == false);
assertTrue(requiredField.needAllFields() == false);
List<Pair<Integer, Integer>> fields = requiredField.getFields();
assertTrue(fields.size() == 1);
assertTrue(fields.get(0).first == 0);
assertTrue(fields.get(0).second == 1);
}