Added tests for Environment functions