Queried rank and IDs Map is sorted in TestServlet