Refactored ApplicationTest