Add unit test for rank and recommendation