test environment: refactoring