Refs #4915 - Added test for invalid prioritization in ElggPriorityList in some cases

+ fixed mocking of the session for Entity tests

Refs #4915