add ability to write environment properties

What's that test fore? Cant see how it is related to the feature.