Add unit tests for statistics service