Add some tests to environment controller