/* Create a CostCategory. */
CostCategory costCategory = createCostCategory();
/* Create resource DTOs. */
MachineDTO m1 = new MachineDTO("name", "desc");
ResourcesCostCategoryAssignmentDTO a1m1 = new ResourcesCostCategoryAssignmentDTO(
' ' + costCategory.getName().toUpperCase() + ' ', getDate(2001,
1, 1), null);
m1.resourcesCostCategoryAssignments.add(a1m1);
m1.resourcesCostCategoryAssignments
.add(new ResourcesCostCategoryAssignmentDTO(costCategory
.getName(), getDate(2000, 1, 1), getDate(2000, 4, 1)));
MachineDTO m2 = new MachineDTO("name", "desc");
m2.resourcesCostCategoryAssignments
.add(new ResourcesCostCategoryAssignmentDTO(a1m1.code,
costCategory.getName().toUpperCase(), getDate(2001, 1,
1), null)); // Repeated assignment code
// (used by another machine).
m2.resourcesCostCategoryAssignments
.add(new ResourcesCostCategoryAssignmentDTO(null, costCategory
.getName().toUpperCase(), getDate(2000, 1, 1), getDate(
2000, 4, 1))); // Missing
// assignment code (autogenerated code).
MachineDTO m3 = new MachineDTO("name", "desc");
ResourcesCostCategoryAssignmentDTO a1m3 = new ResourcesCostCategoryAssignmentDTO(
costCategory.getName(), getDate(2001, 1, 1), null);
m3.resourcesCostCategoryAssignments.add(a1m3);
m3.resourcesCostCategoryAssignments
.add(new ResourcesCostCategoryAssignmentDTO(a1m3.code, // Repeated