Add env and it's related test.