AbstractEnvironment extends EIDefaultImpl.
Therefore it inherits the freePair(agent,entity) function
freePair removes its references to the entity (from LinkedList? entities and ConcurrentHashMap<String, HashSet> agentsToEntities)
(BTW interesting but useless attempt here at making EIDefaultImpl thread safe by using ConcurrentHashMap??)
However AbstractEnvironment maintains its own copy of the existing entities: Map<String, Object> entities.
Because AbstractEnvironment never updates its copy when freePair is called, this results in an inconsistent state in AbstractEnvironment. For example, AbstractEnvironment#getEntity will still return the non-removed entity.