Added ability to override the message returned
Added test for defaultMessage parameter