public void resetTrailingEntityMap(Solution workingSolution) {
   if (hasChainedVariables) {
     List<Object> entityList = solutionDescriptor.getEntityList(workingSolution);
     for (Map.Entry<PlanningVariableDescriptor, Map<Object, Set<Object>>> entry :
         trailingEntitiesMap.entrySet()) {
       entry.setValue(new IdentityHashMap<Object, Set<Object>>(entityList.size()));
     }
     // TODO Remove when all starting entities call afterEntityAdded too
     for (Object entity : entityList) {
       insertInTrailingEntityMap(
           solutionDescriptor.getEntityDescriptor(entity.getClass()), entity);
     }
   }
 }