Unit test for rating