Added ApplicationSpec helper and refactored test specs