What version of Infinispan are you referring to?
This part of the code is the same in 4.1.0-FINAL and 4.2.0-ALPHA2.
Thanks for catching this one and reporting back. I've fixed trunk and 4.2 branch and added a unit test. In fact, all eviction unit tests are using cache eviction listener as of now. Reference JIRA is https://jira.jboss.org/browse/ISPN-674