Ranking Unit Test

 * Refactored the Community unit test a bit.
 * Refactored test utils