Updated tests to mimic the Pkg.generate function.