Refactored the StatisticsTest for better reuse.