Remove unused function
Fix test compilation issue