Adds test for #7071. (ced98f1870d17a2766d671d25eb613f708255e1c)
dns: resolver: validate arguments

Closes #7070. Mitigates C++-land assertion error; adds tests
accordingly.