LocalDate date) {
List<ShareSource> result = new ArrayList<ShareSource>();
for (int i = 0; i < resources.size(); i++) {
List<Share> shares = new ArrayList<Share>();
Resource resource = resources.get(i).resource;
ICalendar calendarForResource = resources.get(i).calendar;
EffortDuration alreadyAssigned = assignedEffortForEachResource
.getAssignedDurationAt(resource, date);
final int alreadyAssignedSeconds = alreadyAssigned.getSeconds();
Integer capacityEachOneSeconds = calendarForResource.asDurationOn(
PartialDay.wholeDay(date), ONE).getSeconds();
final int capacityUnits = resources.get(i).capacityUnits;
assert capacityUnits >= 1;
final int assignedForEach = alreadyAssignedSeconds / capacityUnits;
final int remainder = alreadyAssignedSeconds % capacityUnits;