Minor refactoring that fixes a TODO.

Moving the construction of the Test Environment from a static method to the constructor of the class itself.