New tests for env factory