boolean reportGlobalAdvance, BigDecimal maxValue, LocalDate date1,
BigDecimal value1, LocalDate date2, BigDecimal value2,
LocalDate five, BigDecimal date3)
throws DuplicateValueTrueReportGlobalAdvanceException,
DuplicateAdvanceAssignmentForOrderElementException {
DirectAdvanceAssignment advanceAssignment = givenAdvanceAssigement(
maxValue, advanceType);
advanceAssignment.setReportGlobalAdvance(reportGlobalAdvance);
AdvanceMeasurement advanceMeasurement1 = AdvanceMeasurement.create();
advanceMeasurement1.setDate(date1);
advanceMeasurement1.setValue(value1);
advanceMeasurement1.setAdvanceAssignment(advanceAssignment);
AdvanceMeasurement advanceMeasurement2 = AdvanceMeasurement.create();
advanceMeasurement2.setDate(date2);
advanceMeasurement2.setValue(value2);
advanceMeasurement2.setAdvanceAssignment(advanceAssignment);
AdvanceMeasurement advanceMeasurement3 = AdvanceMeasurement.create();
advanceMeasurement3.setDate(five);
advanceMeasurement3.setValue(date3);
advanceMeasurement3.setAdvanceAssignment(advanceAssignment);
orderElement.addAdvanceAssignment(advanceAssignment);
advanceAssignment.addAdvanceMeasurements(advanceMeasurement1);
advanceAssignment.addAdvanceMeasurements(advanceMeasurement2);
advanceAssignment.addAdvanceMeasurements(advanceMeasurement3);
}