/* Create a criterion type. */
CriterionType ct = createCriterionType(ResourceEnum.MACHINE);
/* Create a resource DTO. */
MachineDTO m1 = new MachineDTO("name", "desc");
CriterionSatisfactionDTO cs1m1 =
new CriterionSatisfactionDTO(
' ' + ct.getName().toUpperCase() + // Upper case and blank
' ', " C1 ", // spaces intentionally
// added (OK).
getDate(2001, 1, 1), getDate(2001, 2, 1));
m1.criterionSatisfactions.add(cs1m1);
m1.criterionSatisfactions.add(
new CriterionSatisfactionDTO(ct.getName(), "c2",
getDate(2001, 1, 1), null));
MachineDTO m2 = new MachineDTO("name", "desc");
m2.criterionSatisfactions.add(
new CriterionSatisfactionDTO(cs1m1.code, ct.getName(), "c1",
getDate(2001, 1, 1), null)); // Repeated criterion satisfaction
// code (used by another machine).
m2.criterionSatisfactions.add(
new CriterionSatisfactionDTO(null, ct.getName(), "c2",
getDate(2001, 1, 1), null)); // Missing criterion satisfaction
// code.(autogenerated code)
MachineDTO m3 = new MachineDTO("name", "desc");
CriterionSatisfactionDTO cs1m3 =
new CriterionSatisfactionDTO(ct.getName(), "c1",
getDate(2001, 1, 1), getDate(2001, 2, 1));
m3.criterionSatisfactions.add(cs1m3);
m3.criterionSatisfactions.add(