Added some unit tests for AnalyticsServiceImpl.