private Map<Resource, List<ResourceAllocation<?>>> eachWithAllocations(
List<Resource> allResources) {
Map<Resource, List<ResourceAllocation<?>>> result = new LinkedHashMap<Resource, List<ResourceAllocation<?>>>();
for (Resource resource : allResources) {
IAllocationCriteria criteria = and(onInterval(),
relatedToResource(resource));
result.put(resource, ResourceAllocation
.sortedByStartDate(doReplacementsIfNeeded(
resourceAllocationDAO.findAllocationsRelatedTo(
getCurrentScenario(), resource,