Added test for invalid prioritization in ElggPriorityList in some cases

+ fixed mocking of the session for Entity tests