Add test for loadPackageFunction.