refactoring test application