Added test for environment update

please review it
thanks