add ability to write environment properties

This test and the next test are completely similar -- unify them via parametrization