Add tests for function autoloading