Add test assertion for DnsException