refactored test cases of priority queue