Test that package_stub errors when invalid package is given