Fix compile warning

* Move unused function to test