Amend unit tests to match the latest changes in DNS (tickets 2627, 2628) and hardened exception error message checks.