Add test for CodeStatistics