Functional test refactored.