new DateTime(writtenEvaluationEndTime.getTime()).withSecondOfMinute(0).withMillisOfSecond(0);
// YearMonthDay endYMD = endDateTime.toYearMonthDay();
for (Occupation occupation : allocatableSpace.getOccupationSet()) {
if (occupation instanceof EventSpaceOccupation) {
EventSpaceOccupation eventSpaceOccupation = (EventSpaceOccupation) occupation;
List<Interval> intervals =
eventSpaceOccupation.getEventSpaceOccupationIntervals(beginDateTime, endDateTime);
intervalCount += intervals.size();
if (intervalCount > 1) {
throw new DomainException("error.noRoom", allocatableSpace.getName());
}
}