Order validOrder = createValidOrder();
OrderLineGroup container = OrderLineGroup.create();
validOrder.add(container);
container.setName("bla");
container.setCode("000000000");
OrderLine son = createValidLeaf("bla", "132");
container.add(son);
AdvanceMeasurement advanceMeasurement = createValidAdvanceMeasurement();
AdvanceType advanceTypeA = createAndSaveType("tipoA");
AdvanceType advanceTypeB = createAndSaveType("tipoB");
DirectAdvanceAssignment advanceAssignmentA = createValidAdvanceAssignment(true);
advanceAssignmentA.setAdvanceType(advanceTypeA);
DirectAdvanceAssignment advanceAssignmentB = createValidAdvanceAssignment(false);
advanceAssignmentB.setAdvanceType(advanceTypeB);
OrderElementTest
.removeReportGlobalAdvanceFromChildrenAdvance(container);
container.addAdvanceAssignment(advanceAssignmentA);
son.addAdvanceAssignment(advanceAssignmentB);
advanceAssignmentA.addAdvanceMeasurements(advanceMeasurement);
advanceAssignmentB.addAdvanceMeasurements(advanceMeasurement);
}