Refactored to use a spec default value for parameter and added test coverage