Add UpdatePriority method. Add IPriorityQueue. Extract common functional test to a separate file.