Test clone_environment