starting unit and functional test refactoring